From 611ec94e27c211452a3098d014709d519b954e51 Mon Sep 17 00:00:00 2001 From: abd Date: Wed, 7 Feb 2007 11:48:21 +0000 Subject: [PATCH] Merging with WPdev --- src/BREPExport/BREPExport.cxx | 22 +- src/BREPImport/BREPImport.cxx | 18 +- src/BasicGUI/BasicGUI.cxx | 4 +- src/BasicGUI/BasicGUI.h | 10 +- src/BasicGUI/BasicGUI_ArcDlg.h | 10 +- src/BasicGUI/BasicGUI_CircleDlg.h | 12 +- src/BasicGUI/BasicGUI_CurveDlg.h | 10 +- src/BasicGUI/BasicGUI_EllipseDlg.h | 12 +- src/BasicGUI/BasicGUI_LineDlg.h | 10 +- src/BasicGUI/BasicGUI_MarkerDlg.h | 10 +- src/BasicGUI/BasicGUI_PlaneDlg.h | 10 +- src/BasicGUI/BasicGUI_PointDlg.h | 9 +- src/BasicGUI/BasicGUI_VectorDlg.h | 10 +- src/BasicGUI/BasicGUI_WorkingPlaneDlg.h | 10 +- src/BasicGUI/Makefile.in | 6 +- src/BlocksGUI/BlocksGUI.cxx | 4 +- src/BlocksGUI/BlocksGUI.h | 4 +- src/BlocksGUI/BlocksGUI_BlockDlg.h | 4 +- src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx | 3 +- src/BlocksGUI/BlocksGUI_ExplodeDlg.h | 4 +- src/BlocksGUI/BlocksGUI_PropagateDlg.h | 4 +- src/BlocksGUI/BlocksGUI_QuadFaceDlg.h | 4 +- src/BlocksGUI/BlocksGUI_TrsfDlg.h | 4 +- src/BlocksGUI/Makefile.in | 3 +- src/BooleanGUI/BooleanGUI.cxx | 4 +- src/BooleanGUI/BooleanGUI.h | 20 +- src/BooleanGUI/BooleanGUI_Dialog.h | 4 +- src/BuildGUI/BuildGUI.cxx | 4 +- src/BuildGUI/BuildGUI.h | 4 +- src/BuildGUI/BuildGUI_CompoundDlg.h | 4 +- src/BuildGUI/BuildGUI_EdgeDlg.h | 4 +- src/BuildGUI/BuildGUI_FaceDlg.cxx | 21 +- src/BuildGUI/BuildGUI_FaceDlg.h | 4 +- src/BuildGUI/BuildGUI_ShellDlg.h | 4 +- src/BuildGUI/BuildGUI_SolidDlg.h | 4 +- src/BuildGUI/BuildGUI_WireDlg.h | 4 +- src/BuildGUI/Makefile.in | 3 +- src/DisplayGUI/DisplayGUI.cxx | 4 +- src/DisplayGUI/DisplayGUI.h | 12 +- src/DlgRef/DlgRef_1List1Spin1Btn_QTD.h | 10 +- src/DlgRef/DlgRef_1Sel1Check1List_QTD.h | 10 +- src/DlgRef/DlgRef_1Sel1Check_QTD.h | 10 +- src/DlgRef/DlgRef_1Sel1Spin.h | 14 +- src/DlgRef/DlgRef_1Sel1Spin1Check.h | 10 +- src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.h | 4 +- src/DlgRef/DlgRef_1Sel1Spin_QTD.h | 10 +- src/DlgRef/DlgRef_1Sel2Spin.h | 4 +- src/DlgRef/DlgRef_1Sel2Spin_QTD.h | 4 +- src/DlgRef/DlgRef_1Sel3Check_QTD.h | 4 +- src/DlgRef/DlgRef_1Sel3Spin.h | 15 +- src/DlgRef/DlgRef_1Sel3Spin_QTD.h | 10 +- src/DlgRef/DlgRef_1Sel4Spin.h | 4 +- src/DlgRef/DlgRef_1Sel4Spin_QTD.h | 4 +- src/DlgRef/DlgRef_1Sel5Spin.h | 10 +- src/DlgRef/DlgRef_1Sel5Spin_QTD.h | 4 +- src/DlgRef/DlgRef_1Sel_Ext.h | 10 +- src/DlgRef/DlgRef_1Sel_QTD.h | 10 +- src/DlgRef/DlgRef_1Spin.h | 10 +- src/DlgRef/DlgRef_1Spin_QTD.h | 10 +- src/DlgRef/DlgRef_2Sel1Spin.h | 14 +- src/DlgRef/DlgRef_2Sel1Spin2Check.h | 9 +- src/DlgRef/DlgRef_2Sel1Spin2Check_QTD.h | 4 +- src/DlgRef/DlgRef_2Sel1Spin_QTD.h | 10 +- src/DlgRef/DlgRef_2Sel2Spin.h | 15 +- src/DlgRef/DlgRef_2Sel2Spin1Check.h | 10 +- src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.h | 4 +- src/DlgRef/DlgRef_2Sel2Spin_QTD.h | 10 +- src/DlgRef/DlgRef_2Sel3Spin.h | 10 +- src/DlgRef/DlgRef_2Sel3Spin_QTD.h | 10 +- src/DlgRef/DlgRef_2Sel4Spin1Check.h | 9 +- src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.h | 4 +- src/DlgRef/DlgRef_2Sel_QTD.h | 10 +- src/DlgRef/DlgRef_2Spin.h | 10 +- src/DlgRef/DlgRef_2Spin_QTD.h | 10 +- src/DlgRef/DlgRef_3Check_QTD.h | 10 +- src/DlgRef/DlgRef_3Sel1Spin.h | 15 +- src/DlgRef/DlgRef_3Sel3Spin1Check.h | 10 +- src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.h | 4 +- src/DlgRef/DlgRef_3Sel4Spin2Check.h | 10 +- src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.h | 4 +- src/DlgRef/DlgRef_3Sel_QTD.h | 10 +- src/DlgRef/DlgRef_3Spin.h | 15 +- src/DlgRef/DlgRef_3Spin1Check.h | 9 +- src/DlgRef/DlgRef_3Spin1Check_QTD.h | 10 +- src/DlgRef/DlgRef_3Spin_QTD.h | 9 +- src/DlgRef/DlgRef_4Sel1List1Check_QTD.h | 10 +- src/DlgRef/DlgRef_4Sel1List_QTD.h | 4 +- src/DlgRef/DlgRef_6Sel_QTD.h | 10 +- src/DlgRef/DlgRef_Skeleton_QTD.h | 4 +- src/DlgRef/DlgRef_SpinBox.h | 14 +- src/DlgRef/Makefile.in | 13 +- src/DlgRef/UIFiles/ui_to_cxx | 10 +- src/EntityGUI/EntityGUI.cxx | 4 +- src/EntityGUI/EntityGUI.h | 4 +- src/EntityGUI/EntityGUI_1Sel_QTD.h | 4 +- src/EntityGUI/EntityGUI_1Spin.h | 4 +- src/EntityGUI/EntityGUI_1Spin_QTD.h | 4 +- src/EntityGUI/EntityGUI_2Spin.h | 4 +- src/EntityGUI/EntityGUI_2Spin_QTD.h | 4 +- src/EntityGUI/EntityGUI_3Spin.h | 4 +- src/EntityGUI/EntityGUI_3Spin_QTD.h | 4 +- src/EntityGUI/EntityGUI_4Spin.h | 4 +- src/EntityGUI/EntityGUI_4Spin_QTD.h | 4 +- src/EntityGUI/EntityGUI_Dir1_QTD.h | 4 +- src/EntityGUI/EntityGUI_Dir2_QTD.h | 4 +- src/EntityGUI/EntityGUI_Point_QTD.h | 4 +- src/EntityGUI/EntityGUI_Skeleton_QTD.h | 4 +- src/EntityGUI/EntityGUI_SketcherDlg.cxx | 223 ++-- src/EntityGUI/EntityGUI_SketcherDlg.h | 42 +- src/EntityGUI/EntityGUI_SubShapeDlg.h | 4 +- src/EntityGUI/Makefile.in | 2 +- src/GEOM/GEOM_Function.cxx | 101 +- src/GEOM/GEOM_Object.cxx | 121 ++- src/GEOM/GEOM_Object.hxx | 141 +-- src/GEOM/GEOM_PythonDump.hxx | 4 +- src/GEOMAlgo/GEOMAlgo.cdl | 133 ++- src/GEOMAlgo/GEOMAlgo_Algo.cdl | 39 +- src/GEOMAlgo/GEOMAlgo_Algo.hxx | 29 +- src/GEOMAlgo/GEOMAlgo_Algo.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_Algo.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cdl | 38 +- src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx | 31 +- src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.jxx | 18 +- ...taMapIteratorOfDataMapOfPassKeyInteger.hxx | 27 +- ...MapIteratorOfDataMapOfPassKeyInteger_0.cxx | 16 +- ...o_DataMapNodeOfDataMapOfPassKeyInteger.hxx | 38 +- ...DataMapNodeOfDataMapOfPassKeyInteger_0.cxx | 31 +- .../GEOMAlgo_DataMapOfPassKeyInteger.hxx | 37 +- .../GEOMAlgo_DataMapOfPassKeyInteger_0.cxx | 16 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl | 38 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx | 49 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl | 41 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx | 25 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx | 69 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx | 21 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.hxx | 1 + src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cdl | 39 +- src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx | 12 +- src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx | 39 +- src/GEOMAlgo/GEOMAlgo_GlueAnalyser.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_GlueAnalyser.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_Gluer.cdl | 43 +- src/GEOMAlgo/GEOMAlgo_Gluer.cxx | 30 +- src/GEOMAlgo/GEOMAlgo_Gluer.hxx | 69 +- src/GEOMAlgo/GEOMAlgo_Gluer.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_Gluer.jxx | 18 +- ...aMapNodeOfIndexedDataMapOfIntegerShape.hxx | 40 +- ...apNodeOfIndexedDataMapOfIntegerShape_0.cxx | 31 +- ...ndexedDataMapOfPassKeyShapeListOfShape.hxx | 46 +- ...exedDataMapOfPassKeyShapeListOfShape_0.cxx | 39 +- ...dDataMapNodeOfIndexedDataMapOfShapeBox.hxx | 40 +- ...ataMapNodeOfIndexedDataMapOfShapeBox_0.cxx | 31 +- ...ataMapNodeOfIndexedDataMapOfShapeState.hxx | 40 +- ...aMapNodeOfIndexedDataMapOfShapeState_0.cxx | 31 +- .../GEOMAlgo_IndexedDataMapOfIntegerShape.hxx | 47 +- ...EOMAlgo_IndexedDataMapOfIntegerShape_0.cxx | 16 +- ...ndexedDataMapOfPassKeyShapeListOfShape.hxx | 49 +- ...exedDataMapOfPassKeyShapeListOfShape_0.cxx | 24 +- .../GEOMAlgo_IndexedDataMapOfShapeBox.hxx | 47 +- .../GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx | 16 +- .../GEOMAlgo_IndexedDataMapOfShapeState.hxx | 47 +- .../GEOMAlgo_IndexedDataMapOfShapeState_0.cxx | 16 +- ...lgo_ListIteratorOfListOfCoupleOfShapes.hxx | 28 +- ...o_ListIteratorOfListOfCoupleOfShapes_0.cxx | 16 +- .../GEOMAlgo_ListIteratorOfListOfPnt.hxx | 28 +- .../GEOMAlgo_ListIteratorOfListOfPnt_0.cxx | 16 +- ...EOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx | 37 +- ...MAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx | 31 +- src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx | 37 +- .../GEOMAlgo_ListNodeOfListOfPnt_0.cxx | 31 +- .../GEOMAlgo_ListOfCoupleOfShapes.hxx | 56 +- .../GEOMAlgo_ListOfCoupleOfShapes_0.cxx | 16 +- src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx | 56 +- src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx | 16 +- src/GEOMAlgo/GEOMAlgo_PassKey.cdl | 79 +- src/GEOMAlgo/GEOMAlgo_PassKey.cxx | 268 ++--- src/GEOMAlgo/GEOMAlgo_PassKey.hxx | 72 +- src/GEOMAlgo/GEOMAlgo_PassKey.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_PassKey.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cdl | 39 +- src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx | 10 +- src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx | 21 +- src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl | 92 +- src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx | 212 +++- src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx | 78 +- src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cdl | 38 +- src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx | 29 +- src/GEOMAlgo/GEOMAlgo_ShapeAlgo.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_ShapeAlgo.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl | 38 +- src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx | 27 +- src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl | 38 +- src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx | 27 +- src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl | 38 +- src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx | 27 +- src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_State.hxx | 17 +- src/GEOMAlgo/GEOMAlgo_StateCollector.cdl | 38 +- src/GEOMAlgo/GEOMAlgo_StateCollector.hxx | 23 +- src/GEOMAlgo/GEOMAlgo_StateCollector.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_StateCollector.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl | 38 +- src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx | 35 +- src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_Tools.cdl | 43 +- src/GEOMAlgo/GEOMAlgo_Tools.cxx | 15 +- src/GEOMAlgo/GEOMAlgo_Tools.hxx | 41 +- src/GEOMAlgo/GEOMAlgo_Tools.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_Tools.jxx | 16 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl | 38 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx | 25 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx | 18 +- src/GEOMAlgo/GEOMAlgo_WireSolid.cdl | 38 +- src/GEOMAlgo/GEOMAlgo_WireSolid.hxx | 25 +- src/GEOMAlgo/GEOMAlgo_WireSolid.ixx | 16 +- src/GEOMAlgo/GEOMAlgo_WireSolid.jxx | 18 +- ...o_DataMapNodeOfDataMapOfPassKeyInteger.hxx | 37 +- ...aMapNodeOfIndexedDataMapOfIntegerShape.hxx | 37 +- ...ndexedDataMapOfPassKeyShapeListOfShape.hxx | 37 +- ...dDataMapNodeOfIndexedDataMapOfShapeBox.hxx | 37 +- ...ataMapNodeOfIndexedDataMapOfShapeState.hxx | 37 +- ...EOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx | 37 +- .../Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx | 37 +- src/GEOMAlgo/Makefile.in | 117 ++- src/GEOMBase/GEOMBase.cxx | 36 +- src/GEOMBase/GEOMBase.h | 15 +- src/GEOMBase/GEOMBase_Helper.cxx | 18 +- src/GEOMBase/GEOMBase_Helper.h | 15 +- src/GEOMBase/GEOMBase_Skeleton.cxx | 8 +- src/GEOMBase/GEOMBase_Skeleton.h | 14 +- src/GEOMBase/GEOMBase_aParameterDlg.h | 4 +- src/GEOMBase/GEOM_Operation.h | 5 +- src/GEOMBase/Makefile.in | 4 +- src/GEOMClient/GEOM_Client.hxx | 21 +- src/GEOMContext/GEOMContext.cxx | 3 +- src/GEOMContext/GEOMContext.h | 20 +- src/GEOMContext/GEOM_icons.po | 4 + src/GEOMGUI/GEOMGUI.h | 14 +- src/GEOMGUI/GEOMGUI_OCCSelector.cxx | 28 +- src/GEOMGUI/GEOMGUI_OCCSelector.h | 4 +- src/GEOMGUI/GEOMGUI_Selection.h | 4 +- src/GEOMGUI/GEOM_Displayer.cxx | 20 +- src/GEOMGUI/GEOM_Displayer.h | 15 +- src/GEOMGUI/GEOM_images.po | 4 + src/GEOMGUI/GEOM_msg_en.po | 8 +- src/GEOMGUI/GeometryGUI.cxx | 278 ++--- src/GEOMGUI/GeometryGUI.h | 22 +- src/GEOMGUI/GeometryGUI_Swig.cxx | 20 +- src/GEOMGUI/GeometryGUI_Swig.hxx | 10 +- src/GEOMGUI/Makefile.in | 3 +- src/GEOMImpl/GEOMImpl_BooleanDriver.cxx | 69 +- src/GEOMImpl/GEOMImpl_ExportDriver.cxx | 6 +- src/GEOMImpl/GEOMImpl_Gen.hxx | 10 +- src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx | 84 +- src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx | 24 +- src/GEOMImpl/GEOMImpl_IGroupOperations.cxx | 117 ++- src/GEOMImpl/GEOMImpl_IInsertOperations.cxx | 7 +- src/GEOMImpl/GEOMImpl_IRotate.hxx | 15 + src/GEOMImpl/GEOMImpl_IShapesOperations.cxx | 992 ++++++++++++++---- src/GEOMImpl/GEOMImpl_IShapesOperations.hxx | 65 ++ .../GEOMImpl_ITransformOperations.cxx | 119 +++ .../GEOMImpl_ITransformOperations.hxx | 11 + src/GEOMImpl/GEOMImpl_ImportDriver.cxx | 10 +- src/GEOMImpl/GEOMImpl_PartitionDriver.cxx | 174 ++- src/GEOMImpl/GEOMImpl_RotateDriver.cxx | 26 + src/GEOMImpl/GEOMImpl_ShapeDriver.cxx | 49 +- src/GEOMImpl/GEOMImpl_Types.hxx | 11 +- src/GEOMImpl/Makefile.in | 3 +- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 57 +- src/GEOMToolsGUI/GEOMToolsGUI.h | 16 +- src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx | 8 +- src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h | 10 +- .../GEOMToolsGUI_TransparencyDlg.cxx | 8 +- .../GEOMToolsGUI_TransparencyDlg.h | 10 +- src/GEOM_I/GEOM_Gen_i.cc | 80 +- src/GEOM_I/GEOM_Gen_i.hh | 4 +- src/GEOM_I/GEOM_I3DPrimOperations_i.hh | 3 +- src/GEOM_I/GEOM_IBasicOperations_i.hh | 3 +- src/GEOM_I/GEOM_IBlocksOperations_i.hh | 3 +- src/GEOM_I/GEOM_IBooleanOperations_i.cc | 116 +- src/GEOM_I/GEOM_IBooleanOperations_i.hh | 15 +- src/GEOM_I/GEOM_ICurvesOperations_i.hh | 3 +- src/GEOM_I/GEOM_IGroupOperations_i.hh | 3 +- src/GEOM_I/GEOM_IHealingOperations_i.hh | 3 +- src/GEOM_I/GEOM_IInsertOperations_i.hh | 3 +- src/GEOM_I/GEOM_ILocalOperations_i.hh | 3 +- src/GEOM_I/GEOM_IMeasureOperations_i.hh | 3 +- src/GEOM_I/GEOM_IOperations_i.cc | 1 - src/GEOM_I/GEOM_IOperations_i.hh | 3 +- src/GEOM_I/GEOM_IShapesOperations_i.cc | 206 ++++ src/GEOM_I/GEOM_IShapesOperations_i.hh | 28 +- src/GEOM_I/GEOM_ITransformOperations_i.cc | 99 ++ src/GEOM_I/GEOM_ITransformOperations_i.hh | 14 +- src/GEOM_I/GEOM_Object_i.cc | 7 +- src/GEOM_I/GEOM_Object_i.hh | 5 +- src/GEOM_I/Makefile.in | 5 +- src/GEOM_I_Superv/GEOM_Superv_i.cc | 31 + src/GEOM_I_Superv/GEOM_Superv_i.hh | 11 + src/GEOM_SWIG/GEOM_Nut.py | 136 +-- src/GEOM_SWIG/GEOM_Partition1.py | 5 +- src/GEOM_SWIG/GEOM_Sketcher.py | 114 +- src/GEOM_SWIG/GEOM_Spanner.py | 136 +-- src/GEOM_SWIG/GEOM_TestAll.py | 20 +- src/GEOM_SWIG/GEOM_TestOthers.py | 91 +- src/GEOM_SWIG/GEOM_blocks.py | 2 +- src/GEOM_SWIG/GEOM_example5.py | 106 +- src/GEOM_SWIG/GEOM_tube_geom_gg2.py | 320 +++--- src/GEOM_SWIG/batchmode_geompy.py | 6 + src/GEOM_SWIG/geompy.py | 124 ++- src/GenerationGUI/GenerationGUI.cxx | 4 +- src/GenerationGUI/GenerationGUI.h | 12 +- src/GenerationGUI/GenerationGUI_FillingDlg.h | 4 +- src/GenerationGUI/GenerationGUI_PipeDlg.h | 4 +- src/GenerationGUI/GenerationGUI_PrismDlg.h | 4 +- src/GenerationGUI/GenerationGUI_RevolDlg.h | 4 +- src/GroupGUI/GroupGUI_GroupDlg.cxx | 148 ++- src/IGESExport/IGESExport.cxx | 24 +- src/IGESImport/IGESImport.cxx | 18 +- src/MeasureGUI/MeasureGUI.cxx | 4 +- src/MeasureGUI/MeasureGUI.h | 4 +- .../MeasureGUI_1Sel12LineEdit_QTD.h | 4 +- src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.h | 4 +- src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.h | 4 +- src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.h | 4 +- src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.h | 4 +- src/MeasureGUI/MeasureGUI_BndBoxDlg.h | 10 +- src/MeasureGUI/MeasureGUI_CenterMassDlg.h | 10 +- .../MeasureGUI_CheckCompoundOfBlocksDlg.h | 10 +- src/MeasureGUI/MeasureGUI_CheckShapeDlg.h | 10 +- src/MeasureGUI/MeasureGUI_DistanceDlg.h | 10 +- src/MeasureGUI/MeasureGUI_InertiaDlg.h | 10 +- src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h | 10 +- src/MeasureGUI/MeasureGUI_PointDlg.h | 10 +- src/MeasureGUI/MeasureGUI_PropertiesDlg.h | 10 +- src/MeasureGUI/MeasureGUI_Skeleton.cxx | 8 +- src/MeasureGUI/MeasureGUI_Skeleton.h | 7 +- src/MeasureGUI/MeasureGUI_Skeleton_QTD.h | 4 +- src/MeasureGUI/MeasureGUI_WhatisDlg.h | 10 +- ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 37 +- ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 37 +- src/NMTDS/Makefile.in | 64 +- src/NMTDS/NMTDS.cdl | 79 +- src/NMTDS/NMTDS_CArray1OfIndexRange.hxx | 47 +- src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx | 16 +- src/NMTDS/NMTDS_IndexRange.cdl | 38 +- src/NMTDS/NMTDS_IndexRange.hxx | 29 +- src/NMTDS/NMTDS_IndexRange.ixx | 16 +- src/NMTDS/NMTDS_IndexRange.jxx | 18 +- ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 40 +- ...fIntegerIndexedDataMapOfShapeInteger_0.cxx | 31 +- ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 47 +- ...fIntegerIndexedDataMapOfShapeInteger_0.cxx | 16 +- ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 28 +- ...xedDataMapOfShapeAncestorsSuccessors_0.cxx | 16 +- ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 37 +- ...xedDataMapOfShapeAncestorsSuccessors_0.cxx | 31 +- ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 56 +- ...xedDataMapOfShapeAncestorsSuccessors_0.cxx | 16 +- src/NMTDS/NMTDS_PShapesDataStructure.hxx | 16 +- src/NMTDS/NMTDS_ShapesDataStructure.cdl | 61 +- src/NMTDS/NMTDS_ShapesDataStructure.cxx | 198 +++- src/NMTDS/NMTDS_ShapesDataStructure.hxx | 41 +- src/NMTDS/NMTDS_ShapesDataStructure.ixx | 16 +- src/NMTDS/NMTDS_ShapesDataStructure.jxx | 21 +- ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 37 +- ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 37 +- ...eOfIndexedDataMapOfIndexedMapOfInteger.hxx | 37 +- ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 37 +- ...apNodeOfIndexedDataMapOfShapePaveBlock.hxx | 37 +- ...e_NMTTools_ListNodeOfListOfCommonBlock.hxx | 37 +- ...NMTTools_ListNodeOfListOfCoupleOfShape.hxx | 37 +- src/NMTTools/Makefile.in | 64 +- src/NMTTools/NMTTools.cdl | 49 +- src/NMTTools/NMTTools_CommonBlock.cdl | 38 +- src/NMTTools/NMTTools_CommonBlock.hxx | 43 +- src/NMTTools/NMTTools_CommonBlock.ixx | 16 +- src/NMTTools/NMTTools_CommonBlock.jxx | 18 +- src/NMTTools/NMTTools_CommonBlockAPI.cdl | 37 +- src/NMTTools/NMTTools_CommonBlockAPI.hxx | 32 +- src/NMTTools/NMTTools_CommonBlockAPI.ixx | 16 +- src/NMTTools/NMTTools_CommonBlockAPI.jxx | 18 +- src/NMTTools/NMTTools_CommonBlockPool.hxx | 47 +- src/NMTTools/NMTTools_CommonBlockPool_0.cxx | 16 +- src/NMTTools/NMTTools_CoupleOfShape.cdl | 37 +- src/NMTTools/NMTTools_CoupleOfShape.hxx | 27 +- src/NMTTools/NMTTools_CoupleOfShape.ixx | 16 +- src/NMTTools/NMTTools_CoupleOfShape.jxx | 18 +- src/NMTTools/NMTTools_DEProcessor.cdl | 37 +- src/NMTTools/NMTTools_DEProcessor.cxx | 41 +- src/NMTTools/NMTTools_DEProcessor.hxx | 51 +- src/NMTTools/NMTTools_DEProcessor.ixx | 16 +- src/NMTTools/NMTTools_DEProcessor.jxx | 18 +- src/NMTTools/NMTTools_DSFiller.cdl | 37 +- src/NMTTools/NMTTools_DSFiller.hxx | 45 +- src/NMTTools/NMTTools_DSFiller.ixx | 16 +- src/NMTTools/NMTTools_DSFiller.jxx | 18 +- ...eOfIndexedDataMapOfIndexedMapOfInteger.hxx | 40 +- ...fIndexedDataMapOfIndexedMapOfInteger_0.cxx | 31 +- ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 40 +- ...dexedDataMapOfShapeIndexedMapOfShape_0.cxx | 31 +- ...apNodeOfIndexedDataMapOfShapePaveBlock.hxx | 40 +- ...NodeOfIndexedDataMapOfShapePaveBlock_0.cxx | 31 +- ...ls_IndexedDataMapOfIndexedMapOfInteger.hxx | 47 +- ..._IndexedDataMapOfIndexedMapOfInteger_0.cxx | 16 +- ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 47 +- ...dexedDataMapOfShapeIndexedMapOfShape_0.cxx | 16 +- ...MTTools_IndexedDataMapOfShapePaveBlock.hxx | 47 +- ...Tools_IndexedDataMapOfShapePaveBlock_0.cxx | 16 +- .../NMTTools_IteratorOfCoupleOfShape.cdl | 37 +- .../NMTTools_IteratorOfCoupleOfShape.hxx | 29 +- .../NMTTools_IteratorOfCoupleOfShape.ixx | 16 +- .../NMTTools_IteratorOfCoupleOfShape.jxx | 18 +- ...TTools_ListIteratorOfListOfCommonBlock.hxx | 28 +- ...ools_ListIteratorOfListOfCommonBlock_0.cxx | 16 +- ...ools_ListIteratorOfListOfCoupleOfShape.hxx | 28 +- ...ls_ListIteratorOfListOfCoupleOfShape_0.cxx | 16 +- .../NMTTools_ListNodeOfListOfCommonBlock.hxx | 37 +- ...NMTTools_ListNodeOfListOfCommonBlock_0.cxx | 31 +- ...NMTTools_ListNodeOfListOfCoupleOfShape.hxx | 37 +- ...TTools_ListNodeOfListOfCoupleOfShape_0.cxx | 31 +- src/NMTTools/NMTTools_ListOfCommonBlock.hxx | 56 +- src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx | 16 +- src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx | 56 +- .../NMTTools_ListOfCoupleOfShape_0.cxx | 16 +- src/NMTTools/NMTTools_PCurveMaker.cdl | 36 +- src/NMTTools/NMTTools_PCurveMaker.hxx | 28 +- src/NMTTools/NMTTools_PCurveMaker.ixx | 16 +- src/NMTTools/NMTTools_PCurveMaker.jxx | 18 +- src/NMTTools/NMTTools_PDSFiller.hxx | 16 +- src/NMTTools/NMTTools_PPaveFiller.hxx | 16 +- src/NMTTools/NMTTools_PaveFiller.cdl | 160 ++- src/NMTTools/NMTTools_PaveFiller.cxx | 38 +- src/NMTTools/NMTTools_PaveFiller.hxx | 224 +++- src/NMTTools/NMTTools_PaveFiller.ixx | 16 +- src/NMTTools/NMTTools_PaveFiller.jxx | 27 +- src/NMTTools/NMTTools_PaveFiller_0.cxx | 30 +- src/NMTTools/NMTTools_PaveFiller_1.cxx | 177 ++-- src/NMTTools/NMTTools_PaveFiller_2.cxx | 118 ++- src/NMTTools/NMTTools_PaveFiller_3.cxx | 54 +- src/NMTTools/NMTTools_PaveFiller_4.cxx | 555 +++++++--- src/NMTTools/NMTTools_PaveFiller_5.cxx | 33 +- src/NMTTools/NMTTools_PaveFiller_6.cxx | 583 +++++++--- src/NMTTools/NMTTools_PaveFiller_7.cxx | 286 ++++- src/NMTTools/NMTTools_PaveFiller_8.cxx | 68 ++ src/NMTTools/NMTTools_Tools.cdl | 59 +- src/NMTTools/NMTTools_Tools.cxx | 181 ++-- src/NMTTools/NMTTools_Tools.hxx | 24 +- src/NMTTools/NMTTools_Tools.ixx | 16 +- src/NMTTools/NMTTools_Tools.jxx | 18 +- src/OBJECT/GEOM_AISShape.hxx | 9 +- src/OBJECT/GEOM_AISTrihedron.cxx | 142 +-- src/OBJECT/GEOM_AISTrihedron.hxx | 160 +-- src/OBJECT/GEOM_Actor.h | 10 +- src/OBJECT/GEOM_AssemblyBuilder.h | 10 +- src/OBJECT/GEOM_OCCReader.h | 10 +- src/OBJECT/GEOM_VTKTrihedron.hxx | 11 +- src/OBJECT/Makefile.in | 3 +- .../OperationGUI_PartitionDlg.cxx | 98 +- src/OperationGUI/OperationGUI_PartitionDlg.h | 7 +- src/PARTITION/Partition_Inter2d.cxx | 3 +- src/PARTITION/Partition_Inter3d.cxx | 3 +- src/PARTITION/Partition_Loop.cxx | 3 +- src/PARTITION/Partition_Loop2d.cxx | 3 +- src/PARTITION/Partition_Loop3d.cxx | 3 +- src/PARTITION/Partition_Spliter.cxx | 3 +- src/RepairGUI/RepairGUI_FreeBoundDlg.cxx | 8 +- src/RepairGUI/RepairGUI_FreeFacesDlg.cxx | 8 +- src/RepairGUI/RepairGUI_GlueDlg.cxx | 6 +- src/STEPExport/STEPExport.cxx | 22 +- src/STEPImport/STEPImport.cxx | 18 +- .../TransformationGUI_OffsetDlg.cxx | 14 +- .../TransformationGUI_RotationDlg.cxx | 189 +++- .../TransformationGUI_RotationDlg.h | 7 +- 488 files changed, 10714 insertions(+), 6152 deletions(-) diff --git a/src/BREPExport/BREPExport.cxx b/src/BREPExport/BREPExport.cxx index 568ecc8a4..c7d25b655 100644 --- a/src/BREPExport/BREPExport.cxx +++ b/src/BREPExport/BREPExport.cxx @@ -30,9 +30,21 @@ #include #ifdef WNT -#include + #if defined BREPEXPORT_EXPORTS + #if defined WIN32 + #define BREPEXPORT_EXPORT __declspec( dllexport ) + #else + #define BREPEXPORT_EXPORT + #endif + #else + #if defined WIN32 + #define BREPEXPORT_EXPORT __declspec( dllimport ) + #else + #define BREPEXPORT_EXPORT + #endif + #endif #else -#define SALOME_WNT_EXPORT + #define BREPEXPORT_EXPORT #endif //============================================================================= @@ -43,10 +55,8 @@ extern "C" { -SALOME_WNT_EXPORT - int Export(const TopoDS_Shape& theShape, - const TCollection_AsciiString& theFileName, - const TCollection_AsciiString& /*theFormatName*/) +BREPEXPORT_EXPORT + int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName) { MESSAGE("Export BREP into file " << theFileName.ToCString()); diff --git a/src/BREPImport/BREPImport.cxx b/src/BREPImport/BREPImport.cxx index 7604c6b6f..cd78468ba 100644 --- a/src/BREPImport/BREPImport.cxx +++ b/src/BREPImport/BREPImport.cxx @@ -31,9 +31,21 @@ #include #ifdef WNT -#include + #if defined BREPIMPORT_EXPORTS + #if defined WIN32 + #define BREPIMPORT_EXPORT __declspec( dllexport ) + #else + #define BREPIMPORT_EXPORT + #endif + #else + #if defined WIN32 + #define BREPIMPORT_EXPORT __declspec( dllimport ) + #else + #define BREPIMPORT_EXPORT + #endif + #endif #else -#define SALOME_WNT_EXPORT + #define BREPIMPORT_EXPORT #endif //============================================================================= @@ -44,7 +56,7 @@ extern "C" { -SALOME_WNT_EXPORT +BREPIMPORT_EXPORT TopoDS_Shape Import (const TCollection_AsciiString& theFileName, const TCollection_AsciiString& /*theFormatName*/, TCollection_AsciiString& theError) diff --git a/src/BasicGUI/BasicGUI.cxx b/src/BasicGUI/BasicGUI.cxx index 2fad21a14..41b484848 100644 --- a/src/BasicGUI/BasicGUI.cxx +++ b/src/BasicGUI/BasicGUI.cxx @@ -207,9 +207,7 @@ gp_Pnt BasicGUI::ConvertClickToPoint( int x, int y, Handle(V3d_View) aView) //===================================================================================== extern "C" { -#ifdef WNT - __declspec( dllexport ) -#endif +GEOM_BASICGUI_EXPORT GEOMGUI* GetLibGUI( GeometryGUI* parent ) { return new BasicGUI( parent ); diff --git a/src/BasicGUI/BasicGUI.h b/src/BasicGUI/BasicGUI.h index 0e70833d7..73a16e6bd 100644 --- a/src/BasicGUI/BasicGUI.h +++ b/src/BasicGUI/BasicGUI.h @@ -28,21 +28,17 @@ #ifndef BASICGUI_H #define BASICGUI_H +#include "GEOM_BasicGUI.hxx" + #include "GEOMGUI.h" #include "GEOMBase.h" #include -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define BASICGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define BASICGUI_WNT_EXPORT -#endif - //================================================================================= // class : BasicGUI // purpose : //================================================================================= -class BasicGUI : public GEOMGUI +class GEOM_BASICGUI_EXPORT BasicGUI : public GEOMGUI { public: BasicGUI( GeometryGUI* parent ); diff --git a/src/BasicGUI/BasicGUI_ArcDlg.h b/src/BasicGUI/BasicGUI_ArcDlg.h index 14eb40471..35038d452 100644 --- a/src/BasicGUI/BasicGUI_ArcDlg.h +++ b/src/BasicGUI/BasicGUI_ArcDlg.h @@ -28,18 +28,16 @@ #ifndef DIALOGBOX_ARC_H #define DIALOGBOX_ARC_H +#include "GEOM_BasicGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_3Sel_QTD.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define BASICGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define BASICGUI_WNT_EXPORT -#endif + //================================================================================= // class : BasicGUI_ArcDlg // purpose : //================================================================================= -class BasicGUI_ArcDlg : public GEOMBase_Skeleton +class GEOM_BASICGUI_EXPORT BasicGUI_ArcDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BasicGUI/BasicGUI_CircleDlg.h b/src/BasicGUI/BasicGUI_CircleDlg.h index dae862b04..fb0f51315 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.h +++ b/src/BasicGUI/BasicGUI_CircleDlg.h @@ -28,25 +28,19 @@ #ifndef DIALOGBOX_CIRCLE_H #define DIALOGBOX_CIRCLE_H +#include "GEOM_BasicGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel1Spin.h" #include "DlgRef_3Sel_QTD.h" #include "BasicGUI.h" -#include - -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define BASICGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define BASICGUI_WNT_EXPORT -#endif - //================================================================================= // class : BasicGUI_CircleDlg // purpose : //================================================================================= -class BasicGUI_CircleDlg : public GEOMBase_Skeleton +class GEOM_BASICGUI_EXPORT BasicGUI_CircleDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BasicGUI/BasicGUI_CurveDlg.h b/src/BasicGUI/BasicGUI_CurveDlg.h index 2367a9ac3..6a1b6fa9b 100644 --- a/src/BasicGUI/BasicGUI_CurveDlg.h +++ b/src/BasicGUI/BasicGUI_CurveDlg.h @@ -27,6 +27,8 @@ #ifndef BASICGUI_CURVE_H #define BASICGUI_CURVE_H +#include "GEOM_BasicGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel_QTD.h" @@ -34,17 +36,11 @@ #include -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define BASICGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define BASICGUI_WNT_EXPORT -#endif - //================================================================================= // class : BasicGUI_CurveDlg // purpose : //================================================================================= -class BasicGUI_CurveDlg : public GEOMBase_Skeleton +class GEOM_BASICGUI_EXPORT BasicGUI_CurveDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.h b/src/BasicGUI/BasicGUI_EllipseDlg.h index f3c5db3ac..038700f53 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.h +++ b/src/BasicGUI/BasicGUI_EllipseDlg.h @@ -27,24 +27,18 @@ #ifndef BASICGUI_ELLIPSE_H #define BASICGUI_ELLIPSE_H +#include "GEOM_BasicGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel2Spin.h" #include "BasicGUI.h" -#include - -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define BASICGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define BASICGUI_WNT_EXPORT -#endif - //================================================================================= // class : BasicGUI_EllipseDlg // purpose : //================================================================================= -class BasicGUI_EllipseDlg : public GEOMBase_Skeleton +class GEOM_BASICGUI_EXPORT BasicGUI_EllipseDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BasicGUI/BasicGUI_LineDlg.h b/src/BasicGUI/BasicGUI_LineDlg.h index 64fea7f1c..65eba2b98 100644 --- a/src/BasicGUI/BasicGUI_LineDlg.h +++ b/src/BasicGUI/BasicGUI_LineDlg.h @@ -28,20 +28,16 @@ #ifndef DIALOGBOX_LINE_H #define DIALOGBOX_LINE_H +#include "GEOM_BasicGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel_QTD.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define BASICGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define BASICGUI_WNT_EXPORT -#endif - //================================================================================= // class : BasicGUI_LineDlg // purpose : //================================================================================= -class BasicGUI_LineDlg : public GEOMBase_Skeleton +class GEOM_BASICGUI_EXPORT BasicGUI_LineDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BasicGUI/BasicGUI_MarkerDlg.h b/src/BasicGUI/BasicGUI_MarkerDlg.h index dfab99930..7ba75b60b 100644 --- a/src/BasicGUI/BasicGUI_MarkerDlg.h +++ b/src/BasicGUI/BasicGUI_MarkerDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_Marker_H #define DIALOGBOX_Marker_H +#include "GEOM_BasicGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel_QTD.h" #include "DlgRef_3Sel_QTD.h" @@ -36,13 +38,7 @@ class DlgRef_SpinBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define BASICGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define BASICGUI_WNT_EXPORT -#endif - -class BasicGUI_MarkerDlg : public GEOMBase_Skeleton +class GEOM_BASICGUI_EXPORT BasicGUI_MarkerDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.h b/src/BasicGUI/BasicGUI_PlaneDlg.h index c03f934c0..05e8c69ec 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.h +++ b/src/BasicGUI/BasicGUI_PlaneDlg.h @@ -28,22 +28,18 @@ #ifndef DIALOGBOX_PLANE_H #define DIALOGBOX_PLANE_H +#include "GEOM_BasicGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel1Spin.h" #include "DlgRef_2Sel1Spin.h" #include "DlgRef_3Sel1Spin.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define BASICGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define BASICGUI_WNT_EXPORT -#endif - //================================================================================= // class : BasicGUI_PlaneDlg // purpose : //================================================================================= -class BasicGUI_PlaneDlg : public GEOMBase_Skeleton +class GEOM_BASICGUI_EXPORT BasicGUI_PlaneDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BasicGUI/BasicGUI_PointDlg.h b/src/BasicGUI/BasicGUI_PointDlg.h index c47e09112..5d9e7cd7f 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.h +++ b/src/BasicGUI/BasicGUI_PointDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_POINT_H #define DIALOGBOX_POINT_H +#include "GEOM_BasicGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel1Spin.h" #include "DlgRef_3Spin.h" @@ -36,16 +38,11 @@ class QLineEdit; class QGroupBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define BASICGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define BASICGUI_WNT_EXPORT -#endif //================================================================================= // class : BasicGUI_PointDlg // purpose : //================================================================================= -class BasicGUI_PointDlg : public GEOMBase_Skeleton +class GEOM_BASICGUI_EXPORT BasicGUI_PointDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BasicGUI/BasicGUI_VectorDlg.h b/src/BasicGUI/BasicGUI_VectorDlg.h index 1656038f8..a9dcb51b8 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.h +++ b/src/BasicGUI/BasicGUI_VectorDlg.h @@ -28,23 +28,19 @@ #ifndef DIALOGBOX_VECTOR_H #define DIALOGBOX_VECTOR_H +#include "GEOM_BasicGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel_QTD.h" #include "DlgRef_3Spin1Check.h" #include "BasicGUI.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define BASICGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define BASICGUI_WNT_EXPORT -#endif - //================================================================================= // class : BasicGUI_VectorDlg // purpose : //================================================================================= -class BasicGUI_VectorDlg : public GEOMBase_Skeleton +class GEOM_BASICGUI_EXPORT BasicGUI_VectorDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.h b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.h index b2f03d4f2..35561c741 100644 --- a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.h +++ b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.h @@ -28,22 +28,18 @@ #ifndef DIALOGBOX_WORKINGPLANE_H #define DIALOGBOX_WORKINGPLANE_H +#include "GEOM_BasicGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel_QTD.h" #include "DlgRef_2Sel_QTD.h" #include "DlgRef_3Check_QTD.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define BASICGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define BASICGUI_WNT_EXPORT -#endif - //================================================================================= // class : BasicGUI_WorkingPlaneDlg // purpose : //================================================================================= -class BASICGUI_WNT_EXPORT BasicGUI_WorkingPlaneDlg : public GEOMBase_Skeleton +class GEOM_BASICGUI_EXPORT BasicGUI_WorkingPlaneDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BasicGUI/Makefile.in b/src/BasicGUI/Makefile.in index 1687af924..e5fb2cec1 100644 --- a/src/BasicGUI/Makefile.in +++ b/src/BasicGUI/Makefile.in @@ -35,7 +35,8 @@ VPATH=.:@srcdir@:@top_srcdir@/idl @COMMENCE@ # header files -EXPORT_HEADERS= BasicGUI_PointDlg.h +EXPORT_HEADERS= BasicGUI_PointDlg.h \ + GEOM_BasicGUI.hxx # Libraries targets LIB = libBasicGUI.la @@ -62,7 +63,8 @@ LIB_MOC = \ BasicGUI_PlaneDlg.h \ BasicGUI_WorkingPlaneDlg.h \ BasicGUI_CurveDlg.h \ - BasicGUI_MarkerDlg.h + BasicGUI_MarkerDlg.h \ + GEOM_BasicGUI.hxx LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Exception.idl SALOME_Component.idl diff --git a/src/BlocksGUI/BlocksGUI.cxx b/src/BlocksGUI/BlocksGUI.cxx index b3126c101..2ab3c1db0 100644 --- a/src/BlocksGUI/BlocksGUI.cxx +++ b/src/BlocksGUI/BlocksGUI.cxx @@ -91,9 +91,7 @@ bool BlocksGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) //===================================================================================== extern "C" { -#ifdef WNT - __declspec( dllexport ) -#endif + GEOM_BLOCKSGUI_EXPORT GEOMGUI* GetLibGUI( GeometryGUI* parent ) { return new BlocksGUI( parent ); diff --git a/src/BlocksGUI/BlocksGUI.h b/src/BlocksGUI/BlocksGUI.h index 48a975ca6..9d546a298 100644 --- a/src/BlocksGUI/BlocksGUI.h +++ b/src/BlocksGUI/BlocksGUI.h @@ -27,13 +27,15 @@ #ifndef BLOCKSGUI_H #define BLOCKSGUI_H +#include "GEOM_BlocksGUI.hxx" + #include "GEOMGUI.h" //================================================================================= // class : BlocksGUI // purpose : //================================================================================= -class BlocksGUI : public GEOMGUI +class GEOM_BLOCKSGUI_EXPORT BlocksGUI : public GEOMGUI { public: BlocksGUI( GeometryGUI* parent ); diff --git a/src/BlocksGUI/BlocksGUI_BlockDlg.h b/src/BlocksGUI/BlocksGUI_BlockDlg.h index 0d8c8c5b2..92801ac05 100644 --- a/src/BlocksGUI/BlocksGUI_BlockDlg.h +++ b/src/BlocksGUI/BlocksGUI_BlockDlg.h @@ -27,6 +27,8 @@ #ifndef DIALOGBOX_BLOCK_H #define DIALOGBOX_BLOCK_H +#include "GEOM_BlocksGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel_QTD.h" #include "DlgRef_6Sel_QTD.h" @@ -36,7 +38,7 @@ // class : BlocksGUI_BlockDlg // purpose : //================================================================================= -class BlocksGUI_BlockDlg : public GEOMBase_Skeleton +class GEOM_BLOCKSGUI_EXPORT BlocksGUI_BlockDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx index d8ec38847..b0832eda3 100644 --- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx @@ -452,7 +452,8 @@ bool BlocksGUI_ExplodeDlg::execute (ObjectList& objects) ObjectList toRemoveFromEnggine; ObjectList::iterator anIter; for (anIter = myTmpObjs.begin(); anIter != myTmpObjs.end(); ++anIter) { - if (selected.contains(myGeomGUI->getApp()->orb()->object_to_string(*anIter))) + CORBA::String_var objStr = myGeomGUI->getApp()->orb()->object_to_string(*anIter); + if (selected.contains(QString(objStr.in()))) objects.push_back(*anIter); else toRemoveFromEnggine.push_back(*anIter); diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.h b/src/BlocksGUI/BlocksGUI_ExplodeDlg.h index b62a5cdf6..8e309ecfd 100644 --- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.h +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.h @@ -27,6 +27,8 @@ #ifndef DIALOGBOX_BLOCK_EXPLODE_H #define DIALOGBOX_BLOCK_EXPLODE_H +#include "GEOM_BlocksGUI.hxx" + #include "GEOMBase_Skeleton.h" class DlgRef_SpinBox; @@ -37,7 +39,7 @@ class QCheckBox; // class : BlocksGUI_ExplodeDlg // purpose : //================================================================================= -class BlocksGUI_ExplodeDlg : public GEOMBase_Skeleton +class GEOM_BLOCKSGUI_EXPORT BlocksGUI_ExplodeDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BlocksGUI/BlocksGUI_PropagateDlg.h b/src/BlocksGUI/BlocksGUI_PropagateDlg.h index e0d9c217a..e6236d632 100644 --- a/src/BlocksGUI/BlocksGUI_PropagateDlg.h +++ b/src/BlocksGUI/BlocksGUI_PropagateDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_BlocksGUI_PropagateDlg_H #define DIALOGBOX_BlocksGUI_PropagateDlg_H +#include "GEOM_BlocksGUI.hxx" + #include "GEOMBase_Skeleton.h" @@ -35,7 +37,7 @@ // class : BlocksGUI_PropagateDlg // purpose : //================================================================================= -class BlocksGUI_PropagateDlg : public GEOMBase_Skeleton +class GEOM_BLOCKSGUI_EXPORT BlocksGUI_PropagateDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BlocksGUI/BlocksGUI_QuadFaceDlg.h b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.h index 1386a2c1c..be706bab3 100644 --- a/src/BlocksGUI/BlocksGUI_QuadFaceDlg.h +++ b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.h @@ -27,13 +27,15 @@ #ifndef DIALOGBOX_QUAD_FACE_H #define DIALOGBOX_QUAD_FACE_H +#include "GEOM_BlocksGUI.hxx" + #include "GEOMBase_Skeleton.h" //================================================================================= // class : BlocksGUI_QuadFaceDlg // purpose : //================================================================================= -class BlocksGUI_QuadFaceDlg : public GEOMBase_Skeleton +class GEOM_BLOCKSGUI_EXPORT BlocksGUI_QuadFaceDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BlocksGUI/BlocksGUI_TrsfDlg.h b/src/BlocksGUI/BlocksGUI_TrsfDlg.h index cc11c8e8b..7508c8e48 100644 --- a/src/BlocksGUI/BlocksGUI_TrsfDlg.h +++ b/src/BlocksGUI/BlocksGUI_TrsfDlg.h @@ -27,6 +27,8 @@ #ifndef DIALOGBOX_BLOCK_MULTITRSF_H #define DIALOGBOX_BLOCK_MULTITRSF_H +#include "GEOM_BlocksGUI.hxx" + #include "GEOMBase_Skeleton.h" class DlgRef_SpinBox; @@ -35,7 +37,7 @@ class DlgRef_SpinBox; // class : BlocksGUI_TrsfDlg // purpose : //================================================================================= -class BlocksGUI_TrsfDlg : public GEOMBase_Skeleton +class GEOM_BLOCKSGUI_EXPORT BlocksGUI_TrsfDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BlocksGUI/Makefile.in b/src/BlocksGUI/Makefile.in index 229f0f9d7..26c445679 100644 --- a/src/BlocksGUI/Makefile.in +++ b/src/BlocksGUI/Makefile.in @@ -52,7 +52,8 @@ LIB_MOC = \ BlocksGUI_BlockDlg.h \ BlocksGUI_ExplodeDlg.h \ BlocksGUI_PropagateDlg.h \ - BlocksGUI_TrsfDlg.h + BlocksGUI_TrsfDlg.h \ + GEOM_BlocksGUI.hxx LIB_CLIENT_IDL = SALOME_Exception.idl SALOME_GenericObj.idl SALOME_Component.idl diff --git a/src/BooleanGUI/BooleanGUI.cxx b/src/BooleanGUI/BooleanGUI.cxx index 10af70c48..34ddff642 100644 --- a/src/BooleanGUI/BooleanGUI.cxx +++ b/src/BooleanGUI/BooleanGUI.cxx @@ -84,9 +84,7 @@ bool BooleanGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent) //===================================================================================== extern "C" { -#ifdef WNT - __declspec( dllexport ) -#endif +GEOM_BOOLEANGUI_EXPORT GEOMGUI* GetLibGUI( GeometryGUI* parent ) { return new BooleanGUI( parent ); diff --git a/src/BooleanGUI/BooleanGUI.h b/src/BooleanGUI/BooleanGUI.h index 9de8c7bd2..32d8f57e0 100644 --- a/src/BooleanGUI/BooleanGUI.h +++ b/src/BooleanGUI/BooleanGUI.h @@ -30,11 +30,29 @@ #include "GEOMGUI.h" +#ifdef WNT + #if defined BOOLEANGUI_EXPORTS + #if defined WIN32 + #define GEOM_BOOLEANGUI_EXPORT __declspec( dllexport ) + #else + #define GEOM_BOOLEANGUI_EXPORT + #endif + #else + #if defined WIN32 + #define GEOM_BOOLEANGUI_EXPORT __declspec( dllimport ) + #else + #define GEOM_BOOLEANGUI_EXPORT + #endif + #endif +#else + #define GEOM_BOOLEANGUI_EXPORT +#endif + //================================================================================= // class : BooleanGUI // purpose : //================================================================================= -class BooleanGUI : public GEOMGUI +class GEOM_BOOLEANGUI_EXPORT BooleanGUI : public GEOMGUI { public: enum BooleanOperation { COMMON = 1, CUT = 2, FUSE = 3, SECTION = 4 }; diff --git a/src/BooleanGUI/BooleanGUI_Dialog.h b/src/BooleanGUI/BooleanGUI_Dialog.h index ecaadcc55..e42fd2be2 100644 --- a/src/BooleanGUI/BooleanGUI_Dialog.h +++ b/src/BooleanGUI/BooleanGUI_Dialog.h @@ -28,6 +28,8 @@ #ifndef BooleanGUI_Dialog_H #define BooleanGUI_Dialog_H +#include "BooleanGUI.h" //for wnt defines + #include "GEOMBase_Skeleton.h" class DlgRef_2Sel_QTD; @@ -36,7 +38,7 @@ class DlgRef_2Sel_QTD; // class : BooleanGUI_Dialog // purpose : //================================================================================= -class BooleanGUI_Dialog : public GEOMBase_Skeleton +class GEOM_BOOLEANGUI_EXPORT BooleanGUI_Dialog : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BuildGUI/BuildGUI.cxx b/src/BuildGUI/BuildGUI.cxx index eebeee4b6..a9d443817 100644 --- a/src/BuildGUI/BuildGUI.cxx +++ b/src/BuildGUI/BuildGUI.cxx @@ -95,9 +95,7 @@ bool BuildGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) //===================================================================================== extern "C" { -#ifdef WNT - __declspec( dllexport ) -#endif + GEOM_BUILDGUI_EXPORT GEOMGUI* GetLibGUI( GeometryGUI* parent ) { return new BuildGUI( parent ); diff --git a/src/BuildGUI/BuildGUI.h b/src/BuildGUI/BuildGUI.h index 0688cabb8..60e57a347 100644 --- a/src/BuildGUI/BuildGUI.h +++ b/src/BuildGUI/BuildGUI.h @@ -28,13 +28,15 @@ #ifndef BUILDGUI_H #define BUILDGUI_H +#include "GEOM_BuildGUI.hxx" + #include "GEOMGUI.h" //================================================================================= // class : BuildGUI // purpose : //================================================================================= -class BuildGUI : public GEOMGUI +class GEOM_BUILDGUI_EXPORT BuildGUI : public GEOMGUI { public : BuildGUI( GeometryGUI* parent ); diff --git a/src/BuildGUI/BuildGUI_CompoundDlg.h b/src/BuildGUI/BuildGUI_CompoundDlg.h index 10f8ffd2a..31182622c 100644 --- a/src/BuildGUI/BuildGUI_CompoundDlg.h +++ b/src/BuildGUI/BuildGUI_CompoundDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_COMPOUND_H #define DIALOGBOX_COMPOUND_H +#include "GEOM_BuildGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel_QTD.h" @@ -35,7 +37,7 @@ // class : BuildGUI_CompoundDlg // purpose : //================================================================================= -class BuildGUI_CompoundDlg : public GEOMBase_Skeleton +class GEOM_BUILDGUI_EXPORT BuildGUI_CompoundDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BuildGUI/BuildGUI_EdgeDlg.h b/src/BuildGUI/BuildGUI_EdgeDlg.h index 4767ae913..3a7b7b2b5 100644 --- a/src/BuildGUI/BuildGUI_EdgeDlg.h +++ b/src/BuildGUI/BuildGUI_EdgeDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_EDGE_H #define DIALOGBOX_EDGE_H +#include "GEOM_BuildGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel_QTD.h" @@ -35,7 +37,7 @@ // class : BuildGUI_EdgeDlg // purpose : //================================================================================= -class BuildGUI_EdgeDlg : public GEOMBase_Skeleton +class GEOM_BUILDGUI_EXPORT BuildGUI_EdgeDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BuildGUI/BuildGUI_FaceDlg.cxx b/src/BuildGUI/BuildGUI_FaceDlg.cxx index 36d8605a9..953c54f8f 100644 --- a/src/BuildGUI/BuildGUI_FaceDlg.cxx +++ b/src/BuildGUI/BuildGUI_FaceDlg.cxx @@ -28,6 +28,7 @@ #include "BuildGUI_FaceDlg.h" #include "GEOMImpl_Types.hxx" +#include "TColStd_MapOfInteger.hxx" #include "SUIT_Session.h" #include "SalomeApp_Application.h" @@ -64,7 +65,7 @@ BuildGUI_FaceDlg::BuildGUI_FaceDlg(GeometryGUI* theGeometryGUI, QWidget* parent, GroupWire = new DlgRef_1Sel1Check_QTD(this, "GroupWire"); GroupWire->GroupBox1->setTitle(tr("GEOM_FACE_FFW")); - GroupWire->TextLabel1->setText(tr("GEOM_WIRES")); + GroupWire->TextLabel1->setText(tr("GEOM_OBJECTS")); GroupWire->CheckButton1->setText(tr("GEOM_FACE_OPT")); GroupWire->PushButton1->setPixmap(image1); @@ -100,7 +101,10 @@ void BuildGUI_FaceDlg::Init() GroupWire->CheckButton1->setChecked(TRUE); - globalSelection( GEOM_WIRE ); + TColStd_MapOfInteger aMap; + aMap.Add( GEOM_EDGE ); + aMap.Add( GEOM_WIRE ); + globalSelection( aMap ); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -160,7 +164,7 @@ void BuildGUI_FaceDlg::SelectionIntoArgument() if (!myWires.length()) return; if(aNbSel != 1) - aName = tr("%1_wires").arg(aNbSel); + aName = tr("%1_objects").arg(aNbSel); myEditCurrentArgument->setText( aName ); @@ -178,7 +182,11 @@ void BuildGUI_FaceDlg::SetEditCurrentArgument() if (send != GroupWire->PushButton1) return; - globalSelection( GEOM_WIRE ); + TColStd_MapOfInteger aMap; + aMap.Add( GEOM_EDGE ); + aMap.Add( GEOM_WIRE ); + globalSelection( aMap ); + myEditCurrentArgument = GroupWire->LineEdit1; myEditCurrentArgument->setFocus(); @@ -195,7 +203,10 @@ void BuildGUI_FaceDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - globalSelection( GEOM_WIRE ); + TColStd_MapOfInteger aMap; + aMap.Add( GEOM_EDGE ); + aMap.Add( GEOM_WIRE ); + globalSelection( aMap ); } diff --git a/src/BuildGUI/BuildGUI_FaceDlg.h b/src/BuildGUI/BuildGUI_FaceDlg.h index 832c56c4c..734cbc2f3 100644 --- a/src/BuildGUI/BuildGUI_FaceDlg.h +++ b/src/BuildGUI/BuildGUI_FaceDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_FACE_H #define DIALOGBOX_FACE_H +#include "GEOM_BuildGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel1Check_QTD.h" @@ -35,7 +37,7 @@ // class : BuildGUI_FaceDlg // purpose : //================================================================================= -class BuildGUI_FaceDlg : public GEOMBase_Skeleton +class GEOM_BUILDGUI_EXPORT BuildGUI_FaceDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BuildGUI/BuildGUI_ShellDlg.h b/src/BuildGUI/BuildGUI_ShellDlg.h index e0b4fb692..8c1132468 100644 --- a/src/BuildGUI/BuildGUI_ShellDlg.h +++ b/src/BuildGUI/BuildGUI_ShellDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_SHELL_H #define DIALOGBOX_SHELL_H +#include "GEOM_BuildGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel_QTD.h" @@ -35,7 +37,7 @@ // class : BuildGUI_ShellDlg // purpose : //================================================================================= -class BuildGUI_ShellDlg : public GEOMBase_Skeleton +class GEOM_BUILDGUI_EXPORT BuildGUI_ShellDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BuildGUI/BuildGUI_SolidDlg.h b/src/BuildGUI/BuildGUI_SolidDlg.h index ad7771b07..41982f4a2 100644 --- a/src/BuildGUI/BuildGUI_SolidDlg.h +++ b/src/BuildGUI/BuildGUI_SolidDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_SOLID_H #define DIALOGBOX_SOLID_H +#include "GEOM_BuildGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel1Check_QTD.h" @@ -35,7 +37,7 @@ // class : BuildGUI_SolidDlg // purpose : //================================================================================= -class BuildGUI_SolidDlg : public GEOMBase_Skeleton +class GEOM_BUILDGUI_EXPORT BuildGUI_SolidDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BuildGUI/BuildGUI_WireDlg.h b/src/BuildGUI/BuildGUI_WireDlg.h index b9868e711..ecfcc2c14 100644 --- a/src/BuildGUI/BuildGUI_WireDlg.h +++ b/src/BuildGUI/BuildGUI_WireDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_WIRE_H #define DIALOGBOX_WIRE_H +#include "GEOM_BuildGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel_QTD.h" @@ -35,7 +37,7 @@ // class : BuildGUI_WireDlg // purpose : //================================================================================= -class BuildGUI_WireDlg : public GEOMBase_Skeleton +class GEOM_BUILDGUI_EXPORT BuildGUI_WireDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/BuildGUI/Makefile.in b/src/BuildGUI/Makefile.in index 685baddfd..9ba43d0ec 100644 --- a/src/BuildGUI/Makefile.in +++ b/src/BuildGUI/Makefile.in @@ -54,7 +54,8 @@ LIB_MOC = \ BuildGUI_FaceDlg.h \ BuildGUI_ShellDlg.h \ BuildGUI_SolidDlg.h \ - BuildGUI_CompoundDlg.h + BuildGUI_CompoundDlg.h \ + GEOM_BuildGUI.hxx LIB_CLIENT_IDL = SALOME_Exception.idl SALOME_GenericObj.idl SALOME_Component.idl diff --git a/src/DisplayGUI/DisplayGUI.cxx b/src/DisplayGUI/DisplayGUI.cxx index 504f861f6..7ce28c184 100644 --- a/src/DisplayGUI/DisplayGUI.cxx +++ b/src/DisplayGUI/DisplayGUI.cxx @@ -470,9 +470,7 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow //===================================================================================== extern "C" { -#ifdef WNT - __declspec( dllexport ) -#endif + GEOM_DISPLAYGUI_EXPORT GEOMGUI* GetLibGUI( GeometryGUI* parent ) { return new DisplayGUI( parent ); diff --git a/src/DisplayGUI/DisplayGUI.h b/src/DisplayGUI/DisplayGUI.h index 981c1c58f..9e31f223c 100644 --- a/src/DisplayGUI/DisplayGUI.h +++ b/src/DisplayGUI/DisplayGUI.h @@ -31,10 +31,14 @@ #include "GEOMGUI.h" #include "GEOMBase.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DISPLAYGUI_WNT_EXPORT __declspec( dllexport ) +#ifdef WNT +# if defined DISPLAYGUI_EXPORTS +# define GEOM_DISPLAYGUI_EXPORT __declspec( dllexport ) +# else +# define GEOM_DISPLAYGUI_EXPORT __declspec( dllimport ) +# endif #else -#define DISPLAYGUI_WNT_EXPORT +# define GEOM_DISPLAYGUI_EXPORT #endif //================================================================================= @@ -43,7 +47,7 @@ //================================================================================= //class QAD_ViewFrame; class SUIT_ViewWindow; -class DisplayGUI : public GEOMGUI +class GEOM_DISPLAYGUI_EXPORT DisplayGUI : public GEOMGUI { public: DisplayGUI( GeometryGUI* parent ); diff --git a/src/DlgRef/DlgRef_1List1Spin1Btn_QTD.h b/src/DlgRef/DlgRef_1List1Spin1Btn_QTD.h index 70f2b5b50..a14fe62a5 100644 --- a/src/DlgRef/DlgRef_1List1Spin1Btn_QTD.h +++ b/src/DlgRef/DlgRef_1List1Spin1Btn_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1LIST1SPIN1BTN_QTD_H #define DLGREF_1LIST1SPIN1BTN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -40,13 +42,7 @@ class QListViewItem; class QPushButton; class QSpinBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_1List1Spin1Btn_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_1List1Spin1Btn_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel1Check1List_QTD.h b/src/DlgRef/DlgRef_1Sel1Check1List_QTD.h index a782abd49..834d71a32 100644 --- a/src/DlgRef/DlgRef_1Sel1Check1List_QTD.h +++ b/src/DlgRef/DlgRef_1Sel1Check1List_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1SEL1CHECK1LIST_QTD_H #define DLGREF_1SEL1CHECK1LIST_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -40,13 +42,7 @@ class QLineEdit; class QPushButton; class QRadioButton; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_1Sel1Check1List_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_1Sel1Check1List_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel1Check_QTD.h b/src/DlgRef/DlgRef_1Sel1Check_QTD.h index a0383a41d..ace1e2606 100644 --- a/src/DlgRef/DlgRef_1Sel1Check_QTD.h +++ b/src/DlgRef/DlgRef_1Sel1Check_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1SEL1CHECK_QTD_H #define DLGREF_1SEL1CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -39,13 +41,7 @@ class QLabel; class QLineEdit; class QPushButton; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_1Sel1Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_1Sel1Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel1Spin.h b/src/DlgRef/DlgRef_1Sel1Spin.h index 66806c708..3202db597 100644 --- a/src/DlgRef/DlgRef_1Sel1Spin.h +++ b/src/DlgRef/DlgRef_1Sel1Spin.h @@ -29,20 +29,12 @@ #ifndef DLGREF_1SEL1SPIN_H #define DLGREF_1SEL1SPIN_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_1Sel1Spin_QTD.h" #include "DlgRef_SpinBox.h" -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_1Sel1Spin : public DlgRef_1Sel1Spin_QTD +class GEOM_DLGREF_EXPORT DlgRef_1Sel1Spin : public DlgRef_1Sel1Spin_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel1Spin1Check.h b/src/DlgRef/DlgRef_1Sel1Spin1Check.h index 920520f05..0e30376eb 100644 --- a/src/DlgRef/DlgRef_1Sel1Spin1Check.h +++ b/src/DlgRef/DlgRef_1Sel1Spin1Check.h @@ -29,16 +29,12 @@ #ifndef DLGREF_1SEL1SPIN1CHECK_H #define DLGREF_1SEL1SPIN1CHECK_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_1Sel1Spin1Check_QTD.h" #include "DlgRef_SpinBox.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_1Sel1Spin1Check : public DlgRef_1Sel1Spin1Check_QTD +class GEOM_DLGREF_EXPORT DlgRef_1Sel1Spin1Check : public DlgRef_1Sel1Spin1Check_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.h b/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.h index ddb20e147..1dd195db4 100644 --- a/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.h +++ b/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1SEL1SPIN1CHECK_QTD_H #define DLGREF_1SEL1SPIN1CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -40,7 +42,7 @@ class QLineEdit; class QPushButton; class QSpinBox; -class DlgRef_1Sel1Spin1Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_1Sel1Spin1Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel1Spin_QTD.h b/src/DlgRef/DlgRef_1Sel1Spin_QTD.h index 2b1f076ca..f00c396ef 100644 --- a/src/DlgRef/DlgRef_1Sel1Spin_QTD.h +++ b/src/DlgRef/DlgRef_1Sel1Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1SEL1SPIN_QTD_H #define DLGREF_1SEL1SPIN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -38,12 +40,8 @@ class QLabel; class QLineEdit; class QPushButton; class QSpinBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_1Sel1Spin_QTD : public QWidget + +class GEOM_DLGREF_EXPORT DlgRef_1Sel1Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel2Spin.h b/src/DlgRef/DlgRef_1Sel2Spin.h index 21c482d9d..c7e8054c1 100644 --- a/src/DlgRef/DlgRef_1Sel2Spin.h +++ b/src/DlgRef/DlgRef_1Sel2Spin.h @@ -29,10 +29,12 @@ #ifndef DLGREF_1SEL2SPIN_H #define DLGREF_1SEL2SPIN_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_1Sel2Spin_QTD.h" #include "DlgRef_SpinBox.h" -class DlgRef_1Sel2Spin : public DlgRef_1Sel2Spin_QTD +class GEOM_DLGREF_EXPORT DlgRef_1Sel2Spin : public DlgRef_1Sel2Spin_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel2Spin_QTD.h b/src/DlgRef/DlgRef_1Sel2Spin_QTD.h index ea66b4dff..b85a76a37 100644 --- a/src/DlgRef/DlgRef_1Sel2Spin_QTD.h +++ b/src/DlgRef/DlgRef_1Sel2Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1SEL2SPIN_QTD_H #define DLGREF_1SEL2SPIN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -39,7 +41,7 @@ class QLineEdit; class QPushButton; class QSpinBox; -class DlgRef_1Sel2Spin_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_1Sel2Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel3Check_QTD.h b/src/DlgRef/DlgRef_1Sel3Check_QTD.h index 39c0d6bc3..83e38df33 100644 --- a/src/DlgRef/DlgRef_1Sel3Check_QTD.h +++ b/src/DlgRef/DlgRef_1Sel3Check_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1SEL3CHECK_QTD_H #define DLGREF_1SEL3CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -39,7 +41,7 @@ class QLabel; class QLineEdit; class QPushButton; -class DlgRef_1Sel3Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_1Sel3Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel3Spin.h b/src/DlgRef/DlgRef_1Sel3Spin.h index ab95344d5..f307a283b 100644 --- a/src/DlgRef/DlgRef_1Sel3Spin.h +++ b/src/DlgRef/DlgRef_1Sel3Spin.h @@ -29,21 +29,12 @@ #ifndef DLGREF_1SEL3SPIN_H #define DLGREF_1SEL3SPIN_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_1Sel3Spin_QTD.h" #include "DlgRef_SpinBox.h" -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_1Sel3Spin : public DlgRef_1Sel3Spin_QTD +class GEOM_DLGREF_EXPORT DlgRef_1Sel3Spin : public DlgRef_1Sel3Spin_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel3Spin_QTD.h b/src/DlgRef/DlgRef_1Sel3Spin_QTD.h index 600c8513b..61b0d21f0 100644 --- a/src/DlgRef/DlgRef_1Sel3Spin_QTD.h +++ b/src/DlgRef/DlgRef_1Sel3Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1SEL3SPIN_QTD_H #define DLGREF_1SEL3SPIN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -38,12 +40,8 @@ class QLabel; class QLineEdit; class QPushButton; class QSpinBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_1Sel3Spin_QTD : public QWidget + +class GEOM_DLGREF_EXPORT DlgRef_1Sel3Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel4Spin.h b/src/DlgRef/DlgRef_1Sel4Spin.h index ecf73564b..4dcfeb3c6 100644 --- a/src/DlgRef/DlgRef_1Sel4Spin.h +++ b/src/DlgRef/DlgRef_1Sel4Spin.h @@ -29,10 +29,12 @@ #ifndef DLGREF_1SEL4SPIN_H #define DLGREF_1SEL4SPIN_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_1Sel4Spin_QTD.h" #include "DlgRef_SpinBox.h" -class DlgRef_1Sel4Spin : public DlgRef_1Sel4Spin_QTD +class GEOM_DLGREF_EXPORT DlgRef_1Sel4Spin : public DlgRef_1Sel4Spin_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel4Spin_QTD.h b/src/DlgRef/DlgRef_1Sel4Spin_QTD.h index 1c8d90487..a865d411b 100644 --- a/src/DlgRef/DlgRef_1Sel4Spin_QTD.h +++ b/src/DlgRef/DlgRef_1Sel4Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1SEL4SPIN_QTD_H #define DLGREF_1SEL4SPIN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -39,7 +41,7 @@ class QLineEdit; class QPushButton; class QSpinBox; -class DlgRef_1Sel4Spin_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_1Sel4Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel5Spin.h b/src/DlgRef/DlgRef_1Sel5Spin.h index e7a3b3b0c..e1bbefbeb 100644 --- a/src/DlgRef/DlgRef_1Sel5Spin.h +++ b/src/DlgRef/DlgRef_1Sel5Spin.h @@ -29,16 +29,12 @@ #ifndef DLGREF_1SEL5SPIN_H #define DLGREF_1SEL5SPIN_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_1Sel5Spin_QTD.h" #include "DlgRef_SpinBox.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_1Sel5Spin : public DlgRef_1Sel5Spin_QTD +class GEOM_DLGREF_EXPORT DlgRef_1Sel5Spin : public DlgRef_1Sel5Spin_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel5Spin_QTD.h b/src/DlgRef/DlgRef_1Sel5Spin_QTD.h index 6342cfb75..d5375b19c 100644 --- a/src/DlgRef/DlgRef_1Sel5Spin_QTD.h +++ b/src/DlgRef/DlgRef_1Sel5Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1SEL5SPIN_QTD_H #define DLGREF_1SEL5SPIN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -39,7 +41,7 @@ class QLineEdit; class QPushButton; class QSpinBox; -class DlgRef_1Sel5Spin_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_1Sel5Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel_Ext.h b/src/DlgRef/DlgRef_1Sel_Ext.h index a13d4fc5b..ff29a6216 100644 --- a/src/DlgRef/DlgRef_1Sel_Ext.h +++ b/src/DlgRef/DlgRef_1Sel_Ext.h @@ -28,17 +28,13 @@ #ifndef DlgRef_1Sel_Ext_H #define DlgRef_1Sel_Ext_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_1Sel_QTD.h" class QGridLayout; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_1Sel_Ext : public DlgRef_1Sel_QTD +class GEOM_DLGREF_EXPORT DlgRef_1Sel_Ext : public DlgRef_1Sel_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Sel_QTD.h b/src/DlgRef/DlgRef_1Sel_QTD.h index f2f88eb2a..4fce28453 100644 --- a/src/DlgRef/DlgRef_1Sel_QTD.h +++ b/src/DlgRef/DlgRef_1Sel_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1SEL_QTD_H #define DLGREF_1SEL_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -38,13 +40,7 @@ class QLabel; class QLineEdit; class QPushButton; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_1Sel_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_1Sel_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Spin.h b/src/DlgRef/DlgRef_1Spin.h index 8addb5e68..8acaa2680 100644 --- a/src/DlgRef/DlgRef_1Spin.h +++ b/src/DlgRef/DlgRef_1Spin.h @@ -29,14 +29,12 @@ #ifndef DLGREF_1SPIN_H #define DLGREF_1SPIN_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_1Spin_QTD.h" #include "DlgRef_SpinBox.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_1Spin : public DlgRef_1Spin_QTD + +class GEOM_DLGREF_EXPORT DlgRef_1Spin : public DlgRef_1Spin_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_1Spin_QTD.h b/src/DlgRef/DlgRef_1Spin_QTD.h index 35c71c686..25177e9e5 100644 --- a/src/DlgRef/DlgRef_1Spin_QTD.h +++ b/src/DlgRef/DlgRef_1Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_1SPIN_QTD_H #define DLGREF_1SPIN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -36,12 +38,8 @@ class QGridLayout; class QGroupBox; class QLabel; class QSpinBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_1Spin_QTD : public QWidget + +class GEOM_DLGREF_EXPORT DlgRef_1Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel1Spin.h b/src/DlgRef/DlgRef_2Sel1Spin.h index 296aabe2e..8e401687f 100644 --- a/src/DlgRef/DlgRef_2Sel1Spin.h +++ b/src/DlgRef/DlgRef_2Sel1Spin.h @@ -29,20 +29,12 @@ #ifndef DLGREF_2SEL1SPIN_H #define DLGREF_2SEL1SPIN_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_2Sel1Spin_QTD.h" #include "DlgRef_SpinBox.h" -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_2Sel1Spin : public DlgRef_2Sel1Spin_QTD +class GEOM_DLGREF_EXPORT DlgRef_2Sel1Spin : public DlgRef_2Sel1Spin_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel1Spin2Check.h b/src/DlgRef/DlgRef_2Sel1Spin2Check.h index 6b7b52b79..227dcee67 100644 --- a/src/DlgRef/DlgRef_2Sel1Spin2Check.h +++ b/src/DlgRef/DlgRef_2Sel1Spin2Check.h @@ -29,15 +29,12 @@ #ifndef DLGREF_2SEL1SPIN2CHECK_H #define DLGREF_2SEL1SPIN2CHECK_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_2Sel1Spin2Check_QTD.h" #include "DlgRef_SpinBox.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_2Sel1Spin2Check : public DlgRef_2Sel1Spin2Check_QTD +class GEOM_DLGREF_EXPORT DlgRef_2Sel1Spin2Check : public DlgRef_2Sel1Spin2Check_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel1Spin2Check_QTD.h b/src/DlgRef/DlgRef_2Sel1Spin2Check_QTD.h index 57285b27d..617fd445a 100644 --- a/src/DlgRef/DlgRef_2Sel1Spin2Check_QTD.h +++ b/src/DlgRef/DlgRef_2Sel1Spin2Check_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_2SEL1SPIN2CHECK_QTD_H #define DLGREF_2SEL1SPIN2CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -40,7 +42,7 @@ class QLineEdit; class QPushButton; class QSpinBox; -class DlgRef_2Sel1Spin2Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_2Sel1Spin2Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel1Spin_QTD.h b/src/DlgRef/DlgRef_2Sel1Spin_QTD.h index 684b26756..d35c3606e 100644 --- a/src/DlgRef/DlgRef_2Sel1Spin_QTD.h +++ b/src/DlgRef/DlgRef_2Sel1Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_2SEL1SPIN_QTD_H #define DLGREF_2SEL1SPIN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -39,13 +41,7 @@ class QLineEdit; class QPushButton; class QSpinBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_2Sel1Spin_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_2Sel1Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel2Spin.h b/src/DlgRef/DlgRef_2Sel2Spin.h index 8b296092b..ed09840e0 100644 --- a/src/DlgRef/DlgRef_2Sel2Spin.h +++ b/src/DlgRef/DlgRef_2Sel2Spin.h @@ -29,19 +29,12 @@ #ifndef DLGREF_2SEL2SPIN_H #define DLGREF_2SEL2SPIN_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_2Sel2Spin_QTD.h" #include "DlgRef_SpinBox.h" -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_2Sel2Spin : public DlgRef_2Sel2Spin_QTD + +class GEOM_DLGREF_EXPORT DlgRef_2Sel2Spin : public DlgRef_2Sel2Spin_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel2Spin1Check.h b/src/DlgRef/DlgRef_2Sel2Spin1Check.h index e20a18a20..b15de5665 100644 --- a/src/DlgRef/DlgRef_2Sel2Spin1Check.h +++ b/src/DlgRef/DlgRef_2Sel2Spin1Check.h @@ -29,16 +29,12 @@ #ifndef DLGREF_2SEL2SPIN1CHECK_H #define DLGREF_2SEL2SPIN1CHECK_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_2Sel2Spin1Check_QTD.h" #include "DlgRef_SpinBox.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_2Sel2Spin1Check : public DlgRef_2Sel2Spin1Check_QTD +class GEOM_DLGREF_EXPORT DlgRef_2Sel2Spin1Check : public DlgRef_2Sel2Spin1Check_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.h b/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.h index d8013152d..c3d703005 100644 --- a/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.h +++ b/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_2SEL2SPIN1CHECK_QTD_H #define DLGREF_2SEL2SPIN1CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -40,7 +42,7 @@ class QLineEdit; class QPushButton; class QSpinBox; -class DlgRef_2Sel2Spin1Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_2Sel2Spin1Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel2Spin_QTD.h b/src/DlgRef/DlgRef_2Sel2Spin_QTD.h index 7ccf497d4..bc5157559 100644 --- a/src/DlgRef/DlgRef_2Sel2Spin_QTD.h +++ b/src/DlgRef/DlgRef_2Sel2Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_2SEL2SPIN_QTD_H #define DLGREF_2SEL2SPIN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -39,13 +41,7 @@ class QLineEdit; class QPushButton; class QSpinBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_2Sel2Spin_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_2Sel2Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel3Spin.h b/src/DlgRef/DlgRef_2Sel3Spin.h index 4ca8e585e..53b857b66 100644 --- a/src/DlgRef/DlgRef_2Sel3Spin.h +++ b/src/DlgRef/DlgRef_2Sel3Spin.h @@ -29,16 +29,12 @@ #ifndef DLGREF_2SEL3SPIN_H #define DLGREF_2SEL3SPIN_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_2Sel3Spin_QTD.h" #include "DlgRef_SpinBox.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_2Sel3Spin : public DlgRef_2Sel3Spin_QTD +class GEOM_DLGREF_EXPORT DlgRef_2Sel3Spin : public DlgRef_2Sel3Spin_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel3Spin_QTD.h b/src/DlgRef/DlgRef_2Sel3Spin_QTD.h index 038b21147..8b49e9f50 100644 --- a/src/DlgRef/DlgRef_2Sel3Spin_QTD.h +++ b/src/DlgRef/DlgRef_2Sel3Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_2SEL3SPIN_QTD_H #define DLGREF_2SEL3SPIN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -38,12 +40,8 @@ class QLabel; class QLineEdit; class QPushButton; class QSpinBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_2Sel3Spin_QTD : public QWidget + +class GEOM_DLGREF_EXPORT DlgRef_2Sel3Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel4Spin1Check.h b/src/DlgRef/DlgRef_2Sel4Spin1Check.h index a3275451e..1d5e0c4ab 100644 --- a/src/DlgRef/DlgRef_2Sel4Spin1Check.h +++ b/src/DlgRef/DlgRef_2Sel4Spin1Check.h @@ -29,16 +29,13 @@ #ifndef DLGREF_2SEL4SPIN1CHECK_H #define DLGREF_2SEL4SPIN1CHECK_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_2Sel4Spin1Check_QTD.h" #include "DlgRef_SpinBox.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_2Sel4Spin1Check : public DlgRef_2Sel4Spin1Check_QTD +class GEOM_DLGREF_EXPORT DlgRef_2Sel4Spin1Check : public DlgRef_2Sel4Spin1Check_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.h b/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.h index 5a265234e..7f49d2b09 100644 --- a/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.h +++ b/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_2SEL4SPIN1CHECK_QTD_H #define DLGREF_2SEL4SPIN1CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -40,7 +42,7 @@ class QLineEdit; class QPushButton; class QSpinBox; -class DlgRef_2Sel4Spin1Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_2Sel4Spin1Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Sel_QTD.h b/src/DlgRef/DlgRef_2Sel_QTD.h index 2d9519cf6..c28d7e908 100644 --- a/src/DlgRef/DlgRef_2Sel_QTD.h +++ b/src/DlgRef/DlgRef_2Sel_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_2SEL_QTD_H #define DLGREF_2SEL_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -38,13 +40,7 @@ class QLabel; class QLineEdit; class QPushButton; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_2Sel_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_2Sel_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Spin.h b/src/DlgRef/DlgRef_2Spin.h index d8ec09a23..a69052c94 100644 --- a/src/DlgRef/DlgRef_2Spin.h +++ b/src/DlgRef/DlgRef_2Spin.h @@ -31,12 +31,10 @@ #include "DlgRef_2Spin_QTD.h" #include "DlgRef_SpinBox.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_2Spin : public DlgRef_2Spin_QTD + +#include "GEOM_DlgRef.hxx" + +class GEOM_DLGREF_EXPORT DlgRef_2Spin : public DlgRef_2Spin_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_2Spin_QTD.h b/src/DlgRef/DlgRef_2Spin_QTD.h index fb7074f24..b820d4b55 100644 --- a/src/DlgRef/DlgRef_2Spin_QTD.h +++ b/src/DlgRef/DlgRef_2Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_2SPIN_QTD_H #define DLGREF_2SPIN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -36,12 +38,8 @@ class QGridLayout; class QGroupBox; class QLabel; class QSpinBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_2Spin_QTD : public QWidget + +class GEOM_DLGREF_EXPORT DlgRef_2Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_3Check_QTD.h b/src/DlgRef/DlgRef_3Check_QTD.h index bbc514015..976bf8904 100644 --- a/src/DlgRef/DlgRef_3Check_QTD.h +++ b/src/DlgRef/DlgRef_3Check_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_3CHECK_QTD_H #define DLGREF_3CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -36,13 +38,7 @@ class QGridLayout; class QButtonGroup; class QRadioButton; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_3Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_3Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_3Sel1Spin.h b/src/DlgRef/DlgRef_3Sel1Spin.h index bd5632f5d..60a779899 100644 --- a/src/DlgRef/DlgRef_3Sel1Spin.h +++ b/src/DlgRef/DlgRef_3Sel1Spin.h @@ -29,25 +29,18 @@ #ifndef DlgRef_3SEL_1SPIN_H #define DlgRef_3SEL_1SPIN_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_3Sel_QTD.h" #include "DlgRef_SpinBox.h" #include #include -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif + //================================================================================= // class : DlgRef_3Sel1Spin // purpose : extension of a DlgRef_3Sel_QTD class, 1 additional spin box is added //================================================================================= -class DLGREF_WNT_EXPORT DlgRef_3Sel1Spin : public DlgRef_3Sel_QTD +class GEOM_DLGREF_EXPORT DlgRef_3Sel1Spin : public DlgRef_3Sel_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_3Sel3Spin1Check.h b/src/DlgRef/DlgRef_3Sel3Spin1Check.h index ec2f3c8f3..d1731cfd0 100644 --- a/src/DlgRef/DlgRef_3Sel3Spin1Check.h +++ b/src/DlgRef/DlgRef_3Sel3Spin1Check.h @@ -29,16 +29,12 @@ #ifndef DLGREF_3SEL3SPIN1CHECK_H #define DLGREF_3SEL3SPIN1CHECK_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_3Sel3Spin1Check_QTD.h" #include "DlgRef_SpinBox.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_3Sel3Spin1Check : public DlgRef_3Sel3Spin1Check_QTD +class GEOM_DLGREF_EXPORT DlgRef_3Sel3Spin1Check : public DlgRef_3Sel3Spin1Check_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.h b/src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.h index ecdf618cb..a4c0c63b6 100644 --- a/src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.h +++ b/src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_3SEL3SPIN1CHECK_QTD_H #define DLGREF_3SEL3SPIN1CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -40,7 +42,7 @@ class QLineEdit; class QPushButton; class QSpinBox; -class DlgRef_3Sel3Spin1Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_3Sel3Spin1Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_3Sel4Spin2Check.h b/src/DlgRef/DlgRef_3Sel4Spin2Check.h index 232c4d1f1..696c6461b 100644 --- a/src/DlgRef/DlgRef_3Sel4Spin2Check.h +++ b/src/DlgRef/DlgRef_3Sel4Spin2Check.h @@ -29,16 +29,12 @@ #ifndef DLGREF_3SEL4SPIN2CHECK_H #define DLGREF_3SEL4SPIN2CHECK_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_3Sel4Spin2Check_QTD.h" #include "DlgRef_SpinBox.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_3Sel4Spin2Check : public DlgRef_3Sel4Spin2Check_QTD +class GEOM_DLGREF_EXPORT DlgRef_3Sel4Spin2Check : public DlgRef_3Sel4Spin2Check_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.h b/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.h index c8e8781dc..9503dec91 100644 --- a/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.h +++ b/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_3SEL4SPIN2CHECK_QTD_H #define DLGREF_3SEL4SPIN2CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -40,7 +42,7 @@ class QLineEdit; class QPushButton; class QSpinBox; -class DlgRef_3Sel4Spin2Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_3Sel4Spin2Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_3Sel_QTD.h b/src/DlgRef/DlgRef_3Sel_QTD.h index 47b6af943..f4b44a57f 100644 --- a/src/DlgRef/DlgRef_3Sel_QTD.h +++ b/src/DlgRef/DlgRef_3Sel_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_3SEL_QTD_H #define DLGREF_3SEL_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -38,13 +40,7 @@ class QLabel; class QLineEdit; class QPushButton; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_3Sel_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_3Sel_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_3Spin.h b/src/DlgRef/DlgRef_3Spin.h index b18bc6dcb..18ca9f610 100644 --- a/src/DlgRef/DlgRef_3Spin.h +++ b/src/DlgRef/DlgRef_3Spin.h @@ -29,19 +29,12 @@ #ifndef DLGREF_3SPIN_H #define DLGREF_3SPIN_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_3Spin_QTD.h" #include "DlgRef_SpinBox.h" -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_3Spin : public DlgRef_3Spin_QTD + +class GEOM_DLGREF_EXPORT DlgRef_3Spin : public DlgRef_3Spin_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_3Spin1Check.h b/src/DlgRef/DlgRef_3Spin1Check.h index 45a9e7e23..36c5fc2ac 100644 --- a/src/DlgRef/DlgRef_3Spin1Check.h +++ b/src/DlgRef/DlgRef_3Spin1Check.h @@ -29,15 +29,12 @@ #ifndef DLGREF_3SPIN1CHECK_H #define DLGREF_3SPIN1CHECK_H +#include "GEOM_DlgRef.hxx" + #include "DlgRef_3Spin1Check_QTD.h" #include "DlgRef_SpinBox.h" -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_3Spin1Check : public DlgRef_3Spin1Check_QTD +class GEOM_DLGREF_EXPORT DlgRef_3Spin1Check : public DlgRef_3Spin1Check_QTD { Q_OBJECT diff --git a/src/DlgRef/DlgRef_3Spin1Check_QTD.h b/src/DlgRef/DlgRef_3Spin1Check_QTD.h index a810df5e8..6df92fb08 100644 --- a/src/DlgRef/DlgRef_3Spin1Check_QTD.h +++ b/src/DlgRef/DlgRef_3Spin1Check_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_3SPIN1CHECK_QTD_H #define DLGREF_3SPIN1CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -38,13 +40,7 @@ class QLabel; class QRadioButton; class QSpinBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_3Spin1Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_3Spin1Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_3Spin_QTD.h b/src/DlgRef/DlgRef_3Spin_QTD.h index f7d9363cd..7f76b90b5 100644 --- a/src/DlgRef/DlgRef_3Spin_QTD.h +++ b/src/DlgRef/DlgRef_3Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_3SPIN_QTD_H #define DLGREF_3SPIN_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -37,12 +39,7 @@ class QGroupBox; class QLabel; class QSpinBox; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif -class DLGREF_WNT_EXPORT DlgRef_3Spin_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_3Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_4Sel1List1Check_QTD.h b/src/DlgRef/DlgRef_4Sel1List1Check_QTD.h index 1d78c4cb7..3d4a9a42f 100644 --- a/src/DlgRef/DlgRef_4Sel1List1Check_QTD.h +++ b/src/DlgRef/DlgRef_4Sel1List1Check_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_4SEL1LIST1CHECK_QTD_H #define DLGREF_4SEL1LIST1CHECK_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -41,13 +43,7 @@ class QPushButton; class QCheckBox; class QPushButton; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_4Sel1List1Check_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_4Sel1List1Check_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_4Sel1List_QTD.h b/src/DlgRef/DlgRef_4Sel1List_QTD.h index b3a2035dd..d391942f9 100644 --- a/src/DlgRef/DlgRef_4Sel1List_QTD.h +++ b/src/DlgRef/DlgRef_4Sel1List_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_4SEL1LIST_QTD_H #define DLGREF_4SEL1LIST_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -39,7 +41,7 @@ class QLabel; class QLineEdit; class QPushButton; -class DlgRef_4Sel1List_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_4Sel1List_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_6Sel_QTD.h b/src/DlgRef/DlgRef_6Sel_QTD.h index 56c5ec440..517c3a5aa 100644 --- a/src/DlgRef/DlgRef_6Sel_QTD.h +++ b/src/DlgRef/DlgRef_6Sel_QTD.h @@ -28,6 +28,8 @@ #ifndef DLGREF_6SEL_QTD_H #define DLGREF_6SEL_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include class QVBoxLayout; @@ -38,13 +40,7 @@ class QLabel; class QLineEdit; class QPushButton; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif - -class DLGREF_WNT_EXPORT DlgRef_6Sel_QTD : public QWidget +class GEOM_DLGREF_EXPORT DlgRef_6Sel_QTD : public QWidget { Q_OBJECT diff --git a/src/DlgRef/DlgRef_Skeleton_QTD.h b/src/DlgRef/DlgRef_Skeleton_QTD.h index 107b316a0..511d48993 100644 --- a/src/DlgRef/DlgRef_Skeleton_QTD.h +++ b/src/DlgRef/DlgRef_Skeleton_QTD.h @@ -29,6 +29,8 @@ #ifndef DLGREF_SKELETON_QTD_H #define DLGREF_SKELETON_QTD_H +#include "GEOM_DlgRef.hxx" + #include #include @@ -43,7 +45,7 @@ class QRadioButton; class QLineEdit; class QLabel; -class DlgRef_Skeleton_QTD : public QDialog +class GEOM_DLGREF_EXPORT DlgRef_Skeleton_QTD : public QDialog { Q_OBJECT diff --git a/src/DlgRef/DlgRef_SpinBox.h b/src/DlgRef/DlgRef_SpinBox.h index 9cc039d45..d9675462b 100644 --- a/src/DlgRef/DlgRef_SpinBox.h +++ b/src/DlgRef/DlgRef_SpinBox.h @@ -29,17 +29,9 @@ #ifndef GEOMSPINBOX_H #define GEOMSPINBOX_H +#include "GEOM_DlgRef.hxx" + #include "QtxDblSpinBox.h" -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define DLGREF_WNT_EXPORT __declspec( dllexport ) -#else -#define DLGREF_WNT_EXPORT -#endif #define COORD_MIN -1e+15 #define COORD_MAX +1e+15 @@ -49,7 +41,7 @@ // class : DlgRef_SpinBox // purpose : Derivated from QSpinBox class and modified to accept floats //================================================================================= -class DLGREF_WNT_EXPORT DlgRef_SpinBox : public QtxDblSpinBox +class GEOM_DLGREF_EXPORT DlgRef_SpinBox : public QtxDblSpinBox { Q_OBJECT diff --git a/src/DlgRef/Makefile.in b/src/DlgRef/Makefile.in index c349977c6..1f5b195c5 100644 --- a/src/DlgRef/Makefile.in +++ b/src/DlgRef/Makefile.in @@ -58,6 +58,7 @@ LIB_SRC = DlgRef_Skeleton_QTD.cxx \ DlgRef_2Sel4Spin1Check_QTD.cxx \ DlgRef_3Sel4Spin2Check_QTD.cxx \ DlgRef_4Sel1List_QTD.cxx \ + DlgRef_2Sel1List_QTD.cxx \ DlgRef_1List1Spin1Btn_QTD.cxx \ DlgRef_4Sel1List1Check_QTD.cxx \ DlgRef_1Spin_QTD.cxx \ @@ -65,6 +66,7 @@ LIB_SRC = DlgRef_Skeleton_QTD.cxx \ DlgRef_3Spin_QTD.cxx \ DlgRef_3Spin1Check_QTD.cxx \ DlgRef_3Sel3Spin1Check_QTD.cxx \ + DlgRef_4Sel1Spin2Check_QTD.cxx \ DlgRef_SpinBox.cxx \ DlgRef_1Sel1Spin.cxx \ DlgRef_1Sel2Spin.cxx \ @@ -86,7 +88,8 @@ LIB_SRC = DlgRef_Skeleton_QTD.cxx \ DlgRef_3Spin1Check.cxx \ DlgRef_3Sel1Spin.cxx \ DlgRef_3Check_QTD.cxx \ - DlgRef_6Sel_QTD.cxx + DlgRef_6Sel_QTD.cxx \ + DlgRef_4Sel1Spin2Check.cxx LIB_MOC = \ DlgRef_Skeleton_QTD.h \ @@ -110,6 +113,7 @@ LIB_MOC = \ DlgRef_2Sel4Spin1Check_QTD.h \ DlgRef_3Sel4Spin2Check_QTD.h \ DlgRef_4Sel1List_QTD.h \ + DlgRef_2Sel1List_QTD.h \ DlgRef_1List1Spin1Btn_QTD.h \ DlgRef_4Sel1List1Check_QTD.h \ DlgRef_1Spin_QTD.h \ @@ -117,6 +121,7 @@ LIB_MOC = \ DlgRef_3Spin_QTD.h \ DlgRef_3Spin1Check_QTD.h \ DlgRef_3Sel3Spin1Check_QTD.h \ + DlgRef_4Sel1Spin2Check_QTD.h \ DlgRef_SpinBox.h \ DlgRef_1Sel1Spin.h \ DlgRef_1Sel2Spin.h \ @@ -139,10 +144,12 @@ LIB_MOC = \ DlgRef_3Sel1Spin.h \ DlgRef_1Sel_Ext.h \ DlgRef_3Check_QTD.h \ - DlgRef_6Sel_QTD.h + DlgRef_6Sel_QTD.h \ + DlgRef_4Sel1Spin2Check.h # header files -EXPORT_HEADERS= $(LIB_MOC) +EXPORT_HEADERS= $(LIB_MOC) \ + GEOM_DlgRef.hxx LIB_CLIENT_IDL = diff --git a/src/DlgRef/UIFiles/ui_to_cxx b/src/DlgRef/UIFiles/ui_to_cxx index 417de861e..bd1f907c1 100755 --- a/src/DlgRef/UIFiles/ui_to_cxx +++ b/src/DlgRef/UIFiles/ui_to_cxx @@ -14,8 +14,7 @@ # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +#// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # #!/bin/sh @@ -100,5 +99,8 @@ #uic -o DlgRef_6Sel_QTD.h DlgRef_6Sel_QTD.ui #uic -o DlgRef_6Sel_QTD.cxx -impl DlgRef_6Sel_QTD.h DlgRef_6Sel_QTD.ui -uic -o DlgRef_3Check_QTD.h DlgRef_3Check_QTD.ui -uic -o DlgRef_3Check_QTD.cxx -impl DlgRef_3Check_QTD.h DlgRef_3Check_QTD.ui +#uic -o DlgRef_3Check_QTD.h DlgRef_3Check_QTD.ui +#uic -o DlgRef_3Check_QTD.cxx -impl DlgRef_3Check_QTD.h DlgRef_3Check_QTD.ui + +uic -o DlgRef_4Sel1Spin2Check_QTD.h DlgRef_4Sel1Spin2Check_QTD.ui +uic -o DlgRef_4Sel1Spin2Check_QTD.cxx -impl DlgRef_4Sel1Spin2Check_QTD.h DlgRef_4Sel1Spin2Check_QTD.ui diff --git a/src/EntityGUI/EntityGUI.cxx b/src/EntityGUI/EntityGUI.cxx index 5fd229aaf..8bdee4ae6 100644 --- a/src/EntityGUI/EntityGUI.cxx +++ b/src/EntityGUI/EntityGUI.cxx @@ -221,9 +221,7 @@ bool EntityGUI::SObjectExist(const _PTR(SObject)& theFatherObject, const char* I //===================================================================================== extern "C" { -#ifdef WNT - __declspec( dllexport ) -#endif +GEOM_ENTITYGUI_EXPORT GEOMGUI* GetLibGUI( GeometryGUI* parent ) { return new EntityGUI( parent ); diff --git a/src/EntityGUI/EntityGUI.h b/src/EntityGUI/EntityGUI.h index f69297f8f..a4fd8c001 100644 --- a/src/EntityGUI/EntityGUI.h +++ b/src/EntityGUI/EntityGUI.h @@ -28,6 +28,8 @@ #ifndef ENTITYGUI_H #define ENTITYGUI_H +#include "GEOM_EntityGUI.hxx" + #include "GEOMGUI.h" #include "SALOMEDSClient.hxx" @@ -39,7 +41,7 @@ // class : EntityGUI // purpose : //================================================================================= -class EntityGUI : public GEOMGUI +class GEOM_ENTITYGUI_EXPORT EntityGUI : public GEOMGUI { public : EntityGUI( GeometryGUI* parent ); // hide constructor to avoid direct creation diff --git a/src/EntityGUI/EntityGUI_1Sel_QTD.h b/src/EntityGUI/EntityGUI_1Sel_QTD.h index e7c63e59b..401ddddc7 100644 --- a/src/EntityGUI/EntityGUI_1Sel_QTD.h +++ b/src/EntityGUI/EntityGUI_1Sel_QTD.h @@ -28,6 +28,8 @@ #ifndef ENTITYGUI_1SEL_QTD_H #define ENTITYGUI_1SEL_QTD_H +#include "GEOM_EntityGUI.hxx" + #include #include class QVBoxLayout; @@ -38,7 +40,7 @@ class QLabel; class QLineEdit; class QPushButton; -class EntityGUI_1Sel_QTD : public QWidget +class GEOM_ENTITYGUI_EXPORT EntityGUI_1Sel_QTD : public QWidget { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_1Spin.h b/src/EntityGUI/EntityGUI_1Spin.h index e8d9600d2..5631e0bac 100644 --- a/src/EntityGUI/EntityGUI_1Spin.h +++ b/src/EntityGUI/EntityGUI_1Spin.h @@ -29,10 +29,12 @@ #ifndef ENTITYGUI_1SPIN_H #define ENTITYGUI_1SPIN_H +#include "GEOM_EntityGUI.hxx" + #include "EntityGUI_1Spin_QTD.h" #include "DlgRef_SpinBox.h" -class EntityGUI_1Spin : public EntityGUI_1Spin_QTD +class GEOM_ENTITYGUI_EXPORT EntityGUI_1Spin : public EntityGUI_1Spin_QTD { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_1Spin_QTD.h b/src/EntityGUI/EntityGUI_1Spin_QTD.h index 8d00f3acf..e525552bb 100644 --- a/src/EntityGUI/EntityGUI_1Spin_QTD.h +++ b/src/EntityGUI/EntityGUI_1Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef ENTITYGUI_1SPIN_QTD_H #define ENTITYGUI_1SPIN_QTD_H +#include "GEOM_EntityGUI.hxx" + #include #include class QVBoxLayout; @@ -38,7 +40,7 @@ class QLabel; class QPushButton; class QSpinBox; -class EntityGUI_1Spin_QTD : public QWidget +class GEOM_ENTITYGUI_EXPORT EntityGUI_1Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_2Spin.h b/src/EntityGUI/EntityGUI_2Spin.h index e043caae5..9d79e478a 100644 --- a/src/EntityGUI/EntityGUI_2Spin.h +++ b/src/EntityGUI/EntityGUI_2Spin.h @@ -29,10 +29,12 @@ #ifndef ENTITYGUI_2SPIN_H #define ENTITYGUI_2SPIN_H +#include "GEOM_EntityGUI.hxx" + #include "EntityGUI_2Spin_QTD.h" #include "DlgRef_SpinBox.h" -class EntityGUI_2Spin : public EntityGUI_2Spin_QTD +class GEOM_ENTITYGUI_EXPORT EntityGUI_2Spin : public EntityGUI_2Spin_QTD { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_2Spin_QTD.h b/src/EntityGUI/EntityGUI_2Spin_QTD.h index 94c688279..718f80e42 100644 --- a/src/EntityGUI/EntityGUI_2Spin_QTD.h +++ b/src/EntityGUI/EntityGUI_2Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef ENTITYGUI_2SPIN_QTD_H #define ENTITYGUI_2SPIN_QTD_H +#include "GEOM_EntityGUI.hxx" + #include #include class QVBoxLayout; @@ -38,7 +40,7 @@ class QLabel; class QPushButton; class QSpinBox; -class EntityGUI_2Spin_QTD : public QWidget +class GEOM_ENTITYGUI_EXPORT EntityGUI_2Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_3Spin.h b/src/EntityGUI/EntityGUI_3Spin.h index e78243785..4b612bdf1 100644 --- a/src/EntityGUI/EntityGUI_3Spin.h +++ b/src/EntityGUI/EntityGUI_3Spin.h @@ -29,10 +29,12 @@ #ifndef ENTITYGUI_3SPIN_H #define ENTITYGUI_3SPIN_H +#include "GEOM_EntityGUI.hxx" + #include "EntityGUI_3Spin_QTD.h" #include "DlgRef_SpinBox.h" -class EntityGUI_3Spin : public EntityGUI_3Spin_QTD +class GEOM_ENTITYGUI_EXPORT EntityGUI_3Spin : public EntityGUI_3Spin_QTD { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_3Spin_QTD.h b/src/EntityGUI/EntityGUI_3Spin_QTD.h index 9b671ec23..1235b160b 100644 --- a/src/EntityGUI/EntityGUI_3Spin_QTD.h +++ b/src/EntityGUI/EntityGUI_3Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef ENTITYGUI_3SPIN_QTD_H #define ENTITYGUI_3SPIN_QTD_H +#include "GEOM_EntityGUI.hxx" + #include #include class QVBoxLayout; @@ -38,7 +40,7 @@ class QLabel; class QPushButton; class QSpinBox; -class EntityGUI_3Spin_QTD : public QWidget +class GEOM_ENTITYGUI_EXPORT EntityGUI_3Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_4Spin.h b/src/EntityGUI/EntityGUI_4Spin.h index 0443e0c45..eeaf1965b 100644 --- a/src/EntityGUI/EntityGUI_4Spin.h +++ b/src/EntityGUI/EntityGUI_4Spin.h @@ -29,10 +29,12 @@ #ifndef ENTITYGUI_4SPIN_H #define ENTITYGUI_4SPIN_H +#include "GEOM_EntityGUI.hxx" + #include "EntityGUI_4Spin_QTD.h" #include "DlgRef_SpinBox.h" -class EntityGUI_4Spin : public EntityGUI_4Spin_QTD +class GEOM_ENTITYGUI_EXPORT EntityGUI_4Spin : public EntityGUI_4Spin_QTD { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_4Spin_QTD.h b/src/EntityGUI/EntityGUI_4Spin_QTD.h index 9b6e13a39..6ec375d90 100644 --- a/src/EntityGUI/EntityGUI_4Spin_QTD.h +++ b/src/EntityGUI/EntityGUI_4Spin_QTD.h @@ -28,6 +28,8 @@ #ifndef ENTITYGUI_4SPIN_QTD_H #define ENTITYGUI_4SPIN_QTD_H +#include "GEOM_EntityGUI.hxx" + #include #include class QVBoxLayout; @@ -38,7 +40,7 @@ class QLabel; class QPushButton; class QSpinBox; -class EntityGUI_4Spin_QTD : public QWidget +class GEOM_ENTITYGUI_EXPORT EntityGUI_4Spin_QTD : public QWidget { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_Dir1_QTD.h b/src/EntityGUI/EntityGUI_Dir1_QTD.h index 581320aa5..6ca2a1137 100644 --- a/src/EntityGUI/EntityGUI_Dir1_QTD.h +++ b/src/EntityGUI/EntityGUI_Dir1_QTD.h @@ -28,6 +28,8 @@ #ifndef ENTITYGUI_DIR1_QTD_H #define ENTITYGUI_DIR1_QTD_H +#include "GEOM_EntityGUI.hxx" + #include #include class QVBoxLayout; @@ -36,7 +38,7 @@ class QGridLayout; class QButtonGroup; class QRadioButton; -class EntityGUI_Dir1_QTD : public QWidget +class GEOM_ENTITYGUI_EXPORT EntityGUI_Dir1_QTD : public QWidget { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_Dir2_QTD.h b/src/EntityGUI/EntityGUI_Dir2_QTD.h index 302c80213..17480e83f 100644 --- a/src/EntityGUI/EntityGUI_Dir2_QTD.h +++ b/src/EntityGUI/EntityGUI_Dir2_QTD.h @@ -28,6 +28,8 @@ #ifndef ENTITYGUI_DIR2_QTD_H #define ENTITYGUI_DIR2_QTD_H +#include "GEOM_EntityGUI.hxx" + #include #include class QVBoxLayout; @@ -36,7 +38,7 @@ class QGridLayout; class QButtonGroup; class QRadioButton; -class EntityGUI_Dir2_QTD : public QWidget +class GEOM_ENTITYGUI_EXPORT EntityGUI_Dir2_QTD : public QWidget { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_Point_QTD.h b/src/EntityGUI/EntityGUI_Point_QTD.h index 0fcbd9066..453b09807 100644 --- a/src/EntityGUI/EntityGUI_Point_QTD.h +++ b/src/EntityGUI/EntityGUI_Point_QTD.h @@ -28,6 +28,8 @@ #ifndef ENTITYGUI_POINT_QTD_H #define ENTITYGUI_POINT_QTD_H +#include "GEOM_EntityGUI.hxx" + #include #include class QVBoxLayout; @@ -36,7 +38,7 @@ class QGridLayout; class QButtonGroup; class QRadioButton; -class EntityGUI_Point_QTD : public QWidget +class GEOM_ENTITYGUI_EXPORT EntityGUI_Point_QTD : public QWidget { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_Skeleton_QTD.h b/src/EntityGUI/EntityGUI_Skeleton_QTD.h index ca95dc439..70468d719 100644 --- a/src/EntityGUI/EntityGUI_Skeleton_QTD.h +++ b/src/EntityGUI/EntityGUI_Skeleton_QTD.h @@ -29,6 +29,8 @@ #ifndef ENTITYGUI_SKELETON_QTD_H #define ENTITYGUI_SKELETON_QTD_H +#include "GEOM_EntityGUI.hxx" + #include #include @@ -41,7 +43,7 @@ class QButtonGroup; class QRadioButton; class QPushButton; -class EntityGUI_Skeleton_QTD : public QDialog +class GEOM_ENTITYGUI_EXPORT EntityGUI_Skeleton_QTD : public QDialog { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index d81b9b85c..dac57b966 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -1,30 +1,30 @@ // GEOM GEOMGUI : GUI for Geometry component // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // // File : EntityGUI_SketcherDlg.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #include "EntityGUI_SketcherDlg.h" #include "Sketcher_Profile.hxx" @@ -58,7 +58,7 @@ using namespace std; //================================================================================= // class : EntityGUI_SketcherDlg() -// purpose : Constructs a EntityGUI_SketcherDlg which is a child of 'parent', with the +// purpose : Constructs a EntityGUI_SketcherDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. @@ -80,7 +80,7 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent, buttonClose->setText(tr("GEOM_BUT_CLOSE_SKETCH")); buttonHelp->setText(tr("GEOM_BUT_HELP")); - GroupVal->close(TRUE); + GroupVal->close(TRUE); GroupDest2->close(TRUE); GroupDest3->close(TRUE); @@ -132,24 +132,42 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent, Group1Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); Group1Spin->buttonUndo->setPixmap(image1); Group1Spin->buttonRedo->setPixmap(image2); + QWidget::setTabOrder(Group1Spin->SpinBox_DX , Group1Spin->buttonApply); + QWidget::setTabOrder(Group1Spin->buttonApply, Group1Spin->buttonUndo); + QWidget::setTabOrder(Group1Spin->buttonUndo , Group1Spin->buttonRedo); Group2Spin = new EntityGUI_2Spin(this, "Group2Spin"); Group2Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES")); Group2Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); Group2Spin->buttonUndo->setPixmap(image1); Group2Spin->buttonRedo->setPixmap(image2); + QWidget::setTabOrder(Group2Spin->SpinBox_DX , Group2Spin->SpinBox_DY); + QWidget::setTabOrder(Group2Spin->SpinBox_DY , Group2Spin->buttonApply); + QWidget::setTabOrder(Group2Spin->buttonApply, Group2Spin->buttonUndo); + QWidget::setTabOrder(Group2Spin->buttonUndo , Group2Spin->buttonRedo); Group3Spin = new EntityGUI_3Spin(this, "Group3Spin"); Group3Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES")); Group3Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); Group3Spin->buttonUndo->setPixmap(image1); Group3Spin->buttonRedo->setPixmap(image2); + QWidget::setTabOrder(Group3Spin->SpinBox_DX , Group3Spin->SpinBox_DY); + QWidget::setTabOrder(Group3Spin->SpinBox_DY , Group3Spin->SpinBox_DZ); + QWidget::setTabOrder(Group3Spin->SpinBox_DZ , Group3Spin->buttonApply); + QWidget::setTabOrder(Group3Spin->buttonApply, Group3Spin->buttonUndo); + QWidget::setTabOrder(Group3Spin->buttonUndo , Group3Spin->buttonRedo); Group4Spin = new EntityGUI_4Spin(this, "Group4Spin"); Group4Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES")); Group4Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); Group4Spin->buttonUndo->setPixmap(image1); Group4Spin->buttonRedo->setPixmap(image2); + QWidget::setTabOrder(Group4Spin->SpinBox_DX , Group4Spin->SpinBox_DY); + QWidget::setTabOrder(Group4Spin->SpinBox_DY , Group4Spin->SpinBox_DZ); + QWidget::setTabOrder(Group4Spin->SpinBox_DZ , Group4Spin->SpinBox_DS); + QWidget::setTabOrder(Group4Spin->SpinBox_DS , Group4Spin->buttonApply); + QWidget::setTabOrder(Group4Spin->buttonApply, Group4Spin->buttonUndo); + QWidget::setTabOrder(Group4Spin->buttonUndo , Group4Spin->buttonRedo); Layout5->addMultiCellWidget(GroupPt, 1, 1, 0, 1); Layout5->addWidget(GroupD1, 1, 0); @@ -217,7 +235,19 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent, connect(myGeometryGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); connect(myGeometryGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); - + + // install event filter on spin-boxes to provide Apply action on Return pressed + Group1Spin->SpinBox_DX->installEventFilter(this); + Group2Spin->SpinBox_DX->installEventFilter(this); + Group2Spin->SpinBox_DY->installEventFilter(this); + Group3Spin->SpinBox_DX->installEventFilter(this); + Group3Spin->SpinBox_DY->installEventFilter(this); + Group3Spin->SpinBox_DZ->installEventFilter(this); + Group4Spin->SpinBox_DX->installEventFilter(this); + Group4Spin->SpinBox_DY->installEventFilter(this); + Group4Spin->SpinBox_DZ->installEventFilter(this); + Group4Spin->SpinBox_DS->installEventFilter(this); + Init(); } @@ -228,7 +258,42 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(GeometryGUI* GUI, QWidget* parent, //================================================================================= EntityGUI_SketcherDlg::~EntityGUI_SketcherDlg() { - myGeometryGUI->SetActiveDialogBox( 0 ); + myGeometryGUI->SetActiveDialogBox( 0 ); +} + + +//================================================================================= +// function : eventFilter() +// purpose : event filter for spin-boxes to provide Apply action on Return pressed +//================================================================================= +bool EntityGUI_SketcherDlg::eventFilter (QObject* object, QEvent* event) +{ + if (event->type() == QEvent::KeyPress) { + QKeyEvent* ke = (QKeyEvent*)event; + if (ke->key() == Key_Return) { + if (object == Group1Spin->SpinBox_DX) { + Group1Spin->buttonApply->animateClick(); + return true; + } else if (object == Group2Spin->SpinBox_DX || + object == Group2Spin->SpinBox_DY) { + Group2Spin->buttonApply->animateClick(); + return true; + } else if (object == Group3Spin->SpinBox_DX || + object == Group3Spin->SpinBox_DY || + object == Group3Spin->SpinBox_DZ) { + Group3Spin->buttonApply->animateClick(); + return true; + } else if (object == Group4Spin->SpinBox_DX || + object == Group4Spin->SpinBox_DY || + object == Group4Spin->SpinBox_DZ || + object == Group4Spin->SpinBox_DS) { + Group4Spin->buttonApply->animateClick(); + return true; + } + } + } + + return EntityGUI_Skeleton_QTD::eventFilter(object, event); } @@ -289,7 +354,7 @@ void EntityGUI_SketcherDlg::Init() //================================================================================= void EntityGUI_SketcherDlg::InitClick() { - disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0); + disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0); Group1Sel->hide(); Group1Spin->hide(); @@ -359,13 +424,16 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId) { InitClick(); + // Get setting of step value from file configuration + double step = SUIT_Session::session()->resourceMgr()->doubleValue("Geometry", "SettingsGeomStep", 100.0); + if ( myConstructorId == 0 ) { // SEGMENT if ( constructorId == 1 ) { // XY mySketchType = PT_ABS; - Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); - Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2")); myX = 0.0; @@ -380,8 +448,8 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId) else if ( constructorId == 0 ) { // DXDY mySketchType = PT_RELATIVE; - Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); - Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2")); myDX = 0.0; @@ -397,8 +465,8 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId) { // Selection mySketchType = PT_SEL; myEditCurrentArgument = Group1Sel->LineEdit1; - connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), - SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; + connect(myGeometryGUI->getApp()->selectionMgr(), + SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); Group1Sel->show(); Group1Sel->buttonApply->setFocus(); SelectionIntoArgument(); @@ -428,6 +496,9 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) InitClick(); myAngle = 0.0; + // Get setting of step value from file configuration + double step = SUIT_Session::session()->resourceMgr()->doubleValue("Geometry", "SettingsGeomStep", 100.0); + if ( myConstructorId == 0 ) { // SEGMENT myX = 0.0; @@ -436,7 +507,7 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) if ( myConstructorDirId == 2 ) { // Angle Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); - Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2")); Group2Spin->SpinBox_DX->SetValue(myAngle); Group2Spin->buttonApply->setFocus(); @@ -460,7 +531,7 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y3")); Group2Spin->SpinBox_DY->SetValue(myY); } - } + } else if ( myConstructorDirId == 0 ) { // Perpendicular Group1Spin->show(); @@ -513,7 +584,7 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) { // DXDY Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); - Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2")); Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2")); myDX = 0.0; @@ -551,7 +622,7 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) { // Length mySketchType = DIR_ANGLE_LENGTH; Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); - Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2")); Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2")); @@ -570,7 +641,7 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) if ( constructorId == 2 ) { // Length mySketchType = DIR_PER_LENGTH; - Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); @@ -587,7 +658,7 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) if ( constructorId == 2 ) { // Length mySketchType = DIR_TAN_LENGTH; - Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); @@ -651,7 +722,7 @@ void EntityGUI_SketcherDlg::ClickOnEnd() tr( "GEOM_ERROR_STATUS" ), tr( "CANNOT_CLOSE" ), tr( "BUT_OK" ) ); return; } - + QString Command = myCommand.join( "" ) + GetNewCommand(); Sketcher_Profile aProfile (Command.ascii()); @@ -660,11 +731,11 @@ void EntityGUI_SketcherDlg::ClickOnEnd() TopoDS_Shape myShape; if ( aProfile.IsDone() ) myShape = aProfile.GetShape(); - + if(myShape.ShapeType() != TopAbs_VERTEX) myCommand.append( ":WW" ); } - else + else myIsAllAdded = true; if( myCommand.size() > 2 ) @@ -680,7 +751,7 @@ void EntityGUI_SketcherDlg::ClickOnEnd() //================================================================================= bool EntityGUI_SketcherDlg::ClickOnApply() { - ((QPushButton*)sender())->setFocus(); + ((QPushButton*)sender())->setFocus(); // to update value of currently edited spin-box (PAL11948) myCommand.append( GetNewCommand() ); mySketchState = NEXT_POINT; @@ -695,6 +766,24 @@ bool EntityGUI_SketcherDlg::ClickOnApply() GEOMBase_Helper::displayPreview(); + // Set focus to SpinBox_DX + if (sender() == Group1Spin->buttonApply) { + (Group1Spin->SpinBox_DX)->setFocus(); + (Group1Spin->SpinBox_DX)->selectAll(); + } + else if (sender() == Group2Spin->buttonApply) { + (Group2Spin->SpinBox_DX)->setFocus(); + (Group2Spin->SpinBox_DX)->selectAll(); + } + else if (sender() == Group3Spin->buttonApply) { + (Group3Spin->SpinBox_DX)->setFocus(); + (Group3Spin->SpinBox_DX)->selectAll(); + } + else if (sender() == Group4Spin->buttonApply) { + (Group4Spin->SpinBox_DX)->setFocus(); + (Group4Spin->SpinBox_DX)->selectAll(); + } + return true; } @@ -705,12 +794,19 @@ bool EntityGUI_SketcherDlg::ClickOnApply() void EntityGUI_SketcherDlg::ClickOnHelp() { LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication()); - if (app) + if (app) app->onHelpContextModule(myGeometryGUI ? app->moduleName(myGeometryGUI->moduleName()) : QString(""), myHelpFileName); else { + QString platform; +#ifdef WIN32 + platform = "winapplication"; +#else + platform = "application"; +#endif + SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName), + arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), QObject::tr("BUT_OK")); } } @@ -726,7 +822,7 @@ void EntityGUI_SketcherDlg::ClickOnUndo() if(myCommand.count() == 1) { mySketchState = FIRST_POINT; - + RadioButton1->setChecked(true); TypeClicked(0); @@ -872,7 +968,7 @@ void EntityGUI_SketcherDlg::DeactivateActiveDialog() setEnabled( false ); globalSelection(); - disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0); + disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0); myGeometryGUI->SetActiveDialogBox(0); } @@ -887,8 +983,8 @@ void EntityGUI_SketcherDlg::ActivateThisDialog() setEnabled(true); myGeometryGUI->SetActiveDialogBox((QDialog*)this); - connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), - SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; + connect(myGeometryGUI->getApp()->selectionMgr(), + SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); //myGeometryGUI->SetState( 0 ); globalSelection( GEOM_POINT ); @@ -918,7 +1014,7 @@ void EntityGUI_SketcherDlg::enterEvent(QEvent* e) void EntityGUI_SketcherDlg::closeEvent(QCloseEvent* e) { //myGeometryGUI->SetState( -1 ); - disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0); + disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0); QDialog::closeEvent( e ); } @@ -1265,28 +1361,29 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects ) } QString cmd; - if( ( mySketchState != FIRST_POINT && myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) { + if( ( mySketchState != FIRST_POINT && + myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) { cmd = myCommand.join( "" ); if ( Group1Sel->isVisible() ) { Group1Sel->buttonApply->setEnabled(false); - Group1Sel->buttonApply->setFocus(); + //Group1Sel->buttonApply->setFocus(); } if ( Group1Spin->isVisible() ) { Group1Spin->buttonApply->setEnabled(false); - Group1Spin->buttonApply->setFocus(); + //Group1Spin->buttonApply->setFocus(); } if ( Group2Spin->isVisible() ) { Group2Spin->buttonApply->setEnabled(false); - Group2Spin->buttonApply->setFocus(); + //Group2Spin->buttonApply->setFocus(); } if ( Group3Spin->isVisible() ) { Group3Spin->buttonApply->setEnabled(false); - Group3Spin->buttonApply->setFocus(); + //Group3Spin->buttonApply->setFocus(); } if ( Group4Spin->isVisible() ) { Group4Spin->buttonApply->setEnabled(false); - Group4Spin->buttonApply->setFocus(); + //Group4Spin->buttonApply->setFocus(); } } else { @@ -1294,26 +1391,26 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects ) if ( Group1Sel->isVisible() ) { Group1Sel->buttonApply->setEnabled(true); - Group1Sel->buttonApply->setFocus(); + //Group1Sel->buttonApply->setFocus(); } if ( Group1Spin->isVisible() ) { Group1Spin->buttonApply->setEnabled(true); - Group1Spin->buttonApply->setFocus(); + //Group1Spin->buttonApply->setFocus(); } if ( Group2Spin->isVisible() ) { Group2Spin->buttonApply->setEnabled(true); - Group2Spin->buttonApply->setFocus(); + //Group2Spin->buttonApply->setFocus(); } if ( Group3Spin->isVisible() ) { Group3Spin->buttonApply->setEnabled(true); - Group3Spin->buttonApply->setFocus(); + //Group3Spin->buttonApply->setFocus(); } if ( Group4Spin->isVisible() ) { Group4Spin->buttonApply->setEnabled(true); - Group4Spin->buttonApply->setFocus(); + //Group4Spin->buttonApply->setFocus(); } } - + gp_Ax3 myWPlane = myGeometryGUI->GetWorkingPlane(); GEOM::ListOfDouble_var WPlane = new GEOM::ListOfDouble; WPlane->length(9); @@ -1329,7 +1426,8 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects ) WPlane[7] = myWPlane.XDirection().Y(); WPlane[8] = myWPlane.XDirection().Z(); - GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSketcher( cmd.latin1(), WPlane ); + GEOM::GEOM_Object_var anObj = + GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSketcher( cmd.latin1(), WPlane ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); @@ -1358,7 +1456,8 @@ void EntityGUI_SketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object, getDisplayer()->SetToActivate( activate ); // Make a reference to GEOM_Object - getDisplayer()->SetName( myGeometryGUI->getApp()->orb()->object_to_string( object ) ); + CORBA::String_var objStr = myGeometryGUI->getApp()->orb()->object_to_string( object ); + getDisplayer()->SetName( objStr.in() ); // Create wire from applayed object TopoDS_Shape anApplyedWire, aLastSegment; @@ -1441,7 +1540,3 @@ void EntityGUI_SketcherDlg::keyPressEvent( QKeyEvent* e ) ClickOnHelp(); } } - - - - diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.h b/src/EntityGUI/EntityGUI_SketcherDlg.h index 68d975959..4f930f9bc 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.h +++ b/src/EntityGUI/EntityGUI_SketcherDlg.h @@ -1,23 +1,23 @@ // GEOM GEOMGUI : GUI for Geometry component // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -28,6 +28,8 @@ #ifndef ENTITYGUI_SKETCHERDLG_H #define ENTITYGUI_SKETCHERDLG_H +#include "GEOM_EntityGUI.hxx" + #include "GEOMBase_Helper.h" #include "EntityGUI_Skeleton_QTD.h" @@ -57,7 +59,7 @@ // class : EntityGUI_Dlg // purpose : //================================================================================= -class EntityGUI_SketcherDlg : public EntityGUI_Skeleton_QTD, public GEOMBase_Helper +class GEOM_ENTITYGUI_EXPORT EntityGUI_SketcherDlg : public EntityGUI_Skeleton_QTD, public GEOMBase_Helper { Q_OBJECT @@ -66,6 +68,8 @@ public: const char* name = 0, bool modal = FALSE, WFlags fl = 0); ~EntityGUI_SketcherDlg(); + bool eventFilter (QObject* object, QEvent* event); + protected: // redefined from GEOMBase_Helper virtual GEOM::GEOM_IOperations_ptr createOperation(); @@ -73,7 +77,7 @@ protected: virtual bool execute( ObjectList& objects ); void closeEvent( QCloseEvent* e ); - void keyPressEvent( QKeyEvent* e ); + void keyPressEvent( QKeyEvent* e ); private : void Init(); diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.h b/src/EntityGUI/EntityGUI_SubShapeDlg.h index 23b9593ee..5d70497e9 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.h +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_SUBSHAPE_H #define DIALOGBOX_SUBSHAPE_H +#include "GEOM_EntityGUI.hxx" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel1Check1List_QTD.h" @@ -36,7 +38,7 @@ // class : EntityGUI_SubShapeDlg // purpose : //================================================================================= -class EntityGUI_SubShapeDlg : public GEOMBase_Skeleton +class GEOM_ENTITYGUI_EXPORT EntityGUI_SubShapeDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/EntityGUI/Makefile.in b/src/EntityGUI/Makefile.in index d05a3dc24..cb3127981 100644 --- a/src/EntityGUI/Makefile.in +++ b/src/EntityGUI/Makefile.in @@ -38,7 +38,7 @@ VPATH=.:@srcdir@:@top_srcdir@/idl LIB = libEntityGUI.la # header files -EXPORT_HEADERS= +EXPORT_HEADERS= GEOM_EntityGUI.hxx LIB_SRC = EntityGUI.cxx \ EntityGUI_Skeleton_QTD.cxx \ diff --git a/src/GEOM/GEOM_Function.cxx b/src/GEOM/GEOM_Function.cxx index 03cd586af..b3166ad0b 100644 --- a/src/GEOM/GEOM_Function.cxx +++ b/src/GEOM/GEOM_Function.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -23,6 +23,7 @@ #include #include #include +#include #include "utilities.h" @@ -161,30 +162,58 @@ TopoDS_Shape GEOM_Function::GetValue() TopoDS_Shape aShape; TDF_Label aLabel = GetOwnerEntry(); - if(aLabel.IsRoot()) return aShape; + if (aLabel.IsRoot()) return aShape; Handle(GEOM_Object) anObject = GEOM_Object::GetObject(aLabel); - if(anObject.IsNull()) return aShape; - if(!anObject->IsMainShape()) { - try { -#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 - OCC_CATCH_SIGNALS; -#endif - GEOM_Solver aSolver(GEOM_Engine::GetEngine()); - if (!aSolver.ComputeFunction(this)) { - MESSAGE("GEOM_Object::GetValue Error : Can't build a sub shape"); - return aShape; - } + if (anObject.IsNull()) return aShape; + + if (!anObject->IsMainShape()) { + bool isResult = false; + TDF_Label aResultLabel = _label.FindChild(RESULT_LABEL); + if (!aResultLabel.IsNull()) { + Handle(TNaming_NamedShape) aNS; + if (aResultLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS)) + isResult = true; } - catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); - MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString()); - return aShape; + + // compare tics + if (isResult) { + // tic of this + Standard_Integer aTic = anObject->GetTic(); + + // tic of main shape + GEOM_ISubShape aCI (this); + TDF_Label aLabelObjMainSh = aCI.GetMainShape()->GetOwnerEntry(); + if (aLabelObjMainSh.IsRoot()) return aShape; + Handle(GEOM_Object) anObjMainSh = GEOM_Object::GetObject(aLabelObjMainSh); + if (anObjMainSh.IsNull()) return aShape; + Standard_Integer aTicMainSh = anObjMainSh->GetTic(); + + // compare + isResult = ((aTic == aTicMainSh) ? true : false); + } + + if (!isResult) { + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + GEOM_Solver aSolver(GEOM_Engine::GetEngine()); + if (!aSolver.ComputeFunction(this)) { + MESSAGE("GEOM_Object::GetValue Error : Can't build a sub shape"); + return aShape; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString()); + return aShape; + } } } TDF_Label aResultLabel = _label.FindChild(RESULT_LABEL); Handle(TNaming_NamedShape) aNS; - if(!aResultLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS)) return aShape; + if (!aResultLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS)) return aShape; aShape = aNS->Get(); @@ -194,7 +223,7 @@ TopoDS_Shape GEOM_Function::GetValue() //============================================================================= /*! - * GetValue + * SetValue */ //============================================================================= void GEOM_Function::SetValue(TopoDS_Shape& theShape) @@ -205,6 +234,26 @@ void GEOM_Function::SetValue(TopoDS_Shape& theShape) aBuilder.Generated(theShape); + // synchronisation between main shape and its sub-shapes + TDF_Label aLabel = GetOwnerEntry(); + if (aLabel.IsRoot()) return; + Handle(GEOM_Object) anObject = GEOM_Object::GetObject(aLabel); + if (anObject.IsNull()) return; + if (anObject->IsMainShape()) { + // increase modifications counter of this (main) shape + anObject->IncrementTic(); + } + else { + // update modifications counter of this (sub-) shape to be the same as on main shape + GEOM_ISubShape aCI (this); + TDF_Label aLabelObjMainSh = aCI.GetMainShape()->GetOwnerEntry(); + if (aLabelObjMainSh.IsRoot()) return; + Handle(GEOM_Object) anObjMainSh = GEOM_Object::GetObject(aLabelObjMainSh); + if (anObjMainSh.IsNull()) return; + + anObject->SetTic(anObjMainSh->GetTic()); + } + _isDone = true; } diff --git a/src/GEOM/GEOM_Object.cxx b/src/GEOM/GEOM_Object.cxx index e36ddc909..f04bda383 100644 --- a/src/GEOM/GEOM_Object.cxx +++ b/src/GEOM/GEOM_Object.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -38,9 +38,10 @@ #include #include -#define TYPE 2 #define FUNCTION_LABEL(theNb) (_label.FindChild(1).FindChild((theNb))) +#define TYPE_LABEL 2 #define FREE_LABEL 3 +#define TIC_LABEL 4 //======================================================================= //function : GetObjectID @@ -50,7 +51,7 @@ const Standard_GUID& GEOM_Object::GetObjectID() { static Standard_GUID anObjectID("FF1BBB01-5D14-4df2-980B-3A668264EA16"); return anObjectID; -} +} //======================================================================= //function : GetSubShapeID @@ -61,7 +62,7 @@ const Standard_GUID& GEOM_Object::GetSubShapeID() static Standard_GUID anObjectID("FF1BBB68-5D14-4df2-980B-3A668264EA16"); return anObjectID; } - + //============================================================================= /*! * GetObject @@ -79,7 +80,7 @@ Handle(GEOM_Object) GEOM_Object::GetObject(TDF_Label& theLabel) Handle(TDataStd_Integer) anID; if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return NULL; - + GEOM_Engine* anEngine= GEOM_Engine::GetEngine(); if(anEngine == NULL) return NULL; @@ -107,7 +108,7 @@ Handle(GEOM_Object) GEOM_Object::GetReferencedObject(TDF_Label& theLabel) // Get label of the referenced object TDF_Label aLabel = aFather->Label(); - + return GEOM_Object::GetObject(aLabel); } @@ -117,9 +118,9 @@ Handle(GEOM_Object) GEOM_Object::GetReferencedObject(TDF_Label& theLabel) */ //============================================================================= GEOM_Object::GEOM_Object(TDF_Label& theEntry) -: _label(theEntry), _ior("") +: _label(theEntry), _ior("") { - if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root)) + if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root)) _root = TDataStd_TreeNode::Set(theEntry); } @@ -129,14 +130,14 @@ GEOM_Object::GEOM_Object(TDF_Label& theEntry) */ //============================================================================= GEOM_Object::GEOM_Object(TDF_Label& theEntry, int theType) -: _label(theEntry), _ior("") +: _label(theEntry), _ior("") { theEntry.ForgetAllAttributes(Standard_True); - if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root)) + if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root)) _root = TDataStd_TreeNode::Set(theEntry); - TDataStd_Integer::Set(theEntry.FindChild(TYPE), theType); + TDataStd_Integer::Set(theEntry.FindChild(TYPE_LABEL), theType); TDataStd_UAttribute::Set(theEntry, GetObjectID()); } @@ -149,8 +150,8 @@ GEOM_Object::GEOM_Object(TDF_Label& theEntry, int theType) int GEOM_Object::GetType() { Handle(TDataStd_Integer) aType; - if(!_label.FindChild(TYPE).FindAttribute(TDataStd_Integer::GetID(), aType)) return -1; - + if(!_label.FindChild(TYPE_LABEL).FindAttribute(TDataStd_Integer::GetID(), aType)) return -1; + return aType->Get(); } @@ -161,8 +162,57 @@ int GEOM_Object::GetType() //============================================================================= void GEOM_Object::SetType(int theType) { - TDataStd_Integer::Set(_label.FindChild(TYPE), theType); - return; + TDataStd_Integer::Set(_label.FindChild(TYPE_LABEL), theType); +} + + +//============================================================================= +/*! + * Returns modifications counter of this object. + * Comparing this value with modifications counters of argument objects + * (on which this object depends) we decide whether this object needs to be updated. + */ +//============================================================================= +int GEOM_Object::GetTic() +{ + Handle(TDataStd_Integer) aTicAttr; + if (!_label.FindChild(TIC_LABEL).FindAttribute(TDataStd_Integer::GetID(), aTicAttr)) + return 0; + + return aTicAttr->Get(); +} + +//============================================================================= +/*! + * Set another value of modifications counter. + * + * Use this method to update modifications counter of dependent object + * to be equal to modifications counter of its argument. + * This is commonly done in GEOM_Function::GetValue() + */ +//============================================================================= +void GEOM_Object::SetTic(int theTic) +{ + TDataStd_Integer::Set(_label.FindChild(TIC_LABEL), theTic); +} + +//============================================================================= +/*! + * Increment modifications counter to mark this object as modified. + * + * Commonly called from GEOM_Function::SetValue() + */ +//============================================================================= +void GEOM_Object::IncrementTic() +{ + TDF_Label aTicLabel = _label.FindChild(TIC_LABEL); + + Standard_Integer aTic = 0; + Handle(TDataStd_Integer) aTicAttr; + if (aTicLabel.FindAttribute(TDataStd_Integer::GetID(), aTicAttr)) + aTic = aTicAttr->Get(); + + TDataStd_Integer::Set(aTicLabel, aTic + 1); } @@ -178,7 +228,7 @@ int GEOM_Object::GetDocID() Handle(TDataStd_Integer) anID; if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return -1; - + return anID->Get(); } @@ -196,7 +246,7 @@ TopoDS_Shape GEOM_Object::GetValue() if (!aFunction.IsNull()) aShape = aFunction->GetValue(); - + return aShape; } @@ -219,9 +269,12 @@ char* GEOM_Object::GetName() { Handle(TDataStd_Name) aNameAttr; if(!_label.FindAttribute(TDataStd_Name::GetID(), aNameAttr)) return NULL; - + TCollection_AsciiString aName(aNameAttr->Get()); - return aName.ToCString(); + // do not return pointer of local variable + // return aName.ToCString(); + // the following code could lead to memory leak, so take care about recieved pointer + return strdup(aName.ToCString()); } //============================================================================= @@ -255,7 +308,7 @@ TCollection_AsciiString GEOM_Object::GetAuxData() /*! * IsSubShape */ -//============================================================================= +//============================================================================= bool GEOM_Object::IsMainShape() { Handle(GEOM_Function) aFunction = GetFunction(1); @@ -317,7 +370,7 @@ Handle(GEOM_Function) GEOM_Object::GetLastFunction() { Standard_Integer nb = GetNbFunctions(); if(nb) return GetFunction(nb); - + return NULL; } @@ -340,12 +393,12 @@ Handle(TColStd_HSequenceOfTransient) GEOM_Object::GetAllDependency() } Standard_Integer aLength = aSeq.Length(); - if(aLength > 0) { + if(aLength > 0) { anArray = new TColStd_HSequenceOfTransient; for(Standard_Integer j =1; j<=aLength; j++) anArray->Append(GetReferencedObject(aSeq(j))); } - + return anArray; } @@ -385,15 +438,15 @@ TDF_Label GEOM_Object::GetFreeLabel() //======================================================================= //function : GEOM_Object_Type_ //purpose : -//======================================================================= +//======================================================================= Standard_EXPORT Handle_Standard_Type& GEOM_Object_Type_() { static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared); static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient); if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient); - + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOM_Object", @@ -407,7 +460,7 @@ Standard_EXPORT Handle_Standard_Type& GEOM_Object_Type_() //======================================================================= //function : DownCast //purpose : -//======================================================================= +//======================================================================= const Handle(GEOM_Object) Handle(GEOM_Object)::DownCast(const Handle(Standard_Transient)& AnObject) { diff --git a/src/GEOM/GEOM_Object.hxx b/src/GEOM/GEOM_Object.hxx index 414c61af2..154798f65 100644 --- a/src/GEOM/GEOM_Object.hxx +++ b/src/GEOM/GEOM_Object.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -34,10 +34,10 @@ #endif #ifndef _Handle_MMgt_TShared_HeaderFile #include -#endif +#endif #ifndef _MMgt_TShared_HeaderFile #include -#endif +#endif #ifndef _Standard_GUID_HeaderFile #include #endif @@ -65,25 +65,25 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_Object); class Handle(GEOM_Object) : public Handle(MMgt_TShared) { public: - inline void* operator new(size_t,void* anAddress) + inline void* operator new(size_t,void* anAddress) { return anAddress; } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); + inline void* operator new(size_t size) + { + return Standard::Allocate(size); } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); } - Handle(GEOM_Object)():Handle(MMgt_TShared)() {} - Handle(GEOM_Object)(const Handle(GEOM_Object)& aHandle) : Handle(MMgt_TShared)(aHandle) + Handle(GEOM_Object)():Handle(MMgt_TShared)() {} + Handle(GEOM_Object)(const Handle(GEOM_Object)& aHandle) : Handle(MMgt_TShared)(aHandle) { } - Handle(GEOM_Object)(const GEOM_Object* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) + Handle(GEOM_Object)(const GEOM_Object* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) { } @@ -99,55 +99,54 @@ class Handle(GEOM_Object) : public Handle(MMgt_TShared) { return *this; } - GEOM_Object* operator->() + GEOM_Object* operator->() { return (GEOM_Object *)ControlAccess(); } - GEOM_Object* operator->() const + GEOM_Object* operator->() const { return (GEOM_Object *)ControlAccess(); } Standard_EXPORT ~Handle(GEOM_Object)() {}; - + Standard_EXPORT static const Handle(GEOM_Object) DownCast(const Handle(Standard_Transient)& AnObject); }; - #include #include #include "GEOM_Function.hxx" #include "GEOM_Engine.hxx" - class GEOM_Object : public MMgt_TShared { - friend class GEOM_Engine; + friend class GEOM_Engine; public: - inline void* operator new(size_t,void* anAddress) + inline void* operator new(size_t,void* anAddress) { return anAddress; } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); + inline void* operator new(size_t size) + { + return Standard::Allocate(size); } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); } - + // Type management // Standard_EXPORT friend Handle_Standard_Type& GEOM_Object_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOM_Object) ; } - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOM_Object) == AType || MMgt_TShared::IsKind(AType)); } + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const + { return (STANDARD_TYPE(GEOM_Object) == AType || MMgt_TShared::IsKind(AType)); } private: - GEOM_Object(TDF_Label& theLabel); + GEOM_Object(TDF_Label& theLabel); public: Standard_EXPORT GEOM_Object(TDF_Label& theEntry, int theType); @@ -166,25 +165,30 @@ class GEOM_Object : public MMgt_TShared Standard_EXPORT static const Standard_GUID& GetSubShapeID(); //########################################################### - //Access to properties + //Access to properties //########################################################### //Returns a TreeNode that presents a root of a function tree for this GEOM_Object - Standard_EXPORT Handle(TDataStd_TreeNode) GetRootNode() { return _root; } - + Standard_EXPORT Handle(TDataStd_TreeNode) GetRootNode() { return _root; } + //Returns a label of this GEOM_Object Standard_EXPORT TDF_Label GetEntry() { return _label; } - + //Returns a type of this GEOM_Object (GEOM_POINT, GEOM_VECTOR...) - Standard_EXPORT int GetType(); + Standard_EXPORT int GetType(); //Sets the type of this GEOM_Object Standard_EXPORT void SetType(int theType); - - //Returns an ID of the OCAF document where this GEOM_Object is stored - Standard_EXPORT int GetDocID(); - //Returns a value (as TopoDS_Shape) of this GEOM_Object + //Modifications counter management + Standard_EXPORT int GetTic(); + Standard_EXPORT void SetTic(int theTic); + Standard_EXPORT void IncrementTic(); + + //Returns an ID of the OCAF document where this GEOM_Object is stored + Standard_EXPORT int GetDocID(); + + //Returns a value (as TopoDS_Shape) of this GEOM_Object Standard_EXPORT TopoDS_Shape GetValue(); //Sets a name of this GEOM_Object @@ -199,36 +203,37 @@ class GEOM_Object : public MMgt_TShared //Returns an auxiliary data Standard_EXPORT TCollection_AsciiString GetAuxData(); - //########################################################### + //########################################################### // Sub shape methods //########################################################### - + //Returns false if the object is a sub shape of another object Standard_EXPORT bool IsMainShape(); - //########################################################### - // CORBA related methods - //########################################################### - - //Sets an IOR of CORBA GEOM_Object_i which refers to this object - Standard_EXPORT void SetIOR(TCollection_AsciiString& theIOR) { _ior = theIOR; } + //########################################################### + // CORBA related methods + //########################################################### - //Returns an IOR of CORBA GEOM_Object_i which refers to this object - Standard_EXPORT TCollection_AsciiString GetIOR() { return _ior; } + //Sets an IOR of CORBA GEOM_Object_i which refers to this object + Standard_EXPORT void SetIOR(TCollection_AsciiString& theIOR) { _ior = theIOR; } + + //Returns an IOR of CORBA GEOM_Object_i which refers to this object + Standard_EXPORT TCollection_AsciiString GetIOR() { return _ior; } //########################################################### //Functions methods //########################################################### - //Adds a function with a driver GUID = theGUID and a type theFunctionType to the function tree of this GEOM_Object + //Adds a function with a driver GUID = theGUID and a type theFunctionType + //to the function tree of this GEOM_Object Standard_EXPORT Handle(GEOM_Function) AddFunction(const Standard_GUID& theGUID, int theFunctionType); - + //Returns a number of functions of this GEOM_Object - Standard_EXPORT int GetNbFunctions(); - + Standard_EXPORT int GetNbFunctions(); + //Returns a function with given number theFunctionNumber Standard_EXPORT Handle(GEOM_Function) GetFunction(int theFunctionNumber); - + //Return the last function of this GEOM_Object Standard_EXPORT Handle(GEOM_Function) GetLastFunction(); @@ -238,19 +243,17 @@ class GEOM_Object : public MMgt_TShared //Returns the dependencies of the last function Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetLastDependency(); - //########################################################### - // Internal methods - //########################################################### + //########################################################### + // Internal methods + //########################################################### - //Returns a label which could be used to store some additional data - Standard_EXPORT TDF_Label GetFreeLabel(); - + //Returns a label which could be used to store some additional data + Standard_EXPORT TDF_Label GetFreeLabel(); private: - Handle(TDataStd_TreeNode) _root; - TDF_Label _label; - TCollection_AsciiString _ior; + TDF_Label _label; + TCollection_AsciiString _ior; }; #endif diff --git a/src/GEOM/GEOM_PythonDump.hxx b/src/GEOM/GEOM_PythonDump.hxx index 912457e3b..4e87df150 100644 --- a/src/GEOM/GEOM_PythonDump.hxx +++ b/src/GEOM/GEOM_PythonDump.hxx @@ -55,12 +55,12 @@ namespace GEOM /*! Returns an object from two given, which has the latest entry */ - Handle(GEOM_Object) GetCreatedLast (const Handle(GEOM_Object)& theObj1, + Standard_EXPORT Handle(GEOM_Object) GetCreatedLast (const Handle(GEOM_Object)& theObj1, const Handle(GEOM_Object)& theObj2); /*! Returns an object from \a theObjects, which has the latest entry */ - Handle(GEOM_Object) GetCreatedLast (const Handle(TColStd_HSequenceOfTransient)& theObjects); + Standard_EXPORT Handle(GEOM_Object) GetCreatedLast (const Handle(TColStd_HSequenceOfTransient)& theObjects); } #endif diff --git a/src/GEOMAlgo/GEOMAlgo.cdl b/src/GEOMAlgo/GEOMAlgo.cdl index c5c09eb5a..f290d14d0 100755 --- a/src/GEOMAlgo/GEOMAlgo.cdl +++ b/src/GEOMAlgo/GEOMAlgo.cdl @@ -1,28 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo.cdl -- Created: Sat Dec 04 12:36:22 2004 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2004 - package GEOMAlgo @@ -30,7 +28,8 @@ package GEOMAlgo uses TCollection, - TColStd, + + TColgp, Geom, Bnd, gp, @@ -40,10 +39,17 @@ uses TopTools, IntTools, BOPTools, - BOP + BOP, + + TColStd, + BOPTColStd, + BRepAlgo, + NMTDS, + NMTTools is - -- enumerations + -- + -- enumerations -- enumeration State is ST_UNKNOWN, @@ -53,12 +59,19 @@ is ST_ONIN, ST_ONOUT, ST_INOUT - end State; + end State; + -- + deferred class HAlgo; + deferred class Clsf; + class ClsfSurf; + class ClsfBox; + class FinderShapeOn2; + class PassKeyShapeMapHasher; -- -- classes - -- - deferred class Algo; - deferred class ShapeAlgo; + -- + deferred class Algo; + deferred class ShapeAlgo; -- -- gluer class Gluer; @@ -67,9 +80,9 @@ is class PassKey; class PassKeyMapHasher; class PassKeyShape; + class SurfaceTools; class Tools; - -- -- finder on deferred class ShapeSolid; @@ -80,13 +93,50 @@ is class FinderShapeOn; -- class FinderShapeOn1; - class StateCollector; + class StateCollector; + + -- + -- Builder/Splitter + deferred class BuilderShape; + + class Builder; + class Splitter; + class Tools3D; + class BuilderTools; + class ShapeSet; + + deferred class BuilderArea; + class BuilderFace; + class BuilderSolid; + + class WireSplitter; + class WireEdgeSet; + class WESCorrector; + -- + -- Pointers + -- + pointer PWireEdgeSet to WireEdgeSet from GEOMAlgo; + -- + -- + -- Instantiations + class DataMapOfShapeShapeSet instantiates + DataMap from TCollection(Shape from TopoDS, + ShapeSet from GEOMAlgo, + ShapeMapHasher from TopTools); + + class DataMapOfShapeReal instantiates + DataMap from TCollection(Shape from TopoDS, + Real from Standard, + ShapeMapHasher from TopTools); + + + class DataMapOfRealListOfShape instantiates + DataMap from TCollection(Real from Standard, + ListOfShape from TopTools, + MapRealHasher from TColStd); -- -- instantiations - class IndexedDataMapOfPassKeyShapeListOfShape - instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo, - ListOfShape from TopTools, - PassKeyMapHasher from GEOMAlgo); + class IndexedDataMapOfShapeBox instantiates IndexedDataMap from TCollection (Shape from TopoDS, @@ -105,20 +155,17 @@ is instantiates IndexedDataMap from TCollection (Shape from TopoDS, State from TopAbs, ShapeMapHasher from TopTools); --- class ListOfPnt instantiates List from TCollection (Pnt from gp); --- class IndexedDataMapOfPassKeyInteger --- instantiates IndexedDataMap from TCollection (PassKeyRoot from GEOMAlgo, --- Integer from Standard, --- PassKeyMapHasher from GEOMAlgo); - - class DataMapOfPassKeyInteger instantiates DataMap from TCollection (PassKey from GEOMAlgo, Integer from Standard, - PassKeyMapHasher from GEOMAlgo); - + PassKeyMapHasher from GEOMAlgo); + + class IndexedDataMapOfPassKeyShapeListOfShape + instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo, + ListOfShape from TopTools, + PassKeyShapeMapHasher from GEOMAlgo); end GEOMAlgo; diff --git a/src/GEOMAlgo/GEOMAlgo_Algo.cdl b/src/GEOMAlgo/GEOMAlgo_Algo.cdl index a0482b714..1b56ef469 100755 --- a/src/GEOMAlgo/GEOMAlgo_Algo.cdl +++ b/src/GEOMAlgo/GEOMAlgo_Algo.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_Algo.cdl -- Created: Sat Dec 04 12:37:56 2004 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2004 deferred class Algo from GEOMAlgo diff --git a/src/GEOMAlgo/GEOMAlgo_Algo.hxx b/src/GEOMAlgo/GEOMAlgo_Algo.hxx index bfeae4fa2..028e7fbce 100644 --- a/src/GEOMAlgo/GEOMAlgo_Algo.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Algo.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,6 +32,7 @@ #include #endif + class GEOMAlgo_Algo { public: @@ -50,8 +51,14 @@ public: } // Methods PUBLIC // + + Standard_EXPORT virtual void Perform() = 0; + + Standard_EXPORT Standard_Integer ErrorStatus() const; + + Standard_EXPORT Standard_Integer WarningStatus() const; @@ -62,9 +69,15 @@ protected: // Methods PROTECTED // + + Standard_EXPORT GEOMAlgo_Algo(); Standard_EXPORT virtual ~GEOMAlgo_Algo(); + + Standard_EXPORT virtual void CheckData() ; + + Standard_EXPORT virtual void CheckResult() ; diff --git a/src/GEOMAlgo/GEOMAlgo_Algo.ixx b/src/GEOMAlgo/GEOMAlgo_Algo.ixx index b31871134..5b8348358 100644 --- a/src/GEOMAlgo/GEOMAlgo_Algo.ixx +++ b/src/GEOMAlgo/GEOMAlgo_Algo.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_Algo.jxx b/src/GEOMAlgo/GEOMAlgo_Algo.jxx index edeaf138e..65f9ef05a 100644 --- a/src/GEOMAlgo/GEOMAlgo_Algo.jxx +++ b/src/GEOMAlgo/GEOMAlgo_Algo.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _GEOMAlgo_Algo_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cdl b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cdl index 4cabe930d..9314a0888 100644 --- a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cdl +++ b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_CoupleOfShapes.cdl -- Created: Wed Dec 15 13:00:10 2004 -- Author: Peter KURNEV diff --git a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx index 289489482..2505f8049 100644 --- a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx +++ b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -33,6 +33,7 @@ class TopoDS_Shape; #include #endif + class GEOMAlgo_CoupleOfShapes { public: @@ -51,12 +52,26 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_CoupleOfShapes(); + + Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ; + + Standard_EXPORT void SetShape1(const TopoDS_Shape& aS1) ; + + Standard_EXPORT void SetShape2(const TopoDS_Shape& aS2) ; + + Standard_EXPORT void Shapes(TopoDS_Shape& aS1,TopoDS_Shape& aS2) const; + + Standard_EXPORT const TopoDS_Shape& Shape1() const; + + Standard_EXPORT const TopoDS_Shape& Shape2() const; diff --git a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.ixx b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.ixx index 39c41d630..7d793c838 100644 --- a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.ixx +++ b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.jxx b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.jxx index bae26f1de..9caff71ab 100644 --- a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.jxx +++ b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _TopoDS_Shape_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx index 431229248..cd9006ab1 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -43,6 +43,7 @@ class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger; #include #endif + class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger : public TCollection_BasicMapIterator { public: @@ -61,10 +62,20 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger(); + + Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger(const GEOMAlgo_DataMapOfPassKeyInteger& aMap); + + Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfPassKeyInteger& aMap) ; + + Standard_EXPORT const GEOMAlgo_PassKey& Key() const; + + Standard_EXPORT const Standard_Integer& Value() const; diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx index 2c786bb3b..fea43de70 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx index e57928773..eda806e2b 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -45,37 +45,27 @@ class GEOMAlgo_DataMapOfPassKeyInteger; class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger; + class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger(const GEOMAlgo_PassKey& K,const Standard_Integer& I,const TCollection_MapNodePtr& n); + GEOMAlgo_PassKey& Key() const; + Standard_Integer& Value() const; -Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger(); +//Standard_EXPORT ~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx index 8d06859ec..6dd49b86c 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -35,7 +35,7 @@ #ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile #include #endif -GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {} +//GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {} @@ -43,11 +43,8 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInte { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -80,11 +77,11 @@ const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::Dyna { return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) ; } -Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {} +//Standard_Boolean GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::~Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger() {} #define TheKey GEOMAlgo_PassKey #define TheKey_hxx #define TheItem Standard_Integer diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx index 60cb6712a..b847a7345 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -47,6 +47,7 @@ class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger; #include #endif + class GEOMAlgo_DataMapOfPassKeyInteger : public TCollection_BasicMap { public: @@ -65,29 +66,47 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_DataMapOfPassKeyInteger(const Standard_Integer NbBuckets = 1); + + Standard_EXPORT GEOMAlgo_DataMapOfPassKeyInteger& Assign(const GEOMAlgo_DataMapOfPassKeyInteger& Other) ; GEOMAlgo_DataMapOfPassKeyInteger& operator =(const GEOMAlgo_DataMapOfPassKeyInteger& Other) { return Assign(Other); } + + Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; + + Standard_EXPORT void Clear() ; ~GEOMAlgo_DataMapOfPassKeyInteger() { Clear(); } + + Standard_EXPORT Standard_Boolean Bind(const GEOMAlgo_PassKey& K,const Standard_Integer& I) ; + + Standard_EXPORT Standard_Boolean IsBound(const GEOMAlgo_PassKey& K) const; + + Standard_EXPORT Standard_Boolean UnBind(const GEOMAlgo_PassKey& K) ; + + Standard_EXPORT const Standard_Integer& Find(const GEOMAlgo_PassKey& K) const; const Standard_Integer& operator()(const GEOMAlgo_PassKey& K) const { return Find(K); } + + Standard_EXPORT Standard_Integer& ChangeFind(const GEOMAlgo_PassKey& K) ; Standard_Integer& operator()(const GEOMAlgo_PassKey& K) { @@ -113,6 +132,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT GEOMAlgo_DataMapOfPassKeyInteger(const GEOMAlgo_DataMapOfPassKeyInteger& Other); diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx index 8cd1a4f52..0a831e442 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl index b5c0a5d36..9f30dab59 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_FinderShapeOn.cdl -- Created: Tue Jan 11 14:35:52 2005 -- Author: Peter KURNEV diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx index 5d9cfe4d8..fbc85f0d9 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -60,6 +60,7 @@ class TopTools_DataMapOfShapeShape; #include #endif + class GEOMAlgo_FinderShapeOn : public GEOMAlgo_ShapeAlgo { public: @@ -78,16 +79,36 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_FinderShapeOn(); Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn(); + + Standard_EXPORT virtual void Perform() ; + + Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ; + + Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ; + + Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ; + + Standard_EXPORT const Handle_Geom_Surface& Surface() const; + + Standard_EXPORT TopAbs_ShapeEnum ShapeType() const; + + Standard_EXPORT GEOMAlgo_State State() const; + + Standard_EXPORT const TopTools_ListOfShape& Shapes() const; + + Standard_EXPORT static void CopySource(const TopoDS_Shape& aS,TopTools_DataMapOfShapeShape& aImages,TopTools_DataMapOfShapeShape& aOriginals,TopoDS_Shape& aSC) ; @@ -98,11 +119,23 @@ protected: // Methods PROTECTED // + + Standard_EXPORT virtual void CheckData() ; + + Standard_EXPORT void MakeArgument1() ; + + Standard_EXPORT void MakeArgument2() ; + + Standard_EXPORT void Find() ; + + Standard_EXPORT void Find(const TopoDS_Shape& aS) ; + + Standard_EXPORT void FindVertices() ; diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx index 37310e691..514a8fe3b 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx index a0204f414..6b45d4c1f 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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_Surface_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl index 0629101be..6a0b72e5b 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_FinderShapeOn1.cdl -- Created: Fri Mar 4 10:26:54 2005 -- Author: Peter KURNEV @@ -29,7 +29,8 @@ class FinderShapeOn1 from GEOMAlgo ---Purpose: -uses +uses + Pnt from gp,-- Surface from Geom, Surface from GeomAdaptor, diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx index 6a8f33bb4..98f4afe30 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx @@ -67,12 +67,13 @@ #include #include -#include -#include -#include + #include #include +#include +#include +#include //======================================================================= //function : GEOMAlgo_FinderShapeOn1 @@ -529,8 +530,7 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, { myErrorStatus=0; // - Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNbMax, aNb; - Standard_Integer iCnt, *pIds; + Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds; TopLoc_Location aLoc; Handle(Poly_Triangulation) aTRF; TColStd_MapOfInteger aMBN; @@ -578,12 +578,20 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, iCnt=aIt.Value(); if (iCnt==1) { const GEOMAlgo_PassKey& aPK=aIt.Key(); + //qf + /* aNbMax=aPK.NbMax(); pIds=(Standard_Integer*)aPK.Key(); for (k=1; k<3; ++k) { aNx=*(pIds+aNbMax-k); aMBN.Add(aNx); } + */ + aNx=(Standard_Integer)aPK.Id(1); + aMBN.Add(aNx); + aNx=(Standard_Integer)aPK.Id(2); + aMBN.Add(aNx); + //qt } } // @@ -620,10 +628,17 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, // take the first having occured inner link // and discretize it const GEOMAlgo_PassKey& aPK=aIt.Key(); + //qf + /* aNbMax=aPK.NbMax(); pIds=(Standard_Integer*)aPK.Key(); aN1=*(pIds+aNbMax-1); aN2=*(pIds+aNbMax-2); + */ + // + aN1=(Standard_Integer)aPK.Id(1); + aN2=(Standard_Integer)aPK.Id(2); + //qt aP1=aNodes(aN1).Transformed(aTrsf); aP2=aNodes(aN2).Transformed(aTrsf); // diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx index 267f191e1..d07cda45c 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -44,12 +44,16 @@ #ifndef _GEOMAlgo_ShapeAlgo_HeaderFile #include #endif +#ifndef _TopAbs_State_HeaderFile +#include +#endif class Geom_Surface; class TopTools_ListOfShape; class TopoDS_Face; class GEOMAlgo_ListOfPnt; class TopoDS_Edge; class GEOMAlgo_IndexedDataMapOfShapeState; +class gp_Pnt; #ifndef _Standard_HeaderFile @@ -59,6 +63,7 @@ class GEOMAlgo_IndexedDataMapOfShapeState; #include #endif + class GEOMAlgo_FinderShapeOn1 : public GEOMAlgo_ShapeAlgo { public: @@ -77,20 +82,48 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_FinderShapeOn1(); Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn1(); + + Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ; + + Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ; + + Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ; + + Standard_EXPORT void SetNbPntsMin(const Standard_Integer aNb) ; + + Standard_EXPORT Standard_Integer NbPntsMin() const; + + Standard_EXPORT void SetNbPntsMax(const Standard_Integer aNb) ; + + Standard_EXPORT Standard_Integer NbPntsMax() const; + + Standard_EXPORT const Handle_Geom_Surface& Surface() const; + + Standard_EXPORT TopAbs_ShapeEnum ShapeType() const; + + Standard_EXPORT GEOMAlgo_State State() const; + + Standard_EXPORT virtual void Perform() ; + + Standard_EXPORT const TopTools_ListOfShape& Shapes() const; + + Standard_EXPORT const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const; @@ -101,15 +134,33 @@ protected: // Methods PROTECTED // + + Standard_EXPORT virtual void CheckData() ; + + Standard_EXPORT void ProcessVertices() ; + + Standard_EXPORT void ProcessEdges() ; + + Standard_EXPORT void ProcessFaces() ; + + Standard_EXPORT void ProcessSolids() ; + + Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ; + + Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ; + + Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ; -Standard_EXPORT virtual TopAbs_State GetPointState(const gp_Pnt& aP) ; + + +Standard_EXPORT virtual TopAbs_State GetPointState(const gp_Pnt& aP) ; // Fields PROTECTED diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx index a0f3b96d8..da80e4d18 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx index 93dc321dc..db9c4b7f7 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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_Surface_HeaderFile #include #endif @@ -35,6 +35,9 @@ #ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile #include #endif +#ifndef _gp_Pnt_HeaderFile +#include +#endif #ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.hxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.hxx index fbe7680a4..fe9ed8e66 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.hxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.hxx @@ -37,6 +37,7 @@ class GEOMAlgo_FinderShapeOnQuad: public GEOMAlgo_FinderShapeOn1 { public: + Standard_EXPORT GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint, const gp_Pnt & theTopRigthPoint, const gp_Pnt & theBottomLeftPoint, diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cdl b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cdl index 569314e4a..97dd6f476 100644 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cdl +++ b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_GlueAnalyser.cdl -- Created: Wed Dec 15 11:03:03 2004 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2004 class GlueAnalyser from GEOMAlgo diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx index b8aff7294..e38911f5b 100644 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx @@ -270,7 +270,7 @@ for (i=1; i<=aNbF; ++i) { const TopoDS_Shape& aS=aMF(i); // - aPKF.Clear(); + //aPKF.Clear();//qft if (aType==TopAbs_FACE) { const TopoDS_Face& aF=TopoDS::Face(aS); FacePassKey(aF, aPKF); @@ -341,9 +341,10 @@ TopTools_IndexedDataMapOfShapeListOfShape aMFS; TopTools_IndexedMapOfShape aMx, aMS; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; + GEOMAlgo_CoupleOfShapes aCS; + // GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLS; GEOMAlgo_PassKeyShape aPKSx; - GEOMAlgo_CoupleOfShapes aCS; // aBB.MakeCompound(aCmp); // @@ -383,8 +384,11 @@ continue; } // - aPKSx.Clear(); - aPKSx.SetIds(aSx[0], aSx[1]); + //aPKSx.Clear();//qft + //qf + //aPKSx.SetIds(aSx[0], aSx[1]); + aPKSx.SetShapes(aSx[0], aSx[1]); + //qt // if (!aMPKLS.Contains(aPKSx)) { TopTools_ListOfShape aLSx; diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx index e87223a53..8b815072f 100644 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx +++ b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -46,6 +46,7 @@ class TopTools_ListOfShape; #include #endif + class GEOMAlgo_GlueAnalyser : public GEOMAlgo_Gluer { public: @@ -64,12 +65,24 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_GlueAnalyser(); Standard_EXPORT virtual ~GEOMAlgo_GlueAnalyser(); + + Standard_EXPORT virtual void Perform() ; + + Standard_EXPORT Standard_Boolean HasSolidsToGlue() const; + + Standard_EXPORT const GEOMAlgo_ListOfCoupleOfShapes& SolidsToGlue() const; + + Standard_EXPORT Standard_Boolean HasSolidsAlone() const; + + Standard_EXPORT const TopTools_ListOfShape& SolidsAlone() const; @@ -80,10 +93,20 @@ protected: // Methods PROTECTED // + + Standard_EXPORT void DetectVertices() ; + + Standard_EXPORT void DetectEdges() ; + + Standard_EXPORT void DetectFaces() ; + + Standard_EXPORT void DetectShapes(const TopAbs_ShapeEnum aType) ; + + Standard_EXPORT void DetectSolids() ; diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.ixx b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.ixx index 833d4d8bd..d7456f060 100644 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.ixx +++ b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.jxx b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.jxx index bc6681f5b..f89777323 100644 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.jxx +++ b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.cdl b/src/GEOMAlgo/GEOMAlgo_Gluer.cdl index 442f05305..fe629e68b 100755 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.cdl +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_Gluer.cdl -- Created: Sat Dec 04 12:41:32 2004 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2004 class Gluer from GEOMAlgo @@ -106,12 +105,12 @@ is EdgePassKey(me:out; aE:Edge from TopoDS; - aPK:out PassKeyShape from GEOMAlgo) + aPK:out PassKeyShape from GEOMAlgo) is protected; FacePassKey(me:out; aF:Face from TopoDS; - aPK:out PassKeyShape from GEOMAlgo) + aPK:out PassKeyShape from GEOMAlgo) is protected; MakeVertex(me:out; diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx index 1e6d31e6b..cb2b0d424 100755 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx @@ -77,8 +77,8 @@ #include #include -#include -#include +#include //qft +#include //qft #include // @@ -424,8 +424,8 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) TopoDS_Shape aNewShape; TopTools_IndexedMapOfShape aMF; TopTools_ListIteratorOfListOfShape aItS; - GEOMAlgo_PassKeyShape aPKF; - GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF; + GEOMAlgo_PassKeyShape aPKF;//qft + GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF;//qft // TopExp::MapShapes(myShape, aType, aMF); // @@ -433,7 +433,7 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) for (i=1; i<=aNbF; ++i) { const TopoDS_Shape& aS=aMF(i); // - aPKF.Clear(); + //aPKF.Clear();//qft if (aType==TopAbs_FACE) { const TopoDS_Face& aF=TopoDS::Face(aS); FacePassKey(aF, aPKF); @@ -622,17 +622,21 @@ void GEOMAlgo_Gluer::InnerTolerance() void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, GEOMAlgo_PassKeyShape& aPK) { - Standard_Integer i, aNbE, aNbMax; + Standard_Integer i, aNbE;//, aNbMax;//qft TopTools_ListOfShape aLE; TopTools_IndexedMapOfShape aME; // TopExp::MapShapes(aF, TopAbs_EDGE, aME); aNbE=aME.Extent(); + //qf + /* aNbMax=aPK.NbMax(); if (!aNbE || aNbE>aNbMax) { - myErrorStatus=101; // temprorary - return; + myErrorStatus=101; // temprorary + return; } + */ + //qt // for (i=1; i<=aNbE; ++i) { const TopoDS_Shape& aE=aME(i); @@ -643,7 +647,10 @@ void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, const TopoDS_Shape& aER=myOrigins.Find(aE); aLE.Append(aER); } - aPK.SetIds(aLE); + //qf + //aPK.SetIds(aLE); + aPK.SetShapes(aLE); + //qt } //======================================================================= //function : EdgePassKey @@ -662,7 +669,10 @@ void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE, } const TopoDS_Shape& aVR1=myOrigins.Find(aV1); const TopoDS_Shape& aVR2=myOrigins.Find(aV2); - aPK.SetIds(aVR1, aVR2); + //qf + //aPK.SetIds(aVR1, aVR2); + aPK.SetShapes(aVR1, aVR2); + //qt } //======================================================================= //function : MakeVertex diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.hxx b/src/GEOMAlgo/GEOMAlgo_Gluer.hxx index 7d9b77348..0f8a871ab 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -61,6 +61,7 @@ class TopTools_DataMapOfShapeShape; #include #endif + class GEOMAlgo_Gluer : public GEOMAlgo_ShapeAlgo { public: @@ -79,16 +80,36 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_Gluer(); Standard_EXPORT virtual ~GEOMAlgo_Gluer(); + + Standard_EXPORT void SetCheckGeometry(const Standard_Boolean aFlag) ; + + Standard_EXPORT Standard_Boolean CheckGeometry() const; + + Standard_EXPORT virtual void Perform() ; + + Standard_EXPORT Standard_Integer AloneShapes() const; + + Standard_EXPORT const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ; + + Standard_EXPORT const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ; + + Standard_EXPORT Standard_Boolean IsDeleted(const TopoDS_Shape& S) ; + + Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Images() const; + + Standard_EXPORT const TopTools_DataMapOfShapeShape& Origins() const; @@ -99,21 +120,53 @@ protected: // Methods PROTECTED // + + Standard_EXPORT virtual void CheckData() ; + + Standard_EXPORT virtual void CheckResult() ; + + Standard_EXPORT void MakeVertices() ; + + Standard_EXPORT void MakeEdges() ; + + Standard_EXPORT void MakeFaces() ; + + Standard_EXPORT void MakeShapes(const TopAbs_ShapeEnum aType) ; + + Standard_EXPORT void MakeShells() ; + + Standard_EXPORT void MakeSolids() ; + + Standard_EXPORT void InnerTolerance() ; + + Standard_EXPORT void EdgePassKey(const TopoDS_Edge& aE,GEOMAlgo_PassKeyShape& aPK) ; + + Standard_EXPORT void FacePassKey(const TopoDS_Face& aF,GEOMAlgo_PassKeyShape& aPK) ; + + Standard_EXPORT void MakeVertex(const TopTools_ListOfShape& aLV,TopoDS_Vertex& aNewV) ; + + Standard_EXPORT void MakeEdge(const TopoDS_Edge& aEdge,TopoDS_Edge& aNewEdge) ; + + Standard_EXPORT void MakeFace(const TopoDS_Face& aFace,TopoDS_Face& aNewEdge) ; + + Standard_EXPORT Standard_Boolean IsToReverse(const TopoDS_Face& aFR,const TopoDS_Face& aF) ; + + Standard_EXPORT Standard_Boolean HasNewSubShape(const TopoDS_Shape& aS) const; diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.ixx b/src/GEOMAlgo/GEOMAlgo_Gluer.ixx index b27442421..8fe0fabdf 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.ixx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.jxx b/src/GEOMAlgo/GEOMAlgo_Gluer.jxx index 52df5103a..254e050e8 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.jxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _TopTools_ListOfShape_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx index 8f6683ad5..bb87ad0a1 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -44,39 +44,31 @@ class TColStd_MapIntegerHasher; class GEOMAlgo_IndexedDataMapOfIntegerShape; + class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape(const Standard_Integer& K1,const Standard_Integer K2,const TopoDS_Shape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + Standard_Integer& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + TopoDS_Shape& Value() const; -Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape(); +//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx index 84e494ec5..42561ece4 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,7 +32,7 @@ #ifndef _GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile #include #endif -GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {} +//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {} @@ -40,11 +40,8 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -77,11 +74,11 @@ const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntege { return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) ; } -Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {} +//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {} #define TheKey Standard_Integer #define TheKey_hxx #define TheItem TopoDS_Shape diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx index f8310d70a..ce1a5003a 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -44,43 +44,35 @@ #endif class GEOMAlgo_PassKeyShape; class TopTools_ListOfShape; -class GEOMAlgo_PassKeyMapHasher; +class GEOMAlgo_PassKeyShapeMapHasher; class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape; + class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape(const GEOMAlgo_PassKeyShape& K1,const Standard_Integer K2,const TopTools_ListOfShape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + GEOMAlgo_PassKeyShape& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + TopTools_ListOfShape& Value() const; -Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape(); +//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: @@ -112,8 +104,8 @@ TCollection_MapNodePtr myNext2; #define TheKey_hxx #define TheItem TopTools_ListOfShape #define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyMapHasher -#define Hasher_hxx +#define Hasher GEOMAlgo_PassKeyShapeMapHasher +#define Hasher_hxx #define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape #define TCollection_IndexedDataMapNode_hxx #define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx index f2a471ddb..ddacd8762 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -29,13 +29,13 @@ #ifndef _TopTools_ListOfShape_HeaderFile #include #endif -#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile -#include +#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile +#include #endif #ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile #include #endif -GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {} +//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {} @@ -43,11 +43,8 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -80,17 +77,17 @@ const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKe { return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) ; } -Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {} +//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {} #define TheKey GEOMAlgo_PassKeyShape #define TheKey_hxx #define TheItem TopTools_ListOfShape #define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyMapHasher -#define Hasher_hxx +#define Hasher GEOMAlgo_PassKeyShapeMapHasher +#define Hasher_hxx #define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape #define TCollection_IndexedDataMapNode_hxx #define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx index 084701c5a..b88bbcd3d 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -48,39 +48,31 @@ class TopTools_ShapeMapHasher; class GEOMAlgo_IndexedDataMapOfShapeBox; + class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox(const TopoDS_Shape& K1,const Standard_Integer K2,const Bnd_Box& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + TopoDS_Shape& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + Bnd_Box& Value() const; -Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox(); +//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx index 16eda4fb5..e2efeae43 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -35,7 +35,7 @@ #ifndef _GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile #include #endif -GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {} +//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {} @@ -43,11 +43,8 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -80,11 +77,11 @@ const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeB { return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) ; } -Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {} +//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {} #define TheKey TopoDS_Shape #define TheKey_hxx #define TheItem Bnd_Box diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx index 427dd9533..b7f8701e1 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -47,39 +47,31 @@ class TopTools_ShapeMapHasher; class GEOMAlgo_IndexedDataMapOfShapeState; + class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState(const TopoDS_Shape& K1,const Standard_Integer K2,const TopAbs_State& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + TopoDS_Shape& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + TopAbs_State& Value() const; -Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState(); +//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx index 8bf0d942a..fec6e37ca 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,7 +32,7 @@ #ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile #include #endif -GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {} +//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {} @@ -40,11 +40,8 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -77,11 +74,11 @@ const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeS { return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) ; } -Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {} +//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {} #define TheKey TopoDS_Shape #define TheKey_hxx #define TheItem TopAbs_State diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx index d615873d1..513ac78bf 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -47,6 +47,7 @@ class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape; #include #endif + class GEOMAlgo_IndexedDataMapOfIntegerShape : public TCollection_BasicMap { public: @@ -65,39 +66,67 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfIntegerShape(const Standard_Integer NbBuckets = 1); + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfIntegerShape& Assign(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other) ; GEOMAlgo_IndexedDataMapOfIntegerShape& operator =(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other) { return Assign(Other); } + + Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; + + Standard_EXPORT void Clear() ; ~GEOMAlgo_IndexedDataMapOfIntegerShape() { Clear(); } + + Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const TopoDS_Shape& I) ; + + Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const TopoDS_Shape& T) ; + + Standard_EXPORT void RemoveLast() ; + + Standard_EXPORT Standard_Boolean Contains(const Standard_Integer& K) const; + + Standard_EXPORT const Standard_Integer& FindKey(const Standard_Integer I) const; + + Standard_EXPORT const TopoDS_Shape& FindFromIndex(const Standard_Integer I) const; const TopoDS_Shape& operator ()(const Standard_Integer I) const { return FindFromIndex(I); } + + Standard_EXPORT TopoDS_Shape& ChangeFromIndex(const Standard_Integer I) ; TopoDS_Shape& operator ()(const Standard_Integer I) { return ChangeFromIndex(I); } + + Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const; + + Standard_EXPORT const TopoDS_Shape& FindFromKey(const Standard_Integer& K) const; + + Standard_EXPORT TopoDS_Shape& ChangeFromKey(const Standard_Integer& K) ; @@ -118,6 +147,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfIntegerShape(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other); diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx index 4b63205c8..8ec0d0daa 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx index a77707d37..b27ee9a81 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -37,7 +37,7 @@ class Standard_OutOfRange; class Standard_NoSuchObject; class GEOMAlgo_PassKeyShape; class TopTools_ListOfShape; -class GEOMAlgo_PassKeyMapHasher; +class GEOMAlgo_PassKeyShapeMapHasher; class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape; @@ -48,6 +48,7 @@ class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape; #include #endif + class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape : public TCollection_BasicMap { public: @@ -66,39 +67,67 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape(const Standard_Integer NbBuckets = 1); + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Assign(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other) ; GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& operator =(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other) { return Assign(Other); } + + Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; + + Standard_EXPORT void Clear() ; ~GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape() { Clear(); } + + Standard_EXPORT Standard_Integer Add(const GEOMAlgo_PassKeyShape& K,const TopTools_ListOfShape& I) ; + + Standard_EXPORT void Substitute(const Standard_Integer I,const GEOMAlgo_PassKeyShape& K,const TopTools_ListOfShape& T) ; + + Standard_EXPORT void RemoveLast() ; + + Standard_EXPORT Standard_Boolean Contains(const GEOMAlgo_PassKeyShape& K) const; + + Standard_EXPORT const GEOMAlgo_PassKeyShape& FindKey(const Standard_Integer I) const; + + Standard_EXPORT const TopTools_ListOfShape& FindFromIndex(const Standard_Integer I) const; const TopTools_ListOfShape& operator ()(const Standard_Integer I) const { return FindFromIndex(I); } + + Standard_EXPORT TopTools_ListOfShape& ChangeFromIndex(const Standard_Integer I) ; TopTools_ListOfShape& operator ()(const Standard_Integer I) { return ChangeFromIndex(I); } + + Standard_EXPORT Standard_Integer FindIndex(const GEOMAlgo_PassKeyShape& K) const; + + Standard_EXPORT const TopTools_ListOfShape& FindFromKey(const GEOMAlgo_PassKeyShape& K) const; + + Standard_EXPORT TopTools_ListOfShape& ChangeFromKey(const GEOMAlgo_PassKeyShape& K) ; @@ -119,6 +148,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other); diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx index 0fa671f46..ccd40ac28 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -34,8 +34,8 @@ #ifndef _TopTools_ListOfShape_HeaderFile #include #endif -#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile -#include +#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile +#include #endif #ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile #include @@ -46,8 +46,8 @@ #define TheKey_hxx #define TheItem TopTools_ListOfShape #define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyMapHasher -#define Hasher_hxx +#define Hasher GEOMAlgo_PassKeyShapeMapHasher +#define Hasher_hxx #define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape #define TCollection_IndexedDataMapNode_hxx #define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox.hxx index bd0d1e0ec..9b05242de 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -48,6 +48,7 @@ class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox; #include #endif + class GEOMAlgo_IndexedDataMapOfShapeBox : public TCollection_BasicMap { public: @@ -66,39 +67,67 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeBox(const Standard_Integer NbBuckets = 1); + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeBox& Assign(const GEOMAlgo_IndexedDataMapOfShapeBox& Other) ; GEOMAlgo_IndexedDataMapOfShapeBox& operator =(const GEOMAlgo_IndexedDataMapOfShapeBox& Other) { return Assign(Other); } + + Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; + + Standard_EXPORT void Clear() ; ~GEOMAlgo_IndexedDataMapOfShapeBox() { Clear(); } + + Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const Bnd_Box& I) ; + + Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const Bnd_Box& T) ; + + Standard_EXPORT void RemoveLast() ; + + Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; + + Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; + + Standard_EXPORT const Bnd_Box& FindFromIndex(const Standard_Integer I) const; const Bnd_Box& operator ()(const Standard_Integer I) const { return FindFromIndex(I); } + + Standard_EXPORT Bnd_Box& ChangeFromIndex(const Standard_Integer I) ; Bnd_Box& operator ()(const Standard_Integer I) { return ChangeFromIndex(I); } + + Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const; + + Standard_EXPORT const Bnd_Box& FindFromKey(const TopoDS_Shape& K) const; + + Standard_EXPORT Bnd_Box& ChangeFromKey(const TopoDS_Shape& K) ; @@ -119,6 +148,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeBox(const GEOMAlgo_IndexedDataMapOfShapeBox& Other); diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx index ed71748a5..c4add9933 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState.hxx index 1f15ba495..d7f988310 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -50,6 +50,7 @@ class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState; #include #endif + class GEOMAlgo_IndexedDataMapOfShapeState : public TCollection_BasicMap { public: @@ -68,39 +69,67 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState(const Standard_Integer NbBuckets = 1); + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState& Assign(const GEOMAlgo_IndexedDataMapOfShapeState& Other) ; GEOMAlgo_IndexedDataMapOfShapeState& operator =(const GEOMAlgo_IndexedDataMapOfShapeState& Other) { return Assign(Other); } + + Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; + + Standard_EXPORT void Clear() ; ~GEOMAlgo_IndexedDataMapOfShapeState() { Clear(); } + + Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const TopAbs_State& I) ; + + Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const TopAbs_State& T) ; + + Standard_EXPORT void RemoveLast() ; + + Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; + + Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; + + Standard_EXPORT const TopAbs_State& FindFromIndex(const Standard_Integer I) const; const TopAbs_State& operator ()(const Standard_Integer I) const { return FindFromIndex(I); } + + Standard_EXPORT TopAbs_State& ChangeFromIndex(const Standard_Integer I) ; TopAbs_State& operator ()(const Standard_Integer I) { return ChangeFromIndex(I); } + + Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const; + + Standard_EXPORT const TopAbs_State& FindFromKey(const TopoDS_Shape& K) const; + + Standard_EXPORT TopAbs_State& ChangeFromKey(const TopoDS_Shape& K) ; @@ -121,6 +150,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState(const GEOMAlgo_IndexedDataMapOfShapeState& Other); diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState_0.cxx index 0dd967834..92ab03801 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx index 93a423bbb..738875828 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -43,6 +43,7 @@ class GEOMAlgo_ListNodeOfListOfCoupleOfShapes; #include #endif + class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes { public: @@ -61,11 +62,22 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_ListIteratorOfListOfCoupleOfShapes(); + + Standard_EXPORT GEOMAlgo_ListIteratorOfListOfCoupleOfShapes(const GEOMAlgo_ListOfCoupleOfShapes& L); + + Standard_EXPORT void Initialize(const GEOMAlgo_ListOfCoupleOfShapes& L) ; + Standard_Boolean More() const; + + Standard_EXPORT void Next() ; + + Standard_EXPORT GEOMAlgo_CoupleOfShapes& Value() const; diff --git a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx index 51af2be73..ab548e32e 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx index ade23aa45..43bd2f9d0 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -43,6 +43,7 @@ class GEOMAlgo_ListNodeOfListOfPnt; #include #endif + class GEOMAlgo_ListIteratorOfListOfPnt { public: @@ -61,11 +62,22 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_ListIteratorOfListOfPnt(); + + Standard_EXPORT GEOMAlgo_ListIteratorOfListOfPnt(const GEOMAlgo_ListOfPnt& L); + + Standard_EXPORT void Initialize(const GEOMAlgo_ListOfPnt& L) ; + Standard_Boolean More() const; + + Standard_EXPORT void Next() ; + + Standard_EXPORT gp_Pnt& Value() const; diff --git a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx index b46afbab3..179cdce45 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx index 3addadf19..8f8dd4b42 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -41,36 +41,25 @@ class GEOMAlgo_ListOfCoupleOfShapes; class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes; + class GEOMAlgo_ListNodeOfListOfCoupleOfShapes : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + GEOMAlgo_ListNodeOfListOfCoupleOfShapes(const GEOMAlgo_CoupleOfShapes& I,const TCollection_MapNodePtr& n); + GEOMAlgo_CoupleOfShapes& Value() const; -Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfCoupleOfShapes(); +//Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfCoupleOfShapes(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx index 65de62b3d..2ce4cb14b 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,7 +32,7 @@ #ifndef _GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile #include #endif -GEOMAlgo_ListNodeOfListOfCoupleOfShapes::~GEOMAlgo_ListNodeOfListOfCoupleOfShapes() {} +//GEOMAlgo_ListNodeOfListOfCoupleOfShapes::~GEOMAlgo_ListNodeOfListOfCoupleOfShapes() {} @@ -40,11 +40,8 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Ty { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -77,11 +74,11 @@ const Handle(Standard_Type)& GEOMAlgo_ListNodeOfListOfCoupleOfShapes::DynamicTyp { return STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) ; } -Standard_Boolean GEOMAlgo_ListNodeOfListOfCoupleOfShapes::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes::~Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes() {} +//Standard_Boolean GEOMAlgo_ListNodeOfListOfCoupleOfShapes::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes::~Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes() {} #define Item GEOMAlgo_CoupleOfShapes #define Item_hxx #define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx index 24d004406..5fb729abd 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -41,36 +41,25 @@ class GEOMAlgo_ListOfPnt; class GEOMAlgo_ListIteratorOfListOfPnt; + class GEOMAlgo_ListNodeOfListOfPnt : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + GEOMAlgo_ListNodeOfListOfPnt(const gp_Pnt& I,const TCollection_MapNodePtr& n); + gp_Pnt& Value() const; -Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfPnt(); +//Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfPnt(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfPnt_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx index fb7f104f6..4514c4898 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,7 +32,7 @@ #ifndef _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile #include #endif -GEOMAlgo_ListNodeOfListOfPnt::~GEOMAlgo_ListNodeOfListOfPnt() {} +//GEOMAlgo_ListNodeOfListOfPnt::~GEOMAlgo_ListNodeOfListOfPnt() {} @@ -40,11 +40,8 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfPnt_Type_() { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -77,11 +74,11 @@ const Handle(Standard_Type)& GEOMAlgo_ListNodeOfListOfPnt::DynamicType() const { return STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt) ; } -Standard_Boolean GEOMAlgo_ListNodeOfListOfPnt::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_GEOMAlgo_ListNodeOfListOfPnt::~Handle_GEOMAlgo_ListNodeOfListOfPnt() {} +//Standard_Boolean GEOMAlgo_ListNodeOfListOfPnt::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_GEOMAlgo_ListNodeOfListOfPnt::~Handle_GEOMAlgo_ListNodeOfListOfPnt() {} #define Item gp_Pnt #define Item_hxx #define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt diff --git a/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes.hxx b/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes.hxx index b3325c16b..a535c2261 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -45,6 +45,7 @@ class GEOMAlgo_ListNodeOfListOfCoupleOfShapes; #include #endif + class GEOMAlgo_ListOfCoupleOfShapes { public: @@ -63,34 +64,71 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_ListOfCoupleOfShapes(); + + Standard_EXPORT void Assign(const GEOMAlgo_ListOfCoupleOfShapes& Other) ; void operator=(const GEOMAlgo_ListOfCoupleOfShapes& Other) { Assign(Other); } + + Standard_EXPORT Standard_Integer Extent() const; + + Standard_EXPORT void Clear() ; ~GEOMAlgo_ListOfCoupleOfShapes() { Clear(); } + Standard_Boolean IsEmpty() const; + + Standard_EXPORT void Prepend(const GEOMAlgo_CoupleOfShapes& I) ; + + Standard_EXPORT void Prepend(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& theIt) ; + + Standard_EXPORT void Prepend(GEOMAlgo_ListOfCoupleOfShapes& Other) ; + + Standard_EXPORT void Append(const GEOMAlgo_CoupleOfShapes& I) ; + + Standard_EXPORT void Append(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& theIt) ; + + Standard_EXPORT void Append(GEOMAlgo_ListOfCoupleOfShapes& Other) ; + + Standard_EXPORT GEOMAlgo_CoupleOfShapes& First() const; + + Standard_EXPORT GEOMAlgo_CoupleOfShapes& Last() const; + + Standard_EXPORT void RemoveFirst() ; + + Standard_EXPORT void Remove(GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ; + + Standard_EXPORT void InsertBefore(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ; + + Standard_EXPORT void InsertBefore(GEOMAlgo_ListOfCoupleOfShapes& Other,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ; + + Standard_EXPORT void InsertAfter(const GEOMAlgo_CoupleOfShapes& I,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ; + + Standard_EXPORT void InsertAfter(GEOMAlgo_ListOfCoupleOfShapes& Other,GEOMAlgo_ListIteratorOfListOfCoupleOfShapes& It) ; @@ -112,6 +150,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT GEOMAlgo_ListOfCoupleOfShapes(const GEOMAlgo_ListOfCoupleOfShapes& Other); diff --git a/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes_0.cxx index 8a77286c7..838464db1 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx b/src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx index d7958521f..94a8be445 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -45,6 +45,7 @@ class GEOMAlgo_ListNodeOfListOfPnt; #include #endif + class GEOMAlgo_ListOfPnt { public: @@ -63,34 +64,71 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_ListOfPnt(); + + Standard_EXPORT void Assign(const GEOMAlgo_ListOfPnt& Other) ; void operator=(const GEOMAlgo_ListOfPnt& Other) { Assign(Other); } + + Standard_EXPORT Standard_Integer Extent() const; + + Standard_EXPORT void Clear() ; ~GEOMAlgo_ListOfPnt() { Clear(); } + Standard_Boolean IsEmpty() const; + + Standard_EXPORT void Prepend(const gp_Pnt& I) ; + + Standard_EXPORT void Prepend(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& theIt) ; + + Standard_EXPORT void Prepend(GEOMAlgo_ListOfPnt& Other) ; + + Standard_EXPORT void Append(const gp_Pnt& I) ; + + Standard_EXPORT void Append(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& theIt) ; + + Standard_EXPORT void Append(GEOMAlgo_ListOfPnt& Other) ; + + Standard_EXPORT gp_Pnt& First() const; + + Standard_EXPORT gp_Pnt& Last() const; + + Standard_EXPORT void RemoveFirst() ; + + Standard_EXPORT void Remove(GEOMAlgo_ListIteratorOfListOfPnt& It) ; + + Standard_EXPORT void InsertBefore(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& It) ; + + Standard_EXPORT void InsertBefore(GEOMAlgo_ListOfPnt& Other,GEOMAlgo_ListIteratorOfListOfPnt& It) ; + + Standard_EXPORT void InsertAfter(const gp_Pnt& I,GEOMAlgo_ListIteratorOfListOfPnt& It) ; + + Standard_EXPORT void InsertAfter(GEOMAlgo_ListOfPnt& Other,GEOMAlgo_ListIteratorOfListOfPnt& It) ; @@ -112,6 +150,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT GEOMAlgo_ListOfPnt(const GEOMAlgo_ListOfPnt& Other); diff --git a/src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx index c663efc01..295d9ef59 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.cdl b/src/GEOMAlgo/GEOMAlgo_PassKey.cdl index 5644a07ff..8b84345a4 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.cdl +++ b/src/GEOMAlgo/GEOMAlgo_PassKey.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_PassKey.cdl --- Created: +-- Created: Mon Nov 20 12:16:13 2006 -- Author: Peter KURNEV -- ----Copyright: class PassKey from GEOMAlgo @@ -30,25 +29,32 @@ class PassKey from GEOMAlgo uses Shape from TopoDS, - ListOfInteger from TColStd - + IndexedMapOfInteger from TColStd, + ListOfInteger from TColStd + --raises is Create returns PassKey from GEOMAlgo; + ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_PassKey();" + + Create(Other:PassKey from GEOMAlgo) + returns PassKey from GEOMAlgo; Assign(me:out; Other : PassKey from GEOMAlgo) returns PassKey from GEOMAlgo; ---C++: alias operator = ---C++: return & + + Clear(me:out); -- SetIds(me:out; aI1 :Integer from Standard); SetIds(me:out; - aI1 :Integer from Standard; + aI1 :Integer from Standard; aI2 :Integer from Standard); SetIds(me:out; @@ -64,20 +70,13 @@ is SetIds(me:out; aLS :ListOfInteger from TColStd); - - NbMax(me) + + NbIds(me) returns Integer from Standard; - - Clear(me:out); - - Compute(me:out); IsEqual(me; aOther:PassKey from GEOMAlgo) returns Boolean from Standard; - - Key(me) - returns Address from Standard; HashCode(me; Upper : Integer from Standard) @@ -85,16 +84,16 @@ is Id(me; aIndex: Integer from Standard) - returns Integer from Standard; + returns Integer from Standard; - Dump(me); - + Dump(me; + aHex:Integer from Standard=0); + + fields - myNbIds: Integer from Standard is protected; - myNbMax: Integer from Standard is protected; - mySum : Integer from Standard is protected; - myIds : Integer from Standard [8] is protected; + mySum : Integer from Standard is protected; + myMap : IndexedMapOfInteger from TColStd is protected; end PassKey; diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.cxx b/src/GEOMAlgo/GEOMAlgo_PassKey.cxx index f38e29f60..342a116f2 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKey.cxx @@ -17,10 +17,11 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_PassKey.cxx -// Created: +// +// File: GEOMAlgo_Algo.cxx +// Created: Sat Dec 04 12:39:47 2004 // Author: Peter KURNEV -// +// #include @@ -28,13 +29,12 @@ #include #include #include +#include #ifdef WNT #pragma warning( disable : 4101) #endif -static - void SortShell(const int n, int* a); static Standard_Integer NormalizedId(const Standard_Integer aId, const Standard_Integer aDiv); @@ -45,115 +45,102 @@ static //======================================================================= GEOMAlgo_PassKey::GEOMAlgo_PassKey() { - Clear(); + Clear(); +} +//======================================================================= +//function : +//purpose : +//======================================================================= + GEOMAlgo_PassKey::GEOMAlgo_PassKey(const GEOMAlgo_PassKey& aOther) +{ + myNbIds=aOther.myNbIds; + mySum=aOther.mySum; + myMap=aOther.myMap; } //======================================================================= //function :Assign //purpose : //======================================================================= - GEOMAlgo_PassKey& GEOMAlgo_PassKey::Assign(const GEOMAlgo_PassKey& anOther) + GEOMAlgo_PassKey& GEOMAlgo_PassKey::Assign(const GEOMAlgo_PassKey& aOther) { - myNbIds=anOther.myNbIds; - myNbMax=anOther.myNbMax; - mySum=anOther.mySum; - memcpy(myIds, anOther.myIds, sizeof(myIds)); + myNbIds=aOther.myNbIds; + mySum=aOther.mySum; + myMap=aOther.myMap; return *this; } //======================================================================= +//function :~ +//purpose : +//======================================================================= + GEOMAlgo_PassKey::~GEOMAlgo_PassKey() +{ +} +//======================================================================= //function :Clear //purpose : //======================================================================= void GEOMAlgo_PassKey::Clear() { - Standard_Integer i; - // myNbIds=0; - myNbMax=8; mySum=0; - for (i=0; i myNbMax) { - return; - } - // - myNbIds=aNb; - mySum=0; - i=myNbMax-myNbIds; + Clear(); aIt.Initialize(aLI); - for (; aIt.More(); aIt.Next(), ++i) { - anId=aIt.Value(); - myIds[i]=anId; - aIdN=NormalizedId(anId, myNbIds); + for (; aIt.More(); aIt.Next()) { + aId=aIt.Value(); + myMap.Add(aId); + } + myNbIds=myMap.Extent(); + for(i=1; i<=myNbIds; ++i) { + aId=myMap(i); + aIdN=NormalizedId(aId, myNbIds); mySum+=aIdN; } - // - Compute(); +} +//======================================================================= +//function :NbIds +//purpose : +//======================================================================= + Standard_Integer GEOMAlgo_PassKey::NbIds()const +{ + return myNbIds; } //======================================================================= //function :Id //purpose : //======================================================================= - Standard_Integer GEOMAlgo_PassKey::Id(const Standard_Integer aIndex)const + Standard_Integer GEOMAlgo_PassKey::Id(const Standard_Integer aIndex) const { - if (aIndex < 0 || aIndex >= myNbMax) { - return 0; + if (aIndex<1 || aIndex>myNbIds) { + return -1; } - return myIds[aIndex]; -} -//======================================================================= -//function :NbMax -//purpose : -//======================================================================= - Standard_Integer GEOMAlgo_PassKey::NbMax()const -{ - return myNbMax; -} -//======================================================================= -//function :Compute -//purpose : -//======================================================================= - void GEOMAlgo_PassKey::Compute() -{ - SortShell(myNbIds, myIds+myNbMax-myNbIds); + return myMap(aIndex); } //======================================================================= //function :IsEqual //purpose : //======================================================================= - Standard_Boolean GEOMAlgo_PassKey::IsEqual(const GEOMAlgo_PassKey& anOther) const + Standard_Boolean GEOMAlgo_PassKey::IsEqual(const GEOMAlgo_PassKey& aOther) const { - Standard_Integer iIsEqual; - Standard_Boolean bIsEqual; + Standard_Boolean bRet; + Standard_Integer i, aId; // - iIsEqual=memcmp(myIds, anOther.myIds, sizeof(myIds)); - bIsEqual=Standard_False; - if (!iIsEqual) { - bIsEqual=!bIsEqual; + bRet=Standard_False; + // + if (myNbIds!=aOther.myNbIds) { + return bRet; } - return bIsEqual; -} -//======================================================================= -//function :Key -//purpose : -//======================================================================= - Standard_Address GEOMAlgo_PassKey::Key()const -{ - return (Standard_Address)myIds; + for (i=1; i<=myNbIds; ++i) { + aId=myMap(i); + if (!aOther.myMap.Contains(aId)) { + return bRet; + } + } + return !bRet; } //======================================================================= //function : HashCode //purpose : //======================================================================= - Standard_Integer GEOMAlgo_PassKey::HashCode(const Standard_Integer Upper) const + Standard_Integer GEOMAlgo_PassKey::HashCode(const Standard_Integer aUpper) const { - //return (mySum % Upper); - return ::HashCode(mySum, Upper); + return ::HashCode(mySum, aUpper); } //======================================================================= //function : Dump //purpose : //======================================================================= - void GEOMAlgo_PassKey::Dump()const + void GEOMAlgo_PassKey::Dump(const Standard_Integer )const { - Standard_Integer i; - // - printf(" PassKey: {"); - for (i=0; i -1) goto m30; - }//if (a[l] < a[j]){ - }//for (i=0; i #endif +#ifndef _TColStd_IndexedMapOfInteger_HeaderFile +#include +#endif #ifndef _Standard_Boolean_HeaderFile #include #endif -#ifndef _Standard_Address_HeaderFile -#include -#endif class TColStd_ListOfInteger; @@ -39,6 +39,7 @@ class TColStd_ListOfInteger; #include #endif + class GEOMAlgo_PassKey { public: @@ -57,26 +58,54 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_PassKey(); +Standard_EXPORT virtual ~GEOMAlgo_PassKey(); + + +Standard_EXPORT GEOMAlgo_PassKey(const GEOMAlgo_PassKey& Other); + + Standard_EXPORT GEOMAlgo_PassKey& Assign(const GEOMAlgo_PassKey& Other) ; GEOMAlgo_PassKey& operator =(const GEOMAlgo_PassKey& Other) { return Assign(Other); } -Standard_EXPORT void SetIds(const Standard_Integer aI1) ; -Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2) ; -Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3) ; -Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3,const Standard_Integer aI4) ; -Standard_EXPORT void SetIds(const TColStd_ListOfInteger& aLS) ; -Standard_EXPORT Standard_Integer NbMax() const; + + Standard_EXPORT void Clear() ; -Standard_EXPORT void Compute() ; + + +Standard_EXPORT void SetIds(const Standard_Integer aI1) ; + + +Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2) ; + + +Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3) ; + + +Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3,const Standard_Integer aI4) ; + + +Standard_EXPORT void SetIds(const TColStd_ListOfInteger& aLS) ; + + +Standard_EXPORT Standard_Integer NbIds() const; + + Standard_EXPORT Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aOther) const; -Standard_EXPORT Standard_Address Key() const; + + Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const; + + Standard_EXPORT Standard_Integer Id(const Standard_Integer aIndex) const; -Standard_EXPORT void Dump() const; + + +Standard_EXPORT void Dump(const Standard_Integer aHex = 0) const; @@ -91,9 +120,8 @@ protected: // Fields PROTECTED // Standard_Integer myNbIds; -Standard_Integer myNbMax; Standard_Integer mySum; -Standard_Integer myIds[8]; +TColStd_IndexedMapOfInteger myMap; private: diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.ixx b/src/GEOMAlgo/GEOMAlgo_PassKey.ixx index 5d1d1e3ca..d935f86ec 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.ixx +++ b/src/GEOMAlgo/GEOMAlgo_PassKey.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.jxx b/src/GEOMAlgo/GEOMAlgo_PassKey.jxx index ed5b193d1..6363a879e 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.jxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKey.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _TColStd_ListOfInteger_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cdl b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cdl index e16dae0e9..a0ba022fc 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cdl +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_PassKeyMapHasher.cdl -- Created: -- Author: Peter KURNEV -- ----Copyright: class PassKeyMapHasher from GEOMAlgo diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx index fbd3d81cb..654278f7e 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx @@ -29,17 +29,17 @@ //function : HashCode //purpose : //======================================================================= - Standard_Integer GEOMAlgo_PassKeyMapHasher::HashCode(const GEOMAlgo_PassKey& aPKey, + Standard_Integer GEOMAlgo_PassKeyMapHasher::HashCode(const GEOMAlgo_PassKey& aPK, const Standard_Integer Upper) { - return aPKey.HashCode(Upper); + return aPK.HashCode(Upper); } //======================================================================= //function :IsEqual //purpose : //======================================================================= - Standard_Boolean GEOMAlgo_PassKeyMapHasher::IsEqual(const GEOMAlgo_PassKey& aPKey1, - const GEOMAlgo_PassKey& aPKey2) + Standard_Boolean GEOMAlgo_PassKeyMapHasher::IsEqual(const GEOMAlgo_PassKey& aPK1, + const GEOMAlgo_PassKey& aPK2) { - return aPKey1.IsEqual(aPKey2); + return aPK1.IsEqual(aPK2); } diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx index 6cf2510ab..2e0287ee6 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -36,6 +36,7 @@ class GEOMAlgo_PassKey; #include #endif + class GEOMAlgo_PassKeyMapHasher { public: @@ -54,7 +55,11 @@ public: } // Methods PUBLIC // + + Standard_EXPORT static Standard_Integer HashCode(const GEOMAlgo_PassKey& aPKey,const Standard_Integer Upper) ; + + Standard_EXPORT static Standard_Boolean IsEqual(const GEOMAlgo_PassKey& aPKey1,const GEOMAlgo_PassKey& aPKey2) ; diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.ixx b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.ixx index 6bb118e58..331c4d8e9 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.ixx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.jxx b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.jxx index 5edadebd2..f1bedbdd8 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.jxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _GEOMAlgo_PassKey_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl index 523f5898e..5215a4de4 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl @@ -1,67 +1,95 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_PassKeyShape.cdl -- Created: -- Author: Peter KURNEV -- ----Copyright: class PassKeyShape from GEOMAlgo - inherits PassKey from GEOMAlgo - + ---Purpose: uses Shape from TopoDS, - ListOfShape from TopTools - + ListOfShape from TopTools, + IndexedMapOfShape from TopTools + --raises is Create returns PassKeyShape from GEOMAlgo; - - SetIds(me:out; + ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_PassKeyShape();" + + Create(Other:PassKeyShape from GEOMAlgo) + returns PassKeyShape from GEOMAlgo; + + Assign(me:out; + Other : PassKeyShape from GEOMAlgo) + returns PassKeyShape from GEOMAlgo; + ---C++: alias operator = + ---C++: return & + + SetShapes(me:out; aS :Shape from TopoDS); - SetIds(me:out; + SetShapes(me:out; aS1 :Shape from TopoDS; aS2 :Shape from TopoDS); - SetIds(me:out; + SetShapes(me:out; aS1 :Shape from TopoDS; aS2 :Shape from TopoDS; aS3 :Shape from TopoDS); - SetIds(me:out; + SetShapes(me:out; aS1 :Shape from TopoDS; aS2 :Shape from TopoDS; aS3 :Shape from TopoDS; aS4 :Shape from TopoDS); - SetIds(me:out; + SetShapes(me:out; aLS :ListOfShape from TopTools); - + + Clear(me:out); + + NbIds(me) + returns Integer from Standard; + + IsEqual(me; + aOther:PassKeyShape from GEOMAlgo) + returns Boolean from Standard; + + HashCode(me; + Upper : Integer from Standard) + returns Integer from Standard; + + Dump(me; + aHex:Integer from Standard=0); + fields - myUpper : Integer from Standard is protected; + myNbIds:Integer from Standard is protected; + mySum :Integer from Standard is protected; + myUpper:Integer from Standard is protected; + myMap :IndexedMapOfShape from TopTools is protected; end PassKeyShape; diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx index cd90291c2..df01791ad 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx @@ -25,107 +25,203 @@ #include -#include -#include - +#include #include -#include + +static + Standard_Integer NormalizedId(const Standard_Integer aId, + const Standard_Integer aDiv); //======================================================================= //function : //purpose : //======================================================================= GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape() -: - GEOMAlgo_PassKey() { myUpper=432123; - GEOMAlgo_PassKey::Clear(); } //======================================================================= -//function :SetIds +//function : //purpose : //======================================================================= - void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1) + GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& aOther) +{ + myUpper=432123; + myNbIds=aOther.myNbIds; + mySum=aOther.mySum; + myMap=aOther.myMap; +} +//======================================================================= +//function :~ +//purpose : +//======================================================================= + GEOMAlgo_PassKeyShape::~GEOMAlgo_PassKeyShape() +{ +} +//======================================================================= +//function :Assign +//purpose : +//======================================================================= + GEOMAlgo_PassKeyShape& GEOMAlgo_PassKeyShape::Assign(const GEOMAlgo_PassKeyShape& aOther) +{ + myUpper=432123; + myNbIds=aOther.myNbIds; + mySum=aOther.mySum; + myMap=aOther.myMap; + return *this; +} +//======================================================================= +//function :Clear +//purpose : +//======================================================================= + void GEOMAlgo_PassKeyShape::Clear() +{ + myNbIds=0; + mySum=0; + myMap.Clear(); +} +//======================================================================= +//function :SetShapes +//purpose : +//======================================================================= + void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1) { - Standard_Integer anId1; + Standard_Integer aHC; // - anId1=aS1.HashCode(myUpper); - GEOMAlgo_PassKey::SetIds(anId1); + Clear(); + myNbIds=1; + myMap.Add(aS1); + aHC=aS1.HashCode(myUpper); + mySum=NormalizedId(aHC, myNbIds); } //======================================================================= -//function :SetIds +//function :SetShapes //purpose : //======================================================================= - void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) + void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, + const TopoDS_Shape& aS2) { - Standard_Integer anId1, anId2; + TopTools_ListOfShape aLS; // - anId1=aS1.HashCode(myUpper); - anId2=aS2.HashCode(myUpper); - // - GEOMAlgo_PassKey::SetIds(anId1, anId2); + aLS.Append(aS1); + aLS.Append(aS2); + SetShapes(aLS); } //======================================================================= -//function :SetIds +//function :SetShapes //purpose : //======================================================================= - void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2, - const TopoDS_Shape& aS3) + void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, + const TopoDS_Shape& aS2, + const TopoDS_Shape& aS3) { - Standard_Integer anId1, anId2, anId3; + TopTools_ListOfShape aLS; // - anId1=aS1.HashCode(myUpper); - anId2=aS2.HashCode(myUpper); - anId3=aS3.HashCode(myUpper); - // - GEOMAlgo_PassKey::SetIds(anId1, anId2, anId3); + aLS.Append(aS1); + aLS.Append(aS2); + aLS.Append(aS3); + SetShapes(aLS); } //======================================================================= -//function :SetIds +//function :SetShapes //purpose : //======================================================================= - void GEOMAlgo_PassKeyShape::SetIds(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2, - const TopoDS_Shape& aS3, - const TopoDS_Shape& aS4) + void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, + const TopoDS_Shape& aS2, + const TopoDS_Shape& aS3, + const TopoDS_Shape& aS4) { - Standard_Integer anId1, anId2, anId3, anId4; + TopTools_ListOfShape aLS; // - anId1=aS1.HashCode(myUpper); - anId2=aS2.HashCode(myUpper); - anId3=aS3.HashCode(myUpper); - anId4=aS4.HashCode(myUpper); - // - GEOMAlgo_PassKey::SetIds(anId1, anId2, anId3, anId4); + aLS.Append(aS1); + aLS.Append(aS2); + aLS.Append(aS3); + aLS.Append(aS4); + SetShapes(aLS); } //======================================================================= -//function :SetIds +//function :SetShapes //purpose : //======================================================================= - void GEOMAlgo_PassKeyShape::SetIds(const TopTools_ListOfShape& aLS) + void GEOMAlgo_PassKeyShape::SetShapes(const TopTools_ListOfShape& aLS) { - Standard_Integer anId; + Standard_Integer i, aId, aIdN; TopTools_ListIteratorOfListOfShape aIt; - TColStd_ListOfInteger aLI; // - //aNb=aLS.Extent(); - //if (aNb<1 || aNb > myNbMax) { - // return; - //} - // - //myNbIds=aNb; - //mySum=0; - //i=myNbMax-myNbIds; - + Clear(); aIt.Initialize(aLS); for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aS=aIt.Value(); - anId=aS.HashCode(myUpper); - aLI.Append(anId); + myMap.Add(aS); + } + myNbIds=myMap.Extent(); + for(i=1; i<=myNbIds; ++i) { + const TopoDS_Shape& aS=myMap(i); + aId=aS.HashCode(myUpper); + aIdN=NormalizedId(aId, myNbIds); + mySum+=aIdN; } - GEOMAlgo_PassKey::SetIds(aLI); +} +//======================================================================= +//function :NbIds +//purpose : +//======================================================================= + Standard_Integer GEOMAlgo_PassKeyShape::NbIds()const +{ + return myNbIds; +} +//======================================================================= +//function :IsEqual +//purpose : +//======================================================================= + Standard_Boolean GEOMAlgo_PassKeyShape::IsEqual(const GEOMAlgo_PassKeyShape& aOther) const +{ + Standard_Boolean bRet; + Standard_Integer i; + // + bRet=Standard_False; + // + if (myNbIds!=aOther.myNbIds) { + return bRet; + } + for (i=1; i<=myNbIds; ++i) { + const TopoDS_Shape& aS=myMap(i); + if (!aOther.myMap.Contains(aS)) { + return bRet; + } + } + return !bRet; +} +//======================================================================= +//function : HashCode +//purpose : +//======================================================================= + Standard_Integer GEOMAlgo_PassKeyShape::HashCode(const Standard_Integer aUpper) const +{ + return ::HashCode(mySum, aUpper); +} +//======================================================================= +//function : Dump +//purpose : +//======================================================================= + void GEOMAlgo_PassKeyShape::Dump(const Standard_Integer)const +{ +} +//======================================================================= +// function: NormalizedId +// purpose : +//======================================================================= +Standard_Integer NormalizedId(const Standard_Integer aId, + const Standard_Integer aDiv) +{ + Standard_Integer aMax, aTresh, aIdRet; + // + aIdRet=aId; + aMax=::IntegerLast(); + aTresh=aMax/aDiv; + if (aId>aTresh) { + aIdRet=aId%aTresh; + } + return aIdRet; } diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx index 0e4d113a3..d54dd3c0b 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -23,8 +23,11 @@ #ifndef _Standard_Integer_HeaderFile #include #endif -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include +#ifndef _TopTools_IndexedMapOfShape_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include #endif class TopoDS_Shape; class TopTools_ListOfShape; @@ -37,7 +40,8 @@ class TopTools_ListOfShape; #include #endif -class GEOMAlgo_PassKeyShape : public GEOMAlgo_PassKey { + +class GEOMAlgo_PassKeyShape { public: @@ -55,12 +59,51 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_PassKeyShape(); -Standard_EXPORT void SetIds(const TopoDS_Shape& aS) ; -Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ; -Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3) ; -Standard_EXPORT void SetIds(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3,const TopoDS_Shape& aS4) ; -Standard_EXPORT void SetIds(const TopTools_ListOfShape& aLS) ; +Standard_EXPORT virtual ~GEOMAlgo_PassKeyShape(); + + +Standard_EXPORT GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& Other); + + +Standard_EXPORT GEOMAlgo_PassKeyShape& Assign(const GEOMAlgo_PassKeyShape& Other) ; + GEOMAlgo_PassKeyShape& operator =(const GEOMAlgo_PassKeyShape& Other) +{ + return Assign(Other); +} + + + +Standard_EXPORT void SetShapes(const TopoDS_Shape& aS) ; + + +Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ; + + +Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3) ; + + +Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3,const TopoDS_Shape& aS4) ; + + +Standard_EXPORT void SetShapes(const TopTools_ListOfShape& aLS) ; + + +Standard_EXPORT void Clear() ; + + +Standard_EXPORT Standard_Integer NbIds() const; + + +Standard_EXPORT Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aOther) const; + + +Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const; + + +Standard_EXPORT void Dump(const Standard_Integer aHex = 0) const; @@ -74,7 +117,10 @@ protected: // Fields PROTECTED // +Standard_Integer myNbIds; +Standard_Integer mySum; Standard_Integer myUpper; +TopTools_IndexedMapOfShape myMap; private: diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx index 2f34c7cf1..9934607fc 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx index ecc2db93f..06b1a9edb 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _TopoDS_Shape_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cdl b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cdl index 640176e39..26b5c27a9 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cdl +++ b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_ShapeAlgo.cdl -- Created: Tue Dec 7 12:05:19 2004 -- Author: Peter KURNEV diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx index 27e6afad6..7647c9bf2 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -42,6 +42,7 @@ class TopoDS_Shape; #include #endif + class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo { public: @@ -60,10 +61,20 @@ public: } // Methods PUBLIC // + + Standard_EXPORT void SetShape(const TopoDS_Shape& aS) ; + + Standard_EXPORT void SetTolerance(const Standard_Real aT) ; + + Standard_EXPORT const TopoDS_Shape& Shape() const; + + Standard_EXPORT Standard_Real Tolerance() const; + + Standard_EXPORT const TopoDS_Shape& Result() const; @@ -74,6 +85,8 @@ protected: // Methods PROTECTED // + + Standard_EXPORT GEOMAlgo_ShapeAlgo(); Standard_EXPORT virtual ~GEOMAlgo_ShapeAlgo(); diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.ixx b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.ixx index 6e2441ab5..f1a56c8ff 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.ixx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.jxx b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.jxx index d5c10358d..94b9d0c30 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.jxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _TopoDS_Shape_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl index caf91063e..b26e74093 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl +++ b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_ShapeSolid.cdl -- Created: Thu Jan 13 12:44:07 2005 -- Author: Peter KURNEV diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx index da207056c..fa7d823b7 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -46,6 +46,7 @@ class TopTools_ListOfShape; #include #endif + class GEOMAlgo_ShapeSolid : public GEOMAlgo_Algo { public: @@ -64,8 +65,12 @@ public: } // Methods PUBLIC // + + Standard_EXPORT void SetFiller(const BOPTools_DSFiller& aDSF) ; Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid(); + + Standard_EXPORT const TopTools_ListOfShape& Shapes(const TopAbs_State aState) const; @@ -76,8 +81,14 @@ protected: // Methods PROTECTED // + + Standard_EXPORT GEOMAlgo_ShapeSolid(); + + Standard_EXPORT virtual void BuildResult() = 0; + + Standard_EXPORT virtual void Prepare() = 0; diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx index 7e682ae14..2ef2ca6ef 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx index 76fc8fce0..665e84a1a 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _BOPTools_DSFiller_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl index 22959a271..15d47e504 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl +++ b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_ShellSolid.cdl -- Created: Wed Jan 12 12:45:20 2005 -- Author: Peter KURNEV diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx index 2eb5a6c59..a074965c8 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,6 +32,7 @@ #include #endif + class GEOMAlgo_ShellSolid : public GEOMAlgo_ShapeSolid { public: @@ -50,8 +51,12 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_ShellSolid(); Standard_EXPORT virtual ~GEOMAlgo_ShellSolid(); + + Standard_EXPORT virtual void Perform() ; @@ -62,8 +67,14 @@ protected: // Methods PROTECTED // + + Standard_EXPORT virtual void Prepare() ; + + Standard_EXPORT virtual void BuildResult() ; + + Standard_EXPORT void DetectSDFaces() ; diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx index dcadd3ef6..2be64c012 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx +++ b/src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx index 79b529b94..c2e95da40 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx +++ b/src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _GEOMAlgo_ShellSolid_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl index cf105ffa1..aef1c1ae6 100644 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl +++ b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_SolidSolid.cdl -- Created: Wed Jan 26 12:05:14 2005 -- Author: Peter KURNEV diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx b/src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx index fa1895c7b..7dcef534f 100644 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -36,6 +36,7 @@ class TopoDS_Shape; #include #endif + class GEOMAlgo_SolidSolid : public GEOMAlgo_ShellSolid { public: @@ -54,10 +55,18 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_SolidSolid(); Standard_EXPORT virtual ~GEOMAlgo_SolidSolid(); + + Standard_EXPORT virtual void Perform() ; + + Standard_EXPORT void SetShape2(const TopoDS_Shape& aS) ; + + Standard_EXPORT const TopoDS_Shape& Shape2() const; @@ -68,6 +77,8 @@ protected: // Methods PROTECTED // + + Standard_EXPORT virtual void BuildResult() ; diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx b/src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx index af6eda6ac..fae2b9509 100644 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx +++ b/src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx b/src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx index f6711df29..1fa87e792 100644 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx +++ b/src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _TopoDS_Shape_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_State.hxx b/src/GEOMAlgo/GEOMAlgo_State.hxx index 8d4707bd4..1824b18bb 100644 --- a/src/GEOMAlgo/GEOMAlgo_State.hxx +++ b/src/GEOMAlgo/GEOMAlgo_State.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -20,6 +20,7 @@ #ifndef _GEOMAlgo_State_HeaderFile #define _GEOMAlgo_State_HeaderFile + enum GEOMAlgo_State { GEOMAlgo_ST_UNKNOWN, GEOMAlgo_ST_IN, diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.cdl b/src/GEOMAlgo/GEOMAlgo_StateCollector.cdl index a9ae5dcae..15e89c8d1 100644 --- a/src/GEOMAlgo/GEOMAlgo_StateCollector.cdl +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_StateCollector.cdl -- Created: Thu Mar 10 09:39:25 2005 -- Author: Peter KURNEV diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.hxx b/src/GEOMAlgo/GEOMAlgo_StateCollector.hxx index e0c109af2..0bd3e756f 100644 --- a/src/GEOMAlgo/GEOMAlgo_StateCollector.hxx +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -38,6 +38,7 @@ #include #endif + class GEOMAlgo_StateCollector { public: @@ -56,8 +57,14 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_StateCollector(); + + Standard_EXPORT Standard_Boolean AppendState(const TopAbs_State aSt) ; + + Standard_EXPORT TopAbs_State State() const; diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.ixx b/src/GEOMAlgo/GEOMAlgo_StateCollector.ixx index 50d4ab6ee..542bc6eb1 100644 --- a/src/GEOMAlgo/GEOMAlgo_StateCollector.ixx +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.jxx b/src/GEOMAlgo/GEOMAlgo_StateCollector.jxx index 585231ea2..1a00e015a 100644 --- a/src/GEOMAlgo/GEOMAlgo_StateCollector.jxx +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _GEOMAlgo_StateCollector_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl index 9035638b5..d0fa19382 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_SurfaceTools.cdl -- Created: Thu Jan 27 11:03:49 2005 -- Author: Peter KURNEV diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx index f11a7ce96..5703def26 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -53,6 +53,7 @@ class gp_Sphere; #include #endif + class GEOMAlgo_SurfaceTools { public: @@ -71,14 +72,32 @@ public: } // Methods PUBLIC // + + Standard_EXPORT static Standard_Boolean IsAnalytic(const Handle(Geom_Surface)& aS) ; + + Standard_EXPORT static Standard_Boolean IsCoaxial(const gp_Pnt& aP1,const gp_Pnt& aP2,const gp_Cylinder& aCyl,const Standard_Real aTol) ; + + Standard_EXPORT static Standard_Boolean IsConformState(const TopAbs_State aST1,const GEOMAlgo_State aST2) ; + + Standard_EXPORT static Standard_Integer GetState(const gp_Pnt& aP,const GeomAdaptor_Surface& aS,const Standard_Real aTol,TopAbs_State& aSt) ; + + Standard_EXPORT static Standard_Integer GetState(const gp_Pnt& aP,const Handle(Geom_Surface)& aS,const Standard_Real aTol,TopAbs_State& aSt) ; + + Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Pln& aPln) ; + + Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Cylinder& aCyl) ; + + Standard_EXPORT static Standard_Real Distance(const gp_Pnt& aP,const gp_Sphere& aSph) ; + + Standard_EXPORT static TopAbs_State ReverseState(const TopAbs_State aSt) ; diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx index 7911ef34c..520fe97a3 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx index a0ed3b986..2837fd50f 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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_Surface_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.cdl b/src/GEOMAlgo/GEOMAlgo_Tools.cdl index 53d3d7cf2..ece735396 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.cdl +++ b/src/GEOMAlgo/GEOMAlgo_Tools.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_Tools.cdl -- Created: Mon Dec 6 11:26:02 2004 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2004 class Tools from GEOMAlgo @@ -38,7 +37,7 @@ uses ListOfShape from TopTools, IndexedDataMapOfShapeListOfShape from TopTools, Context from IntTools, - IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo + IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo --qft --raises @@ -48,7 +47,7 @@ is returns Boolean from Standard; RefineSDShapes(myclass; - aMSD:out IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo; + aMSD:out IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo; --qft aTol:Real from Standard; aCtx:out Context from IntTools) returns Integer from Standard; diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.cxx b/src/GEOMAlgo/GEOMAlgo_Tools.cxx index 5e3991bfe..65250c364 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools.cxx @@ -52,8 +52,8 @@ #include #include -#include -#include +#include //qft +#include //qft static void GetCount(const TopoDS_Shape& aS, @@ -107,9 +107,9 @@ void GetCount(const TopoDS_Shape& aS, //function : RefineSDShapes //purpose : //======================================================================= -Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape &aMPKLE, - const Standard_Real aTol, - IntTools_Context& aCtx) + Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE, + const Standard_Real aTol, + IntTools_Context& aCtx) { Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd; TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd; @@ -156,7 +156,10 @@ Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKey const TopoDS_Shape& aE1=aMEToAdd.FindKey(i); const TopTools_ListOfShape& aLE=aMEToAdd(i); // - aPKE1.SetIds(aE1); + //qf + //aPKE1.SetIds(aE1); + aPKE1.SetShapes(aE1); + //qt aMPKLE.Add(aPKE1, aLE); } // diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.hxx b/src/GEOMAlgo/GEOMAlgo_Tools.hxx index b566f21c0..5ca79dd40 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -50,6 +50,7 @@ class Geom_Surface; #include #endif + class GEOMAlgo_Tools { public: @@ -68,17 +69,41 @@ public: } // Methods PUBLIC // + + Standard_EXPORT static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS) ; + + Standard_EXPORT static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD,const Standard_Real aTol,IntTools_Context& aCtx) ; + + Standard_EXPORT static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE,const Standard_Real aTol,TopTools_IndexedDataMapOfShapeListOfShape& aMEE,IntTools_Context& aCtx) ; + + Standard_EXPORT static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1,const TopTools_ListOfShape& aLE,const Standard_Real aTol,TopTools_ListOfShape& aLESD,IntTools_Context& aCtx) ; + + Standard_EXPORT static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1,const TopoDS_Shape& aS,gp_Pnt& aP2,IntTools_Context& aCtx) ; + + Standard_EXPORT static void PointOnShape(const TopoDS_Shape& aS,gp_Pnt& aP3D) ; + + Standard_EXPORT static void PointOnEdge(const TopoDS_Edge& aE,gp_Pnt& aP3D) ; + + Standard_EXPORT static void PointOnEdge(const TopoDS_Edge& aE,const Standard_Real aT,gp_Pnt& aP3D) ; + + Standard_EXPORT static void PointOnFace(const TopoDS_Face& aF,gp_Pnt& aP3D) ; + + Standard_EXPORT static void PointOnFace(const TopoDS_Face& aF,const Standard_Real aU,const Standard_Real aV,gp_Pnt& aP3D) ; + + Standard_EXPORT static void RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Standard_Real aU1,const Standard_Real aU2) ; + + Standard_EXPORT static Standard_Boolean IsUPeriodic(const Handle(Geom_Surface)& aS) ; diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.ixx b/src/GEOMAlgo/GEOMAlgo_Tools.ixx index 708109157..1a731d46c 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.ixx +++ b/src/GEOMAlgo/GEOMAlgo_Tools.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.jxx b/src/GEOMAlgo/GEOMAlgo_Tools.jxx index af7450af9..0fa411d8a 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.jxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools.jxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl index a4d9c01d0..9e83db59a 100644 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl +++ b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_VertexSolid.cdl -- Created: Wed Jan 12 16:34:53 2005 -- Author: Peter KURNEV diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx index 941104ec7..7c77c2fa9 100644 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,6 +32,7 @@ #include #endif + class GEOMAlgo_VertexSolid : public GEOMAlgo_ShapeSolid { public: @@ -50,8 +51,12 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_VertexSolid(); Standard_EXPORT virtual ~GEOMAlgo_VertexSolid(); + + Standard_EXPORT virtual void Perform() ; @@ -62,7 +67,11 @@ protected: // Methods PROTECTED // + + Standard_EXPORT virtual void Prepare() ; + + Standard_EXPORT virtual void BuildResult() ; diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx index 335d706b7..32c7746f2 100644 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx +++ b/src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx index 38f0ad644..8925ddd34 100644 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx +++ b/src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _GEOMAlgo_VertexSolid_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.cdl b/src/GEOMAlgo/GEOMAlgo_WireSolid.cdl index a24418a8a..1fa98cd39 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.cdl +++ b/src/GEOMAlgo/GEOMAlgo_WireSolid.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- +-- See http:--www.salome-platform.org/ or email : webmaster.salome@opencascade.com +-- -- File: GEOMAlgo_WireSolid.cdl -- Created: Wed Jan 12 10:17:00 2005 -- Author: Peter KURNEV diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.hxx b/src/GEOMAlgo/GEOMAlgo_WireSolid.hxx index ef9ec1470..867cc561e 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_WireSolid.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,6 +32,7 @@ #include #endif + class GEOMAlgo_WireSolid : public GEOMAlgo_ShapeSolid { public: @@ -50,8 +51,12 @@ public: } // Methods PUBLIC // + + Standard_EXPORT GEOMAlgo_WireSolid(); Standard_EXPORT virtual ~GEOMAlgo_WireSolid(); + + Standard_EXPORT virtual void Perform() ; @@ -62,7 +67,11 @@ protected: // Methods PROTECTED // + + Standard_EXPORT virtual void Prepare() ; + + Standard_EXPORT virtual void BuildResult() ; diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.ixx b/src/GEOMAlgo/GEOMAlgo_WireSolid.ixx index ff86f06f7..d4943559c 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.ixx +++ b/src/GEOMAlgo/GEOMAlgo_WireSolid.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.jxx b/src/GEOMAlgo/GEOMAlgo_WireSolid.jxx index c4d2a32b2..4409553d2 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.jxx +++ b/src/GEOMAlgo/GEOMAlgo_WireSolid.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _GEOMAlgo_WireSolid_HeaderFile #include #endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx index cf0ed1eec..738d8abac 100644 --- a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx +++ b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMa class Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)():Handle(TCollection_MapNode)() {} Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)(const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) : public Handle(TCol return *this; } - GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* operator->() + GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* operator->() const { return (GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger *)ControlAccess(); } - GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger* operator->() const - { - return (GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger *)ControlAccess(); - } - - Standard_EXPORT ~Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)(); +// Standard_EXPORT ~Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)(); Standard_EXPORT static const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx index ba87e481d..d1003aab3 100644 --- a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx +++ b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeO class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)():Handle(TCollection_MapNode)() {} Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) : public return *this; } - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* operator->() + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* operator->() const { return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape *)ControlAccess(); } - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* operator->() const - { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape *)ControlAccess(); - } - - Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(); +// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(); Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx index 82502e38a..019555891 100644 --- a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx +++ b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeO class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)():Handle(TCollection_MapNode)() {} Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShap return *this; } - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* operator->() + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* operator->() const { return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape *)ControlAccess(); } - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* operator->() const - { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape *)ControlAccess(); - } - - Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(); +// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(); Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx index ef5aae2c2..1c53e213a 100644 --- a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx +++ b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeO class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)():Handle(TCollection_MapNode)() {} Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) : public Han return *this; } - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* operator->() + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* operator->() const { return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox *)ControlAccess(); } - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* operator->() const - { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox *)ControlAccess(); - } - - Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(); +// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(); Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx index 3c50ad124..f218abeae 100644 --- a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx +++ b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeO class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)():Handle(TCollection_MapNode)() {} Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) : public H return *this; } - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* operator->() + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* operator->() const { return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState *)ControlAccess(); } - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* operator->() const - { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState *)ControlAccess(); - } - - Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)(); +// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)(); Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx index 072614382..6be59702f 100644 --- a/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx +++ b/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCou class Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)():Handle(TCollection_MapNode)() {} Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)(const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) : public Handle(TCollectio return *this; } - GEOMAlgo_ListNodeOfListOfCoupleOfShapes* operator->() + GEOMAlgo_ListNodeOfListOfCoupleOfShapes* operator->() const { return (GEOMAlgo_ListNodeOfListOfCoupleOfShapes *)ControlAccess(); } - GEOMAlgo_ListNodeOfListOfCoupleOfShapes* operator->() const - { - return (GEOMAlgo_ListNodeOfListOfCoupleOfShapes *)ControlAccess(); - } - - Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)(); +// Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)(); Standard_EXPORT static const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx index f773bfd3e..de9397fc9 100644 --- a/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx +++ b/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt class Handle(GEOMAlgo_ListNodeOfListOfPnt) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(GEOMAlgo_ListNodeOfListOfPnt)():Handle(TCollection_MapNode)() {} Handle(GEOMAlgo_ListNodeOfListOfPnt)(const Handle(GEOMAlgo_ListNodeOfListOfPnt)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(GEOMAlgo_ListNodeOfListOfPnt) : public Handle(TCollection_MapNode) return *this; } - GEOMAlgo_ListNodeOfListOfPnt* operator->() + GEOMAlgo_ListNodeOfListOfPnt* operator->() const { return (GEOMAlgo_ListNodeOfListOfPnt *)ControlAccess(); } - GEOMAlgo_ListNodeOfListOfPnt* operator->() const - { - return (GEOMAlgo_ListNodeOfListOfPnt *)ControlAccess(); - } - - Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfPnt)(); +// Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfPnt)(); Standard_EXPORT static const Handle(GEOMAlgo_ListNodeOfListOfPnt) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/GEOMAlgo/Makefile.in b/src/GEOMAlgo/Makefile.in index a0c7e45a4..5cd728723 100644 --- a/src/GEOMAlgo/Makefile.in +++ b/src/GEOMAlgo/Makefile.in @@ -44,19 +44,47 @@ LIB_SRC = \ BlockFix_UnionEdges.cxx \ BlockFix_UnionFaces.cxx \ GEOMAlgo_Algo.cxx \ + GEOMAlgo_Builder_0.cxx \ + GEOMAlgo_Builder_1.cxx \ + GEOMAlgo_Builder_2.cxx \ + GEOMAlgo_Builder_3.cxx \ + GEOMAlgo_Builder_4.cxx \ + GEOMAlgo_BuilderArea.cxx \ + GEOMAlgo_Builder.cxx \ + GEOMAlgo_BuilderFace.cxx \ + GEOMAlgo_BuilderShape.cxx \ + GEOMAlgo_BuilderSolid.cxx \ + GEOMAlgo_BuilderTools.cxx \ + GEOMAlgo_ClsfBox.cxx \ + GEOMAlgo_Clsf.cxx \ + GEOMAlgo_ClsfSurf.cxx \ GEOMAlgo_CoupleOfShapes.cxx \ GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx \ + GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_0.cxx \ + GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_0.cxx \ + GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_0.cxx \ GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx \ + GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx \ + GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx \ + GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx \ GEOMAlgo_DataMapOfPassKeyInteger_0.cxx \ + GEOMAlgo_DataMapOfRealListOfShape_0.cxx \ + GEOMAlgo_DataMapOfShapeReal_0.cxx \ + GEOMAlgo_DataMapOfShapeShapeSet_0.cxx \ GEOMAlgo_FinderShapeOn1.cxx \ + GEOMAlgo_FinderShapeOn2.cxx \ + GEOMAlgo_FinderShapeOn.cxx \ GEOMAlgo_FinderShapeOnQuad.cxx \ GEOMAlgo_GlueAnalyser.cxx \ GEOMAlgo_Gluer.cxx \ + GEOMAlgo_HAlgo.cxx \ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx \ + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx \ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx \ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx \ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx \ GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx \ + GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx \ GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx \ GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx \ GEOMAlgo_IndexedDataMapOfShapeState_0.cxx \ @@ -69,10 +97,22 @@ LIB_SRC = \ GEOMAlgo_PassKey.cxx \ GEOMAlgo_PassKeyMapHasher.cxx \ GEOMAlgo_PassKeyShape.cxx \ + GEOMAlgo_PassKeyShapeMapHasher.cxx \ GEOMAlgo_ShapeAlgo.cxx \ + GEOMAlgo_ShapeSet.cxx \ + GEOMAlgo_ShapeSolid.cxx \ + GEOMAlgo_ShellSolid.cxx \ + GEOMAlgo_SolidSolid.cxx \ + GEOMAlgo_Splitter.cxx \ GEOMAlgo_StateCollector.cxx \ GEOMAlgo_SurfaceTools.cxx \ - GEOMAlgo_Tools.cxx + GEOMAlgo_Tools3D.cxx \ + GEOMAlgo_Tools.cxx \ + GEOMAlgo_VertexSolid.cxx \ + GEOMAlgo_WESCorrector.cxx \ + GEOMAlgo_WireEdgeSet.cxx \ + GEOMAlgo_WireSolid.cxx \ + GEOMAlgo_WireSplitter.cxx LIB_CLIENT_IDL = LIB_SERVER_IDL = @@ -84,18 +124,87 @@ EXPORT_HEADERS = \ BlockFix_CheckTool.hxx \ Handle_BlockFix_BlockFixAPI.hxx \ GEOMAlgo_Algo.hxx \ + GEOMAlgo_BuilderArea.hxx \ + GEOMAlgo_BuilderFace.hxx \ + GEOMAlgo_Builder.hxx \ + GEOMAlgo_BuilderShape.hxx \ + GEOMAlgo_BuilderSolid.hxx \ + GEOMAlgo_BuilderTools.hxx \ + GEOMAlgo_ClsfBox.hxx \ + GEOMAlgo_Clsf.hxx \ + GEOMAlgo_ClsfSurf.hxx \ GEOMAlgo_CoupleOfShapes.hxx \ + GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx \ + GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx \ + GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx \ + GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx \ + GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx \ + GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx \ + GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx \ + GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx \ + GEOMAlgo_DataMapOfPassKeyInteger.hxx \ + GEOMAlgo_DataMapOfRealListOfShape.hxx \ + GEOMAlgo_DataMapOfShapeReal.hxx \ + GEOMAlgo_DataMapOfShapeShapeSet.hxx \ + GEOMAlgo_FinderShapeOn1.hxx \ + GEOMAlgo_FinderShapeOn2.hxx \ + GEOMAlgo_FinderShapeOn.hxx \ + GEOMAlgo_FinderShapeOnQuad.hxx \ GEOMAlgo_GlueAnalyser.hxx \ GEOMAlgo_Gluer.hxx \ - GEOMAlgo_FinderShapeOn1.hxx \ - GEOMAlgo_FinderShapeOnQuad.hxx \ + GEOMAlgo_HAlgo.hxx \ + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \ + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx \ + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx \ + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \ + GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx \ + GEOMAlgo_IndexedDataMapOfIntegerShape.hxx \ + GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx \ + GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx \ + GEOMAlgo_IndexedDataMapOfShapeBox.hxx \ GEOMAlgo_IndexedDataMapOfShapeState.hxx \ GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx \ + GEOMAlgo_ListIteratorOfListOfPnt.hxx \ + GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx \ + GEOMAlgo_ListNodeOfListOfPnt.hxx \ GEOMAlgo_ListOfCoupleOfShapes.hxx \ + GEOMAlgo_ListOfPnt.hxx \ + GEOMAlgo_PassKey.hxx \ + GEOMAlgo_PassKeyMapHasher.hxx \ + GEOMAlgo_PassKeyShape.hxx \ + GEOMAlgo_PassKeyShapeMapHasher.hxx \ + GEOMAlgo_PWireEdgeSet.hxx \ GEOMAlgo_ShapeAlgo.hxx \ + GEOMAlgo_ShapeSet.hxx \ + GEOMAlgo_ShapeSolid.hxx \ + GEOMAlgo_ShellSolid.hxx \ + GEOMAlgo_SolidSolid.hxx \ + GEOMAlgo_Splitter.hxx \ + GEOMAlgo_StateCollector.hxx \ GEOMAlgo_State.hxx \ + GEOMAlgo_SurfaceTools.hxx \ + GEOMAlgo_Tools3D.hxx \ + GEOMAlgo_Tools.hxx \ + GEOMAlgo_VertexSolid.hxx \ + GEOMAlgo_WESCorrector.hxx \ + GEOMAlgo_WireEdgeSet.hxx \ + GEOMAlgo_WireSolid.hxx \ + GEOMAlgo_WireSplitter.hxx \ + Handle_GEOMAlgo_ClsfBox.hxx \ + Handle_GEOMAlgo_Clsf.hxx \ + Handle_GEOMAlgo_ClsfSurf.hxx \ + Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx \ + Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx \ + Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx \ + Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx \ + Handle_GEOMAlgo_HAlgo.hxx \ + Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \ + Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx \ + Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx \ + Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \ Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx \ - Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx + Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx \ + Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx # idl files EXPORT_IDLS= diff --git a/src/GEOMBase/GEOMBase.cxx b/src/GEOMBase/GEOMBase.cxx index a716f062a..230515df9 100644 --- a/src/GEOMBase/GEOMBase.cxx +++ b/src/GEOMBase/GEOMBase.cxx @@ -82,6 +82,8 @@ #include #include +#include + #include "GEOMImpl_Types.hxx" using namespace std; @@ -849,18 +851,30 @@ QString GEOMBase::GetDefaultName(const QString& theOperation) { QString aName = ""; - SalomeApp_Study* appStudy = dynamic_cast( SUIT_Session::session()->activeApplication()->activeStudy() ); + // collect all object names of GEOM component + SalomeApp_Study* appStudy = + dynamic_cast( SUIT_Session::session()->activeApplication()->activeStudy() ); if ( !appStudy ) return aName; _PTR(Study) aStudy = appStudy->studyDS(); - int aNumber = 0; - _PTR(SObject) obj; - do - { - aName = theOperation+"_"+QString::number(++aNumber); - obj = aStudy->FindObject(aName.latin1()); + std::set aSet; + _PTR(SComponent) aGeomCompo (aStudy->FindComponent("GEOM")); + if (aGeomCompo) { + _PTR(ChildIterator) it (aStudy->NewChildIterator(aGeomCompo)); + _PTR(SObject) obj; + for (it->InitEx(true); it->More(); it->Next()) { + obj = it->Value(); + aSet.insert(obj->GetName()); } - while (obj); + } + + // build a unique name + int aNumber = 0; + bool isUnique = false; + while (!isUnique) { + aName = theOperation + "_" + QString::number(++aNumber); + isUnique = (aSet.count(aName.latin1()) == 0); + } return aName; } @@ -940,10 +954,10 @@ QString GEOMBase::GetName( GEOM::GEOM_Object_ptr theObj ) if ( appStudy ) { - string anIOR = SalomeApp_Application::orb()->object_to_string( theObj ); - if ( anIOR != "" ) + CORBA::String_var anIOR = SalomeApp_Application::orb()->object_to_string( theObj ); + if ( strcmp(anIOR.in(), "") != 0 ) { - _PTR(SObject) aSObj ( appStudy->studyDS()->FindObjectIOR( anIOR ) ); + _PTR(SObject) aSObj ( appStudy->studyDS()->FindObjectIOR( string( anIOR ) ) ); _PTR(GenericAttribute) anAttr; diff --git a/src/GEOMBase/GEOMBase.h b/src/GEOMBase/GEOMBase.h index 0fd37801d..ff3feecbb 100644 --- a/src/GEOMBase/GEOMBase.h +++ b/src/GEOMBase/GEOMBase.h @@ -28,6 +28,8 @@ #ifndef GEOMBASE_H #define GEOMBASE_H +#include "GEOM_GEOMBase.hxx" + // SALOME Includes #include "GEOM_AISShape.hxx" @@ -39,17 +41,6 @@ // QT Includes #include -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif - -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define GEOMBASE_WNT_EXPORT __declspec( dllexport ) -#else -#define GEOMBASE_WNT_EXPORT -#endif class GEOM_Actor; class SALOME_ListIO; @@ -61,7 +52,7 @@ class QWidget; // class : GEOMBase // purpose : //================================================================================= -class GEOMBASE_WNT_EXPORT GEOMBase +class GEOMBASE_EXPORT GEOMBase { public : /* Selection and objects management */ diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index 9cd2a40d6..fe51c488f 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -215,7 +215,8 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object, SalomeApp_Study* aDoc = getStudy(); if ( aDoc && aDoc->studyDS() ) { _PTR(Study) aStudy = aDoc->studyDS(); - _PTR(SObject) aSObj (aStudy->FindObjectIOR(SalomeApp_Application::orb()->object_to_string(object))); + CORBA::String_var objStr = SalomeApp_Application::orb()->object_to_string(object); + _PTR(SObject) aSObj (aStudy->FindObjectIOR(string(objStr.in()))); if ( aSObj ) { _PTR(ChildIterator) anIt ( aStudy->NewChildIterator( aSObj ) ); for ( anIt->InitEx( true ); anIt->More(); anIt->Next() ) { @@ -302,7 +303,8 @@ void GEOMBase_Helper::displayPreview( GEOM::GEOM_Object_ptr object, getDisplayer()->SetToActivate( activate ); // Make a reference to GEOM_Object - getDisplayer()->SetName( SalomeApp_Application::orb()->object_to_string( object ) ); + CORBA::String_var objStr = SalomeApp_Application::orb()->object_to_string( object ); + getDisplayer()->SetName( objStr.in() ); // Build prs SALOME_Prs* aPrs = getDisplayer()->BuildPrs( object ); @@ -571,11 +573,13 @@ char* GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const { SalomeApp_Study* study = getStudy(); if ( study ) { - string IOR = GEOMBase::GetIORFromObject( object); + char * objIOR = GEOMBase::GetIORFromObject( object ); + string IOR( objIOR ); + free( objIOR ); if ( IOR != "" ) { _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) ); if ( SO ) { - return TCollection_AsciiString((char*)SO->GetID().c_str()).ToCString(); + return TCollection_AsciiString((char*)SO->GetID().c_str()).ToCString(); } } } @@ -602,15 +606,15 @@ void GEOMBase_Helper::clearShapeBuffer( GEOM::GEOM_Object_ptr theObj ) if ( CORBA::is_nil( theObj ) ) return; - string IOR = SalomeApp_Application::orb()->object_to_string( theObj ); - TCollection_AsciiString asciiIOR( strdup( IOR.c_str() ) ); + CORBA::String_var IOR = SalomeApp_Application::orb()->object_to_string( theObj ); + TCollection_AsciiString asciiIOR( (char *)IOR.in() ); GEOM_Client().RemoveShapeFromBuffer( asciiIOR ); if ( !getStudy() || !getStudy()->studyDS() ) return; _PTR(Study) aStudy = getStudy()->studyDS(); - _PTR(SObject) aSObj ( aStudy->FindObjectIOR( IOR ) ); + _PTR(SObject) aSObj ( aStudy->FindObjectIOR( string( IOR ) ) ); if ( !aSObj ) return; diff --git a/src/GEOMBase/GEOMBase_Helper.h b/src/GEOMBase/GEOMBase_Helper.h index a0cb49d9e..20bcdae79 100755 --- a/src/GEOMBase/GEOMBase_Helper.h +++ b/src/GEOMBase/GEOMBase_Helper.h @@ -29,6 +29,8 @@ #ifndef GEOMBASE_HELPER_H #define GEOMBASE_HELPER_H +#include "GEOM_GEOMBase.hxx" + #include "GEOM_Displayer.h" #include "SALOME_Prs.h" #include "SALOME_ListIO.hxx" @@ -38,16 +40,7 @@ #include #include -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define GEOMBASE_WNT_EXPORT __declspec( dllexport ) -#else -#define GEOMBASE_WNT_EXPORT -#endif + typedef std::list ObjectList; class SalomeApp_Study; @@ -64,7 +57,7 @@ class TColStd_MapOfInteger; // performing common operations (display/erase, selection activation, // publication in a study, transaction management) //================================================================ -class GEOMBASE_WNT_EXPORT GEOMBase_Helper +class GEOMBASE_EXPORT GEOMBase_Helper { public: GEOMBase_Helper( SUIT_Desktop* ); diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx index 396ec0daa..33a6fe5ac 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.cxx +++ b/src/GEOMBase/GEOMBase_Skeleton.cxx @@ -228,9 +228,15 @@ void GEOMBase_Skeleton::ClickOnHelp() if (app) app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName); else { + QString platform; +#ifdef WIN32 + platform = "winapplication"; +#else + platform = "application"; +#endif SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName), + arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), QObject::tr("BUT_OK")); } } diff --git a/src/GEOMBase/GEOMBase_Skeleton.h b/src/GEOMBase/GEOMBase_Skeleton.h index 7f1f61d6b..251c29436 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.h +++ b/src/GEOMBase/GEOMBase_Skeleton.h @@ -28,6 +28,8 @@ #ifndef GEOMBASE_SKELETON_H #define GEOMBASE_SKELETON_H +#include "GEOM_GEOMBase.hxx" + #include "DlgRef_Skeleton_QTD.h" #include "GEOMBase.h" @@ -41,18 +43,8 @@ #include #include #include -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define GEOMBASE_WNT_EXPORT __declspec( dllexport ) -#else -#define GEOMBASE_WNT_EXPORT -#endif -class GEOMBASE_WNT_EXPORT GEOMBase_Skeleton : public DlgRef_Skeleton_QTD, public GEOMBase_Helper +class GEOMBASE_EXPORT GEOMBase_Skeleton : public DlgRef_Skeleton_QTD, public GEOMBase_Helper { Q_OBJECT diff --git a/src/GEOMBase/GEOMBase_aParameterDlg.h b/src/GEOMBase/GEOMBase_aParameterDlg.h index e95800e4a..8dc1773f7 100644 --- a/src/GEOMBase/GEOMBase_aParameterDlg.h +++ b/src/GEOMBase/GEOMBase_aParameterDlg.h @@ -29,6 +29,8 @@ #ifndef GEOMBase_aParameterDLG_H #define GEOMBase_aParameterDLG_H +#include "GEOM_GEOMBase.hxx" + #include class QPushButton; @@ -38,7 +40,7 @@ class QtxDblSpinBox; // class : GEOMBase_aParameterDlg // purpose : //================================================================================= -class GEOMBase_aParameterDlg : public QDialog +class GEOMBASE_EXPORT GEOMBase_aParameterDlg : public QDialog { Q_OBJECT diff --git a/src/GEOMBase/GEOM_Operation.h b/src/GEOMBase/GEOM_Operation.h index 9da35ad1c..c6654a9ea 100644 --- a/src/GEOMBase/GEOM_Operation.h +++ b/src/GEOMBase/GEOM_Operation.h @@ -29,13 +29,14 @@ #ifndef GEOM_OPERATION_H #define GEOM_OPERATION_H +#include "GEOM_GEOMBase.hxx" + #include "SUIT_Operation.h" #include -#include #include CORBA_CLIENT_HEADER(GEOM_Gen) -class Standard_EXPORT GEOM_Operation : public SUIT_Operation +class GEOMBASE_EXPORT GEOM_Operation : public SUIT_Operation { public: GEOM_Operation( SUIT_Application*, GEOM::GEOM_IOperations_ptr ); diff --git a/src/GEOMBase/Makefile.in b/src/GEOMBase/Makefile.in index 070f91945..4bdc8b6b1 100644 --- a/src/GEOMBase/Makefile.in +++ b/src/GEOMBase/Makefile.in @@ -41,7 +41,8 @@ LIB = libGEOMBase.la EXPORT_HEADERS= GEOMBase.h \ GEOMBase_Skeleton.h \ GEOMBase_Helper.h \ - GEOM_Operation.h + GEOM_Operation.h \ + GEOM_GEOMBase.hxx LIB_SRC = GEOMBase.cxx \ GEOMBase_Skeleton.cxx \ @@ -57,6 +58,7 @@ LIB_CLIENT_IDL = SALOME_Exception.idl \ SALOMEDS.idl \ SALOMEDS_Attributes.idl \ SALOME_GenericObj.idl \ + SALOME_Component.idl \ GEOM_Gen.idl LIB_SERVER_IDL = diff --git a/src/GEOMClient/GEOM_Client.hxx b/src/GEOMClient/GEOM_Client.hxx index f994f0adb..161fcc105 100644 --- a/src/GEOMClient/GEOM_Client.hxx +++ b/src/GEOMClient/GEOM_Client.hxx @@ -51,16 +51,29 @@ class TopoDS_Shape; #ifndef _Standard_Macro_HeaderFile #include #endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define GEOMCLIENT_WNT_EXPORT __declspec( dllexport ) + +#ifdef WNT + #if defined GEOMCLIENT_EXPORTS + #if defined WIN32 + #define GEOMCLIENT_EXPORT __declspec( dllexport ) + #else + #define GEOMCLIENT_EXPORT + #endif + #else + #if defined WIN32 + #define GEOMCLIENT_EXPORT __declspec( dllimport ) + #else + #define GEOMCLIENT_EXPORT + #endif + #endif #else -#define GEOMCLIENT_WNT_EXPORT + #define GEOMCLIENT_EXPORT #endif //===================================================================== // GEOM_Client : class definition //===================================================================== -class GEOMCLIENT_WNT_EXPORT GEOM_Client { +class GEOMCLIENT_EXPORT GEOM_Client { public: diff --git a/src/GEOMContext/GEOMContext.cxx b/src/GEOMContext/GEOMContext.cxx index 8e950f251..fd3ef0de9 100644 --- a/src/GEOMContext/GEOMContext.cxx +++ b/src/GEOMContext/GEOMContext.cxx @@ -25,10 +25,11 @@ // Module : GEOM // $Header: -using namespace std; #include "GEOMContext.h" #include "QAD_Tools.h" +using namespace std; + /* The object itself created in the static method 'GetOrCreateGEOMBase()' */ static GEOMContext* GeomGUI = 0; diff --git a/src/GEOMContext/GEOMContext.h b/src/GEOMContext/GEOMContext.h index f564c05d4..ed339a216 100644 --- a/src/GEOMContext/GEOMContext.h +++ b/src/GEOMContext/GEOMContext.h @@ -34,11 +34,29 @@ #include #include +#ifdef WNT + #if defined GEOMCONTEXT_EXPORTS + #if defined WIN32 + #define GEOM_CONTEXT_EXPORT __declspec( dllexport ) + #else + #define GEOM_CONTEXT_EXPORT + #endif + #else + #if defined WIN32 + #define GEOM_CONTEXT_EXPORT __declspec( dllimport ) + #else + #define GEOM_CONTEXT_EXPORT + #endif + #endif +#else + #define GEOM_CONTEXT_EXPORT +#endif + //================================================================================= // class : GEOMContext // purpose : //================================================================================= -class GEOMContext : public QObject +class GEOM_CONTEXT_EXPORT GEOMContext : public QObject { Q_OBJECT /* for QT compatibility */ diff --git a/src/GEOMContext/GEOM_icons.po b/src/GEOMContext/GEOM_icons.po index 996122d66..82eaeadd2 100644 --- a/src/GEOMContext/GEOM_icons.po +++ b/src/GEOMContext/GEOM_icons.po @@ -257,6 +257,10 @@ msgstr "translation.png" msgid "ICON_DLG_ROTATION" msgstr "rotate.png" +#RotationDlg +msgid "ICON_DLG_ROTATION_THREE_POINTS" +msgstr "rotatepnt.png" + #ScaleDlg msgid "ICON_DLG_SCALE" msgstr "scale.png" diff --git a/src/GEOMGUI/GEOMGUI.h b/src/GEOMGUI/GEOMGUI.h index 675f0330f..8874590bb 100644 --- a/src/GEOMGUI/GEOMGUI.h +++ b/src/GEOMGUI/GEOMGUI.h @@ -29,6 +29,8 @@ #if !defined( __GEOMGUI_H ) #define __GEOMGUI_H +#include "GEOM_GEOMGUI.hxx" + #include class SUIT_Desktop; @@ -37,21 +39,11 @@ class QMouseEvent; class QKeyEvent; class GeometryGUI; -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define GEOMGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define GEOMGUI_WNT_EXPORT -#endif //================================================================================= // class : GEOMGUI // purpose : Base class for all geometry GUI subclasses //================================================================================= -class GEOMGUI_WNT_EXPORT GEOMGUI : public QObject +class GEOMGUI_EXPORT GEOMGUI : public QObject { public : // Constructor diff --git a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx index 3db11fd4e..ed6056650 100644 --- a/src/GEOMGUI/GEOMGUI_OCCSelector.cxx +++ b/src/GEOMGUI/GEOMGUI_OCCSelector.cxx @@ -126,6 +126,12 @@ void GEOMGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const } } } + // add externally selected objects + SUIT_DataOwnerPtrList::const_iterator anExtIter; + for(anExtIter = getSelectedExt().begin(); anExtIter != getSelectedExt().end(); anExtIter++) { + aList.append(*anExtIter); + } + } //================================================================ @@ -175,11 +181,7 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) Handle(AIS_InteractiveContext) ic = vw->getAISContext(); -#ifndef WNT NCollection_DataMap indexesMap; // "entry - list_of_int" map for LOCAL selection -#else - NCollection_DataMap indexesMap; // "entry - list_of_int" map for LOCAL selection -#endif QMap globalSelMap; // only Key=entry from this map is used. value(int) is NOT used at all. SelectMgr_IndexedMapOfOwner ownersmap; // map of owners to be selected @@ -245,6 +247,7 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) if ( !anOwner->ComesFromDecomposition() && globalSelMap.contains( entryStr ) ) { ownersmap.Add( anOwner ); + globalSelMap[entryStr]++; } // LOCAL selection else @@ -289,4 +292,21 @@ void GEOMGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) } vw->update(); + + // fill extra selected + clearSelExtOwners(); + for ( SUIT_DataOwnerPtrList::const_iterator itr2 = aList.begin(); itr2 != aList.end(); ++itr2 ) { + const LightApp_DataSubOwner* subOwner = dynamic_cast( (*itr2).operator->() ); + if ( !subOwner ) + { + const LightApp_DataOwner* owner = dynamic_cast( (*itr2).operator->() ); + if ( owner ) + { + SalomeApp_Study* appStudy = dynamic_cast( SUIT_Session::session()->activeApplication()->activeStudy() ); + QString anEntry = appStudy->referencedToEntry( owner->entry() ); + if (globalSelMap[anEntry] == 1) + appendSelExtOwner(*itr2); + } + } + } } diff --git a/src/GEOMGUI/GEOMGUI_OCCSelector.h b/src/GEOMGUI/GEOMGUI_OCCSelector.h index afbe0f173..81be7bc3b 100644 --- a/src/GEOMGUI/GEOMGUI_OCCSelector.h +++ b/src/GEOMGUI/GEOMGUI_OCCSelector.h @@ -20,9 +20,11 @@ #ifndef GEOMGUI_OCCSELECTOR_H #define GEOMGUI_OCCSELECTOR_H +#include "GEOM_GEOMGUI.hxx" + #include -class GEOMGUI_OCCSelector : public LightApp_OCCSelector +class GEOMGUI_EXPORT GEOMGUI_OCCSelector : public LightApp_OCCSelector { public: GEOMGUI_OCCSelector( OCCViewer_Viewer*, SUIT_SelectionMgr* ); diff --git a/src/GEOMGUI/GEOMGUI_Selection.h b/src/GEOMGUI/GEOMGUI_Selection.h index b7a2912cf..5fb15727c 100644 --- a/src/GEOMGUI/GEOMGUI_Selection.h +++ b/src/GEOMGUI/GEOMGUI_Selection.h @@ -29,12 +29,14 @@ #ifndef GEOMGUI_SELECTION_HeaderFile #define GEOMGUI_SELECTION_HeaderFile +#include "GEOM_GEOMGUI.hxx" + #include #include #include CORBA_SERVER_HEADER(GEOM_Gen) -class GEOMGUI_Selection : public LightApp_Selection +class GEOMGUI_EXPORT GEOMGUI_Selection : public LightApp_Selection { public: GEOMGUI_Selection(); diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index 23a9fb777..3ca1ebbab 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -175,11 +175,11 @@ static string getEntry( GEOM::GEOM_Object_ptr object ) SalomeApp_Application* app = dynamic_cast( session->activeApplication() ); if ( app ) { - string IOR = app->orb()->object_to_string( object ); - if ( IOR != "" ) + CORBA::String_var IOR = app->orb()->object_to_string( object ); + if ( strcmp(IOR.in(), "") != 0 ) { SalomeApp_Study* study = ( SalomeApp_Study* )app->activeStudy(); - _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) ); + _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( string(IOR) ) ); if ( SO ) return SO->GetID(); } @@ -197,11 +197,11 @@ static string getName( GEOM::GEOM_Object_ptr object ) SalomeApp_Application* app = dynamic_cast( session->activeApplication() ); if ( app ) { - string IOR = app->orb()->object_to_string( object ); - if ( IOR != "" ) + CORBA::String_var IOR = app->orb()->object_to_string( object ); + if ( strcmp(IOR.in(), "") != 0 ) { SalomeApp_Study* study = ( SalomeApp_Study* )app->activeStudy(); - _PTR(SObject) aSObj ( study->studyDS()->FindObjectIOR( IOR ) ); + _PTR(SObject) aSObj ( study->studyDS()->FindObjectIOR( string(IOR) ) ); _PTR(GenericAttribute) anAttr; @@ -521,16 +521,20 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs ) AISShape->SetDisplayMode( myDisplayMode ); AISShape->SetShadingColor( myShadingColor ); - // Set color for iso lines + // Set color and number for iso lines SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); QColor col = aResMgr->colorValue( "Geometry", "isos_color", QColor(int(0.5*255), int(0.5*255), int(0.5*255)) ); Quantity_Color aColor = SalomeApp_Tools::color( col ); - + int anUIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_u", 1); + int aVIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_v", 1); + Handle(Prs3d_IsoAspect) anAspect = AISShape->Attributes()->UIsoAspect(); + anAspect->SetNumber( anUIsoNumber ); anAspect->SetColor( aColor ); AISShape->Attributes()->SetUIsoAspect( anAspect ); anAspect = AISShape->Attributes()->VIsoAspect(); + anAspect->SetNumber( aVIsoNumber ); anAspect->SetColor( aColor ); AISShape->Attributes()->SetVIsoAspect( anAspect ); diff --git a/src/GEOMGUI/GEOM_Displayer.h b/src/GEOMGUI/GEOM_Displayer.h index 2668e7d84..10c4d4ed4 100644 --- a/src/GEOMGUI/GEOM_Displayer.h +++ b/src/GEOMGUI/GEOM_Displayer.h @@ -29,6 +29,8 @@ #if !defined (__GEOM_DISPLAYER_H) #define __GEOM_DISPLAYER_H +#include "GEOM_GEOMGUI.hxx" + #include "SALOME_Prs.h" #include "SALOME_InteractiveObject.hxx" #include "SALOME_ListIO.hxx" @@ -55,18 +57,7 @@ class SalomeApp_Application; class SUIT_SelectionFilter; //class SALOME_Selection; -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define GEOMGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define GEOMGUI_WNT_EXPORT -#endif - -class GEOMGUI_WNT_EXPORT GEOM_Displayer : public LightApp_Displayer +class GEOMGUI_EXPORT GEOM_Displayer : public LightApp_Displayer { public: diff --git a/src/GEOMGUI/GEOM_images.po b/src/GEOMGUI/GEOM_images.po index e8132904a..130b32162 100644 --- a/src/GEOMGUI/GEOM_images.po +++ b/src/GEOMGUI/GEOM_images.po @@ -291,6 +291,10 @@ msgstr "translationVector.png" msgid "ICON_DLG_ROTATION" msgstr "rotate.png" +#RotationDlg +msgid "ICON_DLG_ROTATION_THREE_POINTS" +msgstr "rotatepnt.png" + #ScaleDlg msgid "ICON_DLG_SCALE" msgstr "scale.png" diff --git a/src/GEOMGUI/GEOM_msg_en.po b/src/GEOMGUI/GEOM_msg_en.po index fc8253cc8..6d538e649 100644 --- a/src/GEOMGUI/GEOM_msg_en.po +++ b/src/GEOMGUI/GEOM_msg_en.po @@ -903,7 +903,7 @@ msgstr "Create A Face" #: GeometryGUI_FaceDlg.cxx:78 msgid "GEOM_FACE_FFW" -msgstr "Face from a wire" +msgstr "Face from a closed wire and edge" #: GeometryGUI_FaceDlg.cxx:103 msgid "GEOM_FACE_OPT" @@ -2958,3 +2958,9 @@ msgstr "Default display mode" msgid "PREF_TAB_SETTINGS" msgstr "Settings" + +msgid "ERROR_SHAPE_TYPE" +msgstr "Object of incorrect type selected!\nPlease, select face, shell or solid and try again" + +msgid "DEP_OBJECT" +msgstr "Selected object has been used to create another one\n It can't be deleted " diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index e41898df3..0ab1ed994 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -17,7 +17,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -96,7 +96,7 @@ bool GeometryGUI::InitGeomGen() //======================================================================= // function : ClientSObjectToObject -// purpose : +// purpose : //======================================================================= CORBA::Object_var GeometryGUI::ClientSObjectToObject (_PTR(SObject) theSObject) { @@ -116,7 +116,7 @@ CORBA::Object_var GeometryGUI::ClientSObjectToObject (_PTR(SObject) theSObject) //======================================================================= // function : ClientStudyToStudy -// purpose : +// purpose : //======================================================================= SALOMEDS::Study_var GeometryGUI::ClientStudyToStudy (_PTR(Study) theStudy) { @@ -171,12 +171,12 @@ GeometryGUI::GeometryGUI() : SalomeApp_Module( "GEOM" ) { if ( CORBA::is_nil( myComponentGeom ) ) - { + { SALOME_LifeCycleCORBA* ls = new SALOME_LifeCycleCORBA( getApp()->namingService() ); Engines::Component_var comp = ls->FindOrLoad_Component( "FactoryServer", "GEOM" ); myComponentGeom = GEOM::GEOM_Gen::_narrow( comp ); } - + myState = -1; myActiveDialogBox = 0; myFatherior = ""; @@ -350,7 +350,7 @@ void GeometryGUI::OnGUIEvent( int id ) bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() ); // if current viewframe is not of OCC and not of VTK type - return immediately // fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example) - bool NotViewerDependentCommand = ( id == 901 || id == 216 || id == 213 ); + bool NotViewerDependentCommand = ( id == 901 || id == 216 || id == 213 ); if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommand ) return; @@ -486,7 +486,7 @@ void GeometryGUI::OnGUIEvent( int id ) else if( id == 503 || // MENU OPERATION - PARTITION id == 504 || // MENU OPERATION - ARCHIMEDE id == 505 || // MENU OPERATION - FILLET - id == 506 || // MENU OPERATION - CHAMFER + id == 506 || // MENU OPERATION - CHAMFER id == 507 ) { // MENU OPERATION - CLIPPING RANGE #ifndef WNT library = getLibrary( "libOperationGUI.so" ); @@ -549,9 +549,9 @@ void GeometryGUI::OnGUIEvent( int id ) } // call method of corresponding GUI library - if ( library ) + if ( library ) library->OnGUIEvent( id, desk ); - else + else SUIT_MessageBox::error1( desk, tr( "GEOM_ERROR" ), tr( "GEOM_ERR_LIB_NOT_FOUND" ), tr( "GEOM_BUT_OK" ) ); } @@ -578,7 +578,7 @@ void GeometryGUI::OnKeyPress( SUIT_ViewWindow* win, QKeyEvent* pe ) // purpose : Manages mouse move events [static] //================================================================================= void GeometryGUI::OnMouseMove( SUIT_ViewWindow* win, QMouseEvent* pe ) -{ +{ GUIMap::Iterator it; bool bOk = true; for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) { @@ -637,7 +637,7 @@ bool GeometryGUI::SetSettings() { QMenuBar* Mb = parent->getMainMenuBar(); SUIT_Study* ActiveStudy = application()->activeStudy(); - + // Wireframe or Shading int DisplayMode = 0; SUIT_ViewWindow* window = application()->desktop()->activeWindow(); @@ -671,16 +671,16 @@ bool GeometryGUI::SetSettings() // if(!AddInStudy.isEmpty()) // Settings_AddInStudy = AddInStudy.toInt(); // else - + Settings_AddInStudy = 1; Mb->setItemChecked(411, Settings_AddInStudy); - // step value + // step value QString S = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); if(S.isEmpty()) QAD_CONFIG->addSetting("Geometry:SettingsGeomStep", "100"); - // isos + // isos int count = ActiveStudy->getStudyFramesCount(); for(int i = 0; i < count; i++) { if(ActiveStudy->getStudyFrame(i)->getTypeView() == VIEW_OCC) { @@ -704,22 +704,22 @@ bool GeometryGUI::SetSettings() GUIMap::Iterator it; for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) bOk = bOk && it.data()->SetSettings( parent ); - - // MZN: Enable/disable "Clipping range" menu item(from GEOM_CLIPPING variable) + + // MZN: Enable/disable "Clipping range" menu item(from GEOM_CLIPPING variable) if (getenv( "GEOM_CLIPPING" ) == NULL) { QMenuItem* mi = Mb->findItem(50); if (mi && mi->popup()) - mi->popup()->removeItem(507); - } - + mi->popup()->removeItem(507); + } + return bOk; } */ //======================================================================= // function : createGeomAction -// purpose : +// purpose : //======================================================================= void GeometryGUI::createGeomAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle ) { @@ -727,7 +727,7 @@ void GeometryGUI::createGeomAction( const int id, const QString& po_id, const QS QWidget* parent = application()->desktop(); SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); QPixmap pix; - if ( icon_id.length() ) + if ( icon_id.length() ) pix = resMgr->loadPixmap( "GEOM", tr( icon_id ) ); else pix = resMgr->loadPixmap( "GEOM", tr( QString( "ICO_" )+po_id ), false ); @@ -831,7 +831,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createGeomAction( 609, "CHECK_FREE_BNDS" ); createGeomAction( 610, "CHECK_FREE_FACES" ); createGeomAction( 611, "CHANGE_ORIENTATION" ); - + createGeomAction( 708, "POINT_COORDS" ); createGeomAction( 701, "BASIC_PROPS" ); createGeomAction( 702, "MASS_CENTER" ); @@ -845,7 +845,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createGeomAction( 7072, "CHECK_COMPOUND" ); createGeomAction( 5103, "CHECK_GEOMETRY" ); - + createGeomAction( 412, "SHADING_COLOR" ); createGeomAction( 413, "ISOS" ); createGeomAction( 414, "STEP_VALUE" ); @@ -896,125 +896,125 @@ void GeometryGUI::initialize( CAM_Application* app ) createMenu( 4020, basicId, -1 ); int primId = createMenu( tr( "MEN_PRIMITIVES" ), newEntId, -1 ); - createMenu( 4021, primId, -1 ); - createMenu( 4022, primId, -1 ); - createMenu( 4023, primId, -1 ); - createMenu( 4024, primId, -1 ); - createMenu( 4025, primId, -1 ); + createMenu( 4021, primId, -1 ); + createMenu( 4022, primId, -1 ); + createMenu( 4023, primId, -1 ); + createMenu( 4024, primId, -1 ); + createMenu( 4025, primId, -1 ); int genId = createMenu( tr( "MEN_GENERATION" ), newEntId, -1 ); - createMenu( 4031, genId, -1 ); - createMenu( 4032, genId, -1 ); - createMenu( 4033, genId, -1 ); - createMenu( 4034, genId, -1 ); + createMenu( 4031, genId, -1 ); + createMenu( 4032, genId, -1 ); + createMenu( 4033, genId, -1 ); + createMenu( 4034, genId, -1 ); createMenu( separator(), newEntId, -1 ); int groupId = createMenu( tr( "MEN_GROUP" ), newEntId, -1 ); - createMenu( 800, groupId, -1 ); - createMenu( 801, groupId, -1 ); + createMenu( 800, groupId, -1 ); + createMenu( 801, groupId, -1 ); createMenu( separator(), newEntId, -1 ); int blocksId = createMenu( tr( "MEN_BLOCKS" ), newEntId, -1 ); - createMenu( 9997, blocksId, -1 ); - createMenu( 9999, blocksId, -1 ); + createMenu( 9997, blocksId, -1 ); + createMenu( 9999, blocksId, -1 ); createMenu( separator(), newEntId, -1 ); - createMenu( 404, newEntId, -1 ); + createMenu( 404, newEntId, -1 ); createMenu( separator(), newEntId, -1 ); - createMenu( 407, newEntId, -1 ); + createMenu( 407, newEntId, -1 ); int buildId = createMenu( tr( "MEN_BUILD" ), newEntId, -1 ); - createMenu( 4081, buildId, -1 ); - createMenu( 4082, buildId, -1 ); - createMenu( 4083, buildId, -1 ); - createMenu( 4084, buildId, -1 ); - createMenu( 4085, buildId, -1 ); - createMenu( 4086, buildId, -1 ); + createMenu( 4081, buildId, -1 ); + createMenu( 4082, buildId, -1 ); + createMenu( 4083, buildId, -1 ); + createMenu( 4084, buildId, -1 ); + createMenu( 4085, buildId, -1 ); + createMenu( 4086, buildId, -1 ); int operId = createMenu( tr( "MEN_OPERATIONS" ), -1, -1, 10 ); int boolId = createMenu( tr( "MEN_BOOLEAN" ), operId, -1 ); - createMenu( 5011, boolId, -1 ); - createMenu( 5012, boolId, -1 ); - createMenu( 5013, boolId, -1 ); - createMenu( 5014, boolId, -1 ); + createMenu( 5011, boolId, -1 ); + createMenu( 5012, boolId, -1 ); + createMenu( 5013, boolId, -1 ); + createMenu( 5014, boolId, -1 ); int transId = createMenu( tr( "MEN_TRANSFORMATION" ), operId, -1 ); - createMenu( 5021, transId, -1 ); - createMenu( 5022, transId, -1 ); - createMenu( 5023, transId, -1 ); - createMenu( 5024, transId, -1 ); - createMenu( 5025, transId, -1 ); - createMenu( 5026, transId, -1 ); + createMenu( 5021, transId, -1 ); + createMenu( 5022, transId, -1 ); + createMenu( 5023, transId, -1 ); + createMenu( 5024, transId, -1 ); + createMenu( 5025, transId, -1 ); + createMenu( 5026, transId, -1 ); createMenu( separator(), transId, -1 ); - createMenu( 5027, transId, -1 ); - createMenu( 5028, transId, -1 ); + createMenu( 5027, transId, -1 ); + createMenu( 5028, transId, -1 ); - createMenu( 503, operId, -1 ); - createMenu( 504, operId, -1 ); + createMenu( 503, operId, -1 ); + createMenu( 504, operId, -1 ); createMenu( separator(), operId, -1 ); - createMenu( 505, transId, -1 ); - createMenu( 506, transId, -1 ); - //createMenu( 507, transId, -1 ); + createMenu( 505, transId, -1 ); + createMenu( 506, transId, -1 ); + //createMenu( 507, transId, -1 ); int blockId = createMenu( tr( "MEN_BLOCKS" ), operId, -1 ); - createMenu( 9998, blockId, -1 ); - createMenu( 9995, blockId, -1 ); - createMenu( 99991, blockId, -1 ); + createMenu( 9998, blockId, -1 ); + createMenu( 9995, blockId, -1 ); + createMenu( 99991, blockId, -1 ); int repairId = createMenu( tr( "MEN_REPAIR" ), -1, -1, 10 ); - createMenu( 605, repairId, -1 ); - createMenu( 603, repairId, -1 ); - createMenu( 606, repairId, -1 ); - createMenu( 607, repairId, -1 ); - createMenu( 604, repairId, -1 ); - createMenu( 601, repairId, -1 ); - createMenu( 602, repairId, -1 ); - createMenu( 608, repairId, -1 ); - createMenu( 609, repairId, -1 ); - createMenu( 610, repairId, -1 ); - createMenu( 611, repairId, -1 ); + createMenu( 605, repairId, -1 ); + createMenu( 603, repairId, -1 ); + createMenu( 606, repairId, -1 ); + createMenu( 607, repairId, -1 ); + createMenu( 604, repairId, -1 ); + createMenu( 601, repairId, -1 ); + createMenu( 602, repairId, -1 ); + createMenu( 608, repairId, -1 ); + createMenu( 609, repairId, -1 ); + createMenu( 610, repairId, -1 ); + createMenu( 611, repairId, -1 ); int measurId = createMenu( tr( "MEN_MEASURES" ), -1, -1, 10 ); - createMenu( 708, measurId, -1 ); - createMenu( 701, measurId, -1 ); + createMenu( 708, measurId, -1 ); + createMenu( 701, measurId, -1 ); createMenu( separator(), measurId, -1 ); - createMenu( 702, measurId, -1 ); - createMenu( 703, measurId, -1 ); + createMenu( 702, measurId, -1 ); + createMenu( 703, measurId, -1 ); createMenu( separator(), measurId, -1 ); int dimId = createMenu( tr( "MEN_DIMENSIONS" ), measurId, -1 ); - createMenu( 7041, dimId, -1 ); + createMenu( 7041, dimId, -1 ); createMenu( 7042, dimId, -1 ); createMenu( separator(), measurId, -1 ); - - createMenu( 705, measurId, -1 ); + + createMenu( 705, measurId, -1 ); createMenu( separator(), measurId, -1 ); - createMenu( 706, measurId, -1 ); - createMenu( 707, measurId, -1 ); - createMenu( 7072, measurId, -1 ); + createMenu( 706, measurId, -1 ); + createMenu( 707, measurId, -1 ); + createMenu( 7072, measurId, -1 ); int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 50 ); createMenu( separator(), toolsId, -1 ); - createMenu( 5103, toolsId, -1 ); - + createMenu( 5103, toolsId, -1 ); + //int prefId = createMenu( tr( "MEN_PREFERENCES" ), -1, -1, 50 ); //createMenu( separator(), prefId, -1 ); //int geomId = createMenu( tr( "MEN_PREFERENCES_GEOM" ), prefId, -1 ); - //createMenu( 412, geomId, -1 ); - //createMenu( 413, geomId, -1 ); - //createMenu( 414, geomId, -1 ); + //createMenu( 412, geomId, -1 ); + //createMenu( 413, geomId, -1 ); + //createMenu( 414, geomId, -1 ); //createMenu( separator(), prefId, -1 ); int viewId = createMenu( tr( "MEN_VIEW" ), -1, -1 ); createMenu( separator(), viewId, -1 ); int dispmodeId = createMenu( tr( "MEN_DISPLAY_MODE" ), viewId, -1 ); - createMenu( 211, dispmodeId, -1 ); - + createMenu( 211, dispmodeId, -1 ); + createMenu( separator(), viewId, -1 ); - createMenu( 212, viewId, -1 ); - createMenu( 214, viewId, -1 ); + createMenu( 212, viewId, -1 ); + createMenu( 214, viewId, -1 ); createMenu( separator(), viewId, -1 ); /* @@ -1022,8 +1022,8 @@ void GeometryGUI::initialize( CAM_Application* app ) because of these items are accessible through object browser and viewers we have removed they from main menu - createMenu( 216, viewId, -1 ); - createMenu( 213, viewId, -1 ); + createMenu( 216, viewId, -1 ); + createMenu( 213, viewId, -1 ); createMenu( 215, viewId, -1 ); */ @@ -1042,33 +1042,33 @@ void GeometryGUI::initialize( CAM_Application* app ) createTool( 4020, basicTbId ); int primTbId = createTool( tr( "TOOL_PRIMITIVES" ) ); - createTool( 4021, primTbId ); - createTool( 4022, primTbId ); - createTool( 4023, primTbId ); - createTool( 4024, primTbId ); - createTool( 4025, primTbId ); + createTool( 4021, primTbId ); + createTool( 4022, primTbId ); + createTool( 4023, primTbId ); + createTool( 4024, primTbId ); + createTool( 4025, primTbId ); int boolTbId = createTool( tr( "TOOL_BOOLEAN" ) ); - createTool( 5011, boolTbId ); - createTool( 5012, boolTbId ); - createTool( 5013, boolTbId ); - createTool( 5014, boolTbId ); + createTool( 5011, boolTbId ); + createTool( 5012, boolTbId ); + createTool( 5013, boolTbId ); + createTool( 5014, boolTbId ); int genTbId = createTool( tr( "TOOL_GENERATION" ) ); - createTool( 4031, genTbId ); - createTool( 4032, genTbId ); - createTool( 4033, genTbId ); - createTool( 4034, genTbId ); + createTool( 4031, genTbId ); + createTool( 4032, genTbId ); + createTool( 4033, genTbId ); + createTool( 4034, genTbId ); int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ) ); - createTool( 5021, transTbId ); - createTool( 5022, transTbId ); - createTool( 5023, transTbId ); - createTool( 5024, transTbId ); - createTool( 5025, transTbId ); - createTool( 5026, transTbId ); + createTool( 5021, transTbId ); + createTool( 5022, transTbId ); + createTool( 5023, transTbId ); + createTool( 5024, transTbId ); + createTool( 5025, transTbId ); + createTool( 5026, transTbId ); createTool( separator(), transTbId ); - createTool( 5027, transTbId ); + createTool( 5027, transTbId ); createTool( 5028, transTbId ); // ---- create popup menus -------------------------- @@ -1185,14 +1185,14 @@ bool GeometryGUI::deactivateModule( SUIT_Study* study ) setMenuShown( false ); setToolShown( false ); - disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), + disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) ); EmitSignalCloseAllDialogs(); GUIMap::Iterator it; for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) - it.data()->deactivate(); + it.data()->deactivate(); // Unset actions accelerator keys //action(111)->setAccel(QKeySequence()); // Import @@ -1286,7 +1286,7 @@ bool GeometryGUI::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QStr if( nbSel == 0 ) { ////// NOTHING SELECTED popup->clear(); - } + } else if ( nbSel == 1 ) { ////// SINGLE OBJECT SELECTION if ( parentComponent != parent->getActiveComponent() ) { @@ -1513,7 +1513,7 @@ bool GeometryGUI::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QStr //======================================================================= // function : GeometryGUI::BuildPresentation() -// purpose : +// purpose : //======================================================================= void GeometryGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& io, SUIT_ViewWindow* win ) { @@ -1531,7 +1531,7 @@ void GeometryGUI::onWindowActivated( SUIT_ViewWindow* win ) const bool ViewOCC = ( win->getViewManager()->getType() == OCCViewer_Viewer::Type() ); // const bool ViewVTK = ( win->getViewManager()->getType() == SVTK_Viewer::Type() ); - + // disable non-OCC viewframe menu commands // action( 404 )->setEnabled( ViewOCC ); // SKETCHER action( 603 )->setEnabled( ViewOCC ); // SuppressFace @@ -1617,9 +1617,14 @@ void GeometryGUI::onViewManagerRemoved( SUIT_ViewManager* vm ) QString GeometryGUI::engineIOR() const { + QString anIOR = QString::null; if ( !CORBA::is_nil( GetGeomGen() ) ) - return QString( getApp()->orb()->object_to_string( GetGeomGen() ) ); - return QString( "" ); + { + CORBA::String_var objStr = getApp()->orb()->object_to_string( GetGeomGen() ); + anIOR = QString( objStr.in() ); +// free( objStr ); ASV : 26.07.06 : commented out because it raises exception and blocks application + } + return anIOR; } LightApp_Selection* GeometryGUI::createSelection() const @@ -1654,22 +1659,22 @@ void GeometryGUI::createPreferences() addPreference( tr( "PREF_SHADING_COLOR" ), genGroup, LightApp_Preferences::Color, "Geometry", "shading_color" ); - + addPreference( tr( "PREF_WIREFRAME_COLOR" ), genGroup, LightApp_Preferences::Color, "Geometry", "wireframe_color" ); - + addPreference( tr( "PREF_FREE_BOUND_COLOR" ), genGroup, LightApp_Preferences::Color, "Geometry", "free_bound_color" ); - + addPreference( tr( "PREF_LINE_COLOR"), genGroup, LightApp_Preferences::Color, "Geometry", "line_color" ); - + addPreference( tr( "PREF_POINT_COLOR"), genGroup, LightApp_Preferences::Color, "Geometry", "point_color" ); - + addPreference( tr( "PREF_ISOS_COLOR" ), genGroup, LightApp_Preferences::Color, "Geometry", "isos_color" ); - + int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup, LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" ); @@ -1677,23 +1682,30 @@ void GeometryGUI::createPreferences() QStringList aModesList; aModesList.append( tr("MEN_WIREFRAME") ); aModesList.append( tr("MEN_SHADING") ); - + QValueList anIndexesList; anIndexesList.append(0); anIndexesList.append(1); - + setPreferenceProperty( dispmode, "strings", aModesList ); setPreferenceProperty( dispmode, "indexes", anIndexesList ); - + // Set property for step value for spinboxes setPreferenceProperty( step, "min", 0.001 ); setPreferenceProperty( step, "max", 10000 ); setPreferenceProperty( step, "precision", 3 ); - + } void GeometryGUI::preferencesChanged( const QString& section, const QString& param ) { + if (section == "Geometry") { + SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr(); + if (param == QString("SettingsGeomStep")) { + double spin_step = aResourceMgr->doubleValue(section, param, 100.); + EmitSignalDefaultStepValueChanged(spin_step); + } + } } LightApp_Displayer* GeometryGUI::displayer() diff --git a/src/GEOMGUI/GeometryGUI.h b/src/GEOMGUI/GeometryGUI.h index f2902c6bc..f6e93644a 100644 --- a/src/GEOMGUI/GeometryGUI.h +++ b/src/GEOMGUI/GeometryGUI.h @@ -29,6 +29,8 @@ #ifndef GEOMETRYGUI_H #define GEOMETRYGUI_H +#include "GEOM_GEOMGUI.hxx" + #include "SalomeApp_Module.h" #include "GEOMGUI.h" @@ -47,24 +49,6 @@ #include "SALOMEconfig.h" #include CORBA_CLIENT_HEADER(SALOMEDS) -#ifdef WNT -#include -#else -#define SALOME_WNT_EXPORT -#endif - -//#if defined WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif - -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define GEOMGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define GEOMGUI_WNT_EXPORT -#endif - typedef QMap GUIMap; class QDialog; @@ -78,7 +62,7 @@ class SUIT_ViewManager; // class : GeometryGUI // purpose : //================================================================================= -class GEOMGUI_WNT_EXPORT GeometryGUI : public SalomeApp_Module +class GEOMGUI_EXPORT GeometryGUI : public SalomeApp_Module { Q_OBJECT; diff --git a/src/GEOMGUI/GeometryGUI_Swig.cxx b/src/GEOMGUI/GeometryGUI_Swig.cxx index bd4312435..57df497a6 100644 --- a/src/GEOMGUI/GeometryGUI_Swig.cxx +++ b/src/GEOMGUI/GeometryGUI_Swig.cxx @@ -66,6 +66,7 @@ #include #include #include +#include // IDL Headers #include @@ -145,7 +146,8 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry, bool isUpdated) if (!father) return; if (!father->ComponentIOR(aFatherIOR)) { - aStudyBuilder->LoadWith(father, SalomeApp_Application::orb()->object_to_string(Geom)); + CORBA::String_var objStr = SalomeApp_Application::orb()->object_to_string(Geom); + aStudyBuilder->LoadWith(father, objStr.in()); father->ComponentIOR(aFatherIOR); } @@ -439,7 +441,7 @@ void GEOM_Swig::setColor(const char* theEntry, int red, int green, int blue, boo ite.Value()->SetColor(CSFColor); if (ite.Value()->IsKind(STANDARD_TYPE(GEOM_AISShape))) Handle(GEOM_AISShape)::DownCast(ite.Value())->SetShadingColor(CSFColor); - ite.Value()->Redisplay(Standard_True); + ic->Redisplay(ite.Value(), true, true); if (myUpdateViewer) occViewer->update(); break; @@ -613,13 +615,13 @@ void GEOM_Swig::setDeflection(const char* theEntry, float theDeflect) if ((!aObj.IsNull()) && aObj->hasEntry() && aObj->isSame(anIO)) { Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(it.Value()); if (!aShape.IsNull()) { - Handle(AIS_Drawer) aDrawer = aShape->Attributes(); - if (aDrawer.IsNull()) - aDrawer = new AIS_Drawer(); - aDrawer->SetDeviationCoefficient(myParam); - aShape->SetAttributes(aDrawer); - aContext->Redisplay(aShape, true, true); - aContext->UpdateCurrentViewer(); + TopoDS_Shape aSh = aShape->Shape(); + if (!aSh.IsNull()) + BRepTools::Clean(aSh); + + aShape->SetOwnDeviationCoefficient( myParam ); + aShape->SetOwnHLRDeviationAngle( 1.57 ); + aContext->Redisplay(aShape); return; } } diff --git a/src/GEOMGUI/GeometryGUI_Swig.hxx b/src/GEOMGUI/GeometryGUI_Swig.hxx index 45762a73f..86fa64594 100644 --- a/src/GEOMGUI/GeometryGUI_Swig.hxx +++ b/src/GEOMGUI/GeometryGUI_Swig.hxx @@ -29,21 +29,17 @@ #ifndef _GeometryGUI_SWIG_HXX_ #define _GeometryGUI_SWIG_HXX_ +#include "GEOM_GEOMGUI.hxx" + // IDL Headers #include #include CORBA_SERVER_HEADER(GEOM_Gen) #include CORBA_SERVER_HEADER(SALOMEDS) #include CORBA_SERVER_HEADER(SALOMEDS_Attributes) -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define GEOMGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define GEOMGUI_WNT_EXPORT -#endif - class GEOM_Client; -class GEOMGUI_WNT_EXPORT GEOM_Swig +class GEOMGUI_EXPORT GEOM_Swig { public: GEOM_Swig(); diff --git a/src/GEOMGUI/Makefile.in b/src/GEOMGUI/Makefile.in index 3e8dd2114..473e562c1 100644 --- a/src/GEOMGUI/Makefile.in +++ b/src/GEOMGUI/Makefile.in @@ -47,7 +47,8 @@ EXPORT_HEADERS= GeometryGUI.h \ GEOMGUI_OCCSelector.h \ GEOMGUI_Selection.h \ GeometryGUI_Swig.hxx \ - GeometryGUI_Swig.i + GeometryGUI_Swig.i \ + GEOM_GEOMGUI.hxx # Libraries targets LIB = libGEOM.la diff --git a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx index 2f0c9e140..2a7c71386 100644 --- a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx @@ -127,8 +127,25 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const if (!BO.IsDone()) { StdFail_NotDone::Raise("Common operation can not be performed on the given shapes"); } - if (isCompound) - B.Add(C, BO.Shape()); + if (isCompound) { + TopoDS_Shape aStepResult = BO.Shape(); + + // check result of this step: if it is a compound (boolean operations + // allways return a compound), we add all sub-shapes of it. + // This allows to avoid adding empty compounds, + // resulting from COMMON on two non-intersecting shapes. + if (aStepResult.ShapeType() == TopAbs_COMPOUND) { + TopoDS_Iterator aCompIter (aStepResult); + for (; aCompIter.More(); aCompIter.Next()) { + // add shape in a result + B.Add(C, aCompIter.Value()); + } + } + else { + // add shape in a result + B.Add(C, aStepResult); + } + } else aShape = BO.Shape(); } @@ -175,8 +192,23 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const } aCut = BO.Shape(); } - if (isCompound) - B.Add(C, aCut); + if (isCompound) { + // check result of this step: if it is a compound (boolean operations + // allways return a compound), we add all sub-shapes of it. + // This allows to avoid adding empty compounds, + // resulting from CUT of parts + if (aCut.ShapeType() == TopAbs_COMPOUND) { + TopoDS_Iterator aCompIter (aCut); + for (; aCompIter.More(); aCompIter.Next()) { + // add shape in a result + B.Add(C, aCompIter.Value()); + } + } + else { + // add shape in a result + B.Add(C, aCut); + } + } else aShape = aCut; } @@ -225,12 +257,35 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const TopTools_ListIteratorOfListOfShape itSub2 (listShape2); for (; itSub2.More(); itSub2.Next()) { TopoDS_Shape aValue2 = itSub2.Value(); - BRepAlgoAPI_Section BO (aValue1, aValue2); + BRepAlgoAPI_Section BO (aValue1, aValue2, Standard_False); + // Set approximation to have an attached 3D BSpline geometry to each edge, + // where analytic curve is not possible. Without this flag in some cases + // we obtain BSpline curve of degree 1 (C0), which is slowly + // processed by some algorithms (Partition for example). + BO.Approximation(Standard_True); + BO.Build(); if (!BO.IsDone()) { StdFail_NotDone::Raise("Section operation can not be performed on the given shapes"); } - if (isCompound) - B.Add(C, BO.Shape()); + if (isCompound) { + TopoDS_Shape aStepResult = BO.Shape(); + + // check result of this step: if it is a compound (boolean operations + // allways return a compound), we add all sub-shapes of it. + // This allows to avoid adding empty compounds, + // resulting from SECTION on two non-intersecting shapes. + if (aStepResult.ShapeType() == TopAbs_COMPOUND) { + TopoDS_Iterator aCompIter (aStepResult); + for (; aCompIter.More(); aCompIter.Next()) { + // add shape in a result + B.Add(C, aCompIter.Value()); + } + } + else { + // add shape in a result + B.Add(C, aStepResult); + } + } else aShape = BO.Shape(); } diff --git a/src/GEOMImpl/GEOMImpl_ExportDriver.cxx b/src/GEOMImpl/GEOMImpl_ExportDriver.cxx index 77d6acc32..e2d0629e4 100644 --- a/src/GEOMImpl/GEOMImpl_ExportDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ExportDriver.cxx @@ -30,6 +30,8 @@ #include +#include + #ifdef WNT #include #else @@ -99,7 +101,7 @@ Standard_Integer GEOMImpl_ExportDriver::Execute(TFunction_Logbook& log) const return 0; // load plugin library - LibHandle anExportLib = LoadLib( aLibName.ToCString() ); + LibHandle anExportLib = LoadLib( aLibName.ToCString() ); //This is workaround of BUG OCC13051 funcPoint fp = 0; if ( anExportLib ) fp = (funcPoint)GetProc( anExportLib, "Export" ); @@ -111,7 +113,7 @@ Standard_Integer GEOMImpl_ExportDriver::Execute(TFunction_Logbook& log) const int res = fp( aShape, aFileName, aFormatName ); // unload plugin library - UnLoadLib( anExportLib ); + //UnLoadLib( anExportLib ); if ( res ) log.SetTouched(Label()); diff --git a/src/GEOMImpl/GEOMImpl_Gen.hxx b/src/GEOMImpl/GEOMImpl_Gen.hxx index 3e3e113cf..f1a22a785 100644 --- a/src/GEOMImpl/GEOMImpl_Gen.hxx +++ b/src/GEOMImpl/GEOMImpl_Gen.hxx @@ -21,6 +21,8 @@ #ifndef _GEOMImpl_GEN_HXX_ #define _GEOMImpl_GEN_HXX_ +#include + #include #include "GEOMImpl_IBasicOperations.hxx" @@ -37,13 +39,7 @@ #include "GEOMImpl_IGroupOperations.hxx" #include "GEOM_Engine.hxx" -#ifdef WNT -#include -#else -#define SALOME_WNT_EXPORT -#endif - -class SALOME_WNT_EXPORT GEOMImpl_Gen : public GEOM_Engine +class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine { public: GEOMImpl_Gen(); diff --git a/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx b/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx index bedeef3df..d2753622d 100644 --- a/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx @@ -1,22 +1,23 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 @@ -44,7 +45,7 @@ * constructor: */ //============================================================================= -GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine, int theDocID) +GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine, int theDocID) : GEOM_IOperations(theEngine, theDocID) { MESSAGE("GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations"); @@ -73,10 +74,10 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean (Handle(GEOM_Object SetErrorCode(KO); if (theShape1.IsNull() || theShape2.IsNull()) return NULL; - - //Add a new Boolean object + + //Add a new Boolean object Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN); - + //Add a new Boolean function Handle(GEOM_Function) aFunction; if (theOp == 1) { @@ -92,10 +93,10 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean (Handle(GEOM_Object if (aFunction.IsNull()) return NULL; //Check if the function is set correctly - if (aFunction->GetDriverGUID() != GEOMImpl_BooleanDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != GEOMImpl_BooleanDriver::GetID()) return NULL; GEOMImpl_IBoolean aCI (aFunction); - + Handle(GEOM_Function) aRef1 = theShape1->GetLastFunction(); Handle(GEOM_Function) aRef2 = theShape2->GetLastFunction(); @@ -131,7 +132,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean (Handle(GEOM_Object pd << theShape1 << ", " << theShape2 << ")"; SetErrorCode(OK); - return aBool; + return aBool; } //============================================================================= @@ -140,31 +141,32 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean (Handle(GEOM_Object */ //============================================================================= Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition - (const Handle(TColStd_HSequenceOfTransient)& theShapes, + (const Handle(TColStd_HSequenceOfTransient)& theShapes, const Handle(TColStd_HSequenceOfTransient)& theTools, const Handle(TColStd_HSequenceOfTransient)& theKeepIns, const Handle(TColStd_HSequenceOfTransient)& theRemoveIns, - const Standard_Integer theLimit, - const Standard_Boolean theRemoveWebs, - const Handle(TColStd_HArray1OfInteger)& theMaterials) + const Standard_Integer theLimit, + const Standard_Boolean theRemoveWebs, + const Handle(TColStd_HArray1OfInteger)& theMaterials, + const Standard_Boolean thePerformSelfIntersections) { SetErrorCode(KO); - //Add a new Partition object + //Add a new Partition object Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION); - + //Add a new Partition function - Handle(GEOM_Function) aFunction = - aPartition->AddFunction(GEOMImpl_PartitionDriver::GetID(), PARTITION_PARTITION); + Handle(GEOM_Function) aFunction; + if (thePerformSelfIntersections) + aFunction = aPartition->AddFunction(GEOMImpl_PartitionDriver::GetID(), PARTITION_PARTITION); + else + aFunction = aPartition->AddFunction(GEOMImpl_PartitionDriver::GetID(), PARTITION_NO_SELF_INTERSECTIONS); if (aFunction.IsNull()) return NULL; //Check if the function is set correctly - if (aFunction->GetDriverGUID() != GEOMImpl_PartitionDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != GEOMImpl_PartitionDriver::GetID()) return NULL; GEOMImpl_IPartition aCI (aFunction); - -// int aLen = theShapes.size(); -// aCI.SetLength(aLen); Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient; Handle(TColStd_HSequenceOfTransient) aToolsSeq = new TColStd_HSequenceOfTransient; @@ -278,15 +280,19 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition return NULL; } - //Make a Python command + //Make a Python command GEOM::TPythonDump pd (aFunction); - pd << aPartition << " = geompy.MakePartition(["; + if (thePerformSelfIntersections) + pd << aPartition << " = geompy.MakePartition(["; + else + pd << aPartition << " = geompy.MakePartitionNonSelfIntersectedShape(["; + // Shapes, Tools pd << aShapesDescr.ToCString() << "], [" << aToolsDescr.ToCString() << "], ["; // Keep Ins, Remove Ins pd << aKeepInsDescr.ToCString() << "], [" << aRemoveInsDescr.ToCString() << "], "; // Limit, Remove Webs - pd << theLimit << ", " << (int)theRemoveWebs << ", ["; + pd << TopAbs_ShapeEnum(theLimit) << ", " << (int)theRemoveWebs << ", ["; // Materials if (!theMaterials.IsNull() && theMaterials->Length() > 0) { int i = theMaterials->Lower(); @@ -299,7 +305,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition pd << "])"; SetErrorCode(OK); - return aPartition; + return aPartition; } //============================================================================= @@ -313,20 +319,20 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition SetErrorCode(KO); if (theShape.IsNull() || thePlane.IsNull()) return NULL; - - //Add a new Boolean object - Handle(GEOM_Object) aPart = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN); - + + //Add a new Boolean object + Handle(GEOM_Object) aPart = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION); + //Add a new Partition function Handle(GEOM_Function) aFunction = aPart->AddFunction(GEOMImpl_PartitionDriver::GetID(), PARTITION_HALF); if (aFunction.IsNull()) return NULL; //Check if the function is set correctly - if (aFunction->GetDriverGUID() != GEOMImpl_PartitionDriver::GetID()) return NULL; + if (aFunction->GetDriverGUID() != GEOMImpl_PartitionDriver::GetID()) return NULL; GEOMImpl_IPartition aCI (aFunction); - + Handle(GEOM_Function) aRef1 = theShape->GetLastFunction(); Handle(GEOM_Function) aRef2 = thePlane->GetLastFunction(); @@ -351,10 +357,10 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition return NULL; } - //Make a Python command + //Make a Python command GEOM::TPythonDump(aFunction) << aPart << " = geompy.MakeHalfPartition(" << theShape << ", " << thePlane << ")"; SetErrorCode(OK); - return aPart; + return aPart; } diff --git a/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx b/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx index d0b6e87ca..fd82587b2 100644 --- a/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx @@ -23,8 +23,6 @@ #include "GEOM_IOperations.hxx" -//#include "TColStd_HSequenceOfTransient.hxx" - #include "list" class GEOM_Engine; @@ -37,19 +35,21 @@ class GEOMImpl_IBooleanOperations : public GEOM_IOperations { Standard_EXPORT ~GEOMImpl_IBooleanOperations(); Standard_EXPORT Handle(GEOM_Object) MakeBoolean (Handle(GEOM_Object) theShape1, - Handle(GEOM_Object) theShape2, - Standard_Integer theOp); + Handle(GEOM_Object) theShape2, + Standard_Integer theOp); - Standard_EXPORT Handle(GEOM_Object) MakePartition (const Handle(TColStd_HSequenceOfTransient)& theShapes, - const Handle(TColStd_HSequenceOfTransient)& theTools, - const Handle(TColStd_HSequenceOfTransient)& theKeepInside, - const Handle(TColStd_HSequenceOfTransient)& theRemoveInside, - const Standard_Integer theLimit, - const Standard_Boolean theRemoveWebs, - const Handle(TColStd_HArray1OfInteger)& theMaterials); + Standard_EXPORT Handle(GEOM_Object) MakePartition + (const Handle(TColStd_HSequenceOfTransient)& theShapes, + const Handle(TColStd_HSequenceOfTransient)& theTools, + const Handle(TColStd_HSequenceOfTransient)& theKeepInside, + const Handle(TColStd_HSequenceOfTransient)& theRemoveInside, + const Standard_Integer theLimit, + const Standard_Boolean theRemoveWebs, + const Handle(TColStd_HArray1OfInteger)& theMaterials, + const Standard_Boolean thePerformSelfIntersections); Standard_EXPORT Handle(GEOM_Object) MakeHalfPartition (Handle(GEOM_Object) theShape, - Handle(GEOM_Object) thePlane); + Handle(GEOM_Object) thePlane); }; #endif diff --git a/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx b/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx index 6c904ca2d..f9c99baa1 100644 --- a/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx @@ -1,22 +1,23 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 @@ -51,7 +52,7 @@ * constructor: */ //============================================================================= -GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine, int theDocID) +GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine, int theDocID) : GEOM_IOperations(theEngine, theDocID) { MESSAGE("GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations"); @@ -81,7 +82,7 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::CreateGroup Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); anArray->SetValue(1, -1); - //Add a new Fillet object + //Add a new Sub-shape object Handle(GEOM_Object) aGroup = GetEngine()->AddSubShape(theMainShape, anArray); //Set a GROUP type @@ -119,9 +120,9 @@ void GEOMImpl_IGroupOperations::AddObject(Handle(GEOM_Object) theGroup, int theS // Check sub-shape index validity TDF_Label aLabel = aSSI.GetMainShape()->GetOwnerEntry(); if (aLabel.IsRoot()) return; - Handle(GEOM_Object) anObj = GEOM_Object::GetObject(aLabel); - if (anObj.IsNull()) return; - TopoDS_Shape aMainShape = anObj->GetValue(); + Handle(GEOM_Object) aMainObj = GEOM_Object::GetObject(aLabel); + if (aMainObj.IsNull()) return; + TopoDS_Shape aMainShape = aMainObj->GetValue(); if (aMainShape.IsNull()) return; TopTools_IndexedMapOfShape aMapOfShapes; @@ -152,6 +153,10 @@ void GEOMImpl_IGroupOperations::AddObject(Handle(GEOM_Object) theGroup, int theS aSSI.SetIndices(aNewSeq); } + // As we do not recompute here our group, lets mark it as Modified + Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape + theGroup->SetTic(aTic - 1); + //Make a Python command GEOM::TPythonDump(aFunction, /*append=*/true) << "geompy.AddObject(" << theGroup << ", " << theSubShapeID << ")"; @@ -176,50 +181,58 @@ void GEOMImpl_IGroupOperations::RemoveObject (Handle(GEOM_Object) theGroup, int GEOM_ISubShape aSSI(aFunction); Handle(TColStd_HArray1OfInteger) aSeq = aSSI.GetIndices(); if(aSeq.IsNull()) return; + if(aSeq->Length() == 1 && aSeq->Value(1) == -1) { SetErrorCode(NOT_EXISTS); return; } - else { - Handle(TColStd_HArray1OfInteger) aNewSeq; - Standard_Integer aLength = aSeq->Length(); - if(aLength == 1) { - if(aSeq->Value(1) != theSubShapeID) { - SetErrorCode(NOT_EXISTS); - return; - } - aNewSeq = new TColStd_HArray1OfInteger(1,1); - aNewSeq->SetValue(1, -1); + + Handle(TColStd_HArray1OfInteger) aNewSeq; + Standard_Integer aLength = aSeq->Length(); + if(aLength == 1) { + if(aSeq->Value(1) != theSubShapeID) { + SetErrorCode(NOT_EXISTS); + return; } - else { - aNewSeq = new TColStd_HArray1OfInteger(1, aLength-1); - Standard_Boolean isFound = Standard_False; - for (Standard_Integer i = 1, k = 1; i <= aLength; i++) { - if (aSeq->Value(i) == theSubShapeID) { - isFound = Standard_True; - } else { - if (k < aLength) { // this check is to avoid sequence overflow - aNewSeq->SetValue(k, aSeq->Value(i)); - k++; - } + aNewSeq = new TColStd_HArray1OfInteger(1,1); + aNewSeq->SetValue(1, -1); + } + else { + aNewSeq = new TColStd_HArray1OfInteger(1, aLength-1); + Standard_Boolean isFound = Standard_False; + for (Standard_Integer i = 1, k = 1; i <= aLength; i++) { + if (aSeq->Value(i) == theSubShapeID) { + isFound = Standard_True; + } else { + if (k < aLength) { // this check is to avoid sequence overflow + aNewSeq->SetValue(k, aSeq->Value(i)); + k++; } } - - if (!isFound) { - SetErrorCode(NOT_EXISTS); - return; - } } - aSSI.SetIndices(aNewSeq); + if (!isFound) { + SetErrorCode(NOT_EXISTS); + return; + } } - //Make a Python command + aSSI.SetIndices(aNewSeq); + + // As we do not recompute here our group, lets mark it as Modified + TDF_Label aLabel = aSSI.GetMainShape()->GetOwnerEntry(); + if (aLabel.IsRoot()) return; + Handle(GEOM_Object) aMainObj = GEOM_Object::GetObject(aLabel); + if (aMainObj.IsNull()) return; + Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape + theGroup->SetTic(aTic - 1); + + //Make a Python command GEOM::TPythonDump(aFunction, /*append=*/true) << "geompy.RemoveObject(" << theGroup << ", " << theSubShapeID << ")"; SetErrorCode(OK); - return; + return; } //============================================================================= @@ -346,6 +359,10 @@ void GEOMImpl_IGroupOperations::UnionList (Handle(GEOM_Object) theGroup, } aSSI.SetIndices(aNewSeq); + + // As we do not recompute here our group, lets mark it as Modified + Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape + theGroup->SetTic(aTic - 1); } //Make a Python command @@ -476,6 +493,10 @@ void GEOMImpl_IGroupOperations::DifferenceList (Handle(GEOM_Object) theGroup, } aSSI.SetIndices(aNewSeq); + + // As we do not recompute here our group, lets mark it as Modified + Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape + theGroup->SetTic(aTic - 1); } //Make a Python command @@ -566,6 +587,10 @@ void GEOMImpl_IGroupOperations::UnionIDs (Handle(GEOM_Object) theGroup, } aSSI.SetIndices(aNewSeq); + + // As we do not recompute here our group, lets mark it as Modified + Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape + theGroup->SetTic(aTic - 1); } //Make a Python command @@ -651,6 +676,10 @@ void GEOMImpl_IGroupOperations::DifferenceIDs (Handle(GEOM_Object) theGroup, } aSSI.SetIndices(aNewSeq); + + // As we do not recompute here our group, lets mark it as Modified + Standard_Integer aTic = aMainObj->GetTic(); // tic of main shape + theGroup->SetTic(aTic - 1); } //Make a Python command @@ -677,7 +706,7 @@ TopAbs_ShapeEnum GEOMImpl_IGroupOperations::GetType(Handle(GEOM_Object) theGroup if(!aFreeLabel.FindAttribute(TDataStd_Integer::GetID(), anAttrib)) return TopAbs_SHAPE; SetErrorCode(OK); - return (TopAbs_ShapeEnum) anAttrib->Get(); + return (TopAbs_ShapeEnum) anAttrib->Get(); } //============================================================================= @@ -707,7 +736,7 @@ Handle(GEOM_Object) GEOMImpl_IGroupOperations::GetMainShape (Handle(GEOM_Object) << aMainShape << " = geompy.GetMainShape(" << theGroup << ")"; SetErrorCode(OK); - return aMainShape; + return aMainShape; } //============================================================================= diff --git a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx index bdc7b2648..094e2fbb7 100644 --- a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx @@ -372,7 +372,12 @@ Standard_Boolean GEOMImpl_IInsertOperations::IsSupported aKey += "."; aKey += aMode; if (myResMgr->Find(aKey.ToCString())) { - TCollection_AsciiString aLibName (myResMgr->Value(aKey.ToCString())); + TCollection_AsciiString aLibName (myResMgr->Value(aKey.ToCString())); +#ifndef WNT + aLibName += ".so"; +#else + aLibName += ".dll"; +#endif theLibName = new TCollection_HAsciiString (aLibName); return Standard_True; } diff --git a/src/GEOMImpl/GEOMImpl_IRotate.hxx b/src/GEOMImpl/GEOMImpl_IRotate.hxx index 9d09aa487..2cdad4d5a 100644 --- a/src/GEOMImpl/GEOMImpl_IRotate.hxx +++ b/src/GEOMImpl/GEOMImpl_IRotate.hxx @@ -28,6 +28,9 @@ #define ROTATE_STEP1 4 #define ROTATE_NBITER1 5 #define ROTATE_NBITER2 6 +#define ROTATE_CENTRAL_POINT 7 +#define ROTATE_POINT1 8 +#define ROTATE_POINT2 9 class GEOMImpl_IRotate { @@ -35,6 +38,18 @@ class GEOMImpl_IRotate GEOMImpl_IRotate(Handle(GEOM_Function) theFunction): _func(theFunction) {} + void SetCentPoint(Handle(GEOM_Function) theCentPoint) { _func->SetReference(ROTATE_CENTRAL_POINT, theCentPoint); } + + Handle(GEOM_Function) GetCentPoint() { return _func->GetReference(ROTATE_CENTRAL_POINT); } + + void SetPoint1(Handle(GEOM_Function) thePoint1) { _func->SetReference(ROTATE_POINT1, thePoint1); } + + Handle(GEOM_Function) GetPoint1() { return _func->GetReference(ROTATE_POINT1); } + + void SetPoint2(Handle(GEOM_Function) thePoint2) { _func->SetReference(ROTATE_POINT2, thePoint2); } + + Handle(GEOM_Function) GetPoint2() { return _func->GetReference(ROTATE_POINT2); } + void SetAngle(Standard_Real theAngle) { _func->SetReal(ROTATE_ANGLE, theAngle); } Standard_Real GetAngle() { return _func->GetReal(ROTATE_ANGLE); } diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index a9c567a11..54d7d9aef 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -1,22 +1,23 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 "GEOMImpl_IShapesOperations.hxx" @@ -39,6 +40,9 @@ #include "GEOMAlgo_FinderShapeOn1.hxx" #include "GEOMAlgo_FinderShapeOnQuad.hxx" +#include "GEOMAlgo_FinderShapeOn2.hxx" +#include "GEOMAlgo_ClsfBox.hxx" +//#include "GEOMAlgo_ClsfSurf.hxx" #include "utilities.h" #include "OpUtil.hxx" @@ -54,6 +58,7 @@ #include #include +#include #include #include #include @@ -65,6 +70,7 @@ #include #include #include +#include #include #include #include @@ -72,6 +78,7 @@ #include #include #include +#include #include #include #include @@ -82,6 +89,7 @@ #include #include +#include #include #include @@ -601,12 +609,14 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode anArray = new TColStd_HArray1OfInteger(1,1); anArray->SetValue(1, anIndices.FindIndex(aValue)); anObj = GetEngine()->AddSubShape(theShape, anArray); - aSeq->Append(anObj); + if (!anObj.IsNull()) { + aSeq->Append(anObj); - // for python command - TDF_Tool::Entry(anObj->GetEntry(), anEntry); - anAsciiList += anEntry; - anAsciiList += ","; + // for python command + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + anAsciiList += anEntry; + anAsciiList += ","; + } } //Make a Python command @@ -1039,7 +1049,7 @@ Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetFreeFacesIDs //======================================================================= //function : GetSharedShapes -//purpose : +//purpose : //======================================================================= Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetSharedShapes @@ -1104,7 +1114,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetSharedShapes //============================================================================= /*! - * + * */ //============================================================================= static GEOM::TPythonDump& operator<< (GEOM::TPythonDump& theDump, @@ -1219,6 +1229,169 @@ Handle(Geom_Surface) GEOMImpl_IShapesOperations::makeCylinder(const TopoDS_Shape } +//======================================================================= +//function : getShapesOnBoxIDs + /*! + * \brief Find IDs of subshapes complying with given status about surface + * \param theBox - the box to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + */ +//======================================================================= + +Handle(TColStd_HSequenceOfInteger) + GEOMImpl_IShapesOperations::getShapesOnBoxIDs(const Handle(GEOM_Object)& theBox, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState) +{ + Handle(TColStd_HSequenceOfInteger) aSeqOfIDs; + + TopoDS_Shape aBox = theBox->GetValue(); + TopoDS_Shape aShape = theShape->GetValue(); + + // Call algo + GEOMAlgo_FinderShapeOn2 aFinder; + Standard_Real aTol = 0.0001; // default value + + Handle(GEOMAlgo_ClsfBox) aClsfBox = new GEOMAlgo_ClsfBox; + aClsfBox->SetBox(aBox); + + aFinder.SetShape(aShape); + aFinder.SetTolerance(aTol); + aFinder.SetClsf(aClsfBox); + aFinder.SetShapeType( (TopAbs_ShapeEnum)theShapeType ); + aFinder.SetState(theState); + aFinder.Perform(); + + // Interprete results + Standard_Integer iErr = aFinder.ErrorStatus(); + // the detailed description of error codes is in GEOMAlgo_FinderShapeOn1.cxx + if (iErr) { + MESSAGE(" iErr : " << iErr); + TCollection_AsciiString aMsg (" iErr : "); + aMsg += TCollection_AsciiString(iErr); + SetErrorCode(aMsg); + return aSeqOfIDs; + } + Standard_Integer iWrn = aFinder.WarningStatus(); + // the detailed description of warning codes is in GEOMAlgo_FinderShapeOn1.cxx + if (iWrn) { + MESSAGE(" *** iWrn : " << iWrn); + } + + const TopTools_ListOfShape& listSS = aFinder.Shapes(); // the result + + if (listSS.Extent() < 1) { + SetErrorCode("Not a single sub-shape of the requested type found on the given surface"); + return aSeqOfIDs; + } + + // Fill sequence of object IDs + aSeqOfIDs = new TColStd_HSequenceOfInteger; + + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aShape, anIndices); + + TopTools_ListIteratorOfListOfShape itSub (listSS); + for (int index = 1; itSub.More(); itSub.Next(), ++index) { + int id = anIndices.FindIndex(itSub.Value()); + aSeqOfIDs->Append(id); + } + + return aSeqOfIDs; +} + + +//======================================================================= +//function : GetShapesOnBoxIDs +/*! + * \brief Find subshapes complying with given status about surface + * \param theBox - the box to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + */ +//======================================================================= + +Handle(TColStd_HSequenceOfInteger) + GEOMImpl_IShapesOperations::GetShapesOnBoxIDs(const Handle(GEOM_Object)& theBox, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState) +{ + // Find subshapes ids + Handle(TColStd_HSequenceOfInteger) aSeqOfIDs = + getShapesOnBoxIDs (theBox, theShape, theShapeType, theState); + if ( aSeqOfIDs.IsNull() || aSeqOfIDs->Length() == 0 ) + return NULL; + + // The GetShapesOnBox() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theBox)->GetLastFunction(); + + // Make a Python command + GEOM::TPythonDump(aFunction) + << "listShapesOnBoxIDs = geompy.GetShapesOnQuadrangleIDs(" + << theBox << ", " + << theShape << ", " + << TopAbs_ShapeEnum(theShapeType) << ", " + << theState << ")"; + + SetErrorCode(OK); + return aSeqOfIDs; +} + +//======================================================================= +//function : GetShapesOnBox +/*! + * \brief Find subshapes complying with given status about surface + * \param theBox - the box to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfTransient) - found subshapes + */ +//======================================================================= + +Handle(TColStd_HSequenceOfTransient) + GEOMImpl_IShapesOperations::GetShapesOnBox(const Handle(GEOM_Object)& theBox, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState) +{ + // Find subshapes ids + Handle(TColStd_HSequenceOfInteger) aSeqOfIDs = + getShapesOnBoxIDs (theBox, theShape, theShapeType, theState); + if ( aSeqOfIDs.IsNull() || aSeqOfIDs->Length() == 0 ) + return NULL; + + // Find objects by indices + TCollection_AsciiString anAsciiList; + Handle(TColStd_HSequenceOfTransient) aSeq; + aSeq = getObjectsShapesOn( theShape, aSeqOfIDs, anAsciiList ); + if ( aSeq.IsNull() || aSeq->IsEmpty() ) + return NULL; + + // Make a Python command + + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast( aSeq->Value( 1 )); + Handle(GEOM_Function) aFunction = anObj->GetLastFunction(); + + GEOM::TPythonDump(aFunction) + << "[" << anAsciiList.ToCString() << "] = geompy.GetShapesOnBox(" + << theBox << ", " + << theShape << ", " + << TopAbs_ShapeEnum(theShapeType) << ", " + << theState << ")"; + + SetErrorCode(OK); + return aSeq; +} + + //======================================================================= //function : getShapesOnSurfaceIDs /*! @@ -1417,6 +1590,80 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlan return aSeq; } +//============================================================================= +/*! + * GetShapesOnPlaneWithLocation + */ +//============================================================================= +Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlaneWithLocation + (const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + const Handle(GEOM_Object)& theAx1, + const Handle(GEOM_Object)& thePnt, + const GEOMAlgo_State theState) +{ + SetErrorCode(KO); + + if (theShape.IsNull() || theAx1.IsNull() || thePnt.IsNull()) return NULL; + + TopoDS_Shape aShape = theShape->GetValue(); + TopoDS_Shape anAx1 = theAx1->GetValue(); + TopoDS_Shape anPnt = thePnt->GetValue(); + + if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return NULL; + + TopAbs_ShapeEnum aShapeType = TopAbs_ShapeEnum(theShapeType); + if ( !checkTypeShapesOn( theShapeType )) + return NULL; + + // Create plane + if ( anAx1.ShapeType() != TopAbs_EDGE || anPnt.ShapeType() != TopAbs_VERTEX ) return NULL; + TopoDS_Vertex V1, V2, V3; + TopoDS_Edge anEdge = TopoDS::Edge(anAx1); + TopExp::Vertices(anEdge, V1, V2, Standard_True); + + if (V1.IsNull() || V2.IsNull()) { + SetErrorCode("Bad edge given for the plane normal vector"); + return NULL; + } + V3 = TopoDS::Vertex(anPnt); + + if(V3.IsNull()) { + SetErrorCode("Bad vertex given for the plane location"); + return NULL; + } + gp_Pnt aLoc = BRep_Tool::Pnt(V3); + gp_Vec aVec(BRep_Tool::Pnt(V1),BRep_Tool::Pnt(V2)); + + if (aVec.Magnitude() < Precision::Confusion()) { + SetErrorCode("Vector with null magnitude given"); + return NULL; + } + Handle(Geom_Surface) aPlane = new Geom_Plane(aLoc, aVec); + + if ( aPlane.IsNull() ) + return NULL; + + // Find objects + TCollection_AsciiString anAsciiList; + Handle(TColStd_HSequenceOfTransient) aSeq; + aSeq = getShapesOnSurface( aPlane, theShape, aShapeType, theState, anAsciiList ); + if ( aSeq.IsNull() || aSeq->Length() == 0 ) + return NULL; + + // Make a Python command + + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast( aSeq->Value( 1 )); + Handle(GEOM_Function) aFunction = anObj->GetLastFunction(); + + GEOM::TPythonDump(aFunction) << "[" << anAsciiList.ToCString() + << "] = geompy.GetShapesOnPlaneWithLocation(" << theShape << ", " + << aShapeType << ", " << theAx1 << ", "<< thePnt <<", " << theState << ")"; + + SetErrorCode(OK); + return aSeq; +} + //============================================================================= /*! * GetShapesOnCylinder @@ -1453,7 +1700,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnCyli aSeq = getShapesOnSurface( aCylinder, theShape, aShapeType, theState, anAsciiList ); if ( aSeq.IsNull() || aSeq->Length() == 0 ) return NULL; - + // Make a Python command Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast( aSeq->Value( 1 )); @@ -1506,7 +1753,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnSphe aSeq = getShapesOnSurface( aSphere, theShape, aShapeType, theState, anAsciiList ); if ( aSeq.IsNull() || aSeq->Length() == 0 ) return NULL; - + // Make a Python command Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast( aSeq->Value( 1 )); @@ -1565,6 +1812,73 @@ Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnPlaneI return aSeq; } +//============================================================================= +/*! + * GetShapesOnPlaneWithLocationIDs + */ +//============================================================================= +Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnPlaneWithLocationIDs + (const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + const Handle(GEOM_Object)& theAx1, + const Handle(GEOM_Object)& thePnt, + const GEOMAlgo_State theState) +{ + SetErrorCode(KO); + + if (theShape.IsNull() || theAx1.IsNull() || thePnt.IsNull()) return NULL; + + TopoDS_Shape aShape = theShape->GetValue(); + TopoDS_Shape anAx1 = theAx1->GetValue(); + TopoDS_Shape anPnt = thePnt->GetValue(); + + if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return NULL; + + TopAbs_ShapeEnum aShapeType = TopAbs_ShapeEnum(theShapeType); + if ( !checkTypeShapesOn( aShapeType )) + return NULL; + + // Create plane + if (anAx1.ShapeType() != TopAbs_EDGE || anPnt.ShapeType() != TopAbs_VERTEX) return NULL; + TopoDS_Edge anEdge = TopoDS::Edge(anAx1); + TopoDS_Vertex V1, V2, V3; + TopExp::Vertices(anEdge, V1, V2, Standard_True); + if (V1.IsNull() || V2.IsNull()) { + SetErrorCode("Bad edge given for the plane normal vector"); + return NULL; + } + V3 = TopoDS::Vertex(anPnt); + if(V3.IsNull()) { + SetErrorCode("Bad vertex given for the plane location"); + return NULL; + } + gp_Pnt aLoc = BRep_Tool::Pnt(V3); + gp_Vec aVec(BRep_Tool::Pnt(V1),BRep_Tool::Pnt(V2)); + if (aVec.Magnitude() < Precision::Confusion()) { + SetErrorCode("Vector with null magnitude given"); + return NULL; + } + + Handle(Geom_Surface) aPlane = new Geom_Plane(aLoc, aVec); + if ( aPlane.IsNull() ) + return NULL; + + // Find object IDs + Handle(TColStd_HSequenceOfInteger) aSeq; + aSeq = getShapesOnSurfaceIDs( aPlane, aShape, aShapeType, theState ); + + // The GetShapesOnPlaneIDs() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theAx1)->GetLastFunction(); + + // Make a Python command + GEOM::TPythonDump(aFunction, /*append=*/true) + << "listShapesOnPlane = geompy.GetShapesOnPlaneWithLocationIDs" + << "(" << theShape << ", " << aShapeType << ", " << theAx1 << ", "<< thePnt << ", " << theState << ")"; + + SetErrorCode(OK); + return aSeq; +} + //============================================================================= /*! * GetShapesOnCylinderIDs @@ -1594,7 +1908,7 @@ Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnCylind Handle(Geom_Surface) aCylinder = makeCylinder( anAxis, theRadius ); if ( aCylinder.IsNull() ) return NULL; - + // Find object IDs Handle(TColStd_HSequenceOfInteger) aSeq; aSeq = getShapesOnSurfaceIDs( aCylinder, aShape, aShapeType, theState ); @@ -1648,7 +1962,7 @@ Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnSphere // Find object IDs Handle(TColStd_HSequenceOfInteger) aSeq; aSeq = getShapesOnSurfaceIDs( aSphere, aShape, aShapeType, theState ); - + // The GetShapesOnSphere() doesn't change object so no new function is required. Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theCenter)->GetLastFunction(); @@ -1702,13 +2016,13 @@ Handle(TColStd_HSequenceOfInteger) TopoDS_Shape aBR = theBottomRigthPoint->GetValue(); if (aShape.IsNull() || - aTL.IsNull() || - aTR.IsNull() || - aBL.IsNull() || + aTL.IsNull() || + aTR.IsNull() || + aBL.IsNull() || aBR.IsNull() || - aTL.ShapeType() != TopAbs_VERTEX || - aTR.ShapeType() != TopAbs_VERTEX || - aBL.ShapeType() != TopAbs_VERTEX || + aTL.ShapeType() != TopAbs_VERTEX || + aTR.ShapeType() != TopAbs_VERTEX || + aBL.ShapeType() != TopAbs_VERTEX || aBR.ShapeType() != TopAbs_VERTEX ) return NULL; @@ -1913,85 +2227,123 @@ Handle(TColStd_HSequenceOfInteger) * GetInPlace */ //============================================================================= -static void SimplifyWhat (TopoDS_Shape& theWhat, - TopTools_IndexedMapOfShape& theArgumentIndices, - TColStd_ListOfInteger& theSimpleSubWhat) +static bool GetInPlaceOfShape (const Handle(GEOM_Function)& theWhereFunction, + const TopTools_IndexedMapOfShape& theWhereIndices, + const TopoDS_Shape& theWhat, + TColStd_ListOfInteger& theModifiedList) { - TopTools_MapOfShape mapShape; - TopoDS_Iterator It (theWhat, Standard_True, Standard_True); - for (; It.More(); It.Next()) { - if (mapShape.Add(It.Value())) { - TopoDS_Shape curSh = It.Value(); - if (curSh.ShapeType() == TopAbs_COMPOUND || - curSh.ShapeType() == TopAbs_COMPSOLID) { - SimplifyWhat(curSh, theArgumentIndices, theSimpleSubWhat); - } else { - theSimpleSubWhat.Append(theArgumentIndices.FindIndex(curSh)); - } - } + if (theWhereFunction.IsNull() || theWhat.IsNull()) return false; + + if (theWhereIndices.Contains(theWhat)) { + // entity was not changed by the operation + Standard_Integer aWhatIndex = theWhereIndices.FindIndex(theWhat); + theModifiedList.Append(aWhatIndex); + return true; } -} -static bool GetInPlaceOfCompound (Handle(GEOM_Function)& theWhereFunction, - TopoDS_Shape& theWhat, - TColStd_ListOfInteger& theModifiedArray) -{ - bool isFoundAny = false; - TopTools_MapOfShape mapShape; - TopoDS_Iterator It (theWhat, Standard_True, Standard_True); - for (; It.More(); It.Next()) { - if (mapShape.Add(It.Value())) { - TopoDS_Shape curWhat = It.Value(); - if (curWhat.ShapeType() == TopAbs_COMPOUND || - curWhat.ShapeType() == TopAbs_COMPSOLID) { - // Recursive call for compound or compsolid - if (GetInPlaceOfCompound(theWhereFunction, curWhat, theModifiedArray)) - isFoundAny = true; - } else { - // Try to find for "simple" shape - bool isFound = false; + // try to find in history + TDF_Label aHistoryLabel = theWhereFunction->GetHistoryEntry(Standard_False); - TDF_LabelSequence aLabelSeq; - theWhereFunction->GetDependency(aLabelSeq); - Standard_Integer nbArg = aLabelSeq.Length(); + // search in history for all argument shapes + Standard_Boolean isFound = Standard_False; + Standard_Boolean isGood = Standard_False; - for (Standard_Integer iarg = 1; iarg <= nbArg && !isFound; iarg++) { + TDF_LabelSequence aLabelSeq; + theWhereFunction->GetDependency(aLabelSeq); + Standard_Integer nbArg = aLabelSeq.Length(); - TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg); + for (Standard_Integer iarg = 1; iarg <= nbArg && !isFound; iarg++) { - Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel); - TopoDS_Shape anArgumentShape = anArgumentObject->GetValue(); + TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg); - TopTools_IndexedMapOfShape anArgumentIndices; - TopExp::MapShapes(anArgumentShape, anArgumentIndices); + Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel); + TopoDS_Shape anArgumentShape = anArgumentObject->GetValue(); - if (anArgumentIndices.Contains(curWhat)) { - isFound = Standard_True; - Standard_Integer aWhatIndex = anArgumentIndices.FindIndex(curWhat); + TopTools_IndexedMapOfShape anArgumentIndices; + TopExp::MapShapes(anArgumentShape, anArgumentIndices); - // Find corresponding label in history - TDF_Label anArgumentHistoryLabel = - theWhereFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_False); - if (!anArgumentHistoryLabel.IsNull()) { - TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(aWhatIndex, Standard_False); - if (!aWhatHistoryLabel.IsNull()) { - Handle(TDataStd_IntegerArray) anIntegerArray; - if (aWhatHistoryLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) { - Standard_Integer imod, aModifLen = anIntegerArray->Array()->Length(); - for (imod = 1; imod <= aModifLen; imod++) { - theModifiedArray.Append(anIntegerArray->Array()->Value(imod)); - } - } - } + if (anArgumentIndices.Contains(theWhat)) { + isFound = Standard_True; + Standard_Integer aWhatIndex = anArgumentIndices.FindIndex(theWhat); + + // Find corresponding label in history + TDF_Label anArgumentHistoryLabel = + theWhereFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_False); + if (anArgumentHistoryLabel.IsNull()) { + // Lost History of operation argument. Possibly, all its entities was removed. + isGood = Standard_True; + } + else { + TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(aWhatIndex, Standard_False); + + if (aWhatHistoryLabel.IsNull()) { + // Removed entity ? Compound ? Compsolid ? Shell ? Wire + isGood = Standard_False; + } else { + Handle(TDataStd_IntegerArray) anIntegerArray; + if (!aWhatHistoryLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) { + //Error: Empty modifications history for the sought shape. + isGood = Standard_False; + } + else { + isGood = Standard_True; + Standard_Integer imod, aModifLen = anIntegerArray->Array()->Length(); + for (imod = 1; imod <= aModifLen; imod++) { + theModifiedList.Append(anIntegerArray->Array()->Value(imod)); } } } - if (isFound) - isFoundAny = true; } } } - return isFoundAny; + + isFound = isGood; + + if (!isFound) { + // try compound/compsolid/shell/wire element by element + bool isFoundAny = false; + TopTools_MapOfShape mapShape; + + if (theWhat.ShapeType() == TopAbs_COMPOUND || + theWhat.ShapeType() == TopAbs_COMPSOLID) { + // recursive processing of compound/compsolid + TopoDS_Iterator anIt (theWhat, Standard_True, Standard_True); + for (; anIt.More(); anIt.Next()) { + if (mapShape.Add(anIt.Value())) { + TopoDS_Shape curWhat = anIt.Value(); + isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList); + if (isFoundAny) isFound = Standard_True; + } + } + } + else if (theWhat.ShapeType() == TopAbs_SHELL) { + // try to replace a shell by its faces images + TopExp_Explorer anExp (theWhat, TopAbs_FACE); + for (; anExp.More(); anExp.Next()) { + if (mapShape.Add(anExp.Current())) { + TopoDS_Shape curWhat = anExp.Current(); + isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList); + if (isFoundAny) isFound = Standard_True; + } + } + } + else if (theWhat.ShapeType() == TopAbs_WIRE) { + // try to replace a wire by its edges images + TopExp_Explorer anExp (theWhat, TopAbs_EDGE); + for (; anExp.More(); anExp.Next()) { + if (mapShape.Add(anExp.Current())) { + TopoDS_Shape curWhat = anExp.Current(); + isFoundAny = GetInPlaceOfShape(theWhereFunction, theWhereIndices, curWhat, theModifiedList); + if (isFoundAny) isFound = Standard_True; + } + } + } + else { + // Removed entity + } + } + + return isFound; } Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace @@ -2007,146 +2359,45 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetInPlace if (aWhere.IsNull() || aWhat.IsNull()) return NULL; - //Fill array of indices - Handle(TColStd_HArray1OfInteger) aModifiedArray; - Handle(GEOM_Function) aWhereFunction = theShapeWhere->GetLastFunction(); + if (aWhereFunction.IsNull()) return NULL; + //Fill array of indices TopTools_IndexedMapOfShape aWhereIndices; TopExp::MapShapes(aWhere, aWhereIndices); - if (aWhereIndices.Contains(aWhat)) { + // process shape + TColStd_ListOfInteger aModifiedList; + bool isFound = GetInPlaceOfShape(aWhereFunction, aWhereIndices, aWhat, aModifiedList); - // entity was not changed by the operation - Standard_Integer aWhatIndex = aWhereIndices.FindIndex(aWhat); - aModifiedArray = new TColStd_HArray1OfInteger(1,1); - aModifiedArray->SetValue(1, aWhatIndex); + if (!isFound || aModifiedList.Extent() < 1) { + SetErrorCode("Error: No history found for the sought shape or its sub-shapes."); + return NULL; + } - } else { - - TDF_Label aHistoryLabel = aWhereFunction->GetHistoryEntry(Standard_False); - if (aHistoryLabel.IsNull()) { - SetErrorCode("Modifications history does not exist for the shape under consideration."); - return NULL; - } - - // search in history for all argument shapes - Standard_Boolean isFound = Standard_False; - - TDF_LabelSequence aLabelSeq; - aWhereFunction->GetDependency(aLabelSeq); - Standard_Integer nbArg = aLabelSeq.Length(); - - for (Standard_Integer iarg = 1; iarg <= nbArg && !isFound; iarg++) { - - TDF_Label anArgumentRefLabel = aLabelSeq.Value(iarg); - - Handle(GEOM_Object) anArgumentObject = GEOM_Object::GetReferencedObject(anArgumentRefLabel); - TopoDS_Shape anArgumentShape = anArgumentObject->GetValue(); - - TopTools_IndexedMapOfShape anArgumentIndices; - TopExp::MapShapes(anArgumentShape, anArgumentIndices); - - if (anArgumentIndices.Contains(aWhat)) { - isFound = Standard_True; - Standard_Integer aWhatIndex = anArgumentIndices.FindIndex(aWhat); - - // Find corresponding label in history - TDF_Label anArgumentHistoryLabel = - aWhereFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_False); - if (anArgumentHistoryLabel.IsNull()) { - // Lost History of operation argument. Possibly, all its entities was removed. - SetErrorCode(OK); - return NULL; - } - - TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(aWhatIndex, Standard_False); - if (aWhatHistoryLabel.IsNull()) { - // Check, if the sought shape is Compound or Compsolid. - // In that case we will try to find history for its sub-shapes - if (aWhat.ShapeType() == TopAbs_COMPOUND || - aWhat.ShapeType() == TopAbs_COMPSOLID) { - TColStd_ListOfInteger aSimpleSubWhat, aModifiedList; - SimplifyWhat(aWhat, anArgumentIndices, aSimpleSubWhat); - TColStd_ListIteratorOfListOfInteger anIterSub (aSimpleSubWhat); - for (; anIterSub.More(); anIterSub.Next()) { - Standard_Integer aSubWhatIndex = anIterSub.Value(); - TDF_Label aSubWhatHistoryLabel = - anArgumentHistoryLabel.FindChild(aSubWhatIndex, Standard_False); - if (!aSubWhatHistoryLabel.IsNull()) { - Handle(TDataStd_IntegerArray) anIntegerArray; - if (aSubWhatHistoryLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) { - for (Standard_Integer isub = 1; isub <= anIntegerArray->Length(); isub++) { - aModifiedList.Append(anIntegerArray->Value(isub)); - } - } - } - } - if (aModifiedList.Extent() > 0) { - Handle(TColStd_HArray1OfInteger) aModifiedArraySub = - new TColStd_HArray1OfInteger (1, aModifiedList.Extent()); - TColStd_ListIteratorOfListOfInteger anIterModif (aModifiedList); - for (Standard_Integer imod = 1; anIterModif.More(); anIterModif.Next(), imod++) { - aModifiedArraySub->SetValue(imod, anIterModif.Value()); - } - aModifiedArray = aModifiedArraySub; - } else { - // Removed entity - SetErrorCode(OK); - return NULL; - } - } else { - // Removed entity - SetErrorCode(OK); - return NULL; - } - } else { - Handle(TDataStd_IntegerArray) anIntegerArray; - if (!aWhatHistoryLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) { - SetErrorCode("Error: Empty modifications history for the sought shape."); - return NULL; - } - - aModifiedArray = anIntegerArray->Array(); - if (aModifiedArray->Length() == 0) { - SetErrorCode("Error: Empty modifications history for the sought shape."); - return NULL; - } - } - } - } - - if (!isFound) { - // try compound element by element - if (aWhat.ShapeType() == TopAbs_COMPOUND || - aWhat.ShapeType() == TopAbs_COMPSOLID) { - TColStd_ListOfInteger aModifiedList; - isFound = GetInPlaceOfCompound(aWhereFunction, aWhat, aModifiedList); - if (isFound) { - aModifiedArray = new TColStd_HArray1OfInteger (1, aModifiedList.Extent()); - TColStd_ListIteratorOfListOfInteger anIterModif (aModifiedList); - for (Standard_Integer imod = 1; anIterModif.More(); anIterModif.Next(), imod++) { - aModifiedArray->SetValue(imod, anIterModif.Value()); - } - } - } - if (!isFound) { - SetErrorCode("The sought shape does not belong to any operation argument."); - return NULL; - } - } + Handle(TColStd_HArray1OfInteger) aModifiedArray = + new TColStd_HArray1OfInteger (1, aModifiedList.Extent()); + TColStd_ListIteratorOfListOfInteger anIterModif (aModifiedList); + for (Standard_Integer imod = 1; anIterModif.More(); anIterModif.Next(), imod++) { + aModifiedArray->SetValue(imod, anIterModif.Value()); } //Add a new object Handle(GEOM_Object) aResult = GetEngine()->AddSubShape(theShapeWhere, aModifiedArray); + if (aResult.IsNull()) { + SetErrorCode("Error in algorithm: result found, but cannot be returned."); + return NULL; + } if (aModifiedArray->Length() > 1) { //Set a GROUP type aResult->SetType(GEOM_GROUP); //Set a sub shape type + TopoDS_Shape aFirstFound = aWhereIndices.FindKey(aModifiedArray->Value(1)); + TopAbs_ShapeEnum aShapeType = aFirstFound.ShapeType(); + TDF_Label aFreeLabel = aResult->GetFreeLabel(); - TopAbs_ShapeEnum aShapeType = aWhat.ShapeType(); TDataStd_Integer::Set(aFreeLabel, (Standard_Integer)aShapeType); } @@ -2259,3 +2510,324 @@ bool GEOMImpl_IShapesOperations::CheckTriangulation (const TopoDS_Shape& aShape) return true; } + +#define MAX_TOLERANCE 1.e-7 + + +//======================================================================= +//function : isSameEdge +//purpose : Returns True if two edges coincide +//======================================================================= +static bool isSameEdge(const TopoDS_Edge& theEdge1, const TopoDS_Edge& theEdge2) +{ + TopoDS_Vertex V11, V12, V21, V22; + TopExp::Vertices(theEdge1, V11, V12); + TopExp::Vertices(theEdge2, V21, V22); + gp_Pnt P11 = BRep_Tool::Pnt(V11); + gp_Pnt P12 = BRep_Tool::Pnt(V12); + gp_Pnt P21 = BRep_Tool::Pnt(V21); + gp_Pnt P22 = BRep_Tool::Pnt(V22); + bool coincide = false; + + //Check that ends of edges coincide + if(P11.Distance(P21) <= MAX_TOLERANCE) { + if(P12.Distance(P22) <= MAX_TOLERANCE) coincide = true; + } + else if(P11.Distance(P22) <= MAX_TOLERANCE) { + if(P12.Distance(P21) <= MAX_TOLERANCE) coincide = true; + } + + if(!coincide) return false; + + double U11, U12, U21, U22; + Handle(Geom_Curve) C1 = BRep_Tool::Curve(theEdge1, U11, U12); + Handle(Geom_Curve) C2 = BRep_Tool::Curve(theEdge2, U21, U22); + if(C1->DynamicType() == C2->DynamicType()) return true; + + //Check that both edges has the same geometry + double range = U12-U11; + double U = U11+ range/3.0; + gp_Pnt P1 = C1->Value(U); //Compute a point on one third of the edge's length + U = U11+range*2.0/3.0; + gp_Pnt P2 = C1->Value(U); //Compute a point on two thirds of the edge's length + + if(!GeomLib_Tool::Parameter(C2, P1, MAX_TOLERANCE, U) || U < U21 || U > U22) + return false; + + if(P1.Distance(C2->Value(U)) > MAX_TOLERANCE) return false; + + if(!GeomLib_Tool::Parameter(C2, P2, MAX_TOLERANCE, U) || U < U21 || U > U22) + return false; + + if(P2.Distance(C2->Value(U)) > MAX_TOLERANCE) return false; + + return true; +} + +#include +//======================================================================= +//function : isSameFace +//purpose : Returns True if two faces coincide +//======================================================================= +static bool isSameFace(const TopoDS_Face& theFace1, const TopoDS_Face& theFace2) +{ + TopExp_Explorer E(theFace1, TopAbs_EDGE); + TopTools_ListOfShape LS1, LS2; + for(; E.More(); E.Next()) LS1.Append(E.Current()); + + E.Init(theFace2, TopAbs_EDGE); + for(; E.More(); E.Next()) LS2.Append(E.Current()); + + //Compare the number of edges in the faces + if(LS1.Extent() != LS2.Extent()) return false; + + double aMin = RealFirst(), aMax = RealLast(); + double xminB1=aMax, yminB1=aMax, zminB1=aMax, xminB2=aMax, yminB2=aMax, zminB2=aMax; + double xmaxB1=aMin, ymaxB1=aMin, zmaxB1=aMin, xmaxB2=aMin, ymaxB2=aMin, zmaxB2=aMin; + + for(E.Init(theFace1, TopAbs_VERTEX); E.More(); E.Next()) { + gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(E.Current())); + if(P.X() < xminB1) xminB1 = P.X(); + if(P.Y() < yminB1) yminB1 = P.Y(); + if(P.Z() < zminB1) zminB1 = P.Z(); + if(P.X() > xmaxB1) xmaxB1 = P.X(); + if(P.Y() > ymaxB1) ymaxB1 = P.Y(); + if(P.Z() > zmaxB1) zmaxB1 = P.Z(); + } + + for(E.Init(theFace2, TopAbs_VERTEX); E.More(); E.Next()) { + gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(E.Current())); + if(P.X() < xminB2) xminB2 = P.X(); + if(P.Y() < yminB2) yminB2 = P.Y(); + if(P.Z() < zminB2) zminB2 = P.Z(); + if(P.X() > xmaxB2) xmaxB2 = P.X(); + if(P.Y() > ymaxB2) ymaxB2 = P.Y(); + if(P.Z() > zmaxB2) zmaxB2 = P.Z(); + } + + //Compare the bounding boxes of both faces + if(gp_Pnt(xminB1, yminB1, zminB1).Distance(gp_Pnt(xminB2, yminB2, zminB2)) > MAX_TOLERANCE) + return false; + + if(gp_Pnt(xmaxB1, ymaxB1, zmaxB1).Distance(gp_Pnt(xmaxB2, ymaxB2, zmaxB2)) > MAX_TOLERANCE) + return false; + + //Check that each edge of the Face1 has a counterpart in the Face2 + TopTools_MapOfOrientedShape aMap; + TopTools_ListIteratorOfListOfShape LSI1(LS1); + for(; LSI1.More(); LSI1.Next()) { + TopoDS_Edge E = TopoDS::Edge(LSI1.Value()); + bool isFound = false; + TopTools_ListIteratorOfListOfShape LSI2(LS2); + for(; LSI2.More(); LSI2.Next()) { + TopoDS_Shape aValue = LSI2.Value(); + if(aMap.Contains(aValue)) continue; //To avoid checking already found edge several times + if(isSameEdge(E, TopoDS::Edge(aValue))) { + aMap.Add(aValue); + isFound = true; + break; + } + } + if(!isFound) return false; + } + + Handle(Geom_Surface) S1 = BRep_Tool::Surface(theFace1); + Handle(Geom_Surface) S2 = BRep_Tool::Surface(theFace2); + if(S1->DynamicType() == S2->DynamicType()) { + return true; + } + else { //Check if there a coincidence of two surfaces at least in two points + double U11, U12, V11, V12, U21, U22, V21, V22; + BRepTools::UVBounds(theFace1, U11, U12, V11, V12); + BRepTools::UVBounds(theFace2, U21, U22, V21, V22); + + double rangeU = U12-U11; + double rangeV = V12-V11; + double U = U11 + rangeU/3.0; + double V = V11 + rangeV/3.0; + gp_Pnt P1 = S1->Value(U, V); + U = U11+rangeU*2.0/3.0; + V = V11+rangeV*2.0/3.0; + gp_Pnt P2 = S1->Value(U, V); + + if(!GeomLib_Tool::Parameters(S2, P1, MAX_TOLERANCE, U, V) || U < U21 || U > U22 || V < V21 || V > V22) + return false; + + if(P1.Distance(S2->Value(U,V)) > MAX_TOLERANCE) return false; + + if(!GeomLib_Tool::Parameters(S2, P2, MAX_TOLERANCE, U, V) || U < U21 || U > U22 || V < V21 || V > V22) + return false; + + if(P2.Distance(S2->Value(U, V)) > MAX_TOLERANCE) return false; + } + + return true; +} + +//======================================================================= +//function : isSameSolid +//purpose : Returns True if two solids coincide +//======================================================================= +bool isSameSolid(const TopoDS_Solid& theSolid1, const TopoDS_Solid& theSolid2) +{ + TopExp_Explorer E(theSolid1, TopAbs_FACE); + TopTools_ListOfShape LS1, LS2; + for(; E.More(); E.Next()) LS1.Append(E.Current()); + E.Init(theSolid2, TopAbs_FACE); + for(; E.More(); E.Next()) LS2.Append(E.Current()); + + if(LS1.Extent() != LS2.Extent()) return false; + + double aMin = RealFirst(), aMax = RealLast(); + double xminB1=aMax, yminB1=aMax, zminB1=aMax, xminB2=aMax, yminB2=aMax, zminB2=aMax; + double xmaxB1=aMin, ymaxB1=aMin, zmaxB1=aMin, xmaxB2=aMin, ymaxB2=aMin, zmaxB2=aMin; + + for(E.Init(theSolid1, TopAbs_VERTEX); E.More(); E.Next()) { + gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(E.Current())); + if(P.X() < xminB1) xminB1 = P.X(); + if(P.Y() < yminB1) yminB1 = P.Y(); + if(P.Z() < zminB1) zminB1 = P.Z(); + if(P.X() > xmaxB1) xmaxB1 = P.X(); + if(P.Y() > ymaxB1) ymaxB1 = P.Y(); + if(P.Z() > zmaxB1) zmaxB1 = P.Z(); + } + + for(E.Init(theSolid2, TopAbs_VERTEX); E.More(); E.Next()) { + gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(E.Current())); + if(P.X() < xminB2) xminB2 = P.X(); + if(P.Y() < yminB2) yminB2 = P.Y(); + if(P.Z() < zminB2) zminB2 = P.Z(); + if(P.X() > xmaxB2) xmaxB2 = P.X(); + if(P.Y() > ymaxB2) ymaxB2 = P.Y(); + if(P.Z() > zmaxB2) zmaxB2 = P.Z(); + } + + //Compare the bounding boxes of both solids + if(gp_Pnt(xminB1, yminB1, zminB1).Distance(gp_Pnt(xminB2, yminB2, zminB2)) > MAX_TOLERANCE) + return false; + + if(gp_Pnt(xmaxB1, ymaxB1, zmaxB1).Distance(gp_Pnt(xmaxB2, ymaxB2, zmaxB2)) > MAX_TOLERANCE) + return false; + + //Check that each face of the Solid1 has a counterpart in the Solid2 + TopTools_MapOfOrientedShape aMap; + TopTools_ListIteratorOfListOfShape LSI1(LS1); + for(; LSI1.More(); LSI1.Next()) { + TopoDS_Face F = TopoDS::Face(LSI1.Value()); + bool isFound = false; + TopTools_ListIteratorOfListOfShape LSI2(LS2); + for(; LSI2.More(); LSI2.Next()) { + if(aMap.Contains(LSI2.Value())) continue; //To avoid checking already found faces several times + if(isSameFace(F, TopoDS::Face(LSI2.Value()))) { + aMap.Add(LSI2.Value()); + isFound = true; + break; + } + } + if(!isFound) return false; + } + + return true; +} + +//======================================================================= +//function : GetSame +//purpose : +//======================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetSame(const Handle(GEOM_Object)& theShapeWhere, + const Handle(GEOM_Object)& theShapeWhat) +{ + SetErrorCode(KO); + if (theShapeWhere.IsNull() || theShapeWhat.IsNull()) return NULL; + + TopoDS_Shape aWhere = theShapeWhere->GetValue(); + TopoDS_Shape aWhat = theShapeWhat->GetValue(); + + if (aWhere.IsNull() || aWhat.IsNull()) return NULL; + + int anIndex = -1; + bool isFound = false; + TopoDS_Shape aSubShape; + TopTools_MapOfShape aMap; + + switch(aWhat.ShapeType()) { + case TopAbs_VERTEX: { + gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(aWhat)); + TopExp_Explorer E(aWhere, TopAbs_VERTEX); + for(; E.More(); E.Next()) { + if(!aMap.Add(E.Current())) continue; + gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(E.Current())); + if(P.Distance(P2) <= MAX_TOLERANCE) { + isFound = true; + aSubShape = E.Current(); + break; + } + } + break; + } + case TopAbs_FACE: { + TopoDS_Face aFace = TopoDS::Face(aWhat); + TopExp_Explorer E(aWhere, TopAbs_FACE); + for(; E.More(); E.Next()) { + if(!aMap.Add(E.Current())) continue; + if(isSameFace(aFace, TopoDS::Face(E.Current()))) { + aSubShape = E.Current(); + isFound = true; + break; + } + } + break; + } + case TopAbs_EDGE: { + TopoDS_Edge anEdge = TopoDS::Edge(aWhat); + TopExp_Explorer E(aWhere, TopAbs_EDGE); + for(; E.More(); E.Next()) { + if(!aMap.Add(E.Current())) continue; + if(isSameEdge(anEdge, TopoDS::Edge(E.Current()))) { + aSubShape = E.Current(); + isFound = true; + break; + } + } + break; + } + case TopAbs_SOLID: { + TopoDS_Solid aSolid = TopoDS::Solid(aWhat); + TopExp_Explorer E(aWhere, TopAbs_SOLID); + for(; E.More(); E.Next()) { + if(!aMap.Add(E.Current())) continue; + if(isSameSolid(aSolid, TopoDS::Solid(E.Current()))) { + aSubShape = E.Current(); + isFound = true; + break; + } + } + break; + } + default: + return NULL; + } + + if(isFound) { + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aWhere, anIndices); + if (anIndices.Contains(aSubShape)) + anIndex = anIndices.FindIndex(aSubShape); + } + + if(anIndex < 0) return NULL; + + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + + anArray->SetValue(1, anIndex); + + Handle(GEOM_Object) aResult = GetEngine()->AddSubShape(theShapeWhere, anArray); + Handle(GEOM_Function) aFunction = aResult->GetLastFunction(); + + GEOM::TPythonDump(aFunction) << aResult << " = geompy.GetSame(" + << theShapeWhere << ", " << theShapeWhat << ")"; + + SetErrorCode(OK); + + return aResult; +} diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx index d18b35c12..09468c75c 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx @@ -97,6 +97,13 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations { const Handle(GEOM_Object)& theAx1, const GEOMAlgo_State theState); + Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnPlaneWithLocation (const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + const Handle(GEOM_Object)& theAx1, + const Handle(GEOM_Object)& thePnt, + const GEOMAlgo_State theState); + + Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnCylinder (const Handle(GEOM_Object)& theShape, const Standard_Integer theShapeType, const Handle(GEOM_Object)& theAxis, @@ -114,6 +121,12 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations { const Handle(GEOM_Object)& theAx1, const GEOMAlgo_State theState); + Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnPlaneWithLocationIDs (const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + const Handle(GEOM_Object)& theAx1, + const Handle(GEOM_Object)& thePnt, + const GEOMAlgo_State theState); + Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape, const Standard_Integer theShapeType, const Handle(GEOM_Object)& theAxis, @@ -181,6 +194,44 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations { Standard_EXPORT static void SortShapes (TopTools_ListOfShape& SL); + /*! + * \brief Searches a shape equal to theWhat in the context of theWhere + * \param theShapeWhere - a context shap + * \param theShapeWhat - a sample shape + * \retval Handle(GEOM_Object) - found shape + */ + Standard_EXPORT Handle(GEOM_Object) GetSame(const Handle(GEOM_Object)& theShapeWhere, + const Handle(GEOM_Object)& theShapeWhat); + + /*! + * \brief Find IDs of subshapes complying with given status about surface + * \param theBox - the box to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + */ + Standard_EXPORT Handle(TColStd_HSequenceOfInteger) + GEOMImpl_IShapesOperations::GetShapesOnBoxIDs(const Handle(GEOM_Object)& theBox, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState); + + /*! + * \brief Find subshapes complying with given status about surface + * \param theBox - the box to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + */ + Standard_EXPORT Handle(TColStd_HSequenceOfTransient) + GEOMImpl_IShapesOperations::GetShapesOnBox(const Handle(GEOM_Object)& theBox, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState); + + private: Handle(GEOM_Object) MakeShape (list theShapes, const Standard_Integer theObjectType, @@ -267,6 +318,20 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations { const Handle(GEOM_Object)& theBottomRigthPoint, const GEOMAlgo_State theState); + /*! + * \brief Find IDs of subshapes complying with given status about surface + * \param theBox - the box to check state of subshapes against + * \param theShape - the shape to explore + * \param theShapeType - type of subshape of theShape + * \param theState - required state + * \retval Handle(TColStd_HSequenceOfInteger) - IDs of found subshapes + */ + Handle(TColStd_HSequenceOfInteger) + GEOMImpl_IShapesOperations::getShapesOnBoxIDs(const Handle(GEOM_Object)& theBox, + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState); + /*! * \brief Find shape objects and their entries by their ids * \param theShape - the main shape diff --git a/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx index 27ba4cb29..9bf0da1bf 100644 --- a/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx @@ -1405,3 +1405,122 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object) SetErrorCode(OK); return aCopy; } + +//============================================================================= +/*! + * RotateThreePoints + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePoints (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theCentPoint, + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theCentPoint.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated + + // Get last functions of the arguments + Handle(GEOM_Function) aCPF = theCentPoint->GetLastFunction(); + Handle(GEOM_Function) aP1F = thePoint1->GetLastFunction(); + Handle(GEOM_Function) aP2F = thePoint2->GetLastFunction(); + + + //Add a rotate function + aFunction = theObject->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_THREE_POINTS); + + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_RotateDriver::GetID()) return NULL; + + GEOMImpl_IRotate aRI(aFunction); + aRI.SetCentPoint(aCPF); + aRI.SetPoint1(aP1F); + aRI.SetPoint2(aP2F); + aRI.SetOriginal(aLastFunction); + + //Compute the translation + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Rotate driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + GEOM::TPythonDump(aFunction) << "geompy.TrsfOp.RotateThreePoints(" << theObject + << ", " << theCentPoint << ", "<GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a rotate function + aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_THREE_POINTS_COPY); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_RotateDriver::GetID()) return NULL; + + GEOMImpl_IRotate aRI(aFunction); + aRI.SetCentPoint(theCentPoint->GetLastFunction()); + aRI.SetPoint1(thePoint1->GetLastFunction()); + aRI.SetPoint2(thePoint2->GetLastFunction()); + aRI.SetOriginal(aLastFunction); + + //Compute the translation + try { +#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 + OCC_CATCH_SIGNALS; +#endif + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Rotate driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeRotationThreePoints(" << theObject + << ", " << theCentPoint << ", "< #include +#include + #ifdef WNT #include #else @@ -92,8 +94,8 @@ Standard_Integer GEOMImpl_ImportDriver::Execute(TFunction_Logbook& log) const if (aFileName.IsEmpty() || aFormatName.IsEmpty() || aLibName.IsEmpty()) return 0; - // load plugin library - LibHandle anImportLib = LoadLib( aLibName.ToCString() ); + // load plugin library + LibHandle anImportLib = LoadLib( aLibName.ToCString() ); //This is workaround of BUG OCC13051 funcPoint fp = 0; if ( anImportLib ) fp = (funcPoint)GetProc( anImportLib, "Import" ); @@ -105,8 +107,8 @@ Standard_Integer GEOMImpl_ImportDriver::Execute(TFunction_Logbook& log) const TCollection_AsciiString anError; TopoDS_Shape aShape = fp( aFileName, aFormatName, anError ); - // unload plugin library - UnLoadLib( anImportLib ); + // unload plugin library + //UnLoadLib( anImportLib ); //This is workaround of BUG OCC13051 if ( aShape.IsNull() ) { StdFail_NotDone::Raise(anError.ToCString()); diff --git a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx index fc91fd19c..b079521e8 100644 --- a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -27,19 +27,22 @@ #include #include -#include +//#include +#include +#include #include #include #include +#include +#include #include #include #include #include -#include -#include +#include #include #include @@ -52,50 +55,78 @@ //======================================================================= //function : GetID //purpose : -//======================================================================= +//======================================================================= const Standard_GUID& GEOMImpl_PartitionDriver::GetID() { static Standard_GUID aPartitionDriver("FF1BBB22-5D14-4df2-980B-3A668264EA16"); - return aPartitionDriver; + return aPartitionDriver; } //======================================================================= //function : GEOMImpl_PartitionDriver -//purpose : +//purpose : //======================================================================= -GEOMImpl_PartitionDriver::GEOMImpl_PartitionDriver() +GEOMImpl_PartitionDriver::GEOMImpl_PartitionDriver() { } +//======================================================================= +//function : SimplifyCompound +//purpose : +//======================================================================= +static void PrepareShapes (const TopoDS_Shape& theShape, + Standard_Integer theType, + TopTools_ListOfShape& theSimpleList) +{ + if (theType == PARTITION_NO_SELF_INTERSECTIONS || + theShape.ShapeType() != TopAbs_COMPOUND) { + theSimpleList.Append(theShape); + return; + } + + // explode compound on simple shapes to allow their intersections + TopoDS_Iterator It (theShape, Standard_True, Standard_True); + TopTools_MapOfShape mapShape; + for (; It.More(); It.Next()) { + if (mapShape.Add(It.Value())) { + TopoDS_Shape curSh = It.Value(); + PrepareShapes(curSh, theType, theSimpleList); + } + } +} + //======================================================================= //function : Execute //purpose : -//======================================================================= +//======================================================================= Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const { - if (Label().IsNull()) return 0; + if (Label().IsNull()) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); GEOMImpl_IPartition aCI (aFunction); Standard_Integer aType = aFunction->GetType(); TopoDS_Shape aShape; - NMTAlgo_Splitter1 PS; + //sklNMTAlgo_Splitter1 PS; + GEOMAlgo_Splitter PS; - if (aType == PARTITION_PARTITION) { + if (aType == PARTITION_PARTITION || aType == PARTITION_NO_SELF_INTERSECTIONS) + { Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes(); Handle(TColStd_HSequenceOfTransient) aTools = aCI.GetTools(); Handle(TColStd_HSequenceOfTransient) aKeepIns = aCI.GetKeepIns(); Handle(TColStd_HSequenceOfTransient) aRemIns = aCI.GetRemoveIns(); Handle(TColStd_HArray1OfInteger) aMaterials = aCI.GetMaterials(); - Standard_Boolean DoRemoveWebs = !aMaterials.IsNull(); + //skl Standard_Boolean DoRemoveWebs = !aMaterials.IsNull(); - unsigned int ind, nbshapes = 0; - nbshapes += aShapes->Length() + aTools->Length(); - nbshapes += aKeepIns->Length() + aRemIns->Length(); - - TopTools_MapOfShape ShapesMap(nbshapes), ToolsMap(nbshapes); + unsigned int ind; + //unsigned int ind, nbshapes = 0; + //nbshapes += aShapes->Length() + aTools->Length(); + //nbshapes += aKeepIns->Length() + aRemIns->Length(); + //TopTools_MapOfShape ShapesMap(nbshapes), ToolsMap(nbshapes); + TopTools_MapOfShape ShapesMap, ToolsMap; // add object shapes that are in ListShapes; for (ind = 1; ind <= aShapes->Length(); ind++) { @@ -104,11 +135,18 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const if (aShape_i.IsNull()) { Standard_NullObject::Raise("In Partition a shape is null"); } - if (ShapesMap.Add(aShape_i)) { - PS.AddShape(aShape_i); - if (DoRemoveWebs) { - if (aMaterials->Length() >= ind) - PS.SetMaterial(aShape_i, aMaterials->Value(ind)); + // + TopTools_ListOfShape aSimpleShapes; + PrepareShapes(aShape_i, aType, aSimpleShapes); + TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes); + for (; aSimpleIter.More(); aSimpleIter.Next()) { + const TopoDS_Shape& aSimpleSh = aSimpleIter.Value(); + if (ShapesMap.Add(aSimpleSh)) { + PS.AddShape(aSimpleSh); + //skl if (DoRemoveWebs) { + //skl if (aMaterials->Length() >= ind) + //skl PS.SetMaterial(aSimpleSh, aMaterials->Value(ind)); + //skl } } } } @@ -120,8 +158,16 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const if (aShape_i.IsNull()) { Standard_NullObject::Raise("In Partition a tool shape is null"); } - if (!ShapesMap.Contains(aShape_i) && ToolsMap.Add(aShape_i)) - PS.AddTool(aShape_i); + // + TopTools_ListOfShape aSimpleShapes; + PrepareShapes(aShape_i, aType, aSimpleShapes); + TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes); + for (; aSimpleIter.More(); aSimpleIter.Next()) { + const TopoDS_Shape& aSimpleSh = aSimpleIter.Value(); + if (!ShapesMap.Contains(aSimpleSh) && ToolsMap.Add(aSimpleSh)) { + PS.AddTool(aSimpleSh); + } + } } // add shapes that are in ListKeepInside, as object shapes; @@ -131,8 +177,15 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const if (aShape_i.IsNull()) { Standard_NullObject::Raise("In Partition a Keep Inside shape is null"); } - if (!ToolsMap.Contains(aShape_i) && ShapesMap.Add(aShape_i)) - PS.AddShape(aShape_i); + // + TopTools_ListOfShape aSimpleShapes; + PrepareShapes(aShape_i, aType, aSimpleShapes); + TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes); + for (; aSimpleIter.More(); aSimpleIter.Next()) { + const TopoDS_Shape& aSimpleSh = aSimpleIter.Value(); + if (!ToolsMap.Contains(aSimpleSh) && ShapesMap.Add(aSimpleSh)) + PS.AddShape(aSimpleSh); + } } // add shapes that are in ListRemoveInside, as object shapes; @@ -142,14 +195,24 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const if (aShape_i.IsNull()) { Standard_NullObject::Raise("In Partition a Remove Inside shape is null"); } - if (!ToolsMap.Contains(aShape_i) && ShapesMap.Add(aShape_i)) - PS.AddShape(aShape_i); + // + TopTools_ListOfShape aSimpleShapes; + PrepareShapes(aShape_i, aType, aSimpleShapes); + TopTools_ListIteratorOfListOfShape aSimpleIter (aSimpleShapes); + for (; aSimpleIter.More(); aSimpleIter.Next()) { + const TopoDS_Shape& aSimpleSh = aSimpleIter.Value(); + if (!ToolsMap.Contains(aSimpleSh) && ShapesMap.Add(aSimpleSh)) + PS.AddShape(aSimpleSh); + } } - PS.Compute(); - PS.SetRemoveWebs(DoRemoveWebs); - PS.Build((TopAbs_ShapeEnum) aCI.GetLimit()); + PS.SetLimit( (TopAbs_ShapeEnum)aCI.GetLimit() ); + PS.Perform(); + //skl PS.Compute(); + //skl PS.SetRemoveWebs(!DoRemoveWebs); + //skl PS.Build((TopAbs_ShapeEnum) aCI.GetLimit()); + /*skl // suppress result outside of shapes in KInsideMap for (ind = 1; ind <= aKeepIns->Length(); ind++) { Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aKeepIns->Value(ind)); @@ -163,8 +226,10 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const TopoDS_Shape aShape_i = aRefShape->GetValue(); PS.RemoveShapesInside(aShape_i); } - - } else if (aType == PARTITION_HALF) { + */ + } + else if (aType == PARTITION_HALF) + { Handle(GEOM_Function) aRefShape = aCI.GetShape(); Handle(GEOM_Function) aRefPlane = aCI.GetPlane(); TopoDS_Shape aShapeArg = aRefShape->GetValue(); @@ -180,9 +245,10 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const // add tool shapes that are in ListTools and not in ListShapes; PS.AddTool(aPlaneArg); - PS.Compute(); - PS.SetRemoveWebs(Standard_False); - PS.Build(aShapeArg.ShapeType()); + //skl PS.Compute(); + PS.Perform(); + //PS.SetRemoveWebs(Standard_False); + //PS.Build(aShapeArg.ShapeType()); } else { } @@ -200,6 +266,9 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const TopTools_IndexedMapOfShape aResIndices; TopExp::MapShapes(aShape, aResIndices); + // Map: source_shape/images of source_shape in Result + const TopTools_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult(); + // history for all argument shapes TDF_LabelSequence aLabelSeq; aFunction->GetDependency(aLabelSeq); @@ -222,7 +291,9 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const for (Standard_Integer ie = 1; ie <= nbArgumentEntities; ie++) { TopoDS_Shape anEntity = anArgumentIndices.FindKey(ie); - const TopTools_ListOfShape& aModified = PS.Modified(anEntity); + if (!aMR.Contains(anEntity)) continue; + + const TopTools_ListOfShape& aModified = aMR.FindFromKey(anEntity); Standard_Integer nbModified = aModified.Extent(); if (nbModified > 0) { @@ -230,10 +301,11 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const Handle(TDataStd_IntegerArray) anAttr = TDataStd_IntegerArray::Set(aWhatHistoryLabel, 1, nbModified); + int ih = 1; TopTools_ListIteratorOfListOfShape itM (aModified); - for (int im = 1; itM.More(); itM.Next(), ++im) { + for (; itM.More(); itM.Next(), ++ih) { int id = aResIndices.FindIndex(itM.Value()); - anAttr->SetValue(im, id); + anAttr->SetValue(ih, id); } } } @@ -248,17 +320,17 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const //======================================================================= //function : GEOMImpl_PartitionDriver_Type_ //purpose : -//======================================================================= +//======================================================================= Standard_EXPORT Handle_Standard_Type& GEOMImpl_PartitionDriver_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); + 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_PartitionDriver", @@ -273,7 +345,7 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_PartitionDriver_Type_() //======================================================================= //function : DownCast //purpose : -//======================================================================= +//======================================================================= const Handle(GEOMImpl_PartitionDriver) Handle(GEOMImpl_PartitionDriver)::DownCast(const Handle(Standard_Transient)& AnObject) { Handle(GEOMImpl_PartitionDriver) _anOtherObject; diff --git a/src/GEOMImpl/GEOMImpl_RotateDriver.cxx b/src/GEOMImpl/GEOMImpl_RotateDriver.cxx index f252716aa..94f949129 100644 --- a/src/GEOMImpl/GEOMImpl_RotateDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_RotateDriver.cxx @@ -79,6 +79,7 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const GEOMImpl_IRotate RI(aFunction); gp_Trsf aTrsf; + gp_Pnt aCP, aP1, aP2; Standard_Integer aType = aFunction->GetType(); Handle(GEOM_Function) anOriginalFunction = RI.GetOriginal(); if(anOriginalFunction.IsNull()) return 0; @@ -102,6 +103,31 @@ Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False); aShape = aTransformation.Shape(); } + else if(aType == ROTATE_THREE_POINTS || aType == ROTATE_THREE_POINTS_COPY) { + Handle(GEOM_Function) aCentPoint = RI.GetCentPoint(); + Handle(GEOM_Function) aPoint1 = RI.GetPoint1(); + Handle(GEOM_Function) aPoint2 = RI.GetPoint2(); + if(aCentPoint.IsNull() || aPoint1.IsNull() || aPoint2.IsNull()) return 0; + TopoDS_Shape aCV = aCentPoint->GetValue(); + TopoDS_Shape aV1 = aPoint1->GetValue(); + TopoDS_Shape aV2 = aPoint2->GetValue(); + if(aCV.IsNull() || aCV.ShapeType() != TopAbs_VERTEX) return 0; + if(aV1.IsNull() || aV1.ShapeType() != TopAbs_VERTEX) return 0; + if(aV2.IsNull() || aV2.ShapeType() != TopAbs_VERTEX) return 0; + + aCP = BRep_Tool::Pnt(TopoDS::Vertex(aCV)); + aP1 = BRep_Tool::Pnt(TopoDS::Vertex(aV1)); + aP2 = BRep_Tool::Pnt(TopoDS::Vertex(aV2)); + + gp_Vec aVec1(aCP, aP1); + gp_Vec aVec2(aCP, aP2); + gp_Dir aDir(aVec1 ^ aVec2); + gp_Ax1 anAx1(aCP, aDir); + Standard_Real anAngle = aVec1.Angle(aVec2); + aTrsf.SetRotation(anAx1, anAngle); + BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False); + aShape = aTransformation.Shape(); + } else if(aType == ROTATE_1D) { //Get direction Handle(GEOM_Function) anAxis = RI.GetAxis(); diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index 019ad172b..dc199ffee 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -170,8 +170,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const if (!MW.IsDone()) { Standard_ConstructionError::Raise("Wire construction failed"); } - //W = TopoDS::Wire(aShapeBase); - W = MW; + W = MW; } else { Standard_NullObject::Raise @@ -189,17 +188,30 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const Standard_ConstructionError::Raise("No wires given"); } - // first wire + // first wire or edge Handle(GEOM_Function) aRefWire = Handle(GEOM_Function)::DownCast(aShapes->Value(1)); TopoDS_Shape aWire = aRefWire->GetValue(); - if (aWire.IsNull() || aWire.ShapeType() != TopAbs_WIRE) { - Standard_NullObject::Raise("Shape for face construction is null or not a wire"); + if (aWire.IsNull()) Standard_NullObject::Raise("Argument Shape is null"); + TopoDS_Wire W1; + if(aWire.ShapeType() == TopAbs_WIRE) { + W1 = TopoDS::Wire(aWire); + } + else if(aWire.ShapeType() == TopAbs_EDGE && aWire.Closed()) { + BRepBuilderAPI_MakeWire MW; + MW.Add(TopoDS::Edge(aWire)); + if (!MW.IsDone()) { + Standard_ConstructionError::Raise("Wire construction failed"); + } + W1 = MW; + } + else { + Standard_NullObject::Raise + ("Shape for face construction is neither a wire nor closed edge"); } - TopoDS_Wire W = TopoDS::Wire(aWire); // basic face TopoDS_Shape FFace; - GEOMImpl_Block6Explorer::MakeFace(W, aCI.GetIsPlanar(), FFace); + GEOMImpl_Block6Explorer::MakeFace(W1, aCI.GetIsPlanar(), FFace); if (FFace.IsNull()) { Standard_ConstructionError::Raise("Face construction failed"); } @@ -221,11 +233,24 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const Handle(GEOM_Function) aRefWire_i = Handle(GEOM_Function)::DownCast(aShapes->Value(ind)); TopoDS_Shape aWire_i = aRefWire_i->GetValue(); - if (aWire_i.IsNull() || aWire_i.ShapeType() != TopAbs_WIRE) { - Standard_NullObject::Raise("Shape for face construction is null or not a wire"); - } - - FR.Add(TopoDS::Wire(aWire_i)); + if (aWire_i.IsNull()) Standard_NullObject::Raise("Argument Shape is null"); + TopoDS_Wire W_i; + if(aWire_i.ShapeType() == TopAbs_WIRE) { + W_i = TopoDS::Wire(aWire_i); + } + else if(aWire_i.ShapeType() == TopAbs_EDGE && aWire_i.Closed()) { + BRepBuilderAPI_MakeWire MW1; + MW1.Add(TopoDS::Edge(aWire_i)); + if (!MW1.IsDone()) { + Standard_ConstructionError::Raise("Wire construction failed"); + } + W_i = MW1; + } + else { + Standard_NullObject::Raise + ("Shape for face construction is neither a wire nor closed edges"); + } + FR.Add(W_i); } FR.Perform(); diff --git a/src/GEOMImpl/GEOMImpl_Types.hxx b/src/GEOMImpl/GEOMImpl_Types.hxx index cc0ebb563..c1c516fb7 100755 --- a/src/GEOMImpl/GEOMImpl_Types.hxx +++ b/src/GEOMImpl/GEOMImpl_Types.hxx @@ -115,10 +115,12 @@ #define TRANSLATE_XYZ 7 #define TRANSLATE_XYZ_COPY 8 -#define ROTATE 1 -#define ROTATE_COPY 2 -#define ROTATE_1D 3 -#define ROTATE_2D 4 +#define ROTATE 1 +#define ROTATE_COPY 2 +#define ROTATE_1D 3 +#define ROTATE_2D 4 +#define ROTATE_THREE_POINTS 5 +#define ROTATE_THREE_POINTS_COPY 6 #define MIRROR_PLANE 1 #define MIRROR_PLANE_COPY 2 @@ -171,6 +173,7 @@ #define PARTITION_PARTITION 1 #define PARTITION_HALF 2 +#define PARTITION_NO_SELF_INTERSECTIONS 3 #define POLYLINE_POINTS 1 diff --git a/src/GEOMImpl/Makefile.in b/src/GEOMImpl/Makefile.in index 73061a42c..0e6263654 100644 --- a/src/GEOMImpl/Makefile.in +++ b/src/GEOMImpl/Makefile.in @@ -109,7 +109,8 @@ EXPORT_HEADERS= GEOMImpl_Gen.hxx \ GEOMImpl_IMeasureOperations.hxx \ GEOMImpl_IGroupOperations.hxx \ GEOMImpl_CopyDriver.hxx \ - GEOMImpl_Types.hxx + GEOMImpl_Types.hxx \ + GEOM_GEOMImpl.hxx # additionnal information to compil and link file CPPFLAGS += $(OCC_INCLUDES) $(KERNEL_CXXFLAGS) $(BOOST_CPPFLAGS) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index c18dc6c65..1e9479c1c 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -249,8 +249,8 @@ void GEOMToolsGUI::OnEditDelete() // VSR 17/11/04: check if all objects selected belong to GEOM component --> start // modifications of ASV 01.06.05 QString parentComp = getParentComponent( aStudy, selected ); - const char* geomIOR = app->orb()->object_to_string( GeometryGUI::GetGeomGen() ); - QString geomComp = getParentComponent( aStudy->FindObjectIOR( geomIOR ) ); + CORBA::String_var geomIOR = app->orb()->object_to_string( GeometryGUI::GetGeomGen() ); + QString geomComp = getParentComponent( aStudy->FindObjectIOR( geomIOR.in() ) ); if ( parentComp != geomComp ) { SUIT_MessageBox::warn1 ( app->desktop(), @@ -288,6 +288,10 @@ void GEOMToolsGUI::OnEditDelete() _PTR(GenericAttribute) anAttr; GEOM_Displayer* disp = new GEOM_Displayer( appStudy ); + _PTR(SComponent) aGeom ( aStudy->FindComponent("GEOM") ); + if ( !aGeom ) + return; + // MAIN LOOP OF SELECTED OBJECTS for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { @@ -301,6 +305,18 @@ void GEOMToolsGUI::OnEditDelete() if ( !strcmp( obj->GetIOR().c_str(), geomIOR ) ) continue; + //If the object has been used to create another one,then it can't be deleted + _PTR(ChildIterator) it (aStudy->NewChildIterator(aGeom)); + for ( it->InitEx( true ); it->More(); it->Next() ) { + _PTR(SObject) chobj (it->Value()); + if(CheckSubObjectInUse(chobj, obj, aStudy)) return; + //check subobjects + for (_PTR(ChildIterator) it (aStudy->NewChildIterator(obj)); it->More(); it->Next()) { + _PTR(SObject) child (it->Value()); + if(CheckSubObjectInUse( chobj, child, aStudy)) return; + } + } + RemoveObjectWithChildren(obj, aStudy, views, disp); // Remove objects from Study @@ -654,14 +670,45 @@ void GEOMToolsGUI::RemoveObjectWithChildren(_PTR(SObject) obj, } } +//===================================================================================== +// function : CheckSubObjectInUse +// purpose : to be used by OnEditDelete() method +//===================================================================================== +bool GEOMToolsGUI::CheckSubObjectInUse(_PTR(SObject) checkobj, + _PTR(SObject) remobj, + _PTR(Study) aStudy) +{ + CORBA::Object_var corbaObj = GeometryGUI::ClientSObjectToObject(checkobj); + GEOM::GEOM_Object_var geomObj = GEOM::GEOM_Object::_narrow( corbaObj ); + if( CORBA::is_nil(geomObj) ) + return false; + + GEOM::ListOfGO_var list = geomObj->GetDependency(); + if( list->length() > 1 ) + for(int i = 0; i < list->length(); i++ ){ + CORBA::Object_var corbaObj_rem = GeometryGUI::ClientSObjectToObject(remobj); + GEOM::GEOM_Object_var geomObj_rem = GEOM::GEOM_Object::_narrow( corbaObj_rem ); + if( list[i]->_is_equivalent( geomObj_rem ) ){ + SalomeApp_Application* app = + dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() ); + + SUIT_MessageBox::warn1 ( app->desktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("DEP_OBJECT"), + QObject::tr("BUT_OK") ); + return true; + } + } + + return false; +} + //===================================================================================== // EXPORTED METHODS //===================================================================================== extern "C" { -#ifdef WNT - __declspec( dllexport ) -#endif +GEOMTOOLSGUI_EXPORT GEOMGUI* GetLibGUI( GeometryGUI* parent ) { return new GEOMToolsGUI( parent ); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.h b/src/GEOMToolsGUI/GEOMToolsGUI.h index f5829ecfd..c2c9344d5 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI.h @@ -29,6 +29,8 @@ #ifndef GEOMTOOLSGUI_H #define GEOMTOOLSGUI_H +#include "GEOM_ToolsGUI.hxx" + #include "GEOMGUI.h" #include "GEOM_Displayer.h" @@ -41,17 +43,11 @@ #include -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define GEOMTOOLSGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define GEOMTOOLSGUI_WNT_EXPORT -#endif - //================================================================================= // class : GEOMToolsGUI // purpose : //================================================================================= -class GEOMTOOLSGUI_WNT_EXPORT GEOMToolsGUI : public GEOMGUI +class GEOMTOOLSGUI_EXPORT GEOMToolsGUI : public GEOMGUI { public : GEOMToolsGUI( GeometryGUI* ); // hide constructor to avoid direct creation @@ -89,6 +85,12 @@ private: _PTR(Study) aStudy, QPtrList views, GEOM_Displayer* disp); + + //checks if the object passed as the first argument depends on the second arguments + bool CheckSubObjectInUse(_PTR(SObject) checkobj, + _PTR(SObject) remobj, + _PTR(Study) aStudy); + }; #endif diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx index 33c24e211..05c9d39ab 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx @@ -171,9 +171,15 @@ void GEOMToolsGUI_NbIsosDlg::ClickOnHelp() app->onHelpContextModule(aGeomGUI ? app->moduleName(aGeomGUI->moduleName()) : QString(""), myHelpFileName); } else { + QString platform; +#ifdef WIN32 + platform = "winapplication"; +#else + platform = "application"; +#endif SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName), + arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), QObject::tr("BUT_OK")); } } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h index 9df309039..e93b1ded3 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h @@ -29,6 +29,8 @@ #ifndef GEOMTOOLSGUI_NBISOSDLG_H #define GEOMTOOLSGUI_NBISOSDLG_H +#include "GEOM_ToolsGUI.hxx" + #include class QSpinBox; @@ -37,7 +39,7 @@ class QSpinBox; // class : GEOMToolsGUI_NbIsosDlg // purpose : //================================================================================= -class GEOMToolsGUI_NbIsosDlg : public QDialog +class GEOMTOOLSGUI_EXPORT GEOMToolsGUI_NbIsosDlg : public QDialog { Q_OBJECT @@ -51,12 +53,12 @@ public: void setU( const int ); void setV( const int ); +private slots: + void ClickOnHelp(); + private: void keyPressEvent(QKeyEvent*); -private slots: - void ClickOnHelp(); - private: QSpinBox* SpinBoxU; QSpinBox* SpinBoxV; diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index d12ccf7a6..7e7151a6c 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -198,9 +198,15 @@ void GEOMToolsGUI_TransparencyDlg::ClickOnHelp() app->onHelpContextModule(aGeomGUI ? app->moduleName(aGeomGUI->moduleName()) : QString(""), myHelpFileName); } else { + QString platform; +#ifdef WIN32 + platform = "winapplication"; +#else + platform = "application"; +#endif SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName), + arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), QObject::tr("BUT_OK")); } } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h index 44e6bda83..0b7aa869c 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h @@ -29,12 +29,10 @@ #ifndef DIALOGBOX_TRANSPARENCYDLG_H #define DIALOGBOX_TRANSPARENCYDLG_H +#include "GEOM_ToolsGUI.hxx" + #include -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define GEOMTOOLSGUI_WNT_EXPORT __declspec( dllexport ) -#else -#define GEOMTOOLSGUI_WNT_EXPORT -#endif + class QSlider; //================================================================================= @@ -42,7 +40,7 @@ class QSlider; // purpose : // : WARNING : that is a MODAL dialog. //================================================================================= -class GEOMTOOLSGUI_WNT_EXPORT GEOMToolsGUI_TransparencyDlg : public QDialog +class GEOMTOOLSGUI_EXPORT GEOMToolsGUI_TransparencyDlg : public QDialog { Q_OBJECT diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 7ddbe46c9..2ae6d0a59 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -68,18 +68,23 @@ GEOM_Gen_i::GEOM_Gen_i(CORBA::ORB_ptr orb, _impl = new ::GEOMImpl_Gen; - //work around PAL12004, PAL12628 - //OSD::SetSignal( true ); - bool raiseFPE; + //PAL10867: disable signals catching with "noexcepthandler" option + char* envNoCatchSignals = getenv("NOT_INTERCEPT_SIGNALS"); + if (!envNoCatchSignals || !atoi(envNoCatchSignals)) + { + //work around PAL12004, PAL12628 + //OSD::SetSignal( true ); + bool raiseFPE; #ifdef _DEBUG_ - raiseFPE = true; - char* envDisableFPE = getenv("DISABLE_FPE"); - if (envDisableFPE && atoi(envDisableFPE)) - raiseFPE = false; + raiseFPE = true; + char* envDisableFPE = getenv("DISABLE_FPE"); + if (envDisableFPE && atoi(envDisableFPE)) + raiseFPE = false; #else - raiseFPE = false; + raiseFPE = false; #endif - OSD::SetSignal( raiseFPE ); + OSD::SetSignal( raiseFPE ); + } } //============================================================================ @@ -103,7 +108,7 @@ char* GEOM_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, { GEOM::GEOM_Object_var anObject = GEOM::GEOM_Object::_narrow(_orb->string_to_object(IORString)); if (!CORBA::is_nil(anObject)) { - return strdup(anObject->GetEntry()); + return CORBA::string_dup(anObject->GetEntry()); } return 0; } @@ -128,7 +133,7 @@ char* GEOM_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, GEOM::GEOM_Object_var obj = GetObject(anObject->GetDocID(), anEntry.ToCString()); CORBA::String_var aPersRefString = _orb->object_to_string(obj); - return strdup(aPersRefString); + return CORBA::string_dup(aPersRefString); } //============================================================================ @@ -182,8 +187,10 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, } anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeIOR"); SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - char *aGeomObjIOR = _orb->object_to_string(theObject); - anIOR->SetValue(strdup(aGeomObjIOR)); + //char *aGeomObjIOR = _orb->object_to_string(theObject); + CORBA::String_var aGeomObjIOR = _orb->object_to_string(theObject); + //anIOR->SetValue(CORBA::string_dup(aGeomObjIOR)); + anIOR->SetValue(aGeomObjIOR); anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributePixMap"); SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); @@ -238,7 +245,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, aShapeName = "Vertex_"; } //if (strlen(theName) == 0) aShapeName += TCollection_AsciiString(aResultSO->Tag()); - //else aShapeName = TCollection_AsciiString(strdup(theName)); + //else aShapeName = TCollection_AsciiString(CORBA::string_dup(theName)); // asv : 11.11.04 Introducing a more sofisticated method of name creation, just as // it is done in GUI in GEOMBase::GetDefaultName() - not just add a Tag() == number @@ -256,7 +263,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, aShapeName = aNewShapeName; } else // MOST PROBABLY CALLED FROM GEOM GUI (ALREADY WITH VALID NAME) - aShapeName = TCollection_AsciiString(strdup(theName)); + aShapeName = TCollection_AsciiString((char*)theName); //Set the study entry as a name of the published GEOM_Object aShape->SetStudyEntry(aResultSO->GetID()); @@ -348,7 +355,7 @@ CORBA::Boolean GEOM_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true); SALOMEDS::Study_var Study = theComponent->GetStudy(); - TCollection_AsciiString name( strdup(Study->Name()) ); + TCollection_AsciiString name (Study->Name()); return true; } @@ -463,10 +470,14 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream, TDF_Tool::Entry(anObj->GetEntry(), anEntry); GEOM::GEOM_Object_var obj = GetObject(anObj->GetDocID(), anEntry.ToCString()); + //Set the study entry of the published GEOM_Object + obj->SetStudyEntry(aNewSO->GetID()); + // Add IORAttribute to the Study and set IOR of the created GEOM_Object to it SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aNewSO, "AttributeIOR"); SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - anIOR->SetValue(_orb->object_to_string(obj)); + CORBA::String_var objStr = _orb->object_to_string(obj); + anIOR->SetValue(objStr.in()); // Return the created in the Study SObject return aNewSO._retn(); @@ -478,7 +489,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream, //============================================================================ char* GEOM_Gen_i::ComponentDataType() { - return strdup("GEOM"); + return CORBA::string_dup("GEOM"); } //============================================================================ @@ -491,11 +502,11 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy(SALOMEDS::Study_ptr theStudy, GEOM: if(theObject->_is_nil() || theStudy->_is_nil()) return aResultSO; SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); - char* IOR; + CORBA::String_var IOR; if(!theFather->_is_nil()) { IOR = _orb->object_to_string(theFather); - SALOMEDS::SObject_var aFatherSO = theStudy->FindObjectIOR(IOR); + SALOMEDS::SObject_var aFatherSO = theStudy->FindObjectIOR(IOR.in()); if(aFatherSO->_is_nil()) return aResultSO._retn(); aResultSO = aStudyBuilder->NewObject(aFatherSO); //aStudyBuilder->Addreference(aResultSO, aResultSO); @@ -513,7 +524,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy(SALOMEDS::Study_ptr theStudy, GEOM: GEOM::GEOM_Object_var anObject = aList[i]; if(anObject->_is_nil()) continue; IOR = _orb->object_to_string(anObject); - SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(IOR); + SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(IOR.in()); if(aSO->_is_nil()) continue; SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(aResultSO); aStudyBuilder->Addreference(aSubSO, aSO); @@ -529,7 +540,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy(SALOMEDS::Study_ptr theStudy, GEOM: void GEOM_Gen_i::register_name(char * name) { GEOM::GEOM_Gen_ptr g = GEOM::GEOM_Gen::_narrow(_this()); - name_service->Register(g, strdup(name)); + name_service->Register(g, CORBA::string_dup(name)); } //============================================================================ @@ -871,8 +882,9 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::GetObject (CORBA::Long theStudyID, const char* GEOM_Object_i* servant = new GEOM_Object_i (_poa, engine, handle_object); obj = servant->_this(); - stringIOR = _orb->object_to_string(obj); - handle_object->SetIOR(stringIOR); + CORBA::String_var objStr = _orb->object_to_string(obj); + TCollection_AsciiString anAscii( (char *)objStr.in() ); + handle_object->SetIOR( anAscii ); return obj._retn(); } @@ -882,9 +894,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::GetObject (CORBA::Long theStudyID, const char* //===================================================================================== extern "C" { -#ifdef WNT - __declspec( dllexport ) -#endif +GEOM_I_EXPORT PortableServer::ObjectId * GEOMEngine_factory(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId * contId, diff --git a/src/GEOM_I/GEOM_Gen_i.hh b/src/GEOM_I/GEOM_Gen_i.hh index c00407e4e..30188801f 100644 --- a/src/GEOM_I/GEOM_Gen_i.hh +++ b/src/GEOM_I/GEOM_Gen_i.hh @@ -20,6 +20,8 @@ #ifndef __GEOM_GEN_I_H__ #define __GEOM_GEN_I_H__ +#include "GEOM_GEOM_I.hxx" + #include "GEOMImpl_Gen.hxx" // IDL headers @@ -52,7 +54,7 @@ //===================================================================== // GEOM_Gen_i : class definition //===================================================================== -class GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual public Engines_Component_i +class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual public Engines_Component_i { public: diff --git a/src/GEOM_I/GEOM_I3DPrimOperations_i.hh b/src/GEOM_I/GEOM_I3DPrimOperations_i.hh index 97c6f16cb..8ce0c55a4 100644 --- a/src/GEOM_I/GEOM_I3DPrimOperations_i.hh +++ b/src/GEOM_I/GEOM_I3DPrimOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_I3DPrimOperations_i_HeaderFile #define _GEOM_I3DPrimOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOMImpl_I3DPrimOperations.hxx" -class GEOM_I3DPrimOperations_i : +class GEOM_I_EXPORT GEOM_I3DPrimOperations_i : public virtual POA_GEOM::GEOM_I3DPrimOperations, public virtual GEOM_IOperations_i { diff --git a/src/GEOM_I/GEOM_IBasicOperations_i.hh b/src/GEOM_I/GEOM_IBasicOperations_i.hh index 23ca696e7..9a54e2b96 100644 --- a/src/GEOM_I/GEOM_IBasicOperations_i.hh +++ b/src/GEOM_I/GEOM_IBasicOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_IBasicOperations_i_HeaderFile #define _GEOM_IBasicOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOMImpl_IBasicOperations.hxx" -class GEOM_IBasicOperations_i : +class GEOM_I_EXPORT GEOM_IBasicOperations_i : public virtual POA_GEOM::GEOM_IBasicOperations, public virtual GEOM_IOperations_i { diff --git a/src/GEOM_I/GEOM_IBlocksOperations_i.hh b/src/GEOM_I/GEOM_IBlocksOperations_i.hh index 4cb18b9ab..701b374dc 100644 --- a/src/GEOM_I/GEOM_IBlocksOperations_i.hh +++ b/src/GEOM_I/GEOM_IBlocksOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_IBlocksOperations_i_HeaderFile #define _GEOM_IBlocksOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOMImpl_IBlocksOperations.hxx" -class GEOM_IBlocksOperations_i : +class GEOM_I_EXPORT GEOM_IBlocksOperations_i : public virtual POA_GEOM::GEOM_IBlocksOperations, public virtual GEOM_IOperations_i { diff --git a/src/GEOM_I/GEOM_IBooleanOperations_i.cc b/src/GEOM_I/GEOM_IBooleanOperations_i.cc index 56726b072..c7a594259 100644 --- a/src/GEOM_I/GEOM_IBooleanOperations_i.cc +++ b/src/GEOM_I/GEOM_IBooleanOperations_i.cc @@ -1,22 +1,23 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 "GEOM_IBooleanOperations_i.hh" @@ -57,7 +58,7 @@ GEOM_IBooleanOperations_i::~GEOM_IBooleanOperations_i() /*! * MakeBoolean */ -//============================================================================= +//============================================================================= GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1, GEOM::GEOM_Object_ptr theShape2, @@ -90,14 +91,14 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeBoolean /*! * MakePartition */ -//============================================================================= +//============================================================================= GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition (const GEOM::ListOfGO& theShapes, const GEOM::ListOfGO& theTools, const GEOM::ListOfGO& theKeepIns, const GEOM::ListOfGO& theRemoveIns, - const CORBA::Short theLimit, - const CORBA::Boolean theRemoveWebs, + CORBA::Short theLimit, + CORBA::Boolean theRemoveWebs, const GEOM::ListOfLong& theMaterials) { GEOM::GEOM_Object_var aGEOMObject; @@ -164,7 +165,94 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition // Make Partition Handle(GEOM_Object) anObject = GetOperations()->MakePartition(aShapes, aTools, aKeepIns, aRemIns, - theLimit, theRemoveWebs, aMaterials); + theLimit, theRemoveWebs, aMaterials, + /*PerformSelfIntersections*/Standard_True); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakePartitionNonSelfIntersectedShape + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartitionNonSelfIntersectedShape + (const GEOM::ListOfGO& theShapes, + const GEOM::ListOfGO& theTools, + const GEOM::ListOfGO& theKeepIns, + const GEOM::ListOfGO& theRemoveIns, + CORBA::Short theLimit, + CORBA::Boolean theRemoveWebs, + const GEOM::ListOfLong& theMaterials) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + int ind, aLen; + Handle(TColStd_HSequenceOfTransient) aShapes = new TColStd_HSequenceOfTransient; + Handle(TColStd_HSequenceOfTransient) aTools = new TColStd_HSequenceOfTransient; + Handle(TColStd_HSequenceOfTransient) aKeepIns = new TColStd_HSequenceOfTransient; + Handle(TColStd_HSequenceOfTransient) aRemIns = new TColStd_HSequenceOfTransient; + Handle(TColStd_HArray1OfInteger) aMaterials; + + //Get the shapes + aLen = theShapes.length(); + for (ind = 0; ind < aLen; ind++) { + if (theShapes[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theShapes[ind]->GetStudyID(), theShapes[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aShapes->Append(aSh); + } + + //Get the tools + aLen = theTools.length(); + for (ind = 0; ind < aLen; ind++) { + if (theTools[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theTools[ind]->GetStudyID(), theTools[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aTools->Append(aSh); + } + + //Get the keep inside shapes + aLen = theKeepIns.length(); + for (ind = 0; ind < aLen; ind++) { + if (theKeepIns[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theKeepIns[ind]->GetStudyID(), theKeepIns[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aKeepIns->Append(aSh); + } + + //Get the remove inside shapes + aLen = theRemoveIns.length(); + for (ind = 0; ind < aLen; ind++) { + if (theRemoveIns[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theRemoveIns[ind]->GetStudyID(), theRemoveIns[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aRemIns->Append(aSh); + } + + //Get the materials + aLen = theMaterials.length(); + if ( aLen ) { + aMaterials = new TColStd_HArray1OfInteger (1, aLen); + for (ind = 0; ind < aLen; ind++) { + aMaterials->SetValue(ind+1, theMaterials[ind]); + } + } + + // Make Partition + Handle(GEOM_Object) anObject = + GetOperations()->MakePartition(aShapes, aTools, aKeepIns, aRemIns, + theLimit, theRemoveWebs, aMaterials, + /*PerformSelfIntersections*/Standard_False); if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn(); @@ -175,7 +263,7 @@ GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition /*! * MakeHalfPartition */ -//============================================================================= +//============================================================================= GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr thePlane) diff --git a/src/GEOM_I/GEOM_IBooleanOperations_i.hh b/src/GEOM_I/GEOM_IBooleanOperations_i.hh index 8a70bb33d..52e597ed4 100644 --- a/src/GEOM_I/GEOM_IBooleanOperations_i.hh +++ b/src/GEOM_I/GEOM_IBooleanOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_IBooleanOperations_i_HeaderFile #define _GEOM_IBooleanOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOMImpl_IBooleanOperations.hxx" -class GEOM_IBooleanOperations_i : +class GEOM_I_EXPORT GEOM_IBooleanOperations_i : public virtual POA_GEOM::GEOM_IBooleanOperations, public virtual GEOM_IOperations_i { @@ -47,10 +48,18 @@ class GEOM_IBooleanOperations_i : const GEOM::ListOfGO& theTools, const GEOM::ListOfGO& theKeepInside, const GEOM::ListOfGO& theRemoveInside, - CORBA::Short theLimit, - CORBA::Boolean theRemoveWebs, + CORBA::Short theLimit, + CORBA::Boolean theRemoveWebs, const GEOM::ListOfLong& theMaterials); + GEOM::GEOM_Object_ptr MakePartitionNonSelfIntersectedShape (const GEOM::ListOfGO& theShapes, + const GEOM::ListOfGO& theTools, + const GEOM::ListOfGO& theKeepInside, + const GEOM::ListOfGO& theRemoveInside, + CORBA::Short theLimit, + CORBA::Boolean theRemoveWebs, + const GEOM::ListOfLong& theMaterials); + GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr thePlane); diff --git a/src/GEOM_I/GEOM_ICurvesOperations_i.hh b/src/GEOM_I/GEOM_ICurvesOperations_i.hh index a22a595ea..e5c0b0fc0 100644 --- a/src/GEOM_I/GEOM_ICurvesOperations_i.hh +++ b/src/GEOM_I/GEOM_ICurvesOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_ICurvesOperations_i_HeaderFile #define _GEOM_ICurvesOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOMImpl_ICurvesOperations.hxx" -class GEOM_ICurvesOperations_i : +class GEOM_I_EXPORT GEOM_ICurvesOperations_i : public virtual POA_GEOM::GEOM_ICurvesOperations, public virtual GEOM_IOperations_i { diff --git a/src/GEOM_I/GEOM_IGroupOperations_i.hh b/src/GEOM_I/GEOM_IGroupOperations_i.hh index ec0945dd9..505f16ee4 100644 --- a/src/GEOM_I/GEOM_IGroupOperations_i.hh +++ b/src/GEOM_I/GEOM_IGroupOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_IGroupOperations_i_HeaderFile #define _GEOM_IGroupOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOMImpl_IGroupOperations.hxx" -class GEOM_IGroupOperations_i : +class GEOM_I_EXPORT GEOM_IGroupOperations_i : public virtual POA_GEOM::GEOM_IGroupOperations, public virtual GEOM_IOperations_i { diff --git a/src/GEOM_I/GEOM_IHealingOperations_i.hh b/src/GEOM_I/GEOM_IHealingOperations_i.hh index ca859dc50..1b3f45118 100644 --- a/src/GEOM_I/GEOM_IHealingOperations_i.hh +++ b/src/GEOM_I/GEOM_IHealingOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_IHealingOperations_i_HeaderFile #define _GEOM_IHealingOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -33,7 +34,7 @@ #include #include -class GEOM_IHealingOperations_i : +class GEOM_I_EXPORT GEOM_IHealingOperations_i : public virtual POA_GEOM::GEOM_IHealingOperations, public virtual GEOM_IOperations_i { diff --git a/src/GEOM_I/GEOM_IInsertOperations_i.hh b/src/GEOM_I/GEOM_IInsertOperations_i.hh index 1db51fbde..bd0941f4f 100644 --- a/src/GEOM_I/GEOM_IInsertOperations_i.hh +++ b/src/GEOM_I/GEOM_IInsertOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_IInsertOperations_i_HeaderFile #define _GEOM_IInsertOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOMImpl_IInsertOperations.hxx" -class GEOM_IInsertOperations_i : +class GEOM_I_EXPORT GEOM_IInsertOperations_i : public virtual POA_GEOM::GEOM_IInsertOperations, public virtual GEOM_IOperations_i { diff --git a/src/GEOM_I/GEOM_ILocalOperations_i.hh b/src/GEOM_I/GEOM_ILocalOperations_i.hh index 709c75b12..c8f4a6565 100644 --- a/src/GEOM_I/GEOM_ILocalOperations_i.hh +++ b/src/GEOM_I/GEOM_ILocalOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_ILocalOperations_i_HeaderFile #define _GEOM_ILocalOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOMImpl_ILocalOperations.hxx" -class GEOM_ILocalOperations_i : +class GEOM_I_EXPORT GEOM_ILocalOperations_i : public virtual POA_GEOM::GEOM_ILocalOperations, public virtual GEOM_IOperations_i { diff --git a/src/GEOM_I/GEOM_IMeasureOperations_i.hh b/src/GEOM_I/GEOM_IMeasureOperations_i.hh index f14a62236..39c495774 100644 --- a/src/GEOM_I/GEOM_IMeasureOperations_i.hh +++ b/src/GEOM_I/GEOM_IMeasureOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_IMeasureOperations_i_HeaderFile #define _GEOM_IMeasureOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOMImpl_IMeasureOperations.hxx" -class GEOM_IMeasureOperations_i : +class GEOM_I_EXPORT GEOM_IMeasureOperations_i : public virtual POA_GEOM::GEOM_IMeasureOperations, public virtual GEOM_IOperations_i { diff --git a/src/GEOM_I/GEOM_IOperations_i.cc b/src/GEOM_I/GEOM_IOperations_i.cc index 56890701c..89b7fc5f8 100644 --- a/src/GEOM_I/GEOM_IOperations_i.cc +++ b/src/GEOM_I/GEOM_IOperations_i.cc @@ -38,7 +38,6 @@ GEOM_IOperations_i::GEOM_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOM_IOperations* theImpl) :SALOME::GenericObj_i( thePOA ), _impl(theImpl), _engine(theEngine) { - thePOA->activate_object(this); } //============================================================================= diff --git a/src/GEOM_I/GEOM_IOperations_i.hh b/src/GEOM_I/GEOM_IOperations_i.hh index 7d7349f8c..9ad5fca9a 100644 --- a/src/GEOM_I/GEOM_IOperations_i.hh +++ b/src/GEOM_I/GEOM_IOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_IOperations_i_HeaderFile #define _GEOM_IOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOM_Object_i.hh" #include "GEOM_Object.hxx" -class GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperations, public virtual SALOME::GenericObj_i +class GEOM_I_EXPORT GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperations, public virtual SALOME::GenericObj_i { public: GEOM_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOM_IOperations* theImpl); diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.cc b/src/GEOM_I/GEOM_IShapesOperations_i.cc index e26bc84ce..b9893fd9c 100644 --- a/src/GEOM_I/GEOM_IShapesOperations_i.cc +++ b/src/GEOM_I/GEOM_IShapesOperations_i.cc @@ -706,6 +706,49 @@ GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnPlane return aSeq._retn(); } +//============================================================================= +/*! + * GetShapesOnPlaneWithLocation + */ +//============================================================================= +GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocation + (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + GEOM::GEOM_Object_ptr theAx1, + GEOM::GEOM_Object_ptr thePnt, + const GEOM::shape_state theState) +{ + GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject + (theAx1->GetStudyID(), theAx1->GetEntry()); + Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject + (thePnt->GetStudyID(), thePnt->GetEntry()); + + if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn(); + + //Get Shapes On Plane + Handle(TColStd_HSequenceOfTransient) aHSeq = + GetOperations()->GetShapesOnPlaneWithLocation(aShape, theShapeType, anAx1, anPnt, ShapeState(theState)); + if (!GetOperations()->IsDone() || aHSeq.IsNull()) + return aSeq._retn(); + + Standard_Integer aLength = aHSeq->Length(); + aSeq->length(aLength); + for (Standard_Integer i = 1; i <= aLength; i++) + aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i))); + + return aSeq._retn(); +} + //============================================================================= /*! * GetShapesOnCylinder @@ -889,6 +932,49 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnPlaneIDs return aSeq._retn(); } +//============================================================================= +/*! + * GetShapesOnPlaneWithLocationIDs + */ +//============================================================================= +GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocationIDs + (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + GEOM::GEOM_Object_ptr theAx1, + GEOM::GEOM_Object_ptr thePnt, + const GEOM::shape_state theState) +{ + GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject + (theAx1->GetStudyID(), theAx1->GetEntry()); + Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject + (thePnt->GetStudyID(), thePnt->GetEntry()); + + if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn(); + + //Get Shapes On Plane + Handle(TColStd_HSequenceOfInteger) aHSeq = + GetOperations()->GetShapesOnPlaneWithLocationIDs(aShape, theShapeType, anAx1, anPnt, ShapeState(theState)); + if (!GetOperations()->IsDone() || aHSeq.IsNull()) + return aSeq._retn(); + + Standard_Integer aLength = aHSeq->Length(); + aSeq->length(aLength); + for (Standard_Integer i = 1; i <= aLength; i++) + aSeq[i-1] = aHSeq->Value(i); + + return aSeq._retn(); +} + //============================================================================= /*! * GetShapesOnCylinderIDs @@ -1032,6 +1118,90 @@ GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnQuadrangleIDs return aSeq._retn(); } +//============================================================================= +/*! + * GetShapesOnBox + */ +//============================================================================= +GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnBox + (GEOM::GEOM_Object_ptr theBox, + GEOM::GEOM_Object_ptr theShape, + CORBA::Long theShapeType, + GEOM::shape_state theState) +{ + GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if ( theShape == NULL || theBox == NULL ) + return aSeq._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aBox = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theBox->GetEntry()); + + if (aShape.IsNull() || aBox.IsNull() ) + return aSeq._retn(); + + //Get Shapes On Box + Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->GetShapesOnBox + (aBox,aShape, theShapeType,ShapeState(theState)); + if (!GetOperations()->IsDone() || aHSeq.IsNull()) + return aSeq._retn(); + + Standard_Integer aLength = aHSeq->Length(); + aSeq->length(aLength); + for (Standard_Integer i = 1; i <= aLength; i++) + aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i))); + + return aSeq._retn(); +} + +//============================================================================= +/*! + * GetShapesOnQuadrangleIDs + */ +//============================================================================= +GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnBoxIDs + (GEOM::GEOM_Object_ptr theBox, + GEOM::GEOM_Object_ptr theShape, + CORBA::Long theShapeType, + GEOM::shape_state theState) +{ + GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if ( theShape == NULL || theBox == NULL ) + return aSeq._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aBox = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theBox->GetEntry()); + + if (aShape.IsNull() || aBox.IsNull() ) + return aSeq._retn(); + + //Get Shapes On Box + Handle(TColStd_HSequenceOfInteger) aHSeq = GetOperations()->GetShapesOnBoxIDs + (aBox,aShape, theShapeType,ShapeState(theState)); + if (!GetOperations()->IsDone() || aHSeq.IsNull()) + return aSeq._retn(); + + Standard_Integer aLength = aHSeq->Length(); + aSeq->length(aLength); + for (Standard_Integer i = 1; i <= aLength; i++) + aSeq[i-1] = aHSeq->Value(i); + + return aSeq._retn(); +} + //============================================================================= /*! * GetInPlace @@ -1066,3 +1236,39 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetInPlace return GetObject(anObject); } + +//============================================================================= +/*! + * GetSame + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSame + (GEOM::GEOM_Object_ptr theShapeWhere, + GEOM::GEOM_Object_ptr theShapeWhat) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShapeWhere == NULL || + theShapeWhat == NULL) return aGEOMObject._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShapeWhere = GetOperations()->GetEngine()->GetObject + (theShapeWhere->GetStudyID(), theShapeWhere->GetEntry()); + Handle(GEOM_Object) aShapeWhat = GetOperations()->GetEngine()->GetObject + (theShapeWhat->GetStudyID(), theShapeWhat->GetEntry()); + + if (aShapeWhere.IsNull() || + aShapeWhat.IsNull()) return aGEOMObject._retn(); + + //Get Shapes in place of aShapeWhat + Handle(GEOM_Object) anObject = + GetOperations()->GetSame(aShapeWhere, aShapeWhat); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.hh b/src/GEOM_I/GEOM_IShapesOperations_i.hh index 39bd16c31..b63eee1ca 100644 --- a/src/GEOM_I/GEOM_IShapesOperations_i.hh +++ b/src/GEOM_I/GEOM_IShapesOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_IShapesOperations_i_HeaderFile #define _GEOM_IShapesOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOMImpl_IShapesOperations.hxx" -class GEOM_IShapesOperations_i : +class GEOM_I_EXPORT GEOM_IShapesOperations_i : public virtual POA_GEOM::GEOM_IShapesOperations, public virtual GEOM_IOperations_i { @@ -97,6 +98,12 @@ class GEOM_IShapesOperations_i : GEOM::GEOM_Object_ptr theAx1, GEOM::shape_state theState); + GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape, + CORBA::Long theShapeType, + GEOM::GEOM_Object_ptr theAx1, + GEOM::GEOM_Object_ptr thePnt, + GEOM::shape_state theState); + GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape, CORBA::Long theShapeType, GEOM::GEOM_Object_ptr theAxis, @@ -122,6 +129,12 @@ class GEOM_IShapesOperations_i : GEOM::GEOM_Object_ptr theAx1, GEOM::shape_state theState); + GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape, + CORBA::Long theShapeType, + GEOM::GEOM_Object_ptr theAx1, + GEOM::GEOM_Object_ptr thePnt, + GEOM::shape_state theState); + GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape, CORBA::Long theShapeType, GEOM::GEOM_Object_ptr theAxis, @@ -142,9 +155,22 @@ class GEOM_IShapesOperations_i : GEOM::GEOM_Object_ptr theBottomRigthPoint, GEOM::shape_state theState); + GEOM::ListOfGO* GetShapesOnBox (GEOM::GEOM_Object_ptr theBox, + GEOM::GEOM_Object_ptr theShape, + CORBA::Long theShapeType, + GEOM::shape_state theState); + + GEOM::ListOfLong* GetShapesOnBoxIDs (GEOM::GEOM_Object_ptr theBox, + GEOM::GEOM_Object_ptr theShape, + CORBA::Long theShapeType, + GEOM::shape_state theState); + GEOM::GEOM_Object_ptr GetInPlace (GEOM::GEOM_Object_ptr theShapeWhere, GEOM::GEOM_Object_ptr theShapeWhat); + GEOM::GEOM_Object_ptr GetSame (GEOM::GEOM_Object_ptr theShapeWhere, + GEOM::GEOM_Object_ptr theShapeWhat); + ::GEOMImpl_IShapesOperations* GetOperations() { return (::GEOMImpl_IShapesOperations*)GetImpl(); } }; diff --git a/src/GEOM_I/GEOM_ITransformOperations_i.cc b/src/GEOM_I/GEOM_ITransformOperations_i.cc index e19197e80..e914733f6 100644 --- a/src/GEOM_I/GEOM_ITransformOperations_i.cc +++ b/src/GEOM_I/GEOM_ITransformOperations_i.cc @@ -952,3 +952,102 @@ GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate2D (GEOM::GEOM_Obj return GetObject(anObject); } + +//============================================================================= +/*! + * RotateThreePoints + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePoints + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theCentPoint, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + GEOM::GEOM_Object_var aGEOMObject; + + if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Get the central point of rotation + Handle(GEOM_Object) aCentPoint = + GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), theCentPoint->GetEntry()); + if (aCentPoint.IsNull()) return aGEOMObject._retn(); + + //Get the first point + Handle(GEOM_Object) aPoint1 = + GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), thePoint1->GetEntry()); + if (aPoint1.IsNull()) return aGEOMObject._retn(); + + //Get the second point + Handle(GEOM_Object) aPoint2 = + GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), thePoint2->GetEntry()); + if (aPoint2.IsNull()) return aGEOMObject._retn(); + + //Perform the translation + GetOperations()->RotateThreePoints(anObject, aCentPoint, aPoint1, aPoint2); + + return aGEOMObject._retn(); +} + +//============================================================================= +/*! + * RotateThreePointsCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateThreePointsCopy + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theCentPoint, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theCentPoint == NULL || thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn(); + + //Get the object itself + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the central point of rotation + Handle(GEOM_Object) aCentPoint = + GetOperations()->GetEngine()->GetObject(theCentPoint->GetStudyID(), theCentPoint->GetEntry()); + if (aCentPoint.IsNull()) return aGEOMObject._retn(); + + //Get the first point + Handle(GEOM_Object) aPoint1 = + GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), thePoint1->GetEntry()); + if (aPoint1.IsNull()) return aGEOMObject._retn(); + + //Get the second point + Handle(GEOM_Object) aPoint2 = + GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), thePoint2->GetEntry()); + if (aPoint2.IsNull()) return aGEOMObject._retn(); + + //Perform the rotation + Handle(GEOM_Object) anObject = + GetOperations()->RotateThreePointsCopy(aBasicObject, aCentPoint, aPoint1, aPoint2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + diff --git a/src/GEOM_I/GEOM_ITransformOperations_i.hh b/src/GEOM_I/GEOM_ITransformOperations_i.hh index 188642963..3f49b17b7 100644 --- a/src/GEOM_I/GEOM_ITransformOperations_i.hh +++ b/src/GEOM_I/GEOM_ITransformOperations_i.hh @@ -21,6 +21,7 @@ #ifndef _GEOM_ITransformOperations_i_HeaderFile #define _GEOM_ITransformOperations_i_HeaderFile +#include "GEOMImpl_Gen.hxx" #include @@ -30,7 +31,7 @@ #include "GEOMImpl_ITransformOperations.hxx" -class GEOM_ITransformOperations_i : +class GEOM_I_EXPORT GEOM_ITransformOperations_i : public virtual POA_GEOM::GEOM_ITransformOperations, public virtual GEOM_IOperations_i { @@ -124,6 +125,17 @@ class GEOM_ITransformOperations_i : GEOM::GEOM_Object_ptr theStartLCS, GEOM::GEOM_Object_ptr theEndLCS); + GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theCentPoint, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + + GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theCentPoint, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + + ::GEOMImpl_ITransformOperations* GetOperations() { return (::GEOMImpl_ITransformOperations*)GetImpl(); } }; diff --git a/src/GEOM_I/GEOM_Object_i.cc b/src/GEOM_I/GEOM_Object_i.cc index 62aa57a71..dce4e328b 100644 --- a/src/GEOM_I/GEOM_Object_i.cc +++ b/src/GEOM_I/GEOM_Object_i.cc @@ -52,7 +52,6 @@ GEOM_Object_i::GEOM_Object_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr Handle(GEOM_Object) theImpl) : SALOME::GenericObj_i( thePOA ), _engine(theEngine), _impl(theImpl) { - thePOA->activate_object(this); } //============================================================================= @@ -75,7 +74,8 @@ char* GEOM_Object_i::GetEntry() const TDF_Label& aLabel = _impl->GetEntry(); TCollection_AsciiString anEntry; TDF_Tool::Entry(aLabel, anEntry); - return CORBA::string_dup(anEntry.ToCString()); + const char* anEntstr = anEntry.ToCString(); + return CORBA::string_dup(anEntstr); } //============================================================================= @@ -130,7 +130,8 @@ void GEOM_Object_i::SetName(const char* theName) char* GEOM_Object_i::GetName() { char* aName = _impl->GetName(); - if(aName) return strdup(aName); + if (aName) + return aName; // this is already copy of pointer (see implementation of _impl) return strdup(""); } diff --git a/src/GEOM_I/GEOM_Object_i.hh b/src/GEOM_I/GEOM_Object_i.hh index 42b5f2781..660f0399c 100644 --- a/src/GEOM_I/GEOM_Object_i.hh +++ b/src/GEOM_I/GEOM_Object_i.hh @@ -21,6 +21,9 @@ #ifndef _GEOM_Object_i_HeaderFile #define _GEOM_Object_i_HeaderFile +#include "GEOM_GEOM_I.hxx" + +#include "GEOMImpl_Gen.hxx" #include #include CORBA_CLIENT_HEADER(SALOMEDS) @@ -32,7 +35,7 @@ #include -class GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public virtual SALOME::GenericObj_i +class GEOM_I_EXPORT GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public virtual SALOME::GenericObj_i { public: GEOM_Object_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(GEOM_Object) theImpl); diff --git a/src/GEOM_I/Makefile.in b/src/GEOM_I/Makefile.in index dd6cdcf89..abed346f7 100644 --- a/src/GEOM_I/Makefile.in +++ b/src/GEOM_I/Makefile.in @@ -55,7 +55,7 @@ LIB_SRC = \ GEOM_DumpPython.cc # SALOME_Component.idl -LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Exception.idl +LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Exception.idl SALOME_GenericObj.idl #SALOME_Exception.idl SALOME_GenericObj.idl LIB_SERVER_IDL = GEOM_Gen.idl @@ -81,7 +81,8 @@ EXPORT_HEADERS = GEOM_Object_i.hh \ GEOM_ITransformOperations_i.hh \ GEOM_IMeasureOperations_i.hh \ GEOM_IGroupOperations_i.hh \ - GEOM_Gen_i.hh + GEOM_Gen_i.hh \ + GEOM_GEOM_I.hxx # additionnal information to compil and link file CPPFLAGS += $(OCC_INCLUDES) $(BOOST_CPPFLAGS) $(KERNEL_CXXFLAGS) diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc index 894e4f358..6d289ff68 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.cc +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -1278,6 +1278,37 @@ GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject endService( " GEOM_Superv_i::RotateCopy" ); return anObj; } +//============================================================================= +// RotateThreePoints: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePoints (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theCentPoint, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + beginService( " GEOM_Superv_i::RotateThreePoints" ); + MESSAGE("GEOM_Superv_i::RotateThreePoints"); + getTransfOp(); + GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePoints(theObject, theCentPoint, thePoint1, thePoint2); + endService( " GEOM_Superv_i::RotateThreePoints" ); + return anObj; +} + +//============================================================================= +// RotateThreePointsCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theCentPoint, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + beginService( " GEOM_Superv_i::RotateThreePointsCopy" ); + MESSAGE("GEOM_Superv_i::RotateThreePointsCopy"); + getTransfOp(); + GEOM::GEOM_Object_ptr anObj = myTransfOp->RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2); + endService( " GEOM_Superv_i::RotateThreePointsCopy" ); + return anObj; +} //============================================================================= // MultiRotate1D: diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh index 87422e14d..4dce89ebb 100644 --- a/src/GEOM_I_Superv/GEOM_Superv_i.hh +++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh @@ -307,6 +307,17 @@ public: GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theAxis, CORBA::Double theAngle); + + GEOM::GEOM_Object_ptr RotateThreePoints (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theCentPoint, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + + GEOM::GEOM_Object_ptr RotateThreePointsCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theCentPoint, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theAxis, CORBA::Long theNbTimes); diff --git a/src/GEOM_SWIG/GEOM_Nut.py b/src/GEOM_SWIG/GEOM_Nut.py index b1325d6a1..3a1f90adb 100755 --- a/src/GEOM_SWIG/GEOM_Nut.py +++ b/src/GEOM_SWIG/GEOM_Nut.py @@ -17,71 +17,71 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -##################################################################### -#Created :17/02/2005 -#Auhtor :MASLOV Eugeny, KOVALTCHUK Alexey -##################################################################### - -import geompy -import salome -import os -import math - -#Sketcher_1 creation -Sketcher_1 = geompy.MakeSketcher("Sketcher:F 100 -57.7:TT 100 57.7:TT 0 115.47:TT -100 57.7:TT -100 -57.7:TT 0 -115.47:WW") -geompy.addToStudy(Sketcher_1, "Sketcher_1") -Face_1 = geompy.MakeFace(Sketcher_1, 1) -geompy.addToStudy(Face_1, "Face_1") - -#Line creation -Line_1 = geompy.MakeLineTwoPnt(geompy.MakeVertex(0,0,0), geompy.MakeVertex(0,0,100)) -geompy.addToStudy(Line_1, "Line_1") - -#Prism creation -Prism_1 = geompy.MakePrismVecH(Face_1, Line_1, 100) -geompy.addToStudy(Prism_1, "Prism_1") - -#Sketcher_2 creation -Sketcher_2 = geompy.MakeSketcher("Sketcher:F 50 0:TT 80 0:TT 112 13:TT 112 48:TT 80 63:TT 80 90:TT 50 90:WW", [0,0,0, 1,0,0, 0,1,0]) -geompy.addToStudy(Sketcher_2, "Sketcher_2") -Face_2 = geompy.MakeFace(Sketcher_2, 1) -geompy.addToStudy(Face_2, "Face_2") - -#Revolution creation -Revolution_1 = geompy.MakeRevolution(Face_2, Line_1, 2*math.pi) -geompy.addToStudy(Revolution_1, "Revolution_1") - -#Common applying -Common_1 = geompy.MakeBoolean(Revolution_1, Prism_1, 1) -geompy.addToStudy(Common_1, "Common_1") - -#Explode Common_1 on edges -CommonExplodedListEdges = geompy.SubShapeAll(Common_1, geompy.ShapeType["EDGE"]) -for i in range(0, len(CommonExplodedListEdges)): - name = "Edge_"+str(i+1) - geompy.addToStudyInFather(Common_1, CommonExplodedListEdges[i], name) - -#Fillet applying -#ID = geompy.GetSubShapeID(Common_1, CommonExplodedListEdges[0]) -Fillet_1 = geompy.MakeFillet(Common_1, 10, geompy.ShapeType["EDGE"], [6]) -geompy.addToStudy(Fillet_1, "Fillet_1") - -#Chamfer applying -Chamfer_1 = geompy.MakeChamferEdge(Fillet_1, 10, 10, 16, 50 ) -geompy.addToStudy(Chamfer_1, "Chamfer_1") - -Chamfer_2 = geompy.MakeChamferEdge(Chamfer_1, 10, 10, 21, 31 ) -geompy.addToStudy(Chamfer_2, "Chamfer_2") - -#Import of the shape from "slots.brep" -thePath = os.getenv("DATA_DIR") -theFileName = thePath + "/Shapes/Brep/slots.brep" -theShapeForCut = geompy.ImportBREP(theFileName) -geompy.addToStudy(theShapeForCut, "slot.brep_1") - -#Cut applying -Cut_1 = geompy.MakeBoolean(Chamfer_2, theShapeForCut, 2) -geompy.addToStudy(Cut_1, "Cut_1") - -salome.sg.updateObjBrowser(1) - +##################################################################### +#Created :17/02/2005 +#Auhtor :MASLOV Eugeny, KOVALTCHUK Alexey +##################################################################### + +import geompy +import salome +import os +import math + +#Sketcher_1 creation +Sketcher_1 = geompy.MakeSketcher("Sketcher:F 100 -57.7:TT 100 57.7:TT 0 115.47:TT -100 57.7:TT -100 -57.7:TT 0 -115.47:WW") +geompy.addToStudy(Sketcher_1, "Sketcher_1") +Face_1 = geompy.MakeFace(Sketcher_1, 1) +geompy.addToStudy(Face_1, "Face_1") + +#Line creation +Line_1 = geompy.MakeLineTwoPnt(geompy.MakeVertex(0,0,0), geompy.MakeVertex(0,0,100)) +geompy.addToStudy(Line_1, "Line_1") + +#Prism creation +Prism_1 = geompy.MakePrismVecH(Face_1, Line_1, 100) +geompy.addToStudy(Prism_1, "Prism_1") + +#Sketcher_2 creation +Sketcher_2 = geompy.MakeSketcher("Sketcher:F 50 0:TT 80 0:TT 112 13:TT 112 48:TT 80 63:TT 80 90:TT 50 90:WW", [0,0,0, 1,0,0, 0,1,0]) +geompy.addToStudy(Sketcher_2, "Sketcher_2") +Face_2 = geompy.MakeFace(Sketcher_2, 1) +geompy.addToStudy(Face_2, "Face_2") + +#Revolution creation +Revolution_1 = geompy.MakeRevolution(Face_2, Line_1, 2*math.pi) +geompy.addToStudy(Revolution_1, "Revolution_1") + +#Common applying +Common_1 = geompy.MakeBoolean(Revolution_1, Prism_1, 1) +geompy.addToStudy(Common_1, "Common_1") + +#Explode Common_1 on edges +CommonExplodedListEdges = geompy.SubShapeAll(Common_1, geompy.ShapeType["EDGE"]) +for i in range(0, len(CommonExplodedListEdges)): + name = "Edge_"+str(i+1) + geompy.addToStudyInFather(Common_1, CommonExplodedListEdges[i], name) + +#Fillet applying +#ID = geompy.GetSubShapeID(Common_1, CommonExplodedListEdges[0]) +Fillet_1 = geompy.MakeFillet(Common_1, 10, geompy.ShapeType["EDGE"], [6]) +geompy.addToStudy(Fillet_1, "Fillet_1") + +#Chamfer applying +Chamfer_1 = geompy.MakeChamferEdge(Fillet_1, 10, 10, 16, 50 ) +geompy.addToStudy(Chamfer_1, "Chamfer_1") + +Chamfer_2 = geompy.MakeChamferEdge(Chamfer_1, 10, 10, 21, 31 ) +geompy.addToStudy(Chamfer_2, "Chamfer_2") + +#Import of the shape from "slots.brep" +thePath = os.getenv("DATA_DIR") +theFileName = thePath + "/Shapes/Brep/slots.brep" +theShapeForCut = geompy.ImportBREP(theFileName) +geompy.addToStudy(theShapeForCut, "slot.brep_1") + +#Cut applying +Cut_1 = geompy.MakeBoolean(Chamfer_2, theShapeForCut, 2) +geompy.addToStudy(Cut_1, "Cut_1") + +salome.sg.updateObjBrowser(1) + diff --git a/src/GEOM_SWIG/GEOM_Partition1.py b/src/GEOM_SWIG/GEOM_Partition1.py index 556342a84..bc8e4c138 100755 --- a/src/GEOM_SWIG/GEOM_Partition1.py +++ b/src/GEOM_SWIG/GEOM_Partition1.py @@ -76,7 +76,10 @@ colis_cc_multi = geompy.MultiRotate1D(colis_cc, vecz, 4) # -- -alveole = geompy.MakePartition([colis_cc_multi, barier]) +Compound1 = geompy.MakeCompound([colis_cc_multi, barier]) +SubShape_theShape = geompy.SubShapeAll(Compound1,geompy.ShapeType["SOLID"]) +alveole = geompy.MakePartition(SubShape_theShape) +#alveole = geompy.MakePartition([colis_cc_multi, barier]) geompy.addToStudy(alveole, "alveole before explode") diff --git a/src/GEOM_SWIG/GEOM_Sketcher.py b/src/GEOM_SWIG/GEOM_Sketcher.py index 1f87ae976..dc8bf692d 100644 --- a/src/GEOM_SWIG/GEOM_Sketcher.py +++ b/src/GEOM_SWIG/GEOM_Sketcher.py @@ -1,58 +1,58 @@ -# GEOM GEOM_SWIG : binding of C++ omplementaion with Python -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# +# GEOM GEOM_SWIG : binding of C++ omplementaion with Python +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# -# -# File : GEOM_Sketcher.py -# Author : Damien COQUERET, Open CASCADE -# Module : GEOM -# $Header$ - -import geompy - -#SKETCHER INFOS -#Init Sketcher -#Create a string beginning by :"Sketcher:" -#Each command must be separated by ":" -#"F x y" : Create first point at X & Y - -#To Make Segment -#"R angle" : Set the direction by angle -#"D dx dy" : Set the direction by DX & DY - -#"TT x y" : Create by point at X & Y -#"T dx dy" : Create by point with DX & DY -#"L length" : Create by direction & Length -#"IX x" : Create by direction & Intersect. X -#"IY y" : Create by direction & Intersect. Y - -#To Make Arc -#"C radius length" : Create by direction, radius and length(in degree) - -#To finish -#"WW" : Close Wire - -#Create Sketcher -Cmd = "Sketch:F 0 0:TT 0 100:C 100 180:WW" -Sketcher = geompy.MakeSketcher(Cmd) #(string)->GEOM_Shape_ptr - -#Add In Study -id_Sketcher = geompy.addToStudy(Sketcher, "Sketcher") +# +# +# +# File : GEOM_Sketcher.py +# Author : Damien COQUERET, Open CASCADE +# Module : GEOM +# $Header$ + +import geompy + +#SKETCHER INFOS +#Init Sketcher +#Create a string beginning by :"Sketcher:" +#Each command must be separated by ":" +#"F x y" : Create first point at X & Y + +#To Make Segment +#"R angle" : Set the direction by angle +#"D dx dy" : Set the direction by DX & DY + +#"TT x y" : Create by point at X & Y +#"T dx dy" : Create by point with DX & DY +#"L length" : Create by direction & Length +#"IX x" : Create by direction & Intersect. X +#"IY y" : Create by direction & Intersect. Y + +#To Make Arc +#"C radius length" : Create by direction, radius and length(in degree) + +#To finish +#"WW" : Close Wire + +#Create Sketcher +Cmd = "Sketch:F 0 0:TT 0 100:C 100 180:WW" +Sketcher = geompy.MakeSketcher(Cmd) #(string)->GEOM_Shape_ptr + +#Add In Study +id_Sketcher = geompy.addToStudy(Sketcher, "Sketcher") diff --git a/src/GEOM_SWIG/GEOM_Spanner.py b/src/GEOM_SWIG/GEOM_Spanner.py index 959803c67..053619d35 100644 --- a/src/GEOM_SWIG/GEOM_Spanner.py +++ b/src/GEOM_SWIG/GEOM_Spanner.py @@ -27,7 +27,7 @@ ############# MakeSpanner ############# -def MakeSpanner (salome, geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None, hasGUI = 0): +def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None): ### Variables ### @@ -355,11 +355,10 @@ def MakeSpanner (salome, geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = Block_new = geompy.MakeHexa2Faces(Face_g_1, Face_g_1_tr) id_block_new = geompy.addToStudy(Block_new, "Block New") - if isMeshTest == 1: + if isMeshTest == 1 and smesh is not None: print "##################### Build Mesh #####################" - import StdMeshers # ---- add a middle block of spanner handle in study @@ -380,117 +379,68 @@ def MakeSpanner (salome, geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = Id_Edge1 = geompy.addToStudyInFather(FaceTop, Edge1, "Edge 1") Id_Edge2 = geompy.addToStudyInFather(FaceTop, Edge2, "Edge 2") - # ---- launch SMESH + print "-------------------------- Algorithm and Hypothesis" - smeshgui = None - if hasGUI == 1: - smeshgui = salome.ImportComponentGUI("SMESH") - smeshgui.Init(salome.myStudyId) + print "---- Init a Mesh with the Spanner" - print "-------------------------- create Hypothesis" + mesh = smesh.Mesh(Spanner, "Meshed Spanner") + + print "-------------------------- add hypothesis to Spanner" print "-------------------------- NumberOfSegments" - - hypNbSeg3 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so") - hypNbSeg3.SetNumberOfSegments(3) + algoReg = mesh.Segment() + listHyp = algoReg.GetCompatibleHypothesis() + for hyp in listHyp: + print hyp + print algoReg.GetName() + print algoReg.GetId() + algoReg.SetName("Regular_1D") + + + hypNbSeg3 = algoReg.NumberOfSegments(3) print hypNbSeg3.GetName() print hypNbSeg3.GetId() print hypNbSeg3.GetNumberOfSegments() - - if hasGUI == 1: - idseg = salome.ObjectToID(hypNbSeg3) - smeshgui.SetName(idseg, "NumberOfSegments_3"); - - print "-------------------------- LocalLength" - - hypLen1 = smesh.CreateHypothesis("LocalLength", "libStdMeshersEngine.so") - hypLen1.SetLength(10) - print hypLen1.GetName() - print hypLen1.GetId() - print hypLen1.GetLength() - - if hasGUI == 1: - idlength = salome.ObjectToID(hypLen1) - smeshgui.SetName(idlength, "Local_Length_10"); - - print "-------------------------- Propagation" - - hypProp = smesh.CreateHypothesis("Propagation", "libStdMeshersEngine.so") - print hypProp.GetName() - print hypProp.GetId() - - if hasGUI == 1: - idprop = salome.ObjectToID(hypProp) - smeshgui.SetName(idprop, "Propagation hypothesis"); - - #print "-------------------------- NumberOfSegments" - # - #hypNbSeg15 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so") - #hypNbSeg15.SetNumberOfSegments(15) - #print hypNbSeg15.GetName() - #print hypNbSeg15.GetId() - #print hypNbSeg15.GetNumberOfSegments() - # - #if hasGUI == 1: - # idseg15 = salome.ObjectToID(hypNbSeg15) - # smeshgui.SetName(idseg15, "NumberOfSegments_15"); - - print "-------------------------- Regular_1D" - - algoReg = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so") - listHyp = algoReg.GetCompatibleHypothesis() - for hyp in listHyp: - print hyp - print algoReg.GetName() - print algoReg.GetId() - - if hasGUI == 1: - idreg = salome.ObjectToID(algoReg) - smeshgui.SetName(idreg, "Regular_1D"); + smesh.SetName(hypNbSeg3, "NumberOfSegments_3") print "-------------------------- Quadrangle_2D" - algoQuad = smesh.CreateHypothesis("Quadrangle_2D", "libStdMeshersEngine.so") + algoQuad = mesh.Quadrangle() listHyp = algoQuad.GetCompatibleHypothesis() for hyp in listHyp: print hyp print algoQuad.GetName() print algoQuad.GetId() - - if hasGUI == 1: - idquad = salome.ObjectToID(algoQuad) - smeshgui.SetName(idquad, "Quadrangle_2D"); - - print "---- Init a Mesh with the Spanner" - - mesh = smesh.CreateMesh(Spanner) - if hasGUI == 1: - idmesh = salome.ObjectToID(mesh) - smeshgui.SetName(idmesh, "Meshed Spanner"); - - print "-------------------------- add hypothesis to Spanner" - - mesh.AddHypothesis(Spanner, algoReg) - mesh.AddHypothesis(Spanner, hypNbSeg3) - mesh.AddHypothesis(Spanner, algoQuad) + algoQuad.SetName("Quadrangle_2D") print "-------------------------- add hypothesis to the Middle Block" - - submesh_bl = mesh.GetSubMesh(BlockMh, "SubMesh Middle Block") - mesh.AddHypothesis(BlockMh, hypLen1) + + print "-------------------------- LocalLength" + algoRegMb = mesh.Segment(BlockMh) + hypLen1 = algoRegMb.LocalLength(10) + print hypLen1.GetName() + print hypLen1.GetId() + print hypLen1.GetLength() + smesh.SetName(hypLen1, "Local_Length_10") print "-------------------------- add hypothesis to the long edges of the Top Face of the Middle Block" - submesh_e1 = mesh.GetSubMesh(Edge1, "SubMesh Edge 1 of Top Face") - mesh.AddHypothesis(Edge1, hypProp) - #mesh.AddHypothesis(Edge1, hypNbSeg15) - - submesh_e2 = mesh.GetSubMesh(Edge2, "SubMesh Edge 2 of Top Face") - mesh.AddHypothesis(Edge2, hypProp) - #mesh.AddHypothesis(Edge2, hypNbSeg15) - + algoRegE1 = mesh.Segment(Edge1) + hypPropE1 = algoRegE1.Propagation() + print hypPropE1.GetName() + print hypPropE1.GetId() + smesh.SetName(hypPropE1, "Propagation hypothesis") + smesh.SetName(algoRegE1.GetSubMesh(), "SubMesh Edge 1 of Top Face") + + algoRegE2 = mesh.Segment(Edge2) + hypPropE2 = algoRegE2.Propagation() + print hypPropE2.GetName() + print hypPropE2.GetId() + smesh.SetName(hypPropE2, "Propagation hypothesis") + smesh.SetName(algoRegE2.GetSubMesh(), "SubMesh Edge 2 of Top Face") + print "-------------------------- compute the mesh" - smesh.Compute(mesh, Spanner) + mesh.Compute() print "Information about the Mesh:" print "Number of nodes : ", mesh.NbNodes() diff --git a/src/GEOM_SWIG/GEOM_TestAll.py b/src/GEOM_SWIG/GEOM_TestAll.py index 236e187b3..ec0670186 100644 --- a/src/GEOM_SWIG/GEOM_TestAll.py +++ b/src/GEOM_SWIG/GEOM_TestAll.py @@ -156,15 +156,16 @@ def TestAll (geompy, math): Sewing = geompy.MakeSewing([Face, S], precision) #(List Of GEOM_Object_ptr, Double)->GEOM_Object_ptr #Transform objects - Translation = geompy.MakeTranslationTwoPoints(Box, px, pz) #(3 GEOM_Object_ptr)->GEOM_Object_ptr - TranslVect = geompy.MakeTranslationVector(Box, vxyz) #(2 GEOM_Object_ptr)->GEOM_Object_ptr - Rotation = geompy.MakeRotation(Box, vz, angle1) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr - Scale = geompy.MakeScaleTransform(Box, p0, factor) # - Mirror = geompy.MakeMirrorByPlane(Box, Plane) #(2 GEOM_Object_ptr)->GEOM_Object_ptr - MirrorAxis = geompy.MakeMirrorByAxis(Box, Line1) # - MirrorPnt = geompy.MakeMirrorByPoint(Box, p200) # - Position = geompy.MakePosition(Box, cs1, cs2) #(3 GEOM_Object_ptr)->GEOM_Object_ptr - Offset = geompy.MakeOffset(Box, 10.) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr + Translation = geompy.MakeTranslationTwoPoints(Box, px, pz) #(3 GEOM_Object_ptr)->GEOM_Object_ptr + TranslVect = geompy.MakeTranslationVector(Box, vxyz) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + Rotation = geompy.MakeRotation(Box, vz, angle1) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr + RotatPnt = geompy.MakeRotationThreePoints(Box, px, py, pz) #(4 GEOM_Object_ptr)->GEOM_Object_ptr + Scale = geompy.MakeScaleTransform(Box, p0, factor) # + Mirror = geompy.MakeMirrorByPlane(Box, Plane) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + MirrorAxis = geompy.MakeMirrorByAxis(Box, Line1) # + MirrorPnt = geompy.MakeMirrorByPoint(Box, p200) # + Position = geompy.MakePosition(Box, cs1, cs2) #(3 GEOM_Object_ptr)->GEOM_Object_ptr + Offset = geompy.MakeOffset(Box, 10.) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr Orientation = geompy.ChangeOrientation(Box) #IDList for Fillet/Chamfer @@ -292,6 +293,7 @@ def TestAll (geompy, math): id_Translation = geompy.addToStudy(Translation, "Translation") id_TranslVect = geompy.addToStudy(TranslVect , "Translation along vector") id_Rotation = geompy.addToStudy(Rotation, "Rotation") + id_RotatPnt = geompy.addToStudy(RotatPnt, "Rotation by three points") id_Scale = geompy.addToStudy(Scale, "Scale") id_Mirror = geompy.addToStudy(Mirror, "Mirror by Plane") id_MirrorAxis = geompy.addToStudy(MirrorAxis, "Mirror by Axis") diff --git a/src/GEOM_SWIG/GEOM_TestOthers.py b/src/GEOM_SWIG/GEOM_TestOthers.py index dff28b812..81b0aa1e0 100644 --- a/src/GEOM_SWIG/GEOM_TestOthers.py +++ b/src/GEOM_SWIG/GEOM_TestOthers.py @@ -30,32 +30,36 @@ def TestExportImport (geompy, shape): print "Test Export/Import ...", + tmpDir = os.getenv("TEMP") + if tmpDir == None: + tmpDir = "/tmp" + # Files for Export/Import testing - fileExportImport = "/tmp/testExportImport.brep" - fileExportImportBREP = "/tmp/testExportImportBREP.brep" - fileExportImportIGES = "/tmp/testExportImportIGES.iges" - fileExportImportSTEP = "/tmp/testExportImportSTEP.step" + fileExportImport = tmpDir + "/testExportImport.brep" + fileExportImportBREP = tmpDir + "/testExportImportBREP.brep" + fileExportImportIGES = tmpDir + "/testExportImportIGES.iges" + fileExportImportSTEP = tmpDir + "/testExportImportSTEP.step" if os.access(fileExportImport, os.F_OK): if os.access(fileExportImport, os.W_OK): os.remove(fileExportImport) else: - fileExportImport = "/tmp/testExportImport1.brep" + fileExportImport = tmpDir + "/testExportImport1.brep" if os.access(fileExportImportBREP, os.W_OK): os.remove(fileExportImportBREP) else: - fileExportImportBREP = "/tmp/testExportImportBREP1.brep" + fileExportImportBREP = tmpDir + "/testExportImportBREP1.brep" if os.access(fileExportImportIGES, os.W_OK): os.remove(fileExportImportIGES) else: - fileExportImportIGES = "/tmp/testExportImportIGES1.iges" + fileExportImportIGES = tmpDir + "/testExportImportIGES1.iges" if os.access(fileExportImportSTEP, os.W_OK): os.remove(fileExportImportSTEP) else: - fileExportImportSTEP = "/tmp/testExportImportSTEP1.step" + fileExportImportSTEP = tmpDir + "/testExportImportSTEP1.step" # Export geompy.Export(shape, fileExportImport, "BREP") @@ -147,7 +151,8 @@ def TestOtherOperations (geompy, math): p100 = geompy.MakeVertex(100, 100, 100) p300 = geompy.MakeVertex(300, 300, 300) Box1 = geompy.MakeBoxTwoPnt(p100, p300) - Partition = geompy.Partition([Box], [Box1], [], [Box]) + #Partition = geompy.Partition([Box], [Box1], [], [Box]) + Partition = geompy.Partition([Box], [Box1]) id_Partition = geompy.addToStudy(Partition, "Partition of Box by Box1") # MakeMultiRotation1D, MakeMultiRotation2D @@ -303,6 +308,7 @@ def TestOtherOperations (geompy, math): v_n0p = geompy.MakeVectorDXDYDZ(-1, 0, 1) v_pp0 = geompy.MakeVectorDXDYDZ( 1, 1, 0) v_np0 = geompy.MakeVectorDXDYDZ(-1, 1, 0) + v_0n0 = geompy.MakeVectorDXDYDZ( 0, -1, 0) pln_0pp = geompy.MakePlane(p0, v_0pp, 300) pln_0np = geompy.MakePlane(p0, v_0np, 300) @@ -311,10 +317,13 @@ def TestOtherOperations (geompy, math): pln_pp0 = geompy.MakePlane(p0, v_pp0, 300) pln_np0 = geompy.MakePlane(p0, v_np0, 300) - part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0], - [], - [], - [b0]) + #part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0], + # [], + # [], + # [b0]) + part_tool_1 = geompy.MakePartition([b0, pln_0pp, pln_0np, pln_p0p, pln_n0p, pln_pp0, pln_np0]) + + id_part_tool_1 = geompy.addToStudy(part_tool_1, "part_tool_1") pt_pnt_1 = geompy.MakeVertex( 55, 0, 55) pt_pnt_2 = geompy.MakeVertex( 0, 55, 55) @@ -342,14 +351,44 @@ def TestOtherOperations (geompy, math): pt_face_11 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_11) pt_face_12 = geompy.GetFaceNearPoint(part_tool_1, pt_pnt_12) - pt_box = geompy.GetBlockNearPoint(part_tool_1, p0) + #pt_box = geompy.GetBlockNearPoint(part_tool_1, p0) - part_tool = geompy.MakeCompound([pt_face_1, pt_face_4, pt_face_7, pt_face_10, - pt_face_2, pt_face_5, pt_face_8, pt_face_11, - pt_face_3, pt_face_6, pt_face_9, pt_face_12, pt_box]) - id_part_tool = geompy.addToStudy(part_tool, "part_tool") + #part_tool = geompy.MakeCompound([pt_face_1, pt_face_4, pt_face_7, pt_face_10, + # pt_face_2, pt_face_5, pt_face_8, pt_face_11, + # #pt_face_3, pt_face_6, pt_face_9, pt_face_12, pt_box]) + # pt_face_3, pt_face_6, pt_face_9, pt_face_12) + #id_part_tool = geompy.addToStudy(part_tool, "part_tool") - part = geompy.MakePartition([s0], [part_tool]) + #part = geompy.MakePartition([s0], [part_tool]) + #part = geompy.MakePartition([s0], [ pt_face_1, pt_face_4, pt_face_7, pt_face_10, + # pt_face_2, pt_face_5, pt_face_8, pt_face_11, + # pt_face_3, pt_face_6, pt_face_9, pt_face_12, b0] ) + + p1 = geompy.MakeVertex(50, 0, 0) + p2 = geompy.MakeVertex(-50, 0, 0) + p3 = geompy.MakeVertex(0, 50, 0) + p4 = geompy.MakeVertex(0, -50, 0) + p5 = geompy.MakeVertex(0, 0, 50) + p6 = geompy.MakeVertex(0, 0, -50) + + vx = geompy.MakeVectorDXDYDZ( 1, 0, 0) + vy = geompy.MakeVectorDXDYDZ( 0, 1, 0) + vz = geompy.MakeVectorDXDYDZ( 0, 0, 1) + + plnX1 = geompy.MakePlane(p1, vx, 300) + plnX2 = geompy.MakePlane(p2, vx, 300) + plnY1 = geompy.MakePlane(p3, vy, 300) + plnY2 = geompy.MakePlane(p4, vy, 300) + plnZ1 = geompy.MakePlane(p5, vz, 300) + plnZ2 = geompy.MakePlane(p6, vz, 300) + + #part = geompy.MakePartition([s0], [plnX1,plnX2,plnY1,plnY2,plnZ1,plnZ2]) + part = geompy.MakePartition([s0], [plnX1]) + part = geompy.MakePartition([part], [plnX2]) + part = geompy.MakePartition([part], [plnY1]) + part = geompy.MakePartition([part], [plnY2]) + part = geompy.MakePartition([part], [plnZ1]) + part = geompy.MakePartition([part], [plnZ2]) geompy.addToStudy(part, "part") # GetFreeFacesIDs @@ -418,6 +457,20 @@ def TestOtherOperations (geompy, math): geompy.UnionIDs(faces_above, faces_above_pln_ids) geompy.addToStudy(faces_above, "Group of faces above Plane (N = (0, 1, 1))") + # GetShapesOnPlaneWithLocation + Loc = geompy.MakeVertex(0, -50, 0) + edges_on_pln = geompy.GetShapesOnPlaneWithLocation(blocksComp, geompy.ShapeType["EDGE"], + v_0n0, Loc, geompy.GEOM.ST_ON) + for edge_i in edges_on_pln: + geompy.addToStudy(edge_i, "Edge on Plane (N = (0, -1, 0) & Location = (0, -50, 0)") + + # GetShapesOnPlaneWithLocationIDs + edges_on_pln_ids = geompy.GetShapesOnPlaneWithLocationIDs(blocksComp, geompy.ShapeType["EDGE"], + v_0n0, Loc, geompy.GEOM.ST_ON) + group_edges_on_pln = geompy.CreateGroup(blocksComp, geompy.ShapeType["EDGE"]) + geompy.UnionIDs(group_edges_on_pln, edges_on_pln_ids) + geompy.addToStudy(group_edges_on_pln, "Group of edges on Plane (N = (0, -1, 0) & Location = (0, -50, 0))") + # GetShapesOnCylinder edges_out_cyl = geompy.GetShapesOnCylinder(blocksComp, geompy.ShapeType["EDGE"], vy, 55, geompy.GEOM.ST_OUT) diff --git a/src/GEOM_SWIG/GEOM_blocks.py b/src/GEOM_SWIG/GEOM_blocks.py index 109556e3a..6155e2971 100644 --- a/src/GEOM_SWIG/GEOM_blocks.py +++ b/src/GEOM_SWIG/GEOM_blocks.py @@ -36,6 +36,6 @@ isMeshTest = 0 # False smesh = None -GEOM_Spanner.MakeSpanner(salome, geompy, math, isBlocksTest, isMeshTest, smesh) +GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh) salome.sg.updateObjBrowser(1); diff --git a/src/GEOM_SWIG/GEOM_example5.py b/src/GEOM_SWIG/GEOM_example5.py index 0846816bc..035d9a956 100644 --- a/src/GEOM_SWIG/GEOM_example5.py +++ b/src/GEOM_SWIG/GEOM_example5.py @@ -1,54 +1,54 @@ -# GEOM GEOM_SWIG : binding of C++ omplementaion with Python -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# +# GEOM GEOM_SWIG : binding of C++ omplementaion with Python +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# -# -# File : GEOM_example5.py -# Author : Damien COQUERET, Open CASCADE -# Module : GEOM -# $Header$ - -import salome -import geompy - -geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM") - -#Create Points -BasicOp = geom.GetIBasicOperations(salome.myStudyId) -Vertex1 = BasicOp.MakePointXYZ(0., 0., 0.) -Vertex2 = BasicOp.MakePointXYZ(100., 20., 30.) -Vertex3 = BasicOp.MakePointXYZ(150., 100., -25.) -Vertex4 = BasicOp.MakePointXYZ(40., -80., 79.) - -#GEOM_Objects List for Splines -GOList = [] -GOList.append(Vertex1) -GOList.append(Vertex2) -GOList.append(Vertex3) -GOList.append(Vertex4) - -#Create Splines -Bezier = geompy.MakeBezier(GOList) -Interpol = geompy.MakeInterpol(GOList) - -#Add In Study -id_Bezier = geompy.addToStudy(Bezier, "Bezier") -id_Interpol = geompy.addToStudy(Interpol, "Interpol") +# +# +# +# File : GEOM_example5.py +# Author : Damien COQUERET, Open CASCADE +# Module : GEOM +# $Header$ + +import salome +import geompy + +geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM") + +#Create Points +BasicOp = geom.GetIBasicOperations(salome.myStudyId) +Vertex1 = BasicOp.MakePointXYZ(0., 0., 0.) +Vertex2 = BasicOp.MakePointXYZ(100., 20., 30.) +Vertex3 = BasicOp.MakePointXYZ(150., 100., -25.) +Vertex4 = BasicOp.MakePointXYZ(40., -80., 79.) + +#GEOM_Objects List for Splines +GOList = [] +GOList.append(Vertex1) +GOList.append(Vertex2) +GOList.append(Vertex3) +GOList.append(Vertex4) + +#Create Splines +Bezier = geompy.MakeBezier(GOList) +Interpol = geompy.MakeInterpol(GOList) + +#Add In Study +id_Bezier = geompy.addToStudy(Bezier, "Bezier") +id_Interpol = geompy.addToStudy(Interpol, "Interpol") diff --git a/src/GEOM_SWIG/GEOM_tube_geom_gg2.py b/src/GEOM_SWIG/GEOM_tube_geom_gg2.py index 1854af421..9c1f2ce01 100755 --- a/src/GEOM_SWIG/GEOM_tube_geom_gg2.py +++ b/src/GEOM_SWIG/GEOM_tube_geom_gg2.py @@ -17,163 +17,163 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -#============================================================================== -# Info. -# Bug (from script, bug) : tube_geom_gg2_corrected.py, PAL5243 -# Modified : 25/11/2004 -# Author : Kovaltchuk Alexey -# Project : PAL/SALOME -#============================================================================== -# -# Geometrie du cas test -# - -from geompy import * -import salome -# -# base de l'assemblage -# -L_base = 300. -l_base = 150. -h_base = 75. -e_base = 6. - -base_bot = MakeBox(0.,0.,0.,L_base,l_base,e_base) -base_top = MakeTranslation(base_bot,0.,0.,h_base-e_base) -base_front = MakeBox(0,0,0,L_base,e_base,h_base) -base_rear = MakeTranslation(base_front,0.,l_base,0.) - -tmp = MakeBoolean(base_top,base_rear,3) -tmp = MakeBoolean(tmp,base_bot,3) -base = MakeBoolean(tmp,base_front,3) - -baseId = addToStudy(base,"base") -# -# traverse -# -L_trav = 60. -h_trav = 300. -e_trav = 7. -marge = 15. - -flange_left = MakeBox(0.,0.,0,e_trav,L_trav,h_trav) -flange_right = MakeTranslation(flange_left,L_trav-e_trav,0.,0.) -flange_front = MakeBox(0.,0.,0,L_trav,e_trav,h_trav) -flange_rear = MakeTranslation(flange_front,0.,L_trav-e_trav,0.) - -tmp = MakeBoolean(flange_left,flange_rear,3) -tmp = MakeBoolean(tmp,flange_right,3) -flange = MakeBoolean(tmp,flange_front,3) -# -# left chamfer -# -import math -length = e_trav/math.sin(math.pi/4.) -yaxis = MakeVectorDXDYDZ(0.,1.,0.) -cut_left = MakeBox(0.,-marge,0.,-length,L_trav+marge,length) -cut_left = MakeRotation(cut_left,yaxis,-math.pi/4.) -cut_left = MakeTranslation(cut_left,e_trav,0.,0.) -# -# right chamfer -# -symPlaneYZ = MakePlane( - MakeVertex(L_trav/2.,0.,0.), - MakeVectorDXDYDZ(1.,0.,0.), 10000. ) -cut_right = MakeMirrorByPlane(cut_left,symPlaneYZ) -# -# front chamfer -# -xaxis = MakeVectorDXDYDZ(1.,0.,0.) -cut_front = MakeBox(-marge,0.,0.,L_trav+marge,length,length) -cut_front = MakeRotation(cut_front,xaxis,3.*math.pi/4.) -cut_front = MakeTranslation(cut_front,0.,e_trav,0.) -# -# rear chamfer -# -symPlaneXZ = MakePlane( - MakeVertex(0.,L_trav/2.,0.), - MakeVectorDXDYDZ(0.,1.,0.), 10000. ) -cut_rear = MakeMirrorByPlane(cut_front,symPlaneXZ) -# -# chamfer -# -trav = MakeBoolean(flange,cut_left,2) -trav = MakeBoolean(trav,cut_right,2) -trav = MakeBoolean(trav,cut_front,2) -trav = MakeBoolean(trav,cut_rear,2) -trav = MakeTranslation(trav, - L_base/2.-L_trav/2., - l_base/2.-L_trav/2., - h_base) -travId = addToStudy(trav,"trav") -# -# Welding -# -ground = MakeBox(-1000.,-1000.,0.,1000.,1000.,-1000.) -weld_left = MakeBoolean(cut_left,ground,2) -weld_right = MakeBoolean(cut_right,ground,2) -weld_front = MakeBoolean(cut_front,ground,2) -weld_rear = MakeBoolean(cut_rear,ground,2) -# -# Assembly -# -coarse_weld = MakeBoolean(weld_left,weld_rear,3) -coarse_weld = MakeBoolean(coarse_weld,weld_right,3) -coarse_weld = MakeBoolean(coarse_weld,weld_front,3) -# -# Cleaners -# -left_cleaner = MakeBox(0.,-10*marge,0.,-10.*marge,10.*marge,10.*marge) -left_cleaner = MakeRotation(left_cleaner,yaxis,math.pi/4.) -left_cleaner = MakeTranslation(left_cleaner,-e_trav-2.*marge,0.,-2.*marge) - -right_cleaner = MakeMirrorByPlane(left_cleaner,symPlaneYZ) - -front_cleaner = MakeBox(-10*marge,0.,0.,10.*marge,10.*marge,10.*marge) -front_cleaner = MakeRotation(front_cleaner,xaxis,3.*math.pi/4.) -front_cleaner = MakeTranslation(front_cleaner,0.,2.*marge-e_trav,2.*marge) - -rear_cleaner = MakeMirrorByPlane(front_cleaner,symPlaneXZ) -# -# Welding -# -weld = MakeBoolean(coarse_weld,left_cleaner,2) -weld = MakeBoolean(weld,rear_cleaner,2) -weld = MakeBoolean(weld,right_cleaner,2) -weld = MakeBoolean(weld,front_cleaner,2) -weld = MakeTranslation(weld, - L_base/2.-L_trav/2., - l_base/2.-L_trav/2., - h_base) -weldId = addToStudy(weld,"weld") -# -# Assembly -# -#assemblage = MakePartition([base.,weld.GetName()]) -assemblage = MakePartition([base,weld]) -addToStudy(assemblage, "base+weld") -#print assemblage.GetName() -#print trav.GetName() -#assemblage = MakePartition([assemblage.GetName(),trav.GetName()]) -assemblage = MakePartition([assemblage,trav]) -assemblageId = addToStudy(assemblage, "assemblage") - -# -# Display -# -gg = ImportComponentGUI("GEOM") -import salome_ComponentGUI -if not isinstance(gg, type(salome_ComponentGUI)): - gg.initGeomGen() - gg.createAndDisplayGO(baseId) - gg.setTransparency(baseId,0.5) - gg.setDisplayMode(baseId,1) - gg.setColor(baseId,255,0,0) - gg.createAndDisplayGO(travId) - gg.setTransparency(travId,0.5) - gg.setDisplayMode(travId,1) - gg.setColor(travId,255,0,0) - gg.createAndDisplayGO(weldId) - gg.setTransparency(weldId,0.5) - gg.setDisplayMode(weldId,1) - gg.setColor(weldId,0,0,255) +#============================================================================== +# Info. +# Bug (from script, bug) : tube_geom_gg2_corrected.py, PAL5243 +# Modified : 25/11/2004 +# Author : Kovaltchuk Alexey +# Project : PAL/SALOME +#============================================================================== +# +# Geometrie du cas test +# + +from geompy import * +import salome +# +# base de l'assemblage +# +L_base = 300. +l_base = 150. +h_base = 75. +e_base = 6. + +base_bot = MakeBox(0.,0.,0.,L_base,l_base,e_base) +base_top = MakeTranslation(base_bot,0.,0.,h_base-e_base) +base_front = MakeBox(0,0,0,L_base,e_base,h_base) +base_rear = MakeTranslation(base_front,0.,l_base,0.) + +tmp = MakeBoolean(base_top,base_rear,3) +tmp = MakeBoolean(tmp,base_bot,3) +base = MakeBoolean(tmp,base_front,3) + +baseId = addToStudy(base,"base") +# +# traverse +# +L_trav = 60. +h_trav = 300. +e_trav = 7. +marge = 15. + +flange_left = MakeBox(0.,0.,0,e_trav,L_trav,h_trav) +flange_right = MakeTranslation(flange_left,L_trav-e_trav,0.,0.) +flange_front = MakeBox(0.,0.,0,L_trav,e_trav,h_trav) +flange_rear = MakeTranslation(flange_front,0.,L_trav-e_trav,0.) + +tmp = MakeBoolean(flange_left,flange_rear,3) +tmp = MakeBoolean(tmp,flange_right,3) +flange = MakeBoolean(tmp,flange_front,3) +# +# left chamfer +# +import math +length = e_trav/math.sin(math.pi/4.) +yaxis = MakeVectorDXDYDZ(0.,1.,0.) +cut_left = MakeBox(0.,-marge,0.,-length,L_trav+marge,length) +cut_left = MakeRotation(cut_left,yaxis,-math.pi/4.) +cut_left = MakeTranslation(cut_left,e_trav,0.,0.) +# +# right chamfer +# +symPlaneYZ = MakePlane( + MakeVertex(L_trav/2.,0.,0.), + MakeVectorDXDYDZ(1.,0.,0.), 10000. ) +cut_right = MakeMirrorByPlane(cut_left,symPlaneYZ) +# +# front chamfer +# +xaxis = MakeVectorDXDYDZ(1.,0.,0.) +cut_front = MakeBox(-marge,0.,0.,L_trav+marge,length,length) +cut_front = MakeRotation(cut_front,xaxis,3.*math.pi/4.) +cut_front = MakeTranslation(cut_front,0.,e_trav,0.) +# +# rear chamfer +# +symPlaneXZ = MakePlane( + MakeVertex(0.,L_trav/2.,0.), + MakeVectorDXDYDZ(0.,1.,0.), 10000. ) +cut_rear = MakeMirrorByPlane(cut_front,symPlaneXZ) +# +# chamfer +# +trav = MakeBoolean(flange,cut_left,2) +trav = MakeBoolean(trav,cut_right,2) +trav = MakeBoolean(trav,cut_front,2) +trav = MakeBoolean(trav,cut_rear,2) +trav = MakeTranslation(trav, + L_base/2.-L_trav/2., + l_base/2.-L_trav/2., + h_base) +travId = addToStudy(trav,"trav") +# +# Welding +# +ground = MakeBox(-1000.,-1000.,0.,1000.,1000.,-1000.) +weld_left = MakeBoolean(cut_left,ground,2) +weld_right = MakeBoolean(cut_right,ground,2) +weld_front = MakeBoolean(cut_front,ground,2) +weld_rear = MakeBoolean(cut_rear,ground,2) +# +# Assembly +# +coarse_weld = MakeBoolean(weld_left,weld_rear,3) +coarse_weld = MakeBoolean(coarse_weld,weld_right,3) +coarse_weld = MakeBoolean(coarse_weld,weld_front,3) +# +# Cleaners +# +left_cleaner = MakeBox(0.,-10*marge,0.,-10.*marge,10.*marge,10.*marge) +left_cleaner = MakeRotation(left_cleaner,yaxis,math.pi/4.) +left_cleaner = MakeTranslation(left_cleaner,-e_trav-2.*marge,0.,-2.*marge) + +right_cleaner = MakeMirrorByPlane(left_cleaner,symPlaneYZ) + +front_cleaner = MakeBox(-10*marge,0.,0.,10.*marge,10.*marge,10.*marge) +front_cleaner = MakeRotation(front_cleaner,xaxis,3.*math.pi/4.) +front_cleaner = MakeTranslation(front_cleaner,0.,2.*marge-e_trav,2.*marge) + +rear_cleaner = MakeMirrorByPlane(front_cleaner,symPlaneXZ) +# +# Welding +# +weld = MakeBoolean(coarse_weld,left_cleaner,2) +weld = MakeBoolean(weld,rear_cleaner,2) +weld = MakeBoolean(weld,right_cleaner,2) +weld = MakeBoolean(weld,front_cleaner,2) +weld = MakeTranslation(weld, + L_base/2.-L_trav/2., + l_base/2.-L_trav/2., + h_base) +weldId = addToStudy(weld,"weld") +# +# Assembly +# +#assemblage = MakePartition([base.,weld.GetName()]) +assemblage = MakePartition([base,weld]) +addToStudy(assemblage, "base+weld") +#print assemblage.GetName() +#print trav.GetName() +#assemblage = MakePartition([assemblage.GetName(),trav.GetName()]) +assemblage = MakePartition([assemblage,trav]) +assemblageId = addToStudy(assemblage, "assemblage") + +# +# Display +# +gg = ImportComponentGUI("GEOM") +import salome_ComponentGUI +if not isinstance(gg, type(salome_ComponentGUI)): + gg.initGeomGen() + gg.createAndDisplayGO(baseId) + gg.setTransparency(baseId,0.5) + gg.setDisplayMode(baseId,1) + gg.setColor(baseId,255,0,0) + gg.createAndDisplayGO(travId) + gg.setTransparency(travId,0.5) + gg.setDisplayMode(travId,1) + gg.setColor(travId,255,0,0) + gg.createAndDisplayGO(weldId) + gg.setTransparency(weldId,0.5) + gg.setDisplayMode(weldId,1) + gg.setColor(weldId,0,0,255) diff --git a/src/GEOM_SWIG/batchmode_geompy.py b/src/GEOM_SWIG/batchmode_geompy.py index 52ccbdfff..0f91c8c9d 100644 --- a/src/GEOM_SWIG/batchmode_geompy.py +++ b/src/GEOM_SWIG/batchmode_geompy.py @@ -748,6 +748,12 @@ def MakeRotation(aShape,axis,angle): print "RotateCopy : ", TrsfOp.GetErrorCode() return anObj +def MakeRotationThreePoints(aShape, centpoint, point1, point2): + anObj = TrsfOp.RotateThreePointsCopy(aShape, centpoint, point1, point2) + if TrsfOp.IsDone() == 0: + print "RotateThreePointsCopy : ", TrsfOp.GetErrorCode() + return anObj + def MakeScaleTransform(aShape,theCenterofScale,factor): anObj = TrsfOp.ScaleShapeCopy(aShape,theCenterofScale,factor) if TrsfOp.IsDone() == 0: diff --git a/src/GEOM_SWIG/geompy.py b/src/GEOM_SWIG/geompy.py index 055c7f9e3..428939deb 100644 --- a/src/GEOM_SWIG/geompy.py +++ b/src/GEOM_SWIG/geompy.py @@ -744,7 +744,7 @@ def MakeWire(theEdgesAndWires): return anObj ## Create a face on the given wire. -# @param theWire Wire to build the face on. +# @param theWire closed Wire or Edge to build the face on. # @param isPlanarWanted If TRUE, only planar face will be built. # If impossible, NULL object will be returned. # @return New GEOM_Object, containing the created face. @@ -757,7 +757,7 @@ def MakeFace(theWire, isPlanarWanted): return anObj ## Create a face on the given wires set. -# @param theWires List of wires to build the face on. +# @param theWires List of closed wires or edges to build the face on. # @param isPlanarWanted If TRUE, only planar face will be built. # If impossible, NULL object will be returned. # @return New GEOM_Object, containing the created face. @@ -900,6 +900,33 @@ def GetShapesOnPlaneIDs(theShape, theShapeType, theAx1, theState): print "GetShapesOnPlaneIDs : ", ShapesOp.GetErrorCode() return aList +## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively +# the specified plane by the certain way, defined through \a theState parameter. +# @param theShape Shape to find sub-shapes of. +# @param theShapeType Type of sub-shapes to be retrieved. +# @param theAx1 Vector (or line, or linear edge), specifying normal +# direction of the plane to find shapes on. +# @param thePnt Point specifying location of the plane to find shapes on. +# @param theState The state of the subshapes to find. It can be one of +# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. +# @return List of all found sub-shapes. +# +# Example: see GEOM_TestOthers.py +def GetShapesOnPlaneWithLocation(theShape, theShapeType, theAx1, thePnt, theState): + aList = ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType, theAx1, thePnt, theState) + if ShapesOp.IsDone() == 0: + print "GetShapesOnPlaneWithLocation : ", ShapesOp.GetErrorCode() + return aList + +## Works like the above method, but returns list of sub-shapes indices +# +# Example: see GEOM_TestOthers.py +def GetShapesOnPlaneWithLocationIDs(theShape, theShapeType, theAx1, thePnt, theState): + aList = ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType, theAx1, thePnt, theState) + if ShapesOp.IsDone() == 0: + print "GetShapesOnPlaneWithLocationIDs : ", ShapesOp.GetErrorCode() + return aList + ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively # the specified cylinder by the certain way, defined through \a theState parameter. # @param theShape Shape to find sub-shapes of. @@ -981,6 +1008,29 @@ def GetShapesOnQuadrangleIDs(theShape, theShapeType, theTopLeftPoint, theTopRigt print "GetShapesOnQuadrangleIDs : ", ShapesOp.GetErrorCode() return aList +## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively +# the specified \a theBox by the certain way, defined through \a theState parameter. +# @param theBox Shape for relative comparing. +# @param theShape Shape to find sub-shapes of. +# @param theShapeType Type of sub-shapes to be retrieved. +# @param theState The state of the subshapes to find. It can be one of +# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. +# @return List of all found sub-shapes. +# +def GetShapesOnBox(theBox, theShape, theShapeType, theState): + aList = ShapesOp.GetShapesOnBox(theBox, theShape, theShapeType, theState) + if ShapesOp.IsDone() == 0: + print "GetShapesOnBox : ", ShapesOp.GetErrorCode() + return aList + +## Works like the above method, but returns list of sub-shapes indices +# +def GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState): + aList = ShapesOp.GetShapesOnBoxIDs(theBox, theShape, theShapeType, theState) + if ShapesOp.IsDone() == 0: + print "GetShapesOnBoxIDs : ", ShapesOp.GetErrorCode() + return aList + ## Get sub-shape(s) of theShapeWhere, which are # coincident with \a theShapeWhat or could be a part of it. # @param theShapeWhere Shape to find sub-shapes of. @@ -994,6 +1044,18 @@ def GetInPlace(theShapeWhere, theShapeWhat): print "GetInPlace : ", ShapesOp.GetErrorCode() return anObj +## Get sub-shape of theShapeWhere, which is +# equal to \a theShapeWhat. +# @param theShapeWhere Shape to find sub-shape of. +# @param theShapeWhat Shape, specifying what to find. +# @return New GEOM_Object for found sub-shape. +# +def GetSame(theShapeWhere, theShapeWhat): + anObj = ShapesOp.GetSame(theShapeWhere, theShapeWhat) + if ShapesOp.IsDone() == 0: + print "GetSame : ", ShapesOp.GetErrorCode() + return anObj + # ----------------------------------------------------------------------------- # Access to sub-shapes by their unique IDs inside the main shape. # ----------------------------------------------------------------------------- @@ -1320,13 +1382,23 @@ def MakeSection(s1, s2): ## Perform partition operation. # @param ListShapes Shapes to be intersected. # @param ListTools Shapes to intersect theShapes. -# @param ListKeepInside Shapes, outside which the results will be deleted. -# Each shape from theKeepInside must belong to theShapes also. -# @param ListRemoveInside Shapes, inside which the results will be deleted. -# Each shape from theRemoveInside must belong to theShapes also. +# !!!NOTE: Each compound from ListShapes and ListTools will be exploded +# in order to avoid possible intersection between shapes from +# this compound. # @param Limit Type of resulting shapes (corresponding to TopAbs_ShapeEnum). -# @param RemoveWebs If TRUE, perform Glue 3D algorithm. -# @param ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE. +# +# After implementation new version of PartitionAlgo (October 2006) +# other parameters are ignored by current functionality. They are kept +# in this function only for support old versions. +# Ignored parameters: +# @param ListKeepInside Shapes, outside which the results will be deleted. +# Each shape from theKeepInside must belong to theShapes also. +# @param ListRemoveInside Shapes, inside which the results will be deleted. +# Each shape from theRemoveInside must belong to theShapes also. +# @param RemoveWebs If TRUE, perform Glue 3D algorithm. +# @param ListMaterials Material indices for each shape. Make sence, +# only if theRemoveWebs is TRUE. +# # @return New GEOM_Object, containing the result shapes. # # Example: see GEOM_TestAll.py @@ -1339,6 +1411,27 @@ def MakePartition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside= print "MakePartition : ", BoolOp.GetErrorCode() return anObj +## Perform partition operation. +# This method may be useful if it is needed to make a partition for +# compound contains nonintersected shapes. Performance will be better +# since intersection between shapes from compound is not performed. +# +# Description of all parameters as in previous method MakePartition() +# +# !!!NOTE: Passed compounds (via ListShapes or via ListTools) +# have to consist of nonintersecting shapes. +# +# @return New GEOM_Object, containing the result shapes. +# +def MakePartitionNonSelfIntersectedShape(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], + Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[]): + anObj = BoolOp.MakePartitionNonSelfIntersectedShape(ListShapes, ListTools, + ListKeepInside, ListRemoveInside, + Limit, RemoveWebs, ListMaterials); + if BoolOp.IsDone() == 0: + print "MakePartitionNonSelfIntersectedShape : ", BoolOp.GetErrorCode() + return anObj + ## Shortcut to MakePartition() # # Example: see GEOM_TestOthers.py @@ -1419,6 +1512,21 @@ def MakeRotation(theObject, theAxis, theAngle): print "RotateCopy : ", TrsfOp.GetErrorCode() return anObj +## Rotate given object around vector perpendicular to plane +# containing three points, creating its copy before the rotatation. +# @param theObject The object to be rotated. +# @param theCentPoint central point - the axis is the vector perpendicular to the plane +# containing the three points. +# @param thePoint1 and thePoint2 - in a perpendicular plan of the axis. +# @return New GEOM_Object, containing the rotated object. +# +# Example: see GEOM_TestAll.py +def MakeRotationThreePoints(theObject, theCentPoint, thePoint1, thePoint2): + anObj = TrsfOp.RotateThreePointsCopy(theObject, theCentPoint, thePoint1, thePoint2) + if TrsfOp.IsDone() == 0: + print "RotateThreePointsCopy : ", TrsfOp.GetErrorCode() + return anObj + ## Scale the given object by the factor, creating its copy before the scaling. # @param theObject The object to be scaled. # @param thePoint Center point for scaling. diff --git a/src/GenerationGUI/GenerationGUI.cxx b/src/GenerationGUI/GenerationGUI.cxx index 90abc0f50..85832ed84 100644 --- a/src/GenerationGUI/GenerationGUI.cxx +++ b/src/GenerationGUI/GenerationGUI.cxx @@ -92,9 +92,7 @@ bool GenerationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) //===================================================================================== extern "C" { -#ifdef WNT - __declspec( dllexport ) -#endif +GENERATIONGUI_EXPORT GEOMGUI* GetLibGUI(GeometryGUI* parent) { return new GenerationGUI(parent); diff --git a/src/GenerationGUI/GenerationGUI.h b/src/GenerationGUI/GenerationGUI.h index 8f5f2d735..a809bdcf7 100644 --- a/src/GenerationGUI/GenerationGUI.h +++ b/src/GenerationGUI/GenerationGUI.h @@ -28,13 +28,23 @@ #ifndef GENERATIONGUI_H #define GENERATIONGUI_H +#ifdef WNT +# if defined GENERATIONGUI_EXPORTS +# define GENERATIONGUI_EXPORT __declspec( dllexport ) +# else +# define GENERATIONGUI_EXPORT __declspec( dllimport ) +# endif +#else +# define GENERATIONGUI_EXPORT +#endif + #include "GEOMGUI.h" //================================================================================= // class : GenerationGUI // purpose : //================================================================================= -class GenerationGUI : public GEOMGUI +class GENERATIONGUI_EXPORT GenerationGUI : public GEOMGUI { public: GenerationGUI(GeometryGUI* parent); diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.h b/src/GenerationGUI/GenerationGUI_FillingDlg.h index 1590f28bf..e4691b97e 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.h +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_FILLING_H #define DIALOGBOX_FILLING_H +#include "GenerationGUI.h" + #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel5Spin.h" @@ -35,7 +37,7 @@ // class : GenerationGUI_FillingDlg // purpose : //================================================================================= -class GenerationGUI_FillingDlg : public GEOMBase_Skeleton +class GENERATIONGUI_EXPORT GenerationGUI_FillingDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/GenerationGUI/GenerationGUI_PipeDlg.h b/src/GenerationGUI/GenerationGUI_PipeDlg.h index 6921b3760..09f5a7215 100644 --- a/src/GenerationGUI/GenerationGUI_PipeDlg.h +++ b/src/GenerationGUI/GenerationGUI_PipeDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_PIPE_H #define DIALOGBOX_PIPE_H +#include "GenerationGUI.h" + #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel_QTD.h" @@ -35,7 +37,7 @@ // class : GenerationGUI_PipeDlg // purpose : //================================================================================= -class GenerationGUI_PipeDlg : public GEOMBase_Skeleton +class GENERATIONGUI_EXPORT GenerationGUI_PipeDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.h b/src/GenerationGUI/GenerationGUI_PrismDlg.h index 1d5f308fc..2c106080c 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.h +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_PRISM_H #define DIALOGBOX_PRISM_H +#include "GenerationGUI.h" + #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel1Spin2Check.h" #include "DlgRef_3Sel_QTD.h" @@ -36,7 +38,7 @@ // class : GenerationGUI_PrismDlg // purpose : //================================================================================= -class GenerationGUI_PrismDlg : public GEOMBase_Skeleton +class GENERATIONGUI_EXPORT GenerationGUI_PrismDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.h b/src/GenerationGUI/GenerationGUI_RevolDlg.h index 6e99281f8..83be6522b 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.h +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_REVOLUTION_H #define DIALOGBOX_REVOLUTION_H +#include "GenerationGUI.h" + #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel1Spin2Check.h" @@ -37,7 +39,7 @@ // class : GenerationGUI_RevolDlg // purpose : //================================================================================= -class GenerationGUI_RevolDlg : public GEOMBase_Skeleton +class GENERATIONGUI_EXPORT GenerationGUI_RevolDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/GroupGUI/GroupGUI_GroupDlg.cxx b/src/GroupGUI/GroupGUI_GroupDlg.cxx index f5d8356c6..e5a61aa2c 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.cxx +++ b/src/GroupGUI/GroupGUI_GroupDlg.cxx @@ -329,15 +329,36 @@ void GroupGUI_GroupDlg::SelectionIntoArgument() GEOM::ListOfGO anObjects; GEOMBase::ConvertListOfIOInListOfGO(selectedIO(), anObjects); + GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() ); - for (int i = 0; i < anObjects.length(); i++) { - TopoDS_Shape aShape; - if ( GEOMBase::GetShape(anObjects[i], aShape, getShapeType()) ) { - CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, anObjects[i] ); - if ( anIndex >= 0 ) - aMapIndex.Add( anIndex ); - } - } + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + + for (int i = 0; i < anObjects.length(); i++) + { + GEOM::GEOM_Object_var aGeomObj = anObjects[i]; + GEOM::ListOfGO_var aSubObjects = new GEOM::ListOfGO(); + TopoDS_Shape aShape; + if ( GEOMBase::GetShape(aGeomObj, aShape, getShapeType()) ) + { + aSubObjects->length(1); + aSubObjects[0] = aGeomObj; + } + else if (aGeomObj->GetType() == GEOM_GROUP) + aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false); + else + continue; + + for (int i = 0; i < aSubObjects->length(); i++) + { + TopoDS_Shape aShape; + if ( GEOMBase::GetShape(aSubObjects[i], aShape, getShapeType()) ) + { + CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] ); + if ( anIndex >= 0 ) + aMapIndex.Add( anIndex ); + } + } + } if ( !myMainObj->_is_nil() ) localSelection( myMainObj, getShapeType() ); @@ -432,15 +453,36 @@ void GroupGUI_GroupDlg::add() if ( !aMapIndex.Extent() ) { GEOM::ListOfGO anObjects; GEOMBase::ConvertListOfIOInListOfGO(selectedIO(), anObjects); + GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() ); - for (int i = 0; i < anObjects.length(); i++) { - TopoDS_Shape aShape; - if ( GEOMBase::GetShape(anObjects[i], aShape, getShapeType()) ) { - CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, anObjects[i] ); - if ( anIndex >= 0 ) - aMapIndex.Add( anIndex ); + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + + for (int i = 0; i < anObjects.length(); i++) + { + GEOM::GEOM_Object_var aGeomObj = anObjects[i]; + GEOM::ListOfGO_var aSubObjects = new GEOM::ListOfGO(); + TopoDS_Shape aShape; + if ( GEOMBase::GetShape(aGeomObj, aShape, getShapeType()) ) + { + aSubObjects->length(1); + aSubObjects[0] = aGeomObj; + } + else if (aGeomObj->GetType() == GEOM_GROUP) + aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false); + else + break; + + for (int i = 0; i < aSubObjects->length(); i++) + { + TopoDS_Shape aShape; + if ( GEOMBase::GetShape(aSubObjects[i], aShape, getShapeType()) ) + { + CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] ); + if ( anIndex >= 0 ) + aMapIndex.Add( anIndex ); + } + } } - } } if ( aMapIndex.Extent() >= 1 ) { @@ -555,29 +597,60 @@ void GroupGUI_GroupDlg::updateState() // try to find out and process the object browser selection if ( !aMapIndex.Extent() && !CORBA::is_nil( myMainObj ) ) { - isAdd = true; GEOM::ListOfGO anObjects; GEOMBase::ConvertListOfIOInListOfGO(selectedIO(), anObjects); + GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() ); - for (int i = 0; i < anObjects.length(); i++) { - TopoDS_Shape aShape; - if ( GEOMBase::GetShape(anObjects[i], aShape, getShapeType()) ) { - CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, anObjects[i] ); - if ( anIndex >= 0 ) - aMapIndex.Add( anIndex ); - else - isAdd = false; - } - else - isAdd = false; + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); - if ( !isAdd ) { - aMapIndex.Clear(); - break; - } - } + isAdd = true; + + for (int i = 0; i < anObjects.length(); i++) + { + GEOM::GEOM_Object_var aGeomObj = anObjects[i]; + GEOM::ListOfGO_var aSubObjects = new GEOM::ListOfGO(); + TopoDS_Shape aShape; + if ( GEOMBase::GetShape(aGeomObj, aShape, getShapeType()) ) + { + aSubObjects->length(1); + aSubObjects[0] = aGeomObj; + } + else if (aGeomObj->GetType() == GEOM_GROUP) + aSubObjects = aShapesOp->MakeExplode( aGeomObj, getShapeType(), false); + else + { + aMapIndex.Clear(); + break; + } + + for (int i = 0; i < aSubObjects->length(); i++) + { + TopoDS_Shape aShape; + aSubObjects[i]; + if ( GEOMBase::GetShape(aSubObjects[i], aShape, getShapeType()) ) + { + CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubObjects[i] ); + if ( anIndex >= 0 ) + aMapIndex.Add( anIndex ); + else + isAdd = false; + } + else + isAdd = false; + + if ( !isAdd ) { + aMapIndex.Clear(); + break; + } + } + + if ( !isAdd ) { + aMapIndex.Clear(); + break; + } + } } - + isAdd = aMapIndex.Extent() > 0; myAddBtn->setEnabled( !myEditCurrentArgument && !CORBA::is_nil( myMainObj ) && isAdd ); @@ -608,8 +681,10 @@ void GroupGUI_GroupDlg::highlightSubShapes() return; Standard_Boolean isOk; + char* objIOR = GEOMBase::GetIORFromObject( myMainObj ); Handle(GEOM_AISShape) aSh = - GEOMBase::ConvertIORinGEOMAISShape( GEOMBase::GetIORFromObject( myMainObj ), isOk, true ); + GEOMBase::ConvertIORinGEOMAISShape( objIOR, isOk, true ); + free( objIOR ); if ( !isOk || aSh.IsNull() ) return; @@ -705,7 +780,9 @@ bool GroupGUI_GroupDlg::execute( ObjectList& objects ) SalomeApp_Study* study = getStudy(); if ( study ) { - string IOR = GEOMBase::GetIORFromObject( aGroup ); + char* objIOR = GEOMBase::GetIORFromObject( aGroup ); + string IOR( objIOR ); + free( objIOR ); if ( IOR != "" ) { _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) ); if ( SO ) { @@ -734,3 +811,4 @@ GEOM::GEOM_Object_ptr GroupGUI_GroupDlg::getFather( GEOM::GEOM_Object_ptr theObj } return aFatherObj._retn(); } + diff --git a/src/IGESExport/IGESExport.cxx b/src/IGESExport/IGESExport.cxx index 936a5bf90..e4a031650 100644 --- a/src/IGESExport/IGESExport.cxx +++ b/src/IGESExport/IGESExport.cxx @@ -32,9 +32,21 @@ #include #ifdef WNT -#include + #if defined IGESEXPORT_EXPORTS + #if defined WIN32 + #define IGESEXPORT_EXPORT __declspec( dllexport ) + #else + #define IGESEXPORT_EXPORT + #endif + #else + #if defined WIN32 + #define IGESEXPORT_EXPORT __declspec( dllimport ) + #else + #define IGESEXPORT_EXPORT + #endif + #endif #else -#define SALOME_WNT_EXPORT + #define IGESEXPORT_EXPORT #endif //============================================================================= @@ -45,10 +57,10 @@ extern "C" { -SALOME_WNT_EXPORT - int Export(const TopoDS_Shape& theShape, - const TCollection_AsciiString& theFileName, - const TCollection_AsciiString& theFormatName) +IGESEXPORT_EXPORT + int Export( const TopoDS_Shape& theShape, + const TCollection_AsciiString& theFileName, + const TCollection_AsciiString& theFormatName ) { MESSAGE("Export IGES into file " << theFileName.ToCString()); try diff --git a/src/IGESImport/IGESImport.cxx b/src/IGESImport/IGESImport.cxx index 3e3bb302d..c5fe987ca 100644 --- a/src/IGESImport/IGESImport.cxx +++ b/src/IGESImport/IGESImport.cxx @@ -31,9 +31,21 @@ #include #ifdef WNT -#include + #if defined IGESIMPORT_EXPORTS + #if defined WIN32 + #define IGESIMPORT_EXPORT __declspec( dllexport ) + #else + #define IGESIMPORT_EXPORT + #endif + #else + #if defined WIN32 + #define IGESIMPORT_EXPORT __declspec( dllimport ) + #else + #define IGESIMPORT_EXPORT + #endif + #endif #else -#define SALOME_WNT_EXPORT + #define IGESIMPORT_EXPORT #endif //============================================================================= @@ -44,7 +56,7 @@ extern "C" { -SALOME_WNT_EXPORT +IGESIMPORT_EXPORT TopoDS_Shape Import (const TCollection_AsciiString& theFileName, const TCollection_AsciiString& /*theFormatName*/, TCollection_AsciiString& theError) diff --git a/src/MeasureGUI/MeasureGUI.cxx b/src/MeasureGUI/MeasureGUI.cxx index 2b2186d91..3458594d3 100644 --- a/src/MeasureGUI/MeasureGUI.cxx +++ b/src/MeasureGUI/MeasureGUI.cxx @@ -98,9 +98,7 @@ bool MeasureGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) //===================================================================================== extern "C" { -#ifdef WNT - __declspec( dllexport ) -#endif +GEOM_MEASUREGUI_EXPORT GEOMGUI* GetLibGUI( GeometryGUI* parent ) { return new MeasureGUI( parent ); diff --git a/src/MeasureGUI/MeasureGUI.h b/src/MeasureGUI/MeasureGUI.h index 3d1596c37..295c3a742 100644 --- a/src/MeasureGUI/MeasureGUI.h +++ b/src/MeasureGUI/MeasureGUI.h @@ -28,13 +28,15 @@ #ifndef MEASUREGUI_H #define MEASUREGUI_H +#include "GEOM_MeasureGUI.hxx" + #include "GEOMGUI.h" //================================================================================= // class : MeasureGUI // purpose : //================================================================================= -class MeasureGUI : public GEOMGUI +class GEOM_MEASUREGUI_EXPORT MeasureGUI : public GEOMGUI { public: MeasureGUI( GeometryGUI* parent ); diff --git a/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.h b/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.h index d63d20942..92462c9bb 100644 --- a/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.h +++ b/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.h @@ -28,6 +28,8 @@ #ifndef MEASUREGUI_1SEL12LINEEDIT_QTD_H #define MEASUREGUI_1SEL12LINEEDIT_QTD_H +#include "GEOM_MeasureGUI.hxx" + #include #include class QVBoxLayout; @@ -38,7 +40,7 @@ class QLabel; class QLineEdit; class QPushButton; -class MeasureGUI_1Sel12LineEdit_QTD : public QWidget +class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel12LineEdit_QTD : public QWidget { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.h b/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.h index b1c8c5317..749da70fb 100644 --- a/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.h +++ b/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.h @@ -28,6 +28,8 @@ #ifndef MEASUREGUI_1SEL1TEXTVIEW_QTD_H #define MEASUREGUI_1SEL1TEXTVIEW_QTD_H +#include "GEOM_MeasureGUI.hxx" + #include #include class QVBoxLayout; @@ -39,7 +41,7 @@ class QLineEdit; class QPushButton; class QTextEdit; -class MeasureGUI_1Sel1TextView_QTD : public QWidget +class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel1TextView_QTD : public QWidget { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.h b/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.h index ada1ecb7a..5bd97c8f9 100644 --- a/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.h +++ b/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.h @@ -28,6 +28,8 @@ #ifndef MEASUREGUI_1SEL3LINEEDIT_QTD_H #define MEASUREGUI_1SEL3LINEEDIT_QTD_H +#include "GEOM_MeasureGUI.hxx" + #include #include class QVBoxLayout; @@ -38,7 +40,7 @@ class QLabel; class QLineEdit; class QPushButton; -class MeasureGUI_1Sel3LineEdit_QTD : public QWidget +class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel3LineEdit_QTD : public QWidget { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.h b/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.h index b5e4a01e7..6805664ea 100644 --- a/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.h +++ b/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.h @@ -28,6 +28,8 @@ #ifndef MEASUREGUI_1SEL6LINEEDIT_QTD_H #define MEASUREGUI_1SEL6LINEEDIT_QTD_H +#include "GEOM_MeasureGUI.hxx" + #include #include class QVBoxLayout; @@ -38,7 +40,7 @@ class QLabel; class QLineEdit; class QPushButton; -class MeasureGUI_1Sel6LineEdit_QTD : public QWidget +class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel6LineEdit_QTD : public QWidget { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.h b/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.h index b77968ec3..b70505a87 100644 --- a/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.h +++ b/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.h @@ -28,6 +28,8 @@ #ifndef MEASUREGUI_2SEL1LINEEDIT_QTD_H #define MEASUREGUI_2SEL1LINEEDIT_QTD_H +#include "GEOM_MeasureGUI.hxx" + #include #include class QVBoxLayout; @@ -38,7 +40,7 @@ class QLabel; class QLineEdit; class QPushButton; -class MeasureGUI_2Sel1LineEdit_QTD : public QWidget +class GEOM_MEASUREGUI_EXPORT MeasureGUI_2Sel1LineEdit_QTD : public QWidget { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_BndBoxDlg.h b/src/MeasureGUI/MeasureGUI_BndBoxDlg.h index 69c90f22b..cd563a115 100644 --- a/src/MeasureGUI/MeasureGUI_BndBoxDlg.h +++ b/src/MeasureGUI/MeasureGUI_BndBoxDlg.h @@ -28,21 +28,17 @@ #ifndef DIALOGBOX_BNDBOX_H #define DIALOGBOX_BNDBOX_H +#include "GEOM_MeasureGUI.hxx" + #include "MeasureGUI_Skeleton.h" class MeasureGUI_1Sel6LineEdit_QTD; -#if defined WNT && defined MEASUREGUI_EXPORTS -#define MEASUREGUI_EXPORT __declspec( dllexport ) -#else -#define MEASUREGUI_EXPORT -#endif - //================================================================================= // class : DialogBox_PROPERTIES // purpose : //================================================================================= -class MEASUREGUI_EXPORT MeasureGUI_BndBoxDlg : public MeasureGUI_Skeleton +class GEOM_MEASUREGUI_EXPORT MeasureGUI_BndBoxDlg : public MeasureGUI_Skeleton { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_CenterMassDlg.h b/src/MeasureGUI/MeasureGUI_CenterMassDlg.h index 826ef819a..943aee4c3 100644 --- a/src/MeasureGUI/MeasureGUI_CenterMassDlg.h +++ b/src/MeasureGUI/MeasureGUI_CenterMassDlg.h @@ -28,21 +28,17 @@ #ifndef DIALOGBOX_CMASS_H #define DIALOGBOX_CMASS_H +#include "GEOM_MeasureGUI.hxx" + #include "GEOMBase_Skeleton.h" class MeasureGUI_1Sel3LineEdit_QTD; -#if defined WNT && defined MEASUREGUI_EXPORTS -#define MEASUREGUI_EXPORT __declspec( dllexport ) -#else -#define MEASUREGUI_EXPORT -#endif - //================================================================================= // class : MeasureGUI_CenterMassDlg // purpose : //================================================================================= -class MEASUREGUI_EXPORT MeasureGUI_CenterMassDlg : public GEOMBase_Skeleton +class GEOM_MEASUREGUI_EXPORT MeasureGUI_CenterMassDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h index 586eb4d75..58c1b2749 100644 --- a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h +++ b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h @@ -28,23 +28,19 @@ #ifndef DIALOGBOX_CHECKCOMPOUNDOFBLOCKSDLG_H #define DIALOGBOX_CHECKCOMPOUNDOFBLOCKSDLG_H +#include "GEOM_MeasureGUI.hxx" + #include "GEOMBase_Skeleton.h" class MeasureGUI_1Sel1TextView_QTD; class QListBox; class QLabel; -#if defined WNT && defined MEASUREGUI_EXPORTS -#define MEASUREGUI_EXPORT __declspec( dllexport ) -#else -#define MEASUREGUI_EXPORT -#endif - //================================================================================= // class : MeasureGUI_CheckCompoundOfBlocksDlg // purpose : //================================================================================= -class MEASUREGUI_EXPORT MeasureGUI_CheckCompoundOfBlocksDlg : public GEOMBase_Skeleton +class GEOM_MEASUREGUI_EXPORT MeasureGUI_CheckCompoundOfBlocksDlg : public GEOMBase_Skeleton { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h index b4d97f6c1..ba89aff2b 100644 --- a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h +++ b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h @@ -28,17 +28,13 @@ #ifndef DIALOGBOX_CHECKSHAPEDLG_H #define DIALOGBOX_CHECKSHAPEDLG_H +#include "GEOM_MeasureGUI.hxx" + #include "MeasureGUI_Skeleton.h" #include "MeasureGUI_1Sel1TextView_QTD.h" class QCheckBox; -#if defined WNT && defined MEASUREGUI_EXPORTS -#define MEASUREGUI_EXPORT __declspec( dllexport ) -#else -#define MEASUREGUI_EXPORT -#endif - //================================================================================= // class : MeasureGUI_1Sel1TextView1Check_QTD // purpose : @@ -58,7 +54,7 @@ public: // class : MeasureGUI_CheckShapeDlg // purpose : //================================================================================= -class MEASUREGUI_EXPORT MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton +class GEOM_MEASUREGUI_EXPORT MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.h b/src/MeasureGUI/MeasureGUI_DistanceDlg.h index cd4702a3a..77c619db3 100644 --- a/src/MeasureGUI/MeasureGUI_DistanceDlg.h +++ b/src/MeasureGUI/MeasureGUI_DistanceDlg.h @@ -29,22 +29,18 @@ #ifndef DIALOGBOX_DISTANCE_H #define DIALOGBOX_DISTANCE_H +#include "GEOM_MeasureGUI.hxx" + #include "MeasureGUI_Skeleton.h" class MeasureGUI_2Sel1LineEdit_QTD; class gp_Pnt; -#if defined WNT && defined MEASUREGUI_EXPORTS -#define MEASUREGUI_EXPORT __declspec( dllexport ) -#else -#define MEASUREGUI_EXPORT -#endif - //================================================================================= // class : MeasureGUI_DistanceDlg // purpose : //================================================================================= -class MEASUREGUI_EXPORT MeasureGUI_DistanceDlg : public MeasureGUI_Skeleton +class GEOM_MEASUREGUI_EXPORT MeasureGUI_DistanceDlg : public MeasureGUI_Skeleton { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_InertiaDlg.h b/src/MeasureGUI/MeasureGUI_InertiaDlg.h index 085a3b6f4..0905d5219 100644 --- a/src/MeasureGUI/MeasureGUI_InertiaDlg.h +++ b/src/MeasureGUI/MeasureGUI_InertiaDlg.h @@ -29,24 +29,20 @@ #ifndef DIALOGBOX_INERTIA_H #define DIALOGBOX_INERTIA_H +#include "GEOM_MeasureGUI.hxx" + #include "MeasureGUI_Skeleton.h" class MeasureGUI_1Sel12LineEdit_QTD; class gp_XYZ; class gp_Mat; -#if defined WNT && defined MEASUREGUI_EXPORTS -#define MEASUREGUI_EXPORT __declspec( dllexport ) -#else -#define MEASUREGUI_EXPORT -#endif - //================================================================================= // class : MeasureGUI_InertiaDlg // purpose : Dialog for displaying moment of inertia //================================================================================= -class MEASUREGUI_EXPORT MeasureGUI_InertiaDlg : public MeasureGUI_Skeleton +class GEOM_MEASUREGUI_EXPORT MeasureGUI_InertiaDlg : public MeasureGUI_Skeleton { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h index 07f99c764..1b36bca03 100644 --- a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h +++ b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h @@ -29,21 +29,17 @@ #ifndef DIALOGBOX_MAXTOLERANCE_H #define DIALOGBOX_MAXTOLERANCE_H +#include "GEOM_MeasureGUI.hxx" + #include "MeasureGUI_Skeleton.h" class MeasureGUI_1Sel6LineEdit_QTD; -#if defined WNT && defined MEASUREGUI_EXPORTS -#define MEASUREGUI_EXPORT __declspec( dllexport ) -#else -#define MEASUREGUI_EXPORT -#endif - //================================================================================= // class : DialogBox_PROPERTIES // purpose : //================================================================================= -class MEASUREGUI_EXPORT MeasureGUI_MaxToleranceDlg : public MeasureGUI_Skeleton +class GEOM_MEASUREGUI_EXPORT MeasureGUI_MaxToleranceDlg : public MeasureGUI_Skeleton { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_PointDlg.h b/src/MeasureGUI/MeasureGUI_PointDlg.h index 7f86aca17..ca2789816 100644 --- a/src/MeasureGUI/MeasureGUI_PointDlg.h +++ b/src/MeasureGUI/MeasureGUI_PointDlg.h @@ -28,22 +28,18 @@ #ifndef MEASUREGUI_POINTDLG_H #define MEASUREGUI_POINTDLG_H +#include "GEOM_MeasureGUI.hxx" + #include "MeasureGUI_Skeleton.h" class QLineEdit; -#if defined WNT && defined MEASUREGUI_EXPORTS -#define MEASUREGUI_EXPORT __declspec( dllexport ) -#else -#define MEASUREGUI_EXPORT -#endif - //================================================================================= // class : MeasureGUI_PointDlg // purpose : Dialog for displaying point coordinates //================================================================================= -class MEASUREGUI_EXPORT MeasureGUI_PointDlg : public MeasureGUI_Skeleton +class GEOM_MEASUREGUI_EXPORT MeasureGUI_PointDlg : public MeasureGUI_Skeleton { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_PropertiesDlg.h b/src/MeasureGUI/MeasureGUI_PropertiesDlg.h index 3aafca5b2..0689c5806 100644 --- a/src/MeasureGUI/MeasureGUI_PropertiesDlg.h +++ b/src/MeasureGUI/MeasureGUI_PropertiesDlg.h @@ -28,21 +28,17 @@ #ifndef DIALOGBOX_PROPERTIES_H #define DIALOGBOX_PROPERTIES_H +#include "GEOM_MeasureGUI.hxx" + #include "MeasureGUI_Skeleton.h" class MeasureGUI_1Sel3LineEdit_QTD; -#if defined WNT && defined MEASUREGUI_EXPORTS -#define MEASUREGUI_EXPORT __declspec( dllexport ) -#else -#define MEASUREGUI_EXPORT -#endif - //================================================================================= // class : MeasureGUI_PropertiesDlg // purpose : Dialog for displaying length, area and volume //================================================================================= -class MEASUREGUI_EXPORT MeasureGUI_PropertiesDlg : public MeasureGUI_Skeleton +class GEOM_MEASUREGUI_EXPORT MeasureGUI_PropertiesDlg : public MeasureGUI_Skeleton { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.cxx b/src/MeasureGUI/MeasureGUI_Skeleton.cxx index 1c7684c14..ef4d92e8b 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.cxx +++ b/src/MeasureGUI/MeasureGUI_Skeleton.cxx @@ -153,9 +153,15 @@ void MeasureGUI_Skeleton::ClickOnHelp() if (app) app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName); else { + QString platform; +#ifdef WIN32 + platform = "winapplication"; +#else + platform = "application"; +#endif SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName), + arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), QObject::tr("BUT_OK")); } } diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.h b/src/MeasureGUI/MeasureGUI_Skeleton.h index 4a0c9d6f1..79d5ade21 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.h +++ b/src/MeasureGUI/MeasureGUI_Skeleton.h @@ -29,6 +29,8 @@ #ifndef MEASUREGUI_SKELETON_H #define MEASUREGUI_SKELETON_H +#include "GEOM_MeasureGUI.hxx" + #include "MeasureGUI_Skeleton_QTD.h" #include "GEOMBase_Helper.h" @@ -38,8 +40,9 @@ class QLineEdit; class QPushButton; class GEOM_Displayer; -class MeasureGUI_Skeleton : public MeasureGUI_Skeleton_QTD, - public GEOMBase_Helper +class GEOM_MEASUREGUI_EXPORT + MeasureGUI_Skeleton : public MeasureGUI_Skeleton_QTD, + public GEOMBase_Helper { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h index aefba0130..cdc2f7de4 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h +++ b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h @@ -29,6 +29,8 @@ #ifndef MEASUREGUI_SKELETON_QTD_H #define MEASUREGUI_SKELETON_QTD_H +#include "GEOM_MeasureGUI.hxx" + #include #include @@ -41,7 +43,7 @@ class QPushButton; class QButtonGroup; class QRadioButton; -class MeasureGUI_Skeleton_QTD : public QDialog +class GEOM_MEASUREGUI_EXPORT MeasureGUI_Skeleton_QTD : public QDialog { Q_OBJECT diff --git a/src/MeasureGUI/MeasureGUI_WhatisDlg.h b/src/MeasureGUI/MeasureGUI_WhatisDlg.h index 143d8ed16..10f3ccf71 100644 --- a/src/MeasureGUI/MeasureGUI_WhatisDlg.h +++ b/src/MeasureGUI/MeasureGUI_WhatisDlg.h @@ -29,21 +29,17 @@ #ifndef DIALOGBOX_WHATIS_H #define DIALOGBOX_WHATIS_H +#include "GEOM_MeasureGUI.hxx" + #include "MeasureGUI_Skeleton.h" class MeasureGUI_1Sel1TextView_QTD; -#if defined WNT && defined MEASUREGUI_EXPORTS -#define MEASUREGUI_EXPORT __declspec( dllexport ) -#else -#define MEASUREGUI_EXPORT -#endif - //================================================================================= // class : DialogBox_PROPERTIES // purpose : //================================================================================= -class MEASUREGUI_EXPORT MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton +class GEOM_MEASUREGUI_EXPORT MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton { Q_OBJECT diff --git a/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx index f036a1f10..3499864cc 100644 --- a/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx +++ b/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIn class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)():Handle(TCollection_MapNode)() {} Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfSh return *this; } - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const { return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess(); } - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const - { - return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess(); - } - - Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(); +// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(); Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx index 8ffb2d9b2..48ce73f8a 100644 --- a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ b/src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexe class Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)():Handle(TCollection_MapNode)() {} Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) : p return *this; } - NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() + NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const { return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess(); } - NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const - { - return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess(); - } - - Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(); +// Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(); Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/NMTDS/Makefile.in b/src/NMTDS/Makefile.in index 10be7fd90..23f815f85 100644 --- a/src/NMTDS/Makefile.in +++ b/src/NMTDS/Makefile.in @@ -40,23 +40,77 @@ LIB = libNMTDS.la LIB_SRC = \ NMTDS_CArray1OfIndexRange_0.cxx \ NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx \ + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx \ + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx \ NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx \ + NMTDS_IndexedDataMapOfIntegerShape_0.cxx \ + NMTDS_IndexedDataMapOfShapeBox_0.cxx \ NMTDS_IndexRange.cxx \ - NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \ + NMTDS_Iterator.cxx \ + NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \ + NMTDS_ListIteratorOfListOfPassKey_0.cxx \ + NMTDS_ListIteratorOfListOfPassKeyBoolean_0.cxx \ NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \ + NMTDS_ListNodeOfListOfPassKey_0.cxx \ + NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx \ NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \ - NMTDS_ShapesDataStructure.cxx + NMTDS_ListOfPassKey_0.cxx \ + NMTDS_ListOfPassKeyBoolean_0.cxx \ + NMTDS_MapIteratorOfMapOfPassKey_0.cxx \ + NMTDS_MapIteratorOfMapOfPassKeyBoolean_0.cxx \ + NMTDS_MapOfPassKey_0.cxx \ + NMTDS_MapOfPassKeyBoolean_0.cxx \ + NMTDS_PassKeyBoolean.cxx \ + NMTDS_PassKey.cxx \ + NMTDS_PassKeyMapHasher.cxx \ + NMTDS_ShapesDataStructure.cxx \ + NMTDS_StdMapNodeOfMapOfPassKey_0.cxx \ + NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx \ + NMTDS_BoxBndTree.cxx LIB_CLIENT_IDL = LIB_SERVER_IDL = # header files EXPORT_HEADERS = \ - NMTDS_ShapesDataStructure.hxx \ - NMTDS_PShapesDataStructure.hxx \ + Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \ + Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \ + Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \ + Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ + Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx \ + Handle_NMTDS_ListNodeOfListOfPassKey.hxx \ + Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx \ + Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx \ NMTDS_CArray1OfIndexRange.hxx \ + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \ + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \ + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \ NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \ - Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx + NMTDS_IndexedDataMapOfIntegerShape.hxx \ + NMTDS_IndexedDataMapOfShapeBox.hxx \ + NMTDS_IndexRange.hxx \ + NMTDS_Iterator.hxx \ + NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ + NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx \ + NMTDS_ListIteratorOfListOfPassKey.hxx \ + NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ + NMTDS_ListNodeOfListOfPassKeyBoolean.hxx \ + NMTDS_ListNodeOfListOfPassKey.hxx \ + NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ + NMTDS_ListOfPassKeyBoolean.hxx \ + NMTDS_ListOfPassKey.hxx \ + NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx \ + NMTDS_MapIteratorOfMapOfPassKey.hxx \ + NMTDS_MapOfPassKeyBoolean.hxx \ + NMTDS_MapOfPassKey.hxx \ + NMTDS_PassKeyBoolean.hxx \ + NMTDS_PassKey.hxx \ + NMTDS_PassKeyMapHasher.hxx \ + NMTDS_PShapesDataStructure.hxx \ + NMTDS_ShapesDataStructure.hxx \ + NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx \ + NMTDS_StdMapNodeOfMapOfPassKey.hxx \ + NMTDS_BoxBndTree.hxx # idl files EXPORT_IDLS= diff --git a/src/NMTDS/NMTDS.cdl b/src/NMTDS/NMTDS.cdl index 6eb4abbd8..c023fff9e 100644 --- a/src/NMTDS/NMTDS.cdl +++ b/src/NMTDS/NMTDS.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTDS.cdl -- Created: Fri Nov 28 10:13:19 2003 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2003 package NMTDS @@ -40,8 +39,16 @@ uses BOPTColStd is class ShapesDataStructure; - class IndexRange; - + class IndexRange; + + -- Modified to Add new classes Thu Sep 14 14:35:18 2006 + -- Contribution of Samtech www.samcef.com BEGIN + class Iterator; + class PassKey; + class PassKeyBoolean; + class PassKeyMapHasher; + -- Contribution of Samtech www.samcef.com END + pointer PShapesDataStructure to ShapesDataStructure from NMTDS; class CArray1OfIndexRange instantiates @@ -54,5 +61,33 @@ is IndexedDataMap from TCollection(Integer from Standard, IndexedDataMapOfShapeInteger from BooleanOperations, MapIntegerHasher from TColStd); - + + -- Modified to Add new classes Thu Sep 14 14:35:18 2006 + -- Contribution of Samtech www.samcef.com BEGIN + class ListOfPassKey instantiates + List from TCollection(PassKey from NMTDS); + + class MapOfPassKey instantiates + Map from TCollection(PassKey from NMTDS, + PassKeyMapHasher from NMTDS); + + class ListOfPassKeyBoolean instantiates + List from TCollection(PassKeyBoolean from NMTDS); + + class MapOfPassKeyBoolean instantiates + Map from TCollection(PassKeyBoolean from NMTDS, + PassKeyMapHasher from NMTDS); + -- Contribution of Samtech www.samcef.com END + + + class IndexedDataMapOfShapeBox + instantiates IndexedDataMap from TCollection (Shape from TopoDS, + Box from Bnd, + ShapeMapHasher from TopTools); + class IndexedDataMapOfIntegerShape + instantiates IndexedDataMap from TCollection (Integer from Standard, + Shape from TopoDS, + MapIntegerHasher from TColStd); + + end NMTDS; diff --git a/src/NMTDS/NMTDS_CArray1OfIndexRange.hxx b/src/NMTDS/NMTDS_CArray1OfIndexRange.hxx index 26e553190..120e3030c 100644 --- a/src/NMTDS/NMTDS_CArray1OfIndexRange.hxx +++ b/src/NMTDS/NMTDS_CArray1OfIndexRange.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -41,6 +41,7 @@ class NMTDS_IndexRange; #include #endif + class NMTDS_CArray1OfIndexRange { public: @@ -59,32 +60,56 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTDS_CArray1OfIndexRange(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5); + + Standard_EXPORT void Resize(const Standard_Integer theNewLength) ; + + Standard_EXPORT void Destroy() ; ~NMTDS_CArray1OfIndexRange() { Destroy(); } + + Standard_EXPORT Standard_Integer Length() const; + + Standard_EXPORT Standard_Integer Extent() const; + + Standard_EXPORT Standard_Integer FactLength() const; + + Standard_EXPORT Standard_Integer Append(const NMTDS_IndexRange& Value) ; + + Standard_EXPORT void Remove(const Standard_Integer Index) ; + + Standard_EXPORT const NMTDS_IndexRange& Value(const Standard_Integer Index) const; const NMTDS_IndexRange& operator ()(const Standard_Integer Index) const { return Value(Index); } + + Standard_EXPORT NMTDS_IndexRange& ChangeValue(const Standard_Integer Index) ; NMTDS_IndexRange& operator ()(const Standard_Integer Index) { return ChangeValue(Index); } + + Standard_EXPORT void SetBlockLength(const Standard_Integer aBL) ; + + Standard_EXPORT Standard_Integer BlockLength() const; @@ -105,13 +130,19 @@ private: // Methods PRIVATE // + + Standard_EXPORT NMTDS_CArray1OfIndexRange(const NMTDS_CArray1OfIndexRange& AnArray); + + Standard_EXPORT NMTDS_CArray1OfIndexRange& Assign(const NMTDS_CArray1OfIndexRange& Other) ; NMTDS_CArray1OfIndexRange& operator =(const NMTDS_CArray1OfIndexRange& Other) { return Assign(Other); } + + Standard_EXPORT Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const; diff --git a/src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx b/src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx index fa29895c7..6bd7e3df2 100644 --- a/src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx +++ b/src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTDS/NMTDS_IndexRange.cdl b/src/NMTDS/NMTDS_IndexRange.cdl index 459404a04..70458ed5d 100644 --- a/src/NMTDS/NMTDS_IndexRange.cdl +++ b/src/NMTDS/NMTDS_IndexRange.cdl @@ -1,28 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTDS_IndexRange.cdl -- Created: Fri Nov 28 10:31:05 2003 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2003 - class IndexRange from NMTDS diff --git a/src/NMTDS/NMTDS_IndexRange.hxx b/src/NMTDS/NMTDS_IndexRange.hxx index fd1c1cd76..1e9f76065 100644 --- a/src/NMTDS/NMTDS_IndexRange.hxx +++ b/src/NMTDS/NMTDS_IndexRange.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -35,6 +35,7 @@ #include #endif + class NMTDS_IndexRange { public: @@ -53,11 +54,23 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTDS_IndexRange(); + + Standard_EXPORT void SetFirst(const Standard_Integer aFirst) ; + + Standard_EXPORT void SetLast(const Standard_Integer aLast) ; + + Standard_EXPORT Standard_Integer First() const; + + Standard_EXPORT Standard_Integer Last() const; + + Standard_EXPORT Standard_Boolean IsInRange(const Standard_Integer aIndex) const; diff --git a/src/NMTDS/NMTDS_IndexRange.ixx b/src/NMTDS/NMTDS_IndexRange.ixx index beb598c02..44ea38a5a 100644 --- a/src/NMTDS/NMTDS_IndexRange.ixx +++ b/src/NMTDS/NMTDS_IndexRange.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTDS/NMTDS_IndexRange.jxx b/src/NMTDS/NMTDS_IndexRange.jxx index d52e44e24..936832bdc 100644 --- a/src/NMTDS/NMTDS_IndexRange.jxx +++ b/src/NMTDS/NMTDS_IndexRange.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _NMTDS_IndexRange_HeaderFile #include #endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx index 49d1fb437..179895110 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx +++ b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -44,39 +44,31 @@ class TColStd_MapIntegerHasher; class NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger; + class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const Standard_Integer& K1,const Standard_Integer K2,const BooleanOperations_IndexedDataMapOfShapeInteger& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + Standard_Integer& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + BooleanOperations_IndexedDataMapOfShapeInteger& Value() const; -Standard_EXPORT ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(); +//Standard_EXPORT ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx index 454f87a63..4467ed2db 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx +++ b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,7 +32,7 @@ #ifndef _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile #include #endif -NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {} +//NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {} @@ -40,11 +40,8 @@ Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOf { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -77,11 +74,11 @@ const Handle(Standard_Type)& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIn { return STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) ; } -Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {} +//Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {} #define TheKey Standard_Integer #define TheKey_hxx #define TheItem BooleanOperations_IndexedDataMapOfShapeInteger diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx index 4899fb0e0..0b1fef8e9 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx +++ b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -47,6 +47,7 @@ class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInte #include #endif + class NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger : public TCollection_BasicMap { public: @@ -65,39 +66,67 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const Standard_Integer NbBuckets = 1); + + Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Assign(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other) ; NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& operator =(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other) { return Assign(Other); } + + Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; + + Standard_EXPORT void Clear() ; ~NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() { Clear(); } + + Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const BooleanOperations_IndexedDataMapOfShapeInteger& I) ; + + Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const BooleanOperations_IndexedDataMapOfShapeInteger& T) ; + + Standard_EXPORT void RemoveLast() ; + + Standard_EXPORT Standard_Boolean Contains(const Standard_Integer& K) const; + + Standard_EXPORT const Standard_Integer& FindKey(const Standard_Integer I) const; + + Standard_EXPORT const BooleanOperations_IndexedDataMapOfShapeInteger& FindFromIndex(const Standard_Integer I) const; const BooleanOperations_IndexedDataMapOfShapeInteger& operator ()(const Standard_Integer I) const { return FindFromIndex(I); } + + Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeInteger& ChangeFromIndex(const Standard_Integer I) ; BooleanOperations_IndexedDataMapOfShapeInteger& operator ()(const Standard_Integer I) { return ChangeFromIndex(I); } + + Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const; + + Standard_EXPORT const BooleanOperations_IndexedDataMapOfShapeInteger& FindFromKey(const Standard_Integer& K) const; + + Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeInteger& ChangeFromKey(const Standard_Integer& K) ; @@ -118,6 +147,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other); diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx index b3eb5d360..95760dc49 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx +++ b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx index 767db6c4e..3316ee82c 100644 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ b/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -43,6 +43,7 @@ class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors; #include #endif + class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors { public: @@ -61,11 +62,22 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors(); + + Standard_EXPORT NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& L); + + Standard_EXPORT void Initialize(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& L) ; + Standard_Boolean More() const; + + Standard_EXPORT void Next() ; + + Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Value() const; diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx b/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx index 4698ffe4a..e3884deaa 100644 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx +++ b/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx index 13b7a121c..05fe687bb 100644 --- a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -41,36 +41,25 @@ class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors; class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors; + class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,const TCollection_MapNodePtr& n); + BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Value() const; -Standard_EXPORT ~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors(); +//Standard_EXPORT ~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx index 49e69a396..f354af531 100644 --- a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx +++ b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,7 +32,7 @@ #ifndef _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile #include #endif -NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {} +//NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {} @@ -40,11 +40,8 @@ Standard_EXPORT Handle_Standard_Type& NMTDS_ListNodeOfListOfIndexedDataMapOfShap { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -77,11 +74,11 @@ const Handle(Standard_Type)& NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestor { return STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) ; } -Standard_Boolean NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {} +//Standard_Boolean NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {} #define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors #define Item_hxx #define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors diff --git a/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx index 382994b64..7664fc4ea 100644 --- a/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ b/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -45,6 +45,7 @@ class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors; #include #endif + class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors { public: @@ -63,34 +64,71 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors(); + + Standard_EXPORT void Assign(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ; void operator=(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) { Assign(Other); } + + Standard_EXPORT Standard_Integer Extent() const; + + Standard_EXPORT void Clear() ; ~NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors() { Clear(); } + Standard_Boolean IsEmpty() const; + + Standard_EXPORT void Prepend(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I) ; + + Standard_EXPORT void Prepend(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& theIt) ; + + Standard_EXPORT void Prepend(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ; + + Standard_EXPORT void Append(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I) ; + + Standard_EXPORT void Append(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& theIt) ; + + Standard_EXPORT void Append(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ; + + Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& First() const; + + Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Last() const; + + Standard_EXPORT void RemoveFirst() ; + + Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ; + + Standard_EXPORT void InsertBefore(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ; + + Standard_EXPORT void InsertBefore(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ; + + Standard_EXPORT void InsertAfter(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ; + + Standard_EXPORT void InsertAfter(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ; @@ -112,6 +150,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other); diff --git a/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx b/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx index 1647253a4..f85f6d9d5 100644 --- a/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx +++ b/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTDS/NMTDS_PShapesDataStructure.hxx b/src/NMTDS/NMTDS_PShapesDataStructure.hxx index 75e09af84..128b45862 100644 --- a/src/NMTDS/NMTDS_PShapesDataStructure.hxx +++ b/src/NMTDS/NMTDS_PShapesDataStructure.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.cdl b/src/NMTDS/NMTDS_ShapesDataStructure.cdl index d6341bdf7..1922b4861 100644 --- a/src/NMTDS/NMTDS_ShapesDataStructure.cdl +++ b/src/NMTDS/NMTDS_ShapesDataStructure.cdl @@ -1,28 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTDS_ShapesDataStructure.cdl -- Created: Mon Dec 1 10:17:05 2003 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2003 - class ShapesDataStructure from NMTDS inherits ShapesDataStructure from BooleanOperations @@ -30,7 +28,8 @@ class ShapesDataStructure from NMTDS ---Purpose: uses - Shape from TopoDS, + Shape from TopoDS, + IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations, CArray1OfIndexRange from NMTDS, IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger from NMTDS --raises @@ -38,9 +37,7 @@ uses is Create returns ShapesDataStructure from NMTDS; - ---C++: alias "Standard_EXPORT virtual ~NMTDS_ShapesDataStructure();" ---modified by NIZNHY-PKV Wed Feb 2 11:44:38 2005ft - + SetCompositeShape(me:out; aS:Shape from TopoDS); @@ -67,7 +64,21 @@ is aS:Shape from TopoDS; iRank:Integer from Standard) returns Integer from Standard - is redefined; + is redefined; + +-- Modified to Add new methods Thu Sep 14 14:35:18 2006 +-- Contribution of Samtech www.samcef.com BEGIN + FillMap (me; + aS :Shape from TopoDS; + aMSA: out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations; + aMS : out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations); + + FillSubshapes (me; + aS :Shape from TopoDS; + aMSA:out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations; + aMS :out IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations); +-- Contribution of Samtech www.samcef.com END + fields myCompositeShape: Shape from TopoDS is protected; myRanges : CArray1OfIndexRange from NMTDS is protected; diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.cxx b/src/NMTDS/NMTDS_ShapesDataStructure.cxx index 8213536c3..229f3c543 100644 --- a/src/NMTDS/NMTDS_ShapesDataStructure.cxx +++ b/src/NMTDS/NMTDS_ShapesDataStructure.cxx @@ -31,6 +31,10 @@ #include #include #include +// +#include +#include +#include //=========================================================================== //function : NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure @@ -39,19 +43,7 @@ NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure() : BooleanOperations_ShapesDataStructure() -{ - //printf(" NMTDS_ShapesDataStructure CREATE:%x\n", (int)this); -} -//modified by NIZNHY-PKV Wed Feb 2 11:45:04 2005f -//=========================================================================== -//function : ~ -//purpose : -//=========================================================================== - NMTDS_ShapesDataStructure::~NMTDS_ShapesDataStructure() -{ - //printf(" NMTDS_ShapesDataStructure DELETE:%x\n", (int)this); -} -//modified by NIZNHY-PKV Wed Feb 2 11:45:06 2005t +{} //=========================================================================== //function : SetCompositeShape //purpose : @@ -76,6 +68,79 @@ { return myRanges; } +// Modified to Add new methods Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN +//=========================================================================== +//function : FillMap +//purpose : +//=========================================================================== + void NMTDS_ShapesDataStructure::FillMap + (const TopoDS_Shape& aS, + BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA, + BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const +{ + Standard_Integer iX, i, j, aIndex, aNbSc, aNbS; + BooleanOperations_AncestorsSeqAndSuccessorsSeq aAS; + // + aMSA.Add(aS, aAS); + aMS.Add(aS, aAS); + FillSubshapes(aS, aMSA, aMS); + // + aNbS=aMS.Extent(); + for(i=1; i<=aNbS; ++i) { + TColStd_MapOfInteger aMFence; + // + const TopoDS_Shape& aSX=aMS.FindKey(i); + iX=aMSA.FindIndex(aSX); + const BooleanOperations_AncestorsSeqAndSuccessorsSeq& aAS1=aMSA(iX); + // + aNbSc=aAS1.NumberOfSuccessors(); + for(j=1; j<=aNbSc; ++j) { + aIndex=aAS1.GetSuccessor(j); + if(aMFence.Add(aIndex)) { + BooleanOperations_AncestorsSeqAndSuccessorsSeq& aAS2=aMSA.ChangeFromIndex(aIndex); + aAS2.SetNewAncestor(iX); + } + } + } +} +//=========================================================================== +//function : FillSubshapes +//purpose : +//=========================================================================== + void NMTDS_ShapesDataStructure::FillSubshapes + (const TopoDS_Shape& aS, + BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA, + BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const +{ + Standard_Boolean bIsNewSubShape; + Standard_Integer aIndexSubShape, aIndex; + BooleanOperations_AncestorsSeqAndSuccessorsSeq aASx; + // + aIndex=aMSA.FindIndex(aS); + BooleanOperations_AncestorsSeqAndSuccessorsSeq& aAS=aMSA.ChangeFromIndex(aIndex); + // + TopoDS_Iterator anIt(aS, Standard_True); + for(; anIt.More(); anIt.Next()) { + const TopoDS_Shape& aSubShape = anIt.Value(); + bIsNewSubShape = Standard_False; + if(!aMSA.Contains(aSubShape)) { + bIsNewSubShape=!bIsNewSubShape; + aIndexSubShape=aMSA.Add(aSubShape, aASx); + aMS.Add(aSubShape, aASx); + } + else { + aIndexSubShape=aMSA.FindIndex(aSubShape); + } + aAS.SetNewSuccessor(aIndexSubShape); + aAS.SetNewOrientation(aSubShape.Orientation()); + // + if(bIsNewSubShape && (aSubShape.ShapeType() != TopAbs_VERTEX)) { + FillSubshapes(aSubShape, aMSA, aMS); + } + } +} +// Contribution of Samtech www.samcef.com END //=========================================================================== //function : Init //purpose : @@ -87,24 +152,35 @@ NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors aLx; NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors aLit; TopoDS_Iterator anIt; + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aMSA; + // Contribution of Samtech www.samcef.com END // - aNbS=0; anIt.Initialize(myCompositeShape); for (i=0; anIt.More(); anIt.Next(), ++i) { - const TopoDS_Shape& aSx=anIt.Value(); - BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aIndDatMapShape; - FillIndexedMapOfShapesAncestorsAndSuccessors(aSx, aIndDatMapShape); - aNbSx=aIndDatMapShape.Extent(); - aNbS+=aNbSx; - aLx.Append(aIndDatMapShape); + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + const TopoDS_Shape& aSx=anIt.Value(); + BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aMS; + FillMap(aSx, aMSA, aMS); + aLx.Append(aMS); + // Contribution of Samtech www.samcef.com END } + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + aNbS=aMSA.Extent(); + // Contribution of Samtech www.samcef.com END // // Fill myRanges myRanges.Resize(i); aLit.Initialize(aLx); for (i=1; aLit.More(); aLit.Next(), ++i) { - const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aM=aLit.Value(); - aNbSx=aM.Extent(); + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSx=aLit.Value(); + aNbSx=aMSx.Extent(); + // Contribution of Samtech www.samcef.com END if (i==1) { iFirst=1; iLast=aNbSx; @@ -119,31 +195,43 @@ } // myNumberOfShapesOfTheObject=aNbS; - myNumberOfShapesOfTheTool=aNbS; - myLength=3*aNbS; + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + //myNumberOfShapesOfTheTool=aNbS; + //myLength=3*aNbS; + myNumberOfShapesOfTheTool=0; + myLength=2*aNbS; + // Contribution of Samtech www.samcef.com END // // Allocate the whole Table myListOfShapeAndInterferences = (BooleanOperations_PShapeAndInterferences) Standard::Allocate(myLength*sizeof(BooleanOperations_ShapeAndInterferences)); + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN // // Fill the table - for (i=0; i<2; ++i) { - aShift=0; - if (i) { - aShift=myNumberOfShapesOfTheObject; - } - aLit.Initialize(aLx); - for (; aLit.More(); aLit.Next()) { - const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aM=aLit.Value(); - aNbSx=aM.Extent(); - for (j=1; j<=aNbSx; ++j) { - const TopoDS_Shape& aSx=aM.FindKey(j); - const BooleanOperations_AncestorsSeqAndSuccessorsSeq& aASx=aM.FindFromIndex(j); - InsertShapeAndAncestorsSuccessors(aSx, aASx, aShift); - } - aShift+=aNbSx; - } + //modified by NIZNHY-PKV Tue May 16 11:47:28 2006f + + //aShift=0; + //for (i=0; i<2; ++i) { + // if (i) { + // aShift=aNbS; + // } + // for (j=1; j<=aNbS; ++j) { + // const TopoDS_Shape& aSx=aMSA.FindKey(j); + // const BooleanOperations_AncestorsSeqAndSuccessorsSeq& aASx= + // aMSA.FindFromIndex(j); + // InsertShapeAndAncestorsSuccessors(aSx, aASx, aShift); + // } + //} + + aShift=0; + for (j=1; j<=aNbS; ++j) { + const TopoDS_Shape& aSx=aMSA.FindKey(j); + const BooleanOperations_AncestorsSeqAndSuccessorsSeq& aASx=aMSA.FindFromIndex(j); + InsertShapeAndAncestorsSuccessors(aSx, aASx, aShift); } + // Contribution of Samtech www.samcef.com END // // myShapeIndexMap myShapeIndexMap.Clear(); @@ -156,7 +244,7 @@ iFirst=aR.First(); iLast =aR.Last(); for (j=iFirst; j<=iLast; ++j) { - const TopoDS_Shape& aS=GetShape(j); + const TopoDS_Shape& aS=Shape(j); aSIM.Add(aS, j); } myShapeIndexMap.Add(i, aSIM); @@ -244,14 +332,30 @@ if (!bFound) { return aIndex; } + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN // - const BooleanOperations_IndexedDataMapOfShapeInteger& aSIM=myShapeIndexMap.FindFromKey(aRank); + //const BooleanOperations_IndexedDataMapOfShapeInteger& aSIM= + // myShapeIndexMap.FindFromKey(aRank); // - bFound=aSIM.Contains(aS); - if (!bFound) { - return aIndex; + //bFound=aSIM.Contains(aS); + //if (!bFound) { + // return aIndex; + //} + // + //aIndex=aSIM.FindFromKey(aS); + // + Standard_Integer i, aNbRanks; + // + aNbRanks=myShapeIndexMap.Extent(); + for (i=1; i<=aNbRanks; ++i){ + const BooleanOperations_IndexedDataMapOfShapeInteger& aSIM=myShapeIndexMap.FindFromKey(i); + bFound=aSIM.Contains(aS); + if (bFound) { + aIndex=aSIM.FindFromKey(aS); + return aIndex; + } } - // - aIndex=aSIM.FindFromKey(aS); + // Contribution of Samtech www.samcef.com END return aIndex; } diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.hxx b/src/NMTDS/NMTDS_ShapesDataStructure.hxx index af4bda55d..b3e8065f8 100644 --- a/src/NMTDS/NMTDS_ShapesDataStructure.hxx +++ b/src/NMTDS/NMTDS_ShapesDataStructure.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -37,6 +37,7 @@ #endif class TopoDS_Shape; class NMTDS_CArray1OfIndexRange; +class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors; #ifndef _Standard_HeaderFile @@ -46,6 +47,7 @@ class NMTDS_CArray1OfIndexRange; #include #endif + class NMTDS_ShapesDataStructure : public BooleanOperations_ShapesDataStructure { public: @@ -64,17 +66,38 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTDS_ShapesDataStructure(); -Standard_EXPORT virtual ~NMTDS_ShapesDataStructure(); + + Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ; + + Standard_EXPORT void Init() ; + + Standard_EXPORT const NMTDS_CArray1OfIndexRange& Ranges() const; + + Standard_EXPORT const TopoDS_Shape& CompositeShape() const; + + Standard_EXPORT Standard_Integer ShapeRangeIndex(const Standard_Integer aId) const; + + Standard_EXPORT virtual Standard_Integer Rank(const Standard_Integer anIndex) const; + + Standard_EXPORT virtual Standard_Integer ShapeIndex(const TopoDS_Shape& aS,const Standard_Integer iRank) const; +Standard_EXPORT void FillMap(const TopoDS_Shape& aS,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const; + + +Standard_EXPORT void FillSubshapes(const TopoDS_Shape& aS,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSA,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMS) const; + + diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.ixx b/src/NMTDS/NMTDS_ShapesDataStructure.ixx index 6a84be39f..587761e25 100644 --- a/src/NMTDS/NMTDS_ShapesDataStructure.ixx +++ b/src/NMTDS/NMTDS_ShapesDataStructure.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.jxx b/src/NMTDS/NMTDS_ShapesDataStructure.jxx index dbeaba7b7..5ae9a8554 100644 --- a/src/NMTDS/NMTDS_ShapesDataStructure.jxx +++ b/src/NMTDS/NMTDS_ShapesDataStructure.jxx @@ -1,28 +1,31 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _TopoDS_Shape_HeaderFile #include #endif #ifndef _NMTDS_CArray1OfIndexRange_HeaderFile #include #endif +#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif #ifndef _NMTDS_ShapesDataStructure_HeaderFile #include #endif diff --git a/src/NMTTools/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTTools/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx index f036a1f10..3499864cc 100644 --- a/src/NMTTools/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx +++ b/src/NMTTools/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIn class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)():Handle(TCollection_MapNode)() {} Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfSh return *this; } - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const { return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess(); } - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const - { - return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess(); - } - - Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(); +// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(); Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/NMTTools/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTTools/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx index 8ffb2d9b2..48ce73f8a 100644 --- a/src/NMTTools/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ b/src/NMTTools/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexe class Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)():Handle(TCollection_MapNode)() {} Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) : p return *this; } - NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() + NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const { return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess(); } - NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const - { - return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess(); - } - - Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(); +// Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(); Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx index 455ba18bd..ddf434f3f 100644 --- a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx +++ b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeO class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)():Handle(TCollection_MapNode)() {} Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) : return *this; } - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* operator->() + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* operator->() const { return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger *)ControlAccess(); } - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* operator->() const - { - return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger *)ControlAccess(); - } - - Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(); +// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(); Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx index 6bbb071ad..2ae11665b 100644 --- a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx +++ b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeO class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)():Handle(TCollection_MapNode)() {} Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape return *this; } - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* operator->() + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* operator->() const { return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape *)ControlAccess(); } - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* operator->() const - { - return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape *)ControlAccess(); - } - - Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(); +// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(); Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx index 63bb65648..bd78cab85 100644 --- a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx +++ b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeO class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)():Handle(TCollection_MapNode)() {} Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) : publ return *this; } - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* operator->() + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* operator->() const { return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock *)ControlAccess(); } - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* operator->() const - { - return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock *)ControlAccess(); - } - - Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(); +// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(); Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx b/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx index a141eebb8..68c12bec0 100644 --- a/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx +++ b/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_ListNodeOfListOfCom class Handle(NMTTools_ListNodeOfListOfCommonBlock) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(NMTTools_ListNodeOfListOfCommonBlock)():Handle(TCollection_MapNode)() {} Handle(NMTTools_ListNodeOfListOfCommonBlock)(const Handle(NMTTools_ListNodeOfListOfCommonBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(NMTTools_ListNodeOfListOfCommonBlock) : public Handle(TCollection_M return *this; } - NMTTools_ListNodeOfListOfCommonBlock* operator->() + NMTTools_ListNodeOfListOfCommonBlock* operator->() const { return (NMTTools_ListNodeOfListOfCommonBlock *)ControlAccess(); } - NMTTools_ListNodeOfListOfCommonBlock* operator->() const - { - return (NMTTools_ListNodeOfListOfCommonBlock *)ControlAccess(); - } - - Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCommonBlock)(); +// Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCommonBlock)(); Standard_EXPORT static const Handle(NMTTools_ListNodeOfListOfCommonBlock) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx b/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx index 47ad735ce..10c82d040 100644 --- a/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx +++ b/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -39,18 +39,6 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_ListNodeOfListOfCou class Handle(NMTTools_ListNodeOfListOfCoupleOfShape) : public Handle(TCollection_MapNode) { public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } Handle(NMTTools_ListNodeOfListOfCoupleOfShape)():Handle(TCollection_MapNode)() {} Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(const Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) { @@ -72,17 +60,12 @@ class Handle(NMTTools_ListNodeOfListOfCoupleOfShape) : public Handle(TCollection return *this; } - NMTTools_ListNodeOfListOfCoupleOfShape* operator->() + NMTTools_ListNodeOfListOfCoupleOfShape* operator->() const { return (NMTTools_ListNodeOfListOfCoupleOfShape *)ControlAccess(); } - NMTTools_ListNodeOfListOfCoupleOfShape* operator->() const - { - return (NMTTools_ListNodeOfListOfCoupleOfShape *)ControlAccess(); - } - - Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(); +// Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(); Standard_EXPORT static const Handle(NMTTools_ListNodeOfListOfCoupleOfShape) DownCast(const Handle(Standard_Transient)& AnObject); }; diff --git a/src/NMTTools/Makefile.in b/src/NMTTools/Makefile.in index c3743847f..0e8cd2abd 100644 --- a/src/NMTTools/Makefile.in +++ b/src/NMTTools/Makefile.in @@ -37,8 +37,8 @@ VPATH=.:@srcdir@ # Libraries targets LIB = libNMTTools.la LIB_SRC = \ - NMTTools_CommonBlock.cxx \ NMTTools_CommonBlockAPI.cxx \ + NMTTools_CommonBlock.cxx \ NMTTools_CommonBlockPool_0.cxx \ NMTTools_CoupleOfShape.cxx \ NMTTools_DEProcessor.cxx \ @@ -56,7 +56,6 @@ LIB_SRC = \ NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx \ NMTTools_ListOfCommonBlock_0.cxx \ NMTTools_ListOfCoupleOfShape_0.cxx \ - NMTTools_PaveFiller.cxx \ NMTTools_PaveFiller_0.cxx \ NMTTools_PaveFiller_1.cxx \ NMTTools_PaveFiller_2.cxx \ @@ -67,27 +66,62 @@ LIB_SRC = \ NMTTools_PaveFiller_7.cxx \ NMTTools_PaveFiller_8.cxx \ NMTTools_PaveFiller_9.cxx \ + NMTTools_PaveFiller.cxx \ NMTTools_PCurveMaker.cxx \ - NMTTools_Tools.cxx + NMTTools_Tools.cxx \ + NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx \ + NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx \ + NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx \ + NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx \ + NMTTools_MapOfPaveBlock_0.cxx \ + NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx + LIB_CLIENT_IDL = LIB_SERVER_IDL = # header files EXPORT_HEADERS = \ - NMTTools_PDSFiller.hxx \ - NMTTools_DSFiller.hxx \ - NMTTools_PPaveFiller.hxx \ - NMTTools_PaveFiller.hxx \ - NMTTools_ListOfCoupleOfShape.hxx \ - NMTTools_Tools.hxx \ - NMTTools_CoupleOfShape.hxx \ - NMTTools_ListIteratorOfListOfCoupleOfShape.hxx \ - NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx \ - NMTTools_IteratorOfCoupleOfShape.hxx \ - NMTTools_CommonBlockPool.hxx \ + Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \ + Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ + Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx \ + Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx \ + Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx \ + Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx \ Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx \ - Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx + NMTDS_Iterator.hxx \ + NMTTools_CommonBlockAPI.hxx \ + NMTTools_CommonBlock.hxx \ + NMTTools_CommonBlockPool.hxx \ + NMTTools_CoupleOfShape.hxx \ + NMTTools_DEProcessor.hxx \ + NMTTools_DSFiller.hxx \ + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx \ + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx \ + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx \ + NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx \ + NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx \ + NMTTools_IndexedDataMapOfShapePaveBlock.hxx \ + NMTTools_IteratorOfCoupleOfShape.hxx \ + NMTTools_ListIteratorOfListOfCommonBlock.hxx \ + NMTTools_ListIteratorOfListOfCoupleOfShape.hxx \ + NMTTools_ListNodeOfListOfCommonBlock.hxx \ + NMTTools_ListNodeOfListOfCoupleOfShape.hxx \ + NMTTools_ListOfCommonBlock.hxx \ + NMTTools_ListOfCoupleOfShape.hxx \ + NMTTools_PaveFiller.hxx \ + NMTTools_PCurveMaker.hxx \ + NMTTools_PDSFiller.hxx \ + NMTTools_PPaveFiller.hxx \ + NMTTools_Tools.hxx \ + Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \ + Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx \ + NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx \ + NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \ + NMTTools_DataMapOfIntegerListOfPaveBlock.hxx \ + NMTTools_MapIteratorOfMapOfPaveBlock.hxx \ + NMTTools_MapOfPaveBlock.hxx \ + NMTTools_StdMapNodeOfMapOfPaveBlock.hxx # idl files EXPORT_IDLS= diff --git a/src/NMTTools/NMTTools.cdl b/src/NMTTools/NMTTools.cdl index dc10949d9..6342a3082 100644 --- a/src/NMTTools/NMTTools.cdl +++ b/src/NMTTools/NMTTools.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTTools.cdl -- Created: Thu Dec 4 16:55:49 2003 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2003 package NMTTools @@ -54,7 +53,7 @@ is class PCurveMaker; class DEProcessor; class CoupleOfShape; - + pointer PPaveFiller to PaveFiller from NMTTools; pointer PDSFiller to DSFiller from NMTTools; @@ -82,4 +81,14 @@ is class ListOfCoupleOfShape instantiates List from TCollection(CoupleOfShape from NMTTools); +-- + class DataMapOfIntegerListOfPaveBlock instantiates + DataMap from TCollection(Integer from Standard, + ListOfPaveBlock from BOPTools, + MapIntegerHasher from TColStd); + + class MapOfPaveBlock instantiates + Map from TCollection (PaveBlock from BOPTools, + PaveBlockMapHasher from BOPTools); +-- end NMTTools; diff --git a/src/NMTTools/NMTTools_CommonBlock.cdl b/src/NMTTools/NMTTools_CommonBlock.cdl index 039cd74ae..7c4fd7409 100644 --- a/src/NMTTools/NMTTools_CommonBlock.cdl +++ b/src/NMTTools/NMTTools_CommonBlock.cdl @@ -1,27 +1,27 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTTools_CommonBlock.cdl -- Created: Tue Dec 9 12:11:48 2003 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2003 + class CommonBlock from NMTTools diff --git a/src/NMTTools/NMTTools_CommonBlock.hxx b/src/NMTTools/NMTTools_CommonBlock.hxx index 904c6b566..38d036f8d 100644 --- a/src/NMTTools/NMTTools_CommonBlock.hxx +++ b/src/NMTTools/NMTTools_CommonBlock.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -44,6 +44,7 @@ class BOPTools_ListOfPaveBlock; #include #endif + class NMTTools_CommonBlock { public: @@ -62,18 +63,44 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_CommonBlock(); + + Standard_EXPORT void AddPaveBlock(const BOPTools_PaveBlock& aPB) ; + + Standard_EXPORT void AddFace(const Standard_Integer aF) ; + + Standard_EXPORT void AddFaces(const TColStd_ListOfInteger& aLF) ; + + Standard_EXPORT const BOPTools_ListOfPaveBlock& PaveBlocks() const; + + Standard_EXPORT const TColStd_ListOfInteger& Faces() const; + + Standard_EXPORT const BOPTools_PaveBlock& PaveBlock1() const; + + Standard_EXPORT BOPTools_PaveBlock& PaveBlock1(const Standard_Integer anIx) ; + + Standard_EXPORT BOPTools_PaveBlock& PaveBlockOnEdge(const Standard_Integer anIndex) ; + + Standard_EXPORT Standard_Boolean IsPaveBlockOnFace(const Standard_Integer anIndex) const; + + Standard_EXPORT Standard_Boolean IsPaveBlockOnEdge(const Standard_Integer anIndex) const; + + Standard_EXPORT Standard_Boolean IsEqual(const NMTTools_CommonBlock& aCB) const; + + Standard_EXPORT Standard_Boolean Contains(const BOPTools_PaveBlock& aPB) const; diff --git a/src/NMTTools/NMTTools_CommonBlock.ixx b/src/NMTTools/NMTTools_CommonBlock.ixx index a93f77cb6..91d08c8c8 100644 --- a/src/NMTTools/NMTTools_CommonBlock.ixx +++ b/src/NMTTools/NMTTools_CommonBlock.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_CommonBlock.jxx b/src/NMTTools/NMTTools_CommonBlock.jxx index b02eb5526..1373207f3 100644 --- a/src/NMTTools/NMTTools_CommonBlock.jxx +++ b/src/NMTTools/NMTTools_CommonBlock.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _BOPTools_PaveBlock_HeaderFile #include #endif diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.cdl b/src/NMTTools/NMTTools_CommonBlockAPI.cdl index 8a10dc3a8..8743ee8ee 100644 --- a/src/NMTTools/NMTTools_CommonBlockAPI.cdl +++ b/src/NMTTools/NMTTools_CommonBlockAPI.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTTools_CommonBlockAPI.cdl -- Created: Mon Dec 15 11:35:46 2003 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2003 class CommonBlockAPI from NMTTools diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.hxx b/src/NMTTools/NMTTools_CommonBlockAPI.hxx index 24f8fc645..a3c437330 100644 --- a/src/NMTTools/NMTTools_CommonBlockAPI.hxx +++ b/src/NMTTools/NMTTools_CommonBlockAPI.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -45,6 +45,7 @@ class NMTTools_CommonBlock; #include #endif + class NMTTools_CommonBlockAPI { public: @@ -63,10 +64,25 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_CommonBlockAPI(const NMTTools_ListOfCommonBlock& aList); + + +//! Selector
Standard_EXPORT const NMTTools_ListOfCommonBlock& List() const; + + +//! Returns all PaveBlock-s (from the list) that are
+//! common for the given edge with DS-index
Standard_EXPORT const BOPTools_ListOfPaveBlock& CommonPaveBlocks(const Standard_Integer anE) const; + + +//! Returns TRUE if given PaveBlock is
+//! common for the Blocks from the list
Standard_EXPORT Standard_Boolean IsCommonBlock(const BOPTools_PaveBlock& aPB) const; + + Standard_EXPORT NMTTools_CommonBlock& CommonBlock(const BOPTools_PaveBlock& aPB) const; diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.ixx b/src/NMTTools/NMTTools_CommonBlockAPI.ixx index 4c8755cba..49edac894 100644 --- a/src/NMTTools/NMTTools_CommonBlockAPI.ixx +++ b/src/NMTTools/NMTTools_CommonBlockAPI.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.jxx b/src/NMTTools/NMTTools_CommonBlockAPI.jxx index 1f6547fd8..f6599af59 100644 --- a/src/NMTTools/NMTTools_CommonBlockAPI.jxx +++ b/src/NMTTools/NMTTools_CommonBlockAPI.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _NMTTools_ListOfCommonBlock_HeaderFile #include #endif diff --git a/src/NMTTools/NMTTools_CommonBlockPool.hxx b/src/NMTTools/NMTTools_CommonBlockPool.hxx index 201069847..92f849c57 100644 --- a/src/NMTTools/NMTTools_CommonBlockPool.hxx +++ b/src/NMTTools/NMTTools_CommonBlockPool.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -41,6 +41,7 @@ class NMTTools_ListOfCommonBlock; #include #endif + class NMTTools_CommonBlockPool { public: @@ -59,32 +60,56 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_CommonBlockPool(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5); + + Standard_EXPORT void Resize(const Standard_Integer theNewLength) ; + + Standard_EXPORT void Destroy() ; ~NMTTools_CommonBlockPool() { Destroy(); } + + Standard_EXPORT Standard_Integer Length() const; + + Standard_EXPORT Standard_Integer Extent() const; + + Standard_EXPORT Standard_Integer FactLength() const; + + Standard_EXPORT Standard_Integer Append(const NMTTools_ListOfCommonBlock& Value) ; + + Standard_EXPORT void Remove(const Standard_Integer Index) ; + + Standard_EXPORT const NMTTools_ListOfCommonBlock& Value(const Standard_Integer Index) const; const NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) const { return Value(Index); } + + Standard_EXPORT NMTTools_ListOfCommonBlock& ChangeValue(const Standard_Integer Index) ; NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) { return ChangeValue(Index); } + + Standard_EXPORT void SetBlockLength(const Standard_Integer aBL) ; + + Standard_EXPORT Standard_Integer BlockLength() const; @@ -105,13 +130,19 @@ private: // Methods PRIVATE // + + Standard_EXPORT NMTTools_CommonBlockPool(const NMTTools_CommonBlockPool& AnArray); + + Standard_EXPORT NMTTools_CommonBlockPool& Assign(const NMTTools_CommonBlockPool& Other) ; NMTTools_CommonBlockPool& operator =(const NMTTools_CommonBlockPool& Other) { return Assign(Other); } + + Standard_EXPORT Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const; diff --git a/src/NMTTools/NMTTools_CommonBlockPool_0.cxx b/src/NMTTools/NMTTools_CommonBlockPool_0.cxx index 7ca7bee08..09fe06543 100644 --- a/src/NMTTools/NMTTools_CommonBlockPool_0.cxx +++ b/src/NMTTools/NMTTools_CommonBlockPool_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_CoupleOfShape.cdl b/src/NMTTools/NMTTools_CoupleOfShape.cdl index 49215b1c4..7e8d2ed63 100644 --- a/src/NMTTools/NMTTools_CoupleOfShape.cdl +++ b/src/NMTTools/NMTTools_CoupleOfShape.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTTools_CoupleOfShape.cdl -- Created: Wed Jan 28 15:03:39 2004 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2004 class CoupleOfShape from NMTTools diff --git a/src/NMTTools/NMTTools_CoupleOfShape.hxx b/src/NMTTools/NMTTools_CoupleOfShape.hxx index db9a0c535..17ccbd0af 100644 --- a/src/NMTTools/NMTTools_CoupleOfShape.hxx +++ b/src/NMTTools/NMTTools_CoupleOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -33,6 +33,7 @@ class TopoDS_Shape; #include #endif + class NMTTools_CoupleOfShape { public: @@ -51,10 +52,20 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_CoupleOfShape(); + + Standard_EXPORT void SetShape1(const TopoDS_Shape& aS) ; + + Standard_EXPORT void SetShape2(const TopoDS_Shape& aS) ; + + Standard_EXPORT const TopoDS_Shape& Shape1() const; + + Standard_EXPORT const TopoDS_Shape& Shape2() const; diff --git a/src/NMTTools/NMTTools_CoupleOfShape.ixx b/src/NMTTools/NMTTools_CoupleOfShape.ixx index 387747024..9711b73ad 100644 --- a/src/NMTTools/NMTTools_CoupleOfShape.ixx +++ b/src/NMTTools/NMTTools_CoupleOfShape.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_CoupleOfShape.jxx b/src/NMTTools/NMTTools_CoupleOfShape.jxx index e7e77a0af..fe94c8849 100644 --- a/src/NMTTools/NMTTools_CoupleOfShape.jxx +++ b/src/NMTTools/NMTTools_CoupleOfShape.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _TopoDS_Shape_HeaderFile #include #endif diff --git a/src/NMTTools/NMTTools_DEProcessor.cdl b/src/NMTTools/NMTTools_DEProcessor.cdl index 9268aaa0d..d58f06dbf 100644 --- a/src/NMTTools/NMTTools_DEProcessor.cdl +++ b/src/NMTTools/NMTTools_DEProcessor.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTTools_DEProcessor.cdl -- Created: Wed Sep 12 12:08:37 2001 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2001 class DEProcessor from NMTTools diff --git a/src/NMTTools/NMTTools_DEProcessor.cxx b/src/NMTTools/NMTTools_DEProcessor.cxx index 6762a1dd3..0350ee38c 100644 --- a/src/NMTTools/NMTTools_DEProcessor.cxx +++ b/src/NMTTools/NMTTools_DEProcessor.cxx @@ -17,7 +17,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: BOPTools_DEProcessor.cxx +// File: NMTTools_DEProcessor.cxx // Created: Wed Sep 12 12:10:52 2001 // Author: Peter KURNEV // @@ -80,11 +80,15 @@ #include -//#include #include // #include #include +// +#include + +#include +#include @@ -137,14 +141,14 @@ aNb=myDS->NumberOfShapesOfTheObject(); // for (i=1; i<=aNb; i++) { - const TopoDS_Shape& aF=myDS->Shape(i); + const TopoDS_Shape aF=myDS->Shape(i);//mpv if (aF.ShapeType()==TopAbs_FACE) { TopExp::MapShapesAndAncestors (aF, TopAbs_EDGE, TopAbs_FACE, aMEF); } } // for (i=1; i<=aNb; i++) { - const TopoDS_Shape& aS=myDS->Shape(i); + const TopoDS_Shape aS=myDS->Shape(i);//mpv if (aS.ShapeType()==TopAbs_EDGE) { const TopoDS_Edge& aE=TopoDS::Edge(aS); @@ -306,11 +310,16 @@ // Clear aPaveSet, aSplitEdges aPaveSet.ChangeSet().Clear(); // - const TopoDS_Edge& aDE=TopoDS::Edge(myDS->Shape(nED)); - const TopoDS_Face& aDF=TopoDS::Face(myDS->Shape(nFD)); + const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));//mpv + const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));//mpv // // 2D Curve of degenerated edge on the face aDF - Handle(Geom2d_Curve) aC2DDE=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2); + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + //Handle(Geom2d_Curve) aC2DDE=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2); + Handle(Geom2d_Curve) aC2DDE1=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2); + Handle(Geom2d_TrimmedCurve)aC2DDE=new Geom2d_TrimmedCurve(aC2DDE1, aTD1, aTD2); + // Contribution of Samtech www.samcef.com END // // Choose direction for Degenerated Edge gp_Pnt2d aP2d1, aP2d2; @@ -333,7 +342,7 @@ for (; anIt.More(); anIt.Next()) { const BOPTools_PaveBlock& aPB=anIt.Value(); nE=aPB.Edge(); - const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); + const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv Handle(Geom2d_Curve) aC2D=BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2); // @@ -360,7 +369,17 @@ for (j=1; j<=aNbPoints; ++j) { gp_Pnt2d aP2D=aGInter.Point(j).Value(); // - aX=(bXDir) ? aP2D.X(): aP2D.Y(); + // Modified to obtain exact parameter Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + Handle(Geom2d_Line) aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1); + if (aCLDE.IsNull()) { + continue; + } + gp_Lin2d aLDE=aCLDE->Lin2d(); + aX=ElCLib::Parameter(aLDE, aP2D); + // + //aX=(bXDir) ? aP2D.X(): aP2D.Y(); + // Contribution of Samtech www.samcef.com END // if (fabs (aX-aTD1) < aDT || fabs (aX-aTD2) < aDT) { continue; @@ -427,8 +446,8 @@ TopoDS_Edge aE, aESplit; TopoDS_Vertex aV1, aV2; - const TopoDS_Edge& aDE=TopoDS::Edge(myDS->Shape(nED)); - const TopoDS_Face& aDF=TopoDS::Face(myDS->Shape(nFD)); + const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));//mpv + const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));//mpv BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges); diff --git a/src/NMTTools/NMTTools_DEProcessor.hxx b/src/NMTTools/NMTTools_DEProcessor.hxx index 8da33e72b..dfd149335 100644 --- a/src/NMTTools/NMTTools_DEProcessor.hxx +++ b/src/NMTTools/NMTTools_DEProcessor.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -52,6 +52,15 @@ class TopoDS_Vertex; #include #endif + +//!
+//! The Algorithm to compute and store in interferences' pool
+//! and in the Data Structure the following values
+//! for degenerated edges
+//! 1. Paves/Pave set(s)
+//! 2. Split parts
+//! 3. States (3D) for split parts
+//!
class NMTTools_DEProcessor { public: @@ -70,8 +79,20 @@ public: } // Methods PUBLIC // + + +//! Constructor
+//!
+//! Constructor
+//!
Standard_EXPORT NMTTools_DEProcessor(NMTTools_PaveFiller& aFiller); + + +//! Launches the processor
Standard_EXPORT void Do() ; + + +//! Returns TRUE if it is Ok
Standard_EXPORT Standard_Boolean IsDone() const; @@ -82,12 +103,26 @@ protected: // Methods PROTECTED // + + Standard_EXPORT void FindDegeneratedEdges() ; + + Standard_EXPORT void DoPaves() ; + + Standard_EXPORT void FindPaveBlocks(const Standard_Integer nED,const Standard_Integer nVD,const Standard_Integer nFD,BOPTools_ListOfPaveBlock& aLPB) ; + + Standard_EXPORT void FillPaveSet(const Standard_Integer nED,const Standard_Integer nVD,const Standard_Integer nFD,const BOPTools_ListOfPaveBlock& aLPB) ; + + Standard_EXPORT void FillSplitEdgesPool(const Standard_Integer nED) ; + + Standard_EXPORT void MakeSplitEdges(const Standard_Integer nED,const Standard_Integer nFD) ; + + Standard_EXPORT void MakeSplitEdge(const TopoDS_Edge& aS1,const TopoDS_Face& aF,const TopoDS_Vertex& aV1,const Standard_Real aP1,const TopoDS_Vertex& aV2,const Standard_Real aP2,TopoDS_Edge& aNewEdge) ; diff --git a/src/NMTTools/NMTTools_DEProcessor.ixx b/src/NMTTools/NMTTools_DEProcessor.ixx index 5025cc4f6..941caff8c 100644 --- a/src/NMTTools/NMTTools_DEProcessor.ixx +++ b/src/NMTTools/NMTTools_DEProcessor.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_DEProcessor.jxx b/src/NMTTools/NMTTools_DEProcessor.jxx index 0d86c3f6e..b039537bc 100644 --- a/src/NMTTools/NMTTools_DEProcessor.jxx +++ b/src/NMTTools/NMTTools_DEProcessor.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _NMTTools_PaveFiller_HeaderFile #include #endif diff --git a/src/NMTTools/NMTTools_DSFiller.cdl b/src/NMTTools/NMTTools_DSFiller.cdl index ba69d115b..1876b25fe 100644 --- a/src/NMTTools/NMTTools_DSFiller.cdl +++ b/src/NMTTools/NMTTools_DSFiller.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTTools_DSFiller.cdl -- Created: Fri Dec 5 13:57:03 2003 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2003 class DSFiller from NMTTools diff --git a/src/NMTTools/NMTTools_DSFiller.hxx b/src/NMTTools/NMTTools_DSFiller.hxx index a84c42cc8..82c9b40c4 100644 --- a/src/NMTTools/NMTTools_DSFiller.hxx +++ b/src/NMTTools/NMTTools_DSFiller.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -48,6 +48,7 @@ class NMTTools_PaveFiller; #include #endif + class NMTTools_DSFiller { public: @@ -66,22 +67,48 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_DSFiller(); + +//! Destructor
+//!
+//! Selectors/Modifiers
Standard_EXPORT void Destroy() ; ~NMTTools_DSFiller() { Destroy(); } + + Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ; + + Standard_EXPORT const TopoDS_Shape& CompositeShape() const; + + Standard_EXPORT void SetNewFiller(const Standard_Boolean aFlag) const; + + Standard_EXPORT Standard_Boolean IsNewFiller() const; + + Standard_EXPORT void Perform() ; + + Standard_EXPORT const NMTDS_ShapesDataStructure& DS() const; + + Standard_EXPORT const BOPTools_InterferencePool& InterfPool() const; + + Standard_EXPORT Standard_Boolean IsDone() const; + + Standard_EXPORT const NMTTools_PaveFiller& PaveFiller() const; + + Standard_EXPORT NMTTools_PaveFiller& ChangePaveFiller() ; @@ -92,6 +119,8 @@ protected: // Methods PROTECTED // + + Standard_EXPORT void Clear() ; diff --git a/src/NMTTools/NMTTools_DSFiller.ixx b/src/NMTTools/NMTTools_DSFiller.ixx index 297713e85..c9b80740a 100644 --- a/src/NMTTools/NMTTools_DSFiller.ixx +++ b/src/NMTTools/NMTTools_DSFiller.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_DSFiller.jxx b/src/NMTTools/NMTTools_DSFiller.jxx index 47a201400..3ff0ae84f 100644 --- a/src/NMTTools/NMTTools_DSFiller.jxx +++ b/src/NMTTools/NMTTools_DSFiller.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _TopoDS_Shape_HeaderFile #include #endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx index aef005c55..3823f0edf 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -44,39 +44,31 @@ class TColStd_MapIntegerHasher; class NMTTools_IndexedDataMapOfIndexedMapOfInteger; + class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger(const Standard_Integer& K1,const Standard_Integer K2,const TColStd_IndexedMapOfInteger& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + Standard_Integer& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + TColStd_IndexedMapOfInteger& Value() const; -Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger(); +//Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx index 26449e638..bddc64d48 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,7 +32,7 @@ #ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile #include #endif -NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {} +//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {} @@ -40,11 +40,8 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMa { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -77,11 +74,11 @@ const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexe { return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) ; } -Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {} +//Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {} #define TheKey Standard_Integer #define TheKey_hxx #define TheItem TColStd_IndexedMapOfInteger diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx index 82ffd7634..0caba086b 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -48,39 +48,31 @@ class TopTools_ShapeMapHasher; class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape; + class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape(const TopoDS_Shape& K1,const Standard_Integer K2,const TopTools_IndexedMapOfShape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + TopoDS_Shape& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + TopTools_IndexedMapOfShape& Value() const; -Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape(); +//Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx index bc564341f..40833f09d 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -35,7 +35,7 @@ #ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile #include #endif -NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {} +//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {} @@ -43,11 +43,8 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMa { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -80,11 +77,11 @@ const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeI { return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) ; } -Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {} +//Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {} #define TheKey TopoDS_Shape #define TheKey_hxx #define TheItem TopTools_IndexedMapOfShape diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx index ad94cd73c..7a0a361ee 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -48,39 +48,31 @@ class TopTools_ShapeMapHasher; class NMTTools_IndexedDataMapOfShapePaveBlock; + class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock(const TopoDS_Shape& K1,const Standard_Integer K2,const BOPTools_PaveBlock& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + TopoDS_Shape& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + BOPTools_PaveBlock& Value() const; -Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock(); +//Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx index 1544f7045..f16382ff4 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -35,7 +35,7 @@ #ifndef _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile #include #endif -NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {} +//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {} @@ -43,11 +43,8 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMa { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -80,11 +77,11 @@ const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeP { return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) ; } -Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {} +//Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {} #define TheKey TopoDS_Shape #define TheKey_hxx #define TheItem BOPTools_PaveBlock diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx b/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx index 1c2452184..b9f696fe2 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -47,6 +47,7 @@ class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger; #include #endif + class NMTTools_IndexedDataMapOfIndexedMapOfInteger : public TCollection_BasicMap { public: @@ -65,39 +66,67 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger(const Standard_Integer NbBuckets = 1); + + Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger& Assign(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other) ; NMTTools_IndexedDataMapOfIndexedMapOfInteger& operator =(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other) { return Assign(Other); } + + Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; + + Standard_EXPORT void Clear() ; ~NMTTools_IndexedDataMapOfIndexedMapOfInteger() { Clear(); } + + Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const TColStd_IndexedMapOfInteger& I) ; + + Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const TColStd_IndexedMapOfInteger& T) ; + + Standard_EXPORT void RemoveLast() ; + + Standard_EXPORT Standard_Boolean Contains(const Standard_Integer& K) const; + + Standard_EXPORT const Standard_Integer& FindKey(const Standard_Integer I) const; + + Standard_EXPORT const TColStd_IndexedMapOfInteger& FindFromIndex(const Standard_Integer I) const; const TColStd_IndexedMapOfInteger& operator ()(const Standard_Integer I) const { return FindFromIndex(I); } + + Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFromIndex(const Standard_Integer I) ; TColStd_IndexedMapOfInteger& operator ()(const Standard_Integer I) { return ChangeFromIndex(I); } + + Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const; + + Standard_EXPORT const TColStd_IndexedMapOfInteger& FindFromKey(const Standard_Integer& K) const; + + Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFromKey(const Standard_Integer& K) ; @@ -118,6 +147,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other); diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx index 789dab633..38e7ef10b 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx +++ b/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx index be19bc803..2c55162c3 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -48,6 +48,7 @@ class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape; #include #endif + class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape : public TCollection_BasicMap { public: @@ -66,39 +67,67 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape(const Standard_Integer NbBuckets = 1); + + Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Assign(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other) ; NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& operator =(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other) { return Assign(Other); } + + Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; + + Standard_EXPORT void Clear() ; ~NMTTools_IndexedDataMapOfShapeIndexedMapOfShape() { Clear(); } + + Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const TopTools_IndexedMapOfShape& I) ; + + Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const TopTools_IndexedMapOfShape& T) ; + + Standard_EXPORT void RemoveLast() ; + + Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; + + Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; + + Standard_EXPORT const TopTools_IndexedMapOfShape& FindFromIndex(const Standard_Integer I) const; const TopTools_IndexedMapOfShape& operator ()(const Standard_Integer I) const { return FindFromIndex(I); } + + Standard_EXPORT TopTools_IndexedMapOfShape& ChangeFromIndex(const Standard_Integer I) ; TopTools_IndexedMapOfShape& operator ()(const Standard_Integer I) { return ChangeFromIndex(I); } + + Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const; + + Standard_EXPORT const TopTools_IndexedMapOfShape& FindFromKey(const TopoDS_Shape& K) const; + + Standard_EXPORT TopTools_IndexedMapOfShape& ChangeFromKey(const TopoDS_Shape& K) ; @@ -119,6 +148,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other); diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx index 0b5caf8c8..c41bc1e2a 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx +++ b/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx index a6add0910..a13f75903 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -48,6 +48,7 @@ class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock; #include #endif + class NMTTools_IndexedDataMapOfShapePaveBlock : public TCollection_BasicMap { public: @@ -66,39 +67,67 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock(const Standard_Integer NbBuckets = 1); + + Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock& Assign(const NMTTools_IndexedDataMapOfShapePaveBlock& Other) ; NMTTools_IndexedDataMapOfShapePaveBlock& operator =(const NMTTools_IndexedDataMapOfShapePaveBlock& Other) { return Assign(Other); } + + Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; + + Standard_EXPORT void Clear() ; ~NMTTools_IndexedDataMapOfShapePaveBlock() { Clear(); } + + Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const BOPTools_PaveBlock& I) ; + + Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const BOPTools_PaveBlock& T) ; + + Standard_EXPORT void RemoveLast() ; + + Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; + + Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; + + Standard_EXPORT const BOPTools_PaveBlock& FindFromIndex(const Standard_Integer I) const; const BOPTools_PaveBlock& operator ()(const Standard_Integer I) const { return FindFromIndex(I); } + + Standard_EXPORT BOPTools_PaveBlock& ChangeFromIndex(const Standard_Integer I) ; BOPTools_PaveBlock& operator ()(const Standard_Integer I) { return ChangeFromIndex(I); } + + Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const; + + Standard_EXPORT const BOPTools_PaveBlock& FindFromKey(const TopoDS_Shape& K) const; + + Standard_EXPORT BOPTools_PaveBlock& ChangeFromKey(const TopoDS_Shape& K) ; @@ -119,6 +148,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock(const NMTTools_IndexedDataMapOfShapePaveBlock& Other); diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx index 12441f662..8e25be569 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx +++ b/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cdl b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cdl index cb3d54e3b..cc8e02bfe 100644 --- a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cdl +++ b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cdl @@ -1,27 +1,26 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTTools_IteratorOfCoupleOfShape.cdl -- Created: Thu Dec 4 16:57:48 2003 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2003 class IteratorOfCoupleOfShape from NMTTools diff --git a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.hxx index d105a1ece..81dabc054 100644 --- a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.hxx +++ b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -49,6 +49,7 @@ class NMTDS_ShapesDataStructure; #include #endif + class NMTTools_IteratorOfCoupleOfShape : public BOPTools_IteratorOfCoupleOfShape { public: @@ -67,11 +68,23 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_IteratorOfCoupleOfShape(); + + Standard_EXPORT void SetDS(const NMTDS_PShapesDataStructure& pDS) ; + + Standard_EXPORT virtual void Initialize(const TopAbs_ShapeEnum Type1,const TopAbs_ShapeEnum Type2) ; + + Standard_EXPORT virtual void Current(Standard_Integer& Index1,Standard_Integer& Index2,Standard_Boolean& WithSubShape) const; + + Standard_EXPORT virtual Standard_Boolean More() const; + + Standard_EXPORT const NMTDS_ShapesDataStructure& DS() const; diff --git a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.ixx b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.ixx index 324415278..5a5cd42bd 100644 --- a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.ixx +++ b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.jxx b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.jxx index 6bd779ae2..e09e5e92e 100644 --- a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.jxx +++ b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _Standard_NoSuchObject_HeaderFile #include #endif diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx index 895971ec2..25a3784c0 100644 --- a/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx +++ b/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -43,6 +43,7 @@ class NMTTools_ListNodeOfListOfCommonBlock; #include #endif + class NMTTools_ListIteratorOfListOfCommonBlock { public: @@ -61,11 +62,22 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_ListIteratorOfListOfCommonBlock(); + + Standard_EXPORT NMTTools_ListIteratorOfListOfCommonBlock(const NMTTools_ListOfCommonBlock& L); + + Standard_EXPORT void Initialize(const NMTTools_ListOfCommonBlock& L) ; + Standard_Boolean More() const; + + Standard_EXPORT void Next() ; + + Standard_EXPORT NMTTools_CommonBlock& Value() const; diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx index d0405a4b8..82d54ddd8 100644 --- a/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx +++ b/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx index 3b621e372..7e6224c4f 100644 --- a/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx +++ b/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -43,6 +43,7 @@ class NMTTools_ListNodeOfListOfCoupleOfShape; #include #endif + class NMTTools_ListIteratorOfListOfCoupleOfShape { public: @@ -61,11 +62,22 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_ListIteratorOfListOfCoupleOfShape(); + + Standard_EXPORT NMTTools_ListIteratorOfListOfCoupleOfShape(const NMTTools_ListOfCoupleOfShape& L); + + Standard_EXPORT void Initialize(const NMTTools_ListOfCoupleOfShape& L) ; + Standard_Boolean More() const; + + Standard_EXPORT void Next() ; + + Standard_EXPORT NMTTools_CoupleOfShape& Value() const; diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx index af51216a2..6e5da2628 100644 --- a/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx +++ b/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx index a3e47c15b..8dbc0e685 100644 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -41,36 +41,25 @@ class NMTTools_ListOfCommonBlock; class NMTTools_ListIteratorOfListOfCommonBlock; + class NMTTools_ListNodeOfListOfCommonBlock : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + NMTTools_ListNodeOfListOfCommonBlock(const NMTTools_CommonBlock& I,const TCollection_MapNodePtr& n); + NMTTools_CommonBlock& Value() const; -Standard_EXPORT ~NMTTools_ListNodeOfListOfCommonBlock(); +//Standard_EXPORT ~NMTTools_ListNodeOfListOfCommonBlock(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& NMTTools_ListNodeOfListOfCommonBlock_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx index 5d95b5158..ab8a57f3b 100644 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,7 +32,7 @@ #ifndef _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile #include #endif -NMTTools_ListNodeOfListOfCommonBlock::~NMTTools_ListNodeOfListOfCommonBlock() {} +//NMTTools_ListNodeOfListOfCommonBlock::~NMTTools_ListNodeOfListOfCommonBlock() {} @@ -40,11 +40,8 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_ListNodeOfListOfCommonBlock_Type_ { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -77,11 +74,11 @@ const Handle(Standard_Type)& NMTTools_ListNodeOfListOfCommonBlock::DynamicType() { return STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock) ; } -Standard_Boolean NMTTools_ListNodeOfListOfCommonBlock::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_NMTTools_ListNodeOfListOfCommonBlock::~Handle_NMTTools_ListNodeOfListOfCommonBlock() {} +//Standard_Boolean NMTTools_ListNodeOfListOfCommonBlock::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_NMTTools_ListNodeOfListOfCommonBlock::~Handle_NMTTools_ListNodeOfListOfCommonBlock() {} #define Item NMTTools_CommonBlock #define Item_hxx #define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx index e6ab9e45e..9aa25f86d 100644 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -41,36 +41,25 @@ class NMTTools_ListOfCoupleOfShape; class NMTTools_ListIteratorOfListOfCoupleOfShape; + class NMTTools_ListNodeOfListOfCoupleOfShape : public TCollection_MapNode { public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } // Methods PUBLIC // + NMTTools_ListNodeOfListOfCoupleOfShape(const NMTTools_CoupleOfShape& I,const TCollection_MapNodePtr& n); + NMTTools_CoupleOfShape& Value() const; -Standard_EXPORT ~NMTTools_ListNodeOfListOfCoupleOfShape(); +//Standard_EXPORT ~NMTTools_ListNodeOfListOfCoupleOfShape(); // Type management // - Standard_EXPORT friend Handle_Standard_Type& NMTTools_ListNodeOfListOfCoupleOfShape_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx index 338b00a33..430f82c5f 100644 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,7 +32,7 @@ #ifndef _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile #include #endif -NMTTools_ListNodeOfListOfCoupleOfShape::~NMTTools_ListNodeOfListOfCoupleOfShape() {} +//NMTTools_ListNodeOfListOfCoupleOfShape::~NMTTools_ListNodeOfListOfCoupleOfShape() {} @@ -40,11 +40,8 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_ListNodeOfListOfCoupleOfShape_Typ { static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); 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}; @@ -77,11 +74,11 @@ const Handle(Standard_Type)& NMTTools_ListNodeOfListOfCoupleOfShape::DynamicType { return STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape) ; } -Standard_Boolean NMTTools_ListNodeOfListOfCoupleOfShape::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_NMTTools_ListNodeOfListOfCoupleOfShape::~Handle_NMTTools_ListNodeOfListOfCoupleOfShape() {} +//Standard_Boolean NMTTools_ListNodeOfListOfCoupleOfShape::IsKind(const Handle(Standard_Type)& AType) const +//{ +// return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape) == AType || TCollection_MapNode::IsKind(AType)); +//} +//Handle_NMTTools_ListNodeOfListOfCoupleOfShape::~Handle_NMTTools_ListNodeOfListOfCoupleOfShape() {} #define Item NMTTools_CoupleOfShape #define Item_hxx #define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape diff --git a/src/NMTTools/NMTTools_ListOfCommonBlock.hxx b/src/NMTTools/NMTTools_ListOfCommonBlock.hxx index 790503439..a3c33aaaa 100644 --- a/src/NMTTools/NMTTools_ListOfCommonBlock.hxx +++ b/src/NMTTools/NMTTools_ListOfCommonBlock.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -45,6 +45,7 @@ class NMTTools_ListNodeOfListOfCommonBlock; #include #endif + class NMTTools_ListOfCommonBlock { public: @@ -63,34 +64,71 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_ListOfCommonBlock(); + + Standard_EXPORT void Assign(const NMTTools_ListOfCommonBlock& Other) ; void operator=(const NMTTools_ListOfCommonBlock& Other) { Assign(Other); } + + Standard_EXPORT Standard_Integer Extent() const; + + Standard_EXPORT void Clear() ; ~NMTTools_ListOfCommonBlock() { Clear(); } + Standard_Boolean IsEmpty() const; + + Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I) ; + + Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ; + + Standard_EXPORT void Prepend(NMTTools_ListOfCommonBlock& Other) ; + + Standard_EXPORT void Append(const NMTTools_CommonBlock& I) ; + + Standard_EXPORT void Append(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ; + + Standard_EXPORT void Append(NMTTools_ListOfCommonBlock& Other) ; + + Standard_EXPORT NMTTools_CommonBlock& First() const; + + Standard_EXPORT NMTTools_CommonBlock& Last() const; + + Standard_EXPORT void RemoveFirst() ; + + Standard_EXPORT void Remove(NMTTools_ListIteratorOfListOfCommonBlock& It) ; + + Standard_EXPORT void InsertBefore(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ; + + Standard_EXPORT void InsertBefore(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ; + + Standard_EXPORT void InsertAfter(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ; + + Standard_EXPORT void InsertAfter(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ; @@ -112,6 +150,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT NMTTools_ListOfCommonBlock(const NMTTools_ListOfCommonBlock& Other); diff --git a/src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx b/src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx index df5fc9d70..68839bedd 100644 --- a/src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx +++ b/src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx index 6e63a0806..2ba0b324c 100644 --- a/src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx +++ b/src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -45,6 +45,7 @@ class NMTTools_ListNodeOfListOfCoupleOfShape; #include #endif + class NMTTools_ListOfCoupleOfShape { public: @@ -63,34 +64,71 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_ListOfCoupleOfShape(); + + Standard_EXPORT void Assign(const NMTTools_ListOfCoupleOfShape& Other) ; void operator=(const NMTTools_ListOfCoupleOfShape& Other) { Assign(Other); } + + Standard_EXPORT Standard_Integer Extent() const; + + Standard_EXPORT void Clear() ; ~NMTTools_ListOfCoupleOfShape() { Clear(); } + Standard_Boolean IsEmpty() const; + + Standard_EXPORT void Prepend(const NMTTools_CoupleOfShape& I) ; + + Standard_EXPORT void Prepend(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& theIt) ; + + Standard_EXPORT void Prepend(NMTTools_ListOfCoupleOfShape& Other) ; + + Standard_EXPORT void Append(const NMTTools_CoupleOfShape& I) ; + + Standard_EXPORT void Append(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& theIt) ; + + Standard_EXPORT void Append(NMTTools_ListOfCoupleOfShape& Other) ; + + Standard_EXPORT NMTTools_CoupleOfShape& First() const; + + Standard_EXPORT NMTTools_CoupleOfShape& Last() const; + + Standard_EXPORT void RemoveFirst() ; + + Standard_EXPORT void Remove(NMTTools_ListIteratorOfListOfCoupleOfShape& It) ; + + Standard_EXPORT void InsertBefore(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ; + + Standard_EXPORT void InsertBefore(NMTTools_ListOfCoupleOfShape& Other,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ; + + Standard_EXPORT void InsertAfter(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ; + + Standard_EXPORT void InsertAfter(NMTTools_ListOfCoupleOfShape& Other,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ; @@ -112,6 +150,8 @@ private: // Methods PRIVATE // + + Standard_EXPORT NMTTools_ListOfCoupleOfShape(const NMTTools_ListOfCoupleOfShape& Other); diff --git a/src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx b/src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx index 30996a951..3251491ef 100644 --- a/src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx +++ b/src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_PCurveMaker.cdl b/src/NMTTools/NMTTools_PCurveMaker.cdl index c040bbf5f..b4babb82f 100644 --- a/src/NMTTools/NMTTools_PCurveMaker.cdl +++ b/src/NMTTools/NMTTools_PCurveMaker.cdl @@ -1,22 +1,22 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTTools_PCurveMaker.cdl -- Created: -- Author: Peter KURNEV diff --git a/src/NMTTools/NMTTools_PCurveMaker.hxx b/src/NMTTools/NMTTools_PCurveMaker.hxx index 951b32d9b..ca0b3f248 100644 --- a/src/NMTTools/NMTTools_PCurveMaker.hxx +++ b/src/NMTTools/NMTTools_PCurveMaker.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -35,6 +35,9 @@ #include #endif + +//! Class provides computation p-curves for the edges and theirs
+//! split parts
class NMTTools_PCurveMaker { public: @@ -53,8 +56,17 @@ public: } // Methods PUBLIC // + + +//! Constructor
Standard_EXPORT NMTTools_PCurveMaker(NMTTools_PDSFiller& aFiller); + + +//! Launch the processor
Standard_EXPORT void Do() ; + + +//! Returns TRUE if Ok
Standard_EXPORT Standard_Boolean IsDone() const; diff --git a/src/NMTTools/NMTTools_PCurveMaker.ixx b/src/NMTTools/NMTTools_PCurveMaker.ixx index e3425c15e..3a2ac54d6 100644 --- a/src/NMTTools/NMTTools_PCurveMaker.ixx +++ b/src/NMTTools/NMTTools_PCurveMaker.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_PCurveMaker.jxx b/src/NMTTools/NMTTools_PCurveMaker.jxx index 250eeba46..46c9c270f 100644 --- a/src/NMTTools/NMTTools_PCurveMaker.jxx +++ b/src/NMTTools/NMTTools_PCurveMaker.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _NMTTools_PCurveMaker_HeaderFile #include #endif diff --git a/src/NMTTools/NMTTools_PDSFiller.hxx b/src/NMTTools/NMTTools_PDSFiller.hxx index fedc3f393..cfc95a0fa 100644 --- a/src/NMTTools/NMTTools_PDSFiller.hxx +++ b/src/NMTTools/NMTTools_PDSFiller.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_PPaveFiller.hxx b/src/NMTTools/NMTTools_PPaveFiller.hxx index 766401d4b..116c108ef 100644 --- a/src/NMTTools/NMTTools_PPaveFiller.hxx +++ b/src/NMTTools/NMTTools_PPaveFiller.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_PaveFiller.cdl b/src/NMTTools/NMTTools_PaveFiller.cdl index 2ced14146..3cee74a1a 100644 --- a/src/NMTTools/NMTTools_PaveFiller.cdl +++ b/src/NMTTools/NMTTools_PaveFiller.cdl @@ -1,43 +1,51 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- -- File: NMTTools_PaveFiller.cdl -- Created: Fri Dec 5 14:35:00 2003 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2003 class PaveFiller from NMTTools ---Purpose: -uses - ListOfInteger from TColStd, +uses + -- Modified to add new definitions Thu Sep 14 14:35:18 2006 + -- Contribution of Samtech www.samcef.com BEGIN + ListOfInteger from TColStd, + -- Contribution of Samtech www.samcef.com END + DataMapOfIntegerInteger from TColStd, Pnt from gp, ShapeEnum from TopAbs, Vertex from TopoDS, - Face from TopoDS, + Face from TopoDS, + -- Modified to add new definitions Thu Sep 14 14:35:18 2006 + -- Contribution of Samtech www.samcef.com BEGIN + Edge from TopoDS, + ListOfShape from TopTools, + -- Contribution of Samtech www.samcef.com END Context from IntTools, ShrunkRange from IntTools, - + IndexedDataMapOfShapeInteger from BooleanOperations, InterferencePool from BOPTools, @@ -57,12 +65,18 @@ uses CommonBlockPool from NMTTools, CommonBlock from NMTTools, - ListOfCommonBlock from NMTTools, - IteratorOfCoupleOfShape from NMTTools, - - ShapesDataStructure from NMTDS, - PShapesDataStructure from NMTDS - + ListOfCommonBlock from NMTTools, + -- Modified to add new definitions Thu Sep 14 14:35:18 2006 + -- Contribution of Samtech www.samcef.com BEGIN + IndexedDataMapOfIndexedMapOfInteger from NMTTools, + -- Contribution of Samtech www.samcef.com END + ShapesDataStructure from NMTDS, + -- Modified to add new definitions Thu Sep 14 14:35:18 2006 + -- Contribution of Samtech www.samcef.com BEGIN + PShapesDataStructure from NMTDS, + Iterator from NMTDS + -- Contribution of Samtech www.samcef.com END + --raises is @@ -84,14 +98,16 @@ is returns PInterferencePool from BOPTools; -- -- Perform the algo - Init (me:out) - is protected; + -- Modified to add new method Thu Sep 14 14:35:18 2006 + -- Contribution of Samtech www.samcef.com BEGIN + Init (me:out); + -- Contribution of Samtech www.samcef.com END Perform (me:out) is virtual; PerformVV (me:out) - is virtual protected; + is virtual ; PerformVE (me:out) is virtual protected; @@ -127,7 +143,7 @@ is is virtual protected; PerformNewVertices (me:out) - is virtual protected; + is virtual ; PrepareEdges (me:out) is virtual protected; @@ -353,8 +369,17 @@ is RealPaveBlock(me:out; aPB:PaveBlock from BOPTools) returns PaveBlock from BOPTools; + ---C++: return const & + + -- Modified to add new method Thu Sep 14 14:35:18 2006 + -- Contribution of Samtech www.samcef.com BEGIN + RealPaveBlock(me:out; + aPB:PaveBlock from BOPTools; + aLB:out ListOfInteger from TColStd) + returns PaveBlock from BOPTools; ---C++: return const & - -- + -- Contribution of Samtech www.samcef.com END + RealSplitsFace (me:out; nF2 :Integer from Standard; aLs :out ListOfPaveBlock from BOPTools); @@ -394,9 +419,7 @@ is PrepareSetForFace(me:out; nF1 :Integer from Standard; nF2 :Integer from Standard; - --modified by NIZNHY-PKV Fri Apr 1 11:19:15 2005f aLPB: ListOfPaveBlock from BOPTools; - --modified by NIZNHY-PKV Fri Apr 1 10:54:16 2005t aPSF:out PaveSet from BOPTools); PutPaveOnCurve(me:out; @@ -427,34 +450,77 @@ is aTol: Real from Standard) returns Integer from Standard; --- IsExistingPaveBlock (me:out; --- aPB : PaveBlock from BOPTools; --- aFF : SSInterference from BOPTools) --- returns Boolean from Standard; - ---modified by NIZNHY-PKV Fri Apr 1 09:35:34 2005f + IsExistingPaveBlock (me:out; aPB : PaveBlock from BOPTools; aLPB: ListOfPaveBlock from BOPTools; aTol: Real from Standard) returns Boolean from Standard; ---modified by NIZNHY-PKV Fri Apr 1 09:35:39 2005t MakePCurves (me:out); + -- Modified to add new methods Thu Sep 14 14:35:18 2006 + -- Contribution of Samtech www.samcef.com BEGIN + PerformVF1(me:out) + is protected; + + MakeAloneVertices(me:out) + is protected; + + AloneVertices(me) + returns IndexedDataMapOfIndexedMapOfInteger from NMTTools; + ---C++: return const & + -- Contribution of Samtech www.samcef.com END + + IsExistingPaveBlock (me:out; + aPB : PaveBlock from BOPTools; + aLPB: ListOfShape from TopTools; + aTol: Real from Standard) + returns Boolean from Standard; + + -- + CheckCoincidence (me:out; + aPB : PaveBlock from BOPTools; + aLPB: ListOfPaveBlock from BOPTools) + returns Boolean from Standard; + -- + + CheckIntermediatePoint(me:out; + aPB : PaveBlock from BOPTools; + aE : Edge from TopoDS; + aTol: Real from Standard) + returns Integer from Standard; + + -- Modified to add new method Thu Sep 14 14:35:18 2006 + -- Contribution of Samtech www.samcef.com BEGIN + SharedEdges(me:out; + nF1 :Integer from Standard; + nF2 :Integer from Standard; + aLNE :out ListOfInteger from TColStd; + aLSE :out ListOfShape from TopTools); + -- Contribution of Samtech www.samcef.com END + fields myIntrPool : PInterferencePool from BOPTools is protected; myDS : PShapesDataStructure from NMTDS is protected; myIsDone : Boolean from Standard is protected; myNbSources : Integer from Standard is protected; - myNbEdges : Integer from Standard is protected; - myDSIt : IteratorOfCoupleOfShape from NMTTools is protected; - -- + myNbEdges : Integer from Standard is protected; + + -- Modified to add new field Thu Sep 14 14:35:18 2006 + -- Contribution of Samtech www.samcef.com BEGIN + myDSIt : Iterator from NMTDS is protected; + -- Contribution of Samtech www.samcef.com END + myPavePool : PavePool from BOPTools is protected; myPavePoolNew : PavePool from BOPTools is protected; myCommonBlockPool : CommonBlockPool from NMTTools is protected; mySplitShapesPool : SplitShapesPool from BOPTools is protected; -- myContext : Context from IntTools is protected; - mySectionAttribute : SSIntersectionAttribute from BOPTools is protected; + mySectionAttribute : SSIntersectionAttribute from BOPTools is protected; + myAloneVertices : IndexedDataMapOfIndexedMapOfInteger from NMTTools is protected; + -- + myVSD : DataMapOfIntegerInteger from TColStd is protected; + -- end PaveFiller; diff --git a/src/NMTTools/NMTTools_PaveFiller.cxx b/src/NMTTools/NMTTools_PaveFiller.cxx index c3a4f9695..9c76d8910 100644 --- a/src/NMTTools/NMTTools_PaveFiller.cxx +++ b/src/NMTTools/NMTTools_PaveFiller.cxx @@ -27,8 +27,8 @@ #include #include #include -//QQ #include "utilities.h" +// //======================================================================= // function: NMTTools_PaveFiller::NMTTools_PaveFiller // purpose: @@ -165,25 +165,36 @@ void NMTTools_PaveFiller::Init() { myDSIt.SetDS(myDS); + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + myDSIt.Prepare(); + // Contribution of Samtech www.samcef.com END } + //======================================================================= // function: Perform // purpose: //======================================================================= void NMTTools_PaveFiller::Perform() { + myIsDone=Standard_False; + // try { // 0. - Init();//myDSIt.SetDS(myDS); - // + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + Init(); + // Contribution of Samtech www.samcef.com END //1.VV + // PerformVV(); PerformNewVertices(); // // 2.VE myPavePool.Resize (myNbEdges); - PrepareEdges(); + PrepareEdges(); + PerformVE(); // // 3.VF @@ -193,7 +204,7 @@ myCommonBlockPool.Resize (myNbEdges); mySplitShapesPool.Resize (myNbEdges); myPavePoolNew .Resize (myNbEdges); - + PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE); PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE); // @@ -206,16 +217,22 @@ // // 5.EF PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE); + PerformEF(); + // RefinePavePool(); // myPavePoolNew.Destroy(); + MakeSplitEdges(); + UpdateCommonBlocks(); // // 6. FF PerformFF (); + // MakeBlocks(); + // MakePCurves(); // // 7.Postprocessing @@ -224,10 +241,13 @@ NMTTools_DEProcessor aDEP(*this); aDEP.Do(); // - myIsDone = Standard_True; + // Modified to treat Alone Vertices Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + MakeAloneVertices(); + // Contribution of Samtech www.samcef.com END + // + myIsDone=Standard_True; } - catch (BOPTColStd_Failure& /*x*/) { - //QQ MESSAGE(x.Message() << flush); - myIsDone = Standard_False; + catch (BOPTColStd_Failure& ) { } } diff --git a/src/NMTTools/NMTTools_PaveFiller.hxx b/src/NMTTools/NMTTools_PaveFiller.hxx index 0f33f9908..ab479896e 100644 --- a/src/NMTTools/NMTTools_PaveFiller.hxx +++ b/src/NMTTools/NMTTools_PaveFiller.hxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -32,8 +32,8 @@ #ifndef _Standard_Integer_HeaderFile #include #endif -#ifndef _NMTTools_IteratorOfCoupleOfShape_HeaderFile -#include +#ifndef _NMTDS_Iterator_HeaderFile +#include #endif #ifndef _BOPTools_PavePool_HeaderFile #include @@ -50,6 +50,12 @@ #ifndef _BOPTools_SSIntersectionAttribute_HeaderFile #include #endif +#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile +#include +#endif +#ifndef _TColStd_DataMapOfIntegerInteger_HeaderFile +#include +#endif #ifndef _TopAbs_ShapeEnum_HeaderFile #include #endif @@ -77,6 +83,9 @@ class BOPTools_PaveSet; class BOPTools_Curve; class BOPTools_SSInterference; class gp_Pnt; +class NMTTools_IndexedDataMapOfIndexedMapOfInteger; +class TopTools_ListOfShape; +class TopoDS_Edge; #ifndef _Standard_HeaderFile @@ -86,6 +95,7 @@ class gp_Pnt; #include #endif + class NMTTools_PaveFiller { public: @@ -104,56 +114,177 @@ public: } // Methods PUBLIC // + + Standard_EXPORT NMTTools_PaveFiller(); + + Standard_EXPORT NMTTools_PaveFiller(const BOPTools_InterferencePool& aIP); + + Standard_EXPORT virtual void Destroy() ; Standard_EXPORT virtual ~NMTTools_PaveFiller(){Destroy();} + + Standard_EXPORT void SetInterferencePool(const BOPTools_InterferencePool& aIP) ; + + Standard_EXPORT BOPTools_PInterferencePool InterfPool() ; + + +Standard_EXPORT void Init() ; + + Standard_EXPORT virtual void Perform() ; + + +Standard_EXPORT virtual void PerformVV() ; + + +Standard_EXPORT virtual void PerformNewVertices() ; + + Standard_EXPORT Standard_Boolean IsDone() const; + + Standard_EXPORT NMTDS_PShapesDataStructure DS() ; + + Standard_EXPORT const IntTools_Context& Context() const; + + Standard_EXPORT IntTools_Context& ChangeContext() ; + + Standard_EXPORT const BOPTools_PavePool& PavePool() const; + + Standard_EXPORT BOPTools_PavePool& ChangePavePool() ; + + Standard_EXPORT const NMTTools_CommonBlockPool& CommonBlockPool() const; + + Standard_EXPORT NMTTools_CommonBlockPool& ChangeCommonBlockPool() ; + + Standard_EXPORT const BOPTools_SplitShapesPool& SplitShapesPool() const; + + Standard_EXPORT BOPTools_SplitShapesPool& ChangeSplitShapesPool() ; + + Standard_EXPORT Standard_Integer FindSDVertex(const Standard_Integer nV) const; + + Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ; + + Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ; + + Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,TColStd_ListOfInteger& aLs) ; + + Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ; + + Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ; + + Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ; + + Standard_EXPORT Standard_Integer CommonBlocksFace(const Standard_Integer nF,NMTTools_ListOfCommonBlock& aLCB) ; + + Standard_EXPORT void PrepareFace(const Standard_Integer nF,TopoDS_Face& aF) ; + + Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB) ; + + +Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB,TColStd_ListOfInteger& aLB) ; + + Standard_EXPORT void RealSplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT Standard_Boolean HasRealSplitsInOnFace(const Standard_Integer nF1,const Standard_Integer nF2) ; + + Standard_EXPORT void RealSplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT void RealSplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT void RealSplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT void RealSplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT void RealSplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + + Standard_EXPORT void PrepareSetForFace(const Standard_Integer nF1,const Standard_Integer nF2,const BOPTools_ListOfPaveBlock& aLPB,BOPTools_PaveSet& aPSF) ; + + Standard_EXPORT void PutPaveOnCurve(const BOPTools_PaveSet& aPSF,const Standard_Real aTol,BOPTools_Curve& aBC) ; + + Standard_EXPORT void PutBoundPaveOnCurve(BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ; + + Standard_EXPORT void PutBoundPaveOnCurve(const gp_Pnt& aP,const Standard_Real aT,BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ; + + Standard_EXPORT Standard_Boolean FindPave(const gp_Pnt& aP,const Standard_Real aTpV,const BOPTools_PaveSet& aPS,BOPTools_Pave& aPV) ; + + Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const BOPTools_PaveBlock& aPBR,const Standard_Real aTol) ; + + Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB,const Standard_Real aTol) ; + + Standard_EXPORT void MakePCurves() ; +Standard_EXPORT const NMTTools_IndexedDataMapOfIndexedMapOfInteger& AloneVertices() const; + + +Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const TopTools_ListOfShape& aLPB,const Standard_Real aTol) ; + + +Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB) ; + + +Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const TopoDS_Edge& aE,const Standard_Real aTol) ; + + +Standard_EXPORT void SharedEdges(const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLNE,TopTools_ListOfShape& aLSE) ; + + @@ -161,41 +292,104 @@ protected: // Methods PROTECTED // -Standard_EXPORT void Init() ; -Standard_EXPORT virtual void PerformVV() ; + + Standard_EXPORT virtual void PerformVE() ; + + Standard_EXPORT virtual void PerformVF() ; + + Standard_EXPORT virtual void PerformEE() ; + + Standard_EXPORT virtual void PerformEF() ; + + Standard_EXPORT virtual void PerformFF() ; + + Standard_EXPORT void MakeSplitEdges() ; + + Standard_EXPORT virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ; + + Standard_EXPORT void CorrectShrunkRanges(const Standard_Integer aSide,const BOPTools_Pave& aPave,IntTools_ShrunkRange& aSR) ; + + Standard_EXPORT virtual void PreparePaveBlocks(const Standard_Integer anE) ; -Standard_EXPORT virtual void PerformNewVertices() ; + + Standard_EXPORT virtual void PrepareEdges() ; + + Standard_EXPORT void SortTypes(Standard_Integer& anInd1,Standard_Integer& anInd2) const; + + Standard_EXPORT Standard_Integer ExpectedPoolLength() const; + + Standard_EXPORT Standard_Boolean IsSuccesstorsComputed(const Standard_Integer iF1,const Standard_Integer iF2) const; + + Standard_EXPORT Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) const; + + Standard_EXPORT void RefinePavePool() ; + + Standard_EXPORT Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV,const Standard_Integer nF) ; + + Standard_EXPORT void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; + + Standard_EXPORT void RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; + + Standard_EXPORT void SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; + + Standard_EXPORT void SplitCommonBlock(const NMTTools_CommonBlock& aCB,NMTTools_ListOfCommonBlock& aLCB) ; + + Standard_EXPORT void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aM) ; + + Standard_EXPORT void EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) ; + + Standard_EXPORT void EENewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; + + Standard_EXPORT void EENewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; + + Standard_EXPORT void EFNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; + + Standard_EXPORT void EFNewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; + + Standard_EXPORT void UpdateCommonBlocks() ; + + Standard_EXPORT void UpdatePaveBlocks() ; + + Standard_EXPORT Standard_Integer SplitIndex(const BOPTools_PaveBlock& aPB) const; + + Standard_EXPORT void MakeBlocks() ; +Standard_EXPORT void PerformVF1() ; + + +Standard_EXPORT void MakeAloneVertices() ; + + // Fields PROTECTED // BOPTools_PInterferencePool myIntrPool; @@ -203,13 +397,15 @@ NMTDS_PShapesDataStructure myDS; Standard_Boolean myIsDone; Standard_Integer myNbSources; Standard_Integer myNbEdges; -NMTTools_IteratorOfCoupleOfShape myDSIt; +NMTDS_Iterator myDSIt; BOPTools_PavePool myPavePool; BOPTools_PavePool myPavePoolNew; NMTTools_CommonBlockPool myCommonBlockPool; BOPTools_SplitShapesPool mySplitShapesPool; IntTools_Context myContext; BOPTools_SSIntersectionAttribute mySectionAttribute; +NMTTools_IndexedDataMapOfIndexedMapOfInteger myAloneVertices; +TColStd_DataMapOfIntegerInteger myVSD; private: diff --git a/src/NMTTools/NMTTools_PaveFiller.ixx b/src/NMTTools/NMTTools_PaveFiller.ixx index d4671682a..a07e7b69a 100644 --- a/src/NMTTools/NMTTools_PaveFiller.ixx +++ b/src/NMTTools/NMTTools_PaveFiller.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_PaveFiller.jxx b/src/NMTTools/NMTTools_PaveFiller.jxx index 3c9457ac6..0e63c963e 100644 --- a/src/NMTTools/NMTTools_PaveFiller.jxx +++ b/src/NMTTools/NMTTools_PaveFiller.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _BOPTools_InterferencePool_HeaderFile #include #endif @@ -80,6 +80,15 @@ #ifndef _gp_Pnt_HeaderFile #include #endif +#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile +#include +#endif +#ifndef _TopTools_ListOfShape_HeaderFile +#include +#endif +#ifndef _TopoDS_Edge_HeaderFile +#include +#endif #ifndef _NMTTools_PaveFiller_HeaderFile #include #endif diff --git a/src/NMTTools/NMTTools_PaveFiller_0.cxx b/src/NMTTools/NMTTools_PaveFiller_0.cxx index 0f1aba49a..e64607d3e 100644 --- a/src/NMTTools/NMTTools_PaveFiller_0.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_0.cxx @@ -1,28 +1,27 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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: NMTTools_PaveFiller_0.cxx -// Created: Mon Dec 8 11:45:51 2003 +// File: NMTTools_PaveFiller_1.cxx +// Created: Mon Dec 8 11:47:55 2003 // Author: Peter KURNEV // - #include #include @@ -69,9 +68,12 @@ { Standard_Integer aNbIIs; Standard_Real aCfPredict=.5; - - const BOPTools_ListOfCoupleOfInteger& aLC=myDSIt.ListOfCouple(); - aNbIIs=aLC.Extent(); + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + //const BOPTools_ListOfCoupleOfInteger& aLC=myDSIt.ListOfCouple(); + //aNbIIs=aLC.Extent(); + aNbIIs=myDSIt.ExpectedLength(); + // Contribution of Samtech www.samcef.com END // if (aNbIIs==1) { return aNbIIs; diff --git a/src/NMTTools/NMTTools_PaveFiller_1.cxx b/src/NMTTools/NMTTools_PaveFiller_1.cxx index 57c923e77..086e395f6 100644 --- a/src/NMTTools/NMTTools_PaveFiller_1.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_1.cxx @@ -21,12 +21,13 @@ // Created: Mon Dec 8 11:47:55 2003 // Author: Peter KURNEV // - - #include -#include - +#include +#include +#include +#include + #include #include #include @@ -38,14 +39,10 @@ #include #include #include -#include #include #include -#include - - //======================================================================= // function: PerformVV // purpose: @@ -54,8 +51,15 @@ { myIsDone=Standard_False; // - Standard_Integer n1, n2,anIndexIn, aFlag, aWhat, aWith, aNbVVs, aBlockLength; - Standard_Boolean bJustAddInterference; + Standard_Integer anIndexIn, aWhat, aWith, aNbVVs, aBlockLength, aNbVSD; + Standard_Integer nVnew; + TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aIt1; + TColStd_ListIteratorOfListOfInteger aIt; + TopTools_ListOfShape aLV; + TopoDS_Vertex aVnew; + TopoDS_Shape aS; + // + myVSD.Clear(); // BOPTools_CArray1OfVVInterference& aVVs=myIntrPool->VVInterferences(); // @@ -66,33 +70,51 @@ aVVs.SetBlockLength(aNbVVs); } // - // V/V BooleanOperations_VertexVertex - myDSIt.Initialize(TopAbs_VERTEX, TopAbs_VERTEX); - // - for (; myDSIt.More(); myDSIt.Next()) { - myDSIt.Current(n1, n2, bJustAddInterference); - // - if (!myIntrPool->IsComputed(n1, n2)) { - anIndexIn=0; - aWhat=n1; - aWith=n2; - SortTypes(aWhat, aWith); - if (!bJustAddInterference) { - const TopoDS_Shape& aS1=myDS->GetShape(aWhat); - const TopoDS_Shape& aS2=myDS->GetShape(aWith); - // - const TopoDS_Vertex& aV1=TopoDS::Vertex(aS1); - const TopoDS_Vertex& aV2=TopoDS::Vertex(aS2); - aFlag=IntTools_Tools::ComputeVV (aV1, aV2); - // - if (!aFlag) { - BOPTools_VVInterference anInterf (aWhat, aWith); - anIndexIn=aVVs.Append(anInterf); - } - } - myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexVertex, anIndexIn); - } + const TColStd_DataMapOfIntegerListOfInteger& aMVSD=myDSIt.SDVertices(); + aNbVSD=aMVSD.Extent(); + if (!aNbVSD) { + return; } + // + aIt1.Initialize(aMVSD); + for (; aIt1.More(); aIt1.Next()) { + aLV.Clear(); + // + aWhat=aIt1.Key(); + const TColStd_ListOfInteger& aLIV=aIt1.Value(); + // + // new vertex + aIt.Initialize(aLIV); + for (; aIt.More(); aIt.Next()) { + aWith=aIt.Value(); + aS=myDS->Shape(aWith); + aLV.Append(aS); + } + aS=myDS->Shape(aWhat); + aLV.Append(aS); + // + NMTTools_Tools::MakeNewVertex(aLV, aVnew); + // + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + // + myDS->InsertShapeAndAncestorsSuccessors(aVnew, anASSeq); + nVnew=myDS->NumberOfInsertedShapes(); + myDS->SetState (nVnew, BooleanOperations_ON); + // + // interferences + aIt.Initialize(aLIV); + for (; aIt.More(); aIt.Next()) { + aWith=aIt.Value(); + BOPTools_VVInterference aVV(aWhat, aWith); + aVV.SetNewShape(nVnew); + anIndexIn=aVVs.Append(aVV); + myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexVertex, anIndexIn); + // + // to find SD-Vertices + myVSD.Bind(aWith, nVnew); + } + myVSD.Bind(aWhat, nVnew); + }//for (; aIt1.More(); aIt1.Next()) { myIsDone=Standard_True; } //======================================================================= @@ -101,89 +123,18 @@ //======================================================================= void NMTTools_PaveFiller::PerformNewVertices() { - myIsDone=Standard_False; - // - Standard_Integer i, aNb, anIndex1, anIndex2, aNewShape; - TopoDS_Vertex aNewVertex; - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - // - Standard_Integer aNbChains, j, aNbV, aIdV, aNbL; - TColStd_IndexedMapOfInteger aMapWhole; - BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMapChains;//aMCV - TopTools_ListOfShape aLV; - TopTools_IndexedMapOfShape aM; - // - // 1. VV Interferences - BOPTools_CArray1OfVVInterference& VVs=myIntrPool->VVInterferences(); - // - NMTTools_Tools::FindChains(VVs, aMapChains); - // - aNbChains=aMapChains.Extent(); - for (i=1; i<=aNbChains; ++i) { - const TColStd_IndexedMapOfInteger& aChain=aMapChains(i); - // - aM.Clear(); - aLV.Clear(); - aNbV=aChain.Extent(); - for (j=1; j<=aNbV; ++j) { - aIdV=aChain(j); - const TopoDS_Shape& aV=myDS->Shape(aIdV); - if (!aM.Contains(aV)) { - aM.Add(aV); - aLV.Append(aV); - } - } - // - aNbL=aLV.Extent(); - if (aNbL==1){ - aNewShape=aChain(1); - } - else if (aNbL>1) { - // - // Make new Vertex - NMTTools_Tools::MakeNewVertex(aLV, aNewVertex); - // Insert New Vertex in DS; - // aNewShape is # of DS-line, where aNewVertex is kept - myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); - aNewShape=myDS->NumberOfInsertedShapes(); - // - // State of New Vertex is ON - myDS->SetState (aNewShape, BooleanOperations_ON); - } - // - // Insert New Vertex in Interference - aNb=VVs.Extent(); - for (j=1; j<=aNb; ++j) { - BOPTools_VVInterference& VV=VVs(j); - anIndex1=VV.Index1(); - anIndex2=VV.Index2(); - if (aChain.Contains(anIndex1) || aChain.Contains(anIndex2)) { - VV.SetNewShape(aNewShape); - } - } - } - myIsDone=Standard_True; } - //======================================================================= // function: FindSDVertex // purpose: //======================================================================= Standard_Integer NMTTools_PaveFiller::FindSDVertex(const Standard_Integer nV)const { - Standard_Integer i, aNb, anIndex1, anIndex2, aNewShape=0; - - BOPTools_CArray1OfVVInterference& VVs=myIntrPool->VVInterferences(); - aNb=VVs.Extent(); - - for (i=1; i<=aNb; i++) { - const BOPTools_VVInterference& VV=VVs(i); - anIndex1=VV.Index1(); - anIndex2=VV.Index2(); - if (nV==anIndex1 || nV==anIndex2) { - aNewShape=VV.NewShape(); - return aNewShape; - } + Standard_Integer nVSD; + // + nVSD=0; + if (myVSD.IsBound(nV)) { + nVSD=myVSD.Find(nV); } - return aNewShape; + return nVSD; } diff --git a/src/NMTTools/NMTTools_PaveFiller_2.cxx b/src/NMTTools/NMTTools_PaveFiller_2.cxx index a66bbb610..8febb88c2 100644 --- a/src/NMTTools/NMTTools_PaveFiller_2.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_2.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -49,9 +50,17 @@ #include // +// Modified Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN #include #include +#include +// +static + Standard_Boolean Contains(const TopoDS_Edge& aE, + const TopoDS_Vertex& aV); +// Contribution of Samtech www.samcef.com END //======================================================================= // function: PrepareEdges // purpose: @@ -140,7 +149,6 @@ } // Edge aE2=TopoDS::Edge(myDS->Shape(aWith)); - // if (BRep_Tool::Degenerated(aE2)){ continue; } @@ -152,12 +160,35 @@ if (iSDV) { nV1=iSDV; aV1=TopoDS::Vertex(myDS->Shape(nV1)); + // Modified to find same domain vertex Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + Standard_Integer nVE, iSDVE, iRet; + // + BooleanOperations_OnceExplorer aExp(*myDS); + iRet=0; + aExp.Init(aWith, TopAbs_VERTEX); + for (; aExp.More(); aExp.Next()) { + nVE=aExp.Current(); + iSDVE=FindSDVertex(nVE); + if (iSDVE==iSDV) { + iRet=1; + break; + } + } + if (iRet) { + continue; + } + } + else { + if (Contains(aE2, aV1)) { + continue; + } + // Contribution of Samtech www.samcef.com END } // aFlag=myContext.ComputeVE (aV1, aE2, aT); // if (!aFlag) { - // // Add Interference to the Pool BOPTools_VEInterference anInterf (aWhat, aWith, aT); anIndexIn=aVEs.Append(anInterf); @@ -185,46 +216,27 @@ } myIsDone=Standard_True; } - -/* -// A -// - // cto900/M2 - // Some of Edges can be [Semi] Infinite. Such Edges have no - // vertices on correspondant INF ends. So we must provide - // these vertices formally (to obtain Shrunk Ranges for e.g). - // In reality this vertex(-es) does not belong to the INF Edge. - // It just has reference in the DS. - // PKV Tue Apr 23 10:21:45 2002 - { - Standard_Real aT1, aT2, aTolE; - Standard_Boolean bInf1, bInf2; - gp_Pnt aPx; - TopoDS_Vertex aVx; - BRep_Builder aBB; - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - // - aTolE=BRep_Tool::Tolerance(aE); - Handle(Geom_Curve) aC3D=BRep_Tool::Curve (aE, aT1, aT2); - bInf1=Precision::IsNegativeInfinite(aT1); - bInf2=Precision::IsPositiveInfinite(aT2); - - if (bInf1) { - aC3D->D0(aT1, aPx); - aBB.MakeVertex(aVx, aPx, aTolE); - myDS->InsertShapeAndAncestorsSuccessors(aVx, anASSeq); - nV=myDS->NumberOfInsertedShapes(); - BOPTools_Pave aPave(nV, aT1); - aPaveSet.Append (aPave); - } - - if (bInf2) { - aC3D->D0(aT2, aPx); - aBB.MakeVertex(aVx, aPx, aTolE); - myDS->InsertShapeAndAncestorsSuccessors(aVx, anASSeq); - nV=myDS->NumberOfInsertedShapes(); - BOPTools_Pave aPave(nV, aT2); - aPaveSet.Append (aPave); - } - } -*/ +// Modified Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN +//======================================================================= +//function : Contains +//purpose : +//======================================================================= +Standard_Boolean Contains(const TopoDS_Edge& aE, + const TopoDS_Vertex& aV) +{ + Standard_Boolean bRet; + TopoDS_Iterator aIt; + // + bRet=Standard_False; + aIt.Initialize(aE); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aVE=aIt.Value(); + if (aVE.IsSame(aV)) { + bRet=!bRet; + break; + } + } + return bRet; +} +// Contribution of Samtech www.samcef.com END diff --git a/src/NMTTools/NMTTools_PaveFiller_3.cxx b/src/NMTTools/NMTTools_PaveFiller_3.cxx index 85bcb6599..7869f87d0 100644 --- a/src/NMTTools/NMTTools_PaveFiller_3.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_3.cxx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com @@ -34,7 +34,14 @@ #include #include +#include +// Modified Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN +static + Standard_Boolean Contains(const TopoDS_Face& aF, + const TopoDS_Vertex& aV); +// Contribution of Samtech www.samcef.com END //======================================================================= // function: PerformVF // purpose: @@ -85,6 +92,13 @@ // aF2=TopoDS::Face(myDS->Shape(aWith)); // + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + if (Contains(aF2, aV1)) { + continue; + } + // Contribution of Samtech www.samcef.com END + // aFlag=myContext.ComputeVS (aV1, aF2, aU, aV); // if (!aFlag) { @@ -105,3 +119,27 @@ } myIsDone=Standard_True; } +// Modified Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN +//======================================================================= +//function : Contains +//purpose : +//======================================================================= +Standard_Boolean Contains(const TopoDS_Face& aF, + const TopoDS_Vertex& aV) +{ + Standard_Boolean bRet; + TopExp_Explorer aExp; + // + bRet=Standard_False; + aExp.Init(aF, TopAbs_VERTEX); + for (; aExp.More(); aExp.Next()) { + const TopoDS_Shape& aVF=aExp.Current(); + if (aVF.IsSame(aV)) { + bRet=!bRet; + break; + } + } + return bRet; +} +// Contribution of Samtech www.samcef.com END diff --git a/src/NMTTools/NMTTools_PaveFiller_4.cxx b/src/NMTTools/NMTTools_PaveFiller_4.cxx index 33f178c92..af8d70fda 100644 --- a/src/NMTTools/NMTTools_PaveFiller_4.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_4.cxx @@ -25,11 +25,27 @@ #include // +// Modified Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN +#include +#include +#include +#include +#include +// Contribution of Samtech www.samcef.com END + #include #include +#include + #include #include +#include +#include + +#include +#include #include #include @@ -37,11 +53,17 @@ #include #include +#include +#include +#include +#include +#include #include #include #include +#include #include #include @@ -75,13 +97,27 @@ #include #include +#include +#include +#include #include #include #include #include -// + +static + void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI, + TopTools_DataMapOfShapeListOfShape& myImages, + TopTools_DataMapOfShapeShape& myOrigins); + +static + void MakeNewVertex(const TopTools_ListOfShape& aLV, + TopoDS_Vertex& aNewVertex); + + + static void VertexParameters(const IntTools_CommonPrt& aCPart, Standard_Real& aT1, @@ -90,6 +126,9 @@ static Standard_Boolean IsOnPave(const Standard_Real& aT1, const IntTools_Range& aRange, const Standard_Real& aTolerance); +static + void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB); + static void ProcessBlock(const BOPTools_PaveBlock& aPB, const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, @@ -98,7 +137,6 @@ static static void FindChains(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, NMTTools_ListOfCommonBlock& aLCB); - //======================================================================= // function: PerformEE // purpose: @@ -110,6 +148,7 @@ static Standard_Boolean bJustAdd; Standard_Integer n1, n2, anIndexIn, nE1, nE2, aNbVEs, aBlockLength; Standard_Integer aTmp, aWhat, aWith, i, aNbCPrts, aDiscretize=30; + Standard_Integer aNbLPB1, aNbLPB2; Standard_Real aTolE1, aTolE2, aDeflection=0.01; BOPTools_ListIteratorOfListOfPaveBlock anIt1, anIt2; TopoDS_Edge aEWhat, aEWith; @@ -145,8 +184,9 @@ static continue; } // - const TopoDS_Edge& aE1=TopoDS::Edge(myDS->Shape(nE1)); - const TopoDS_Edge& aE2=TopoDS::Edge(myDS->Shape(nE2)); + const TopoDS_Edge aE1=TopoDS::Edge(myDS->Shape(nE1));//mpv + const TopoDS_Edge aE2=TopoDS::Edge(myDS->Shape(nE2));//mpv + // if (BRep_Tool::Degenerated(aE1) || BRep_Tool::Degenerated(aE2)){ continue; @@ -156,6 +196,17 @@ static aTolE2=BRep_Tool::Tolerance(aE2); // BOPTools_ListOfPaveBlock& aLPB1=mySplitShapesPool(myDS->RefEdge(nE1)); + BOPTools_ListOfPaveBlock& aLPB2=mySplitShapesPool(myDS->RefEdge(nE2)); + // + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + aNbLPB1=aLPB1.Extent(); + aNbLPB2=aLPB2.Extent(); + + //if (aE1.IsSame(aE2) && aNbLPB1==1 && aNbLPB2==1) { + // continue; + //} + // Contribution of Samtech www.samcef.com END // for (anIt1.Initialize(aLPB1); anIt1.More(); anIt1.Next()) { BOPTools_PaveBlock& aPB1=anIt1.Value(); @@ -164,8 +215,6 @@ static const IntTools_Range& aSR1=aShrunkRange1.ShrunkRange(); const Bnd_Box& aBB1=aShrunkRange1.BndBox(); // - BOPTools_ListOfPaveBlock& aLPB2=mySplitShapesPool(myDS->RefEdge(nE2)); - // for (anIt2.Initialize(aLPB2); anIt2.More(); anIt2.Next()) { BOPTools_PaveBlock& aPB2=anIt2.Value(); const IntTools_ShrunkRange& aShrunkRange2=aPB2.ShrunkRange(); @@ -304,7 +353,10 @@ static // EENewVertices (aMapVI); EECommonBlocks(aMapCB); - // + // Modified to invoke new nethod Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + PerformVF1(); + // Contribution of Samtech www.samcef.com BEGIN myIsDone=Standard_True; } //======================================================================= @@ -324,165 +376,252 @@ static //======================================================================= void NMTTools_PaveFiller::EENewVertices (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) { - Standard_Integer aNb, i, j, aNewShape, aNbEdges, aNbIEE, aNbVV, aNbSimple; - Standard_Integer aWhat, aWith, i1, i2, nE1, nE2, nE, nV, aFlag; + Standard_Integer aNb, aNbVSD, nVnew, nIEE, nE[2], j, iFlag; Standard_Real aT; - TopoDS_Compound aCompound; - BRep_Builder aBB; - NMTTools_IndexedDataMapOfIndexedMapOfInteger aMNVE, aMNVIEE; - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + TopoDS_Edge aE; + TopTools_DataMapOfShapeListOfShape myImages; + TopTools_DataMapOfShapeShape myOrigins; + TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; + TopTools_ListIteratorOfListOfShape aIt; + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + TColStd_MapOfInteger aMFence; BOPTools_Pave aPave; - TopoDS_Vertex aNewVertex; - TopTools_IndexedMapOfShape aMNVComplex, aMNVSimple; // BOPTools_CArray1OfEEInterference& aEEs=myIntrPool->EEInterferences(); // aNb=aMapVI.Extent(); - // if (!aNb) { // no new vertices, no new problems return; } // // 0. if (aNb==1) { - aNewVertex=TopoDS::Vertex(aMapVI.FindKey(1)); - EENewVertices(aNewVertex, aMapVI); + TopoDS_Vertex aV1=TopoDS::Vertex(aMapVI.FindKey(1)); + EENewVertices(aV1, aMapVI); return; } // - // 1. Make compound from new vertices - aBB.MakeCompound(aCompound); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aV=aMapVI.FindKey(i); - aBB.Add(aCompound, aV); - } + // 1. + TreatNewVertices(aMapVI, myImages, myOrigins); // - // 2. VV intersection between these vertices - // using the auxiliary Filler - NMTDS_ShapesDataStructure tDS; - // - tDS.SetCompositeShape(aCompound); - tDS.Init(); - // - BOPTools_InterferencePool tInterfPool(tDS); - NMTTools_PaveFiller tPaveFiller(tInterfPool); - // - tPaveFiller.Init(); - // - tPaveFiller.PerformVV(); - tPaveFiller.PerformNewVertices(); - // - const BOPTools_CArray1OfVVInterference& aVVInterfs=tInterfPool.VVInterfs(); - // - // 3. Separate Comlex and Simple new vertices - aNbVV=aVVInterfs.Extent(); - for (i=1; i<=aNbVV; ++i) { - const BOPTools_VVInterference& aVV=aVVInterfs(i); - aVV.Indices(aWhat, aWith); - const TopoDS_Shape& aV1=tDS.Shape(aWhat); - const TopoDS_Shape& aV2=tDS.Shape(aWith); - aMNVComplex.Add(aV1); - aMNVComplex.Add(aV2); - } - // - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aV=aMapVI.FindKey(i); - if (!aMNVComplex.Contains(aV)) { - aMNVSimple.Add(aV); - } - } - // - // 4. Treat Simple new Vertices - aNbSimple=aMNVSimple.Extent(); - for (i=1; i<=aNbSimple; ++i) { - const TopoDS_Vertex& aV=TopoDS::Vertex(aMNVSimple(i)); - EENewVertices(aV, aMapVI); - } - // - // 3. Fill Maps : NewVertex-edges (aMNVE) - // NewVertex-interferences (aMNVIEE) - for (i=1; i<=aNbVV; ++i) { - const BOPTools_VVInterference& aVV=aVVInterfs(i); - aNewShape=aVV.NewShape(); - if (!aNewShape) { + aItIm.Initialize(myImages); + for (; aItIm.More(); aItIm.Next()) { + const TopoDS_Vertex& aVnew=TopoDS::Vertex(aItIm.Key()); + const TopTools_ListOfShape& aLVSD=aItIm.Value(); + // + aNbVSD=aLVSD.Extent(); + if (aNbVSD==1) {// simple case aVnew=aVold + EENewVertices(aVnew, aMapVI); continue; } // - if (!aMNVE.Contains(aNewShape)) { - TColStd_IndexedMapOfInteger aMx; - aMNVE.Add(aNewShape, aMx); - } - if (!aMNVIEE.Contains(aNewShape)) { - TColStd_IndexedMapOfInteger aMx; - aMNVIEE.Add(aNewShape, aMx); - } + // aNbVSD>1 + myDS->InsertShapeAndAncestorsSuccessors(aVnew, anASSeq); + nVnew=myDS->NumberOfInsertedShapes(); + myDS->SetState(nVnew, BooleanOperations_ON); // - TColStd_IndexedMapOfInteger& aME=aMNVE.ChangeFromKey(aNewShape); - TColStd_IndexedMapOfInteger& aMIEE=aMNVIEE.ChangeFromKey(aNewShape); - // - aVV.Indices(aWhat, aWith); - //aWhat - const TopoDS_Shape& aV1=tDS.Shape(aWhat); - i1=aMapVI.FindFromKey(aV1); - const BOPTools_EEInterference& aEE1=aEEs(i1); - aEE1.Indices(nE1, nE2); - aME.Add(nE1); - aME.Add(nE2); - aMIEE.Add(i1); - //aWith - const TopoDS_Shape& aV2=tDS.Shape(aWith); - i2=aMapVI.FindFromKey(aV2); - const BOPTools_EEInterference& aEE2=aEEs(i2); - aEE2.Indices(nE1, nE2); - aME.Add(nE1); - aME.Add(nE2); - aMIEE.Add(i2); - // - //printf(" VV: (%d, %d) -> %d\n", aWhat, aWith, aNewShape); + aMFence.Clear(); + aIt.Initialize(aLVSD); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Vertex& aVold=TopoDS::Vertex(aIt.Value()); + nIEE=aMapVI.FindFromKey(aVold); + BOPTools_EEInterference& aEE=aEEs(nIEE); + aEE.Indices(nE[0], nE[1]); + aEE.SetNewShape(nVnew); + // + for (j=0; j<2; ++j) { + if (aMFence.Add(nE[j])) { + aE=TopoDS::Edge(myDS->Shape(nE[j])); + iFlag=myContext.ComputeVE (aVnew, aE, aT); + if (!iFlag) { + aPave.SetInterference(-1); + aPave.SetType (BooleanOperations_EdgeEdge); + aPave.SetIndex(nVnew); + aPave.SetParam(aT); + // + BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE[j])); + aPaveSet.Append(aPave); + } + }// if (aMFence.Add(nE[j])) { + }// for (j=0; j<2; ++j) { + }//for (; aIt.More(); aIt.Next()) { + }// for (; aItIm.More(); aItIm.Next()) +} +//======================================================================= +//function : TreatNewVertices +//purpose : +//======================================================================= +void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI, + TopTools_DataMapOfShapeListOfShape& myImages, + TopTools_DataMapOfShapeShape& myOrigins) +{ + Standard_Integer j, i, aNbV, aIndex, aNbVSD; + Standard_Real aTol; + TColStd_ListIteratorOfListOfInteger aIt; + TopoDS_Shape aSTmp, aVF; + TopoDS_Vertex aVnew; + TopTools_IndexedMapOfShape aMV, aMVProcessed; + TopTools_ListIteratorOfListOfShape aItS; + TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; + TopTools_DataMapOfShapeListOfShape aMVV; + NMTDS_IndexedDataMapOfIntegerShape aMIS; + NMTDS_IndexedDataMapOfShapeBox aMSB; + // + // + NMTDS_BoxBndTreeSelector aSelector; + NMTDS_BoxBndTree aBBTree; + NCollection_UBTreeFiller aTreeFiller(aBBTree); + // + // + myImages.Clear(); + myOrigins.Clear(); + // + aNbV=aMapVI.Extent(); + for (i=1; i<=aNbV; ++i) { + const TopoDS_Shape& aV=aMapVI.FindKey(i); + aMV.Add(aV); } // - // 4. Process new vertices - aNb=aMNVE.Extent(); - for (i=1; i<=aNb; ++i) { // xx + for (i=1; i<=aNbV; ++i) { + const TopoDS_Shape& aV=aMV(i); + Bnd_Box aBox; // - // new Vertex - nV=aMNVE.FindKey(i); - aNewVertex=TopoDS::Vertex(tDS.Shape(nV)); + aTol=BRep_Tool::Tolerance(TopoDS::Vertex(aV)); + aBox.SetGap(aTol); + BRepBndLib::Add(aV, aBox); // - // Insert New Vertex in DS; - myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); - aNewShape=myDS->NumberOfInsertedShapes(); - myDS->SetState (aNewShape, BooleanOperations_ON); + aTreeFiller.Add(i, aBox); // - // Update index of NewShape in EE interferences - const TColStd_IndexedMapOfInteger& aMIEE=aMNVIEE.FindFromKey(nV);//(i); - aNbIEE=aMIEE.Extent(); - for (j=1; j<=aNbIEE; ++j) { - i1=aMIEE(j); - BOPTools_EEInterference& aEE1=aEEs(i1); - aEE1.SetNewShape(aNewShape); + aMIS.Add(i, aV); + aMSB.Add(aV, aBox); + } + // + aTreeFiller.Fill(); + // + for (i=1; i<=aNbV; ++i) { + const TopoDS_Shape& aV=aMV(i); + // + if (aMVProcessed.Contains(aV)) { + continue; } - // - // Update Paves on edges - const TColStd_IndexedMapOfInteger& aME=aMNVE(i); - aNbEdges=aME.Extent(); - for (j=1; j<=aNbEdges; ++j) { - nE=aME(j); - const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); - // - aFlag=myContext.ComputeVE (aNewVertex, aE, aT); - // - if (!aFlag) { - aPave.SetInterference(-1); - aPave.SetType (BooleanOperations_EdgeEdge); - aPave.SetIndex(aNewShape); - aPave.SetParam(aT); - // - BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE)); - aPaveSet.Append(aPave); + // + const Bnd_Box& aBoxV=aMSB.FindFromKey(aV); + aSelector.Clear(); + aSelector.SetBox(aBoxV); + // + aNbVSD=aBBTree.Select(aSelector); + if (!aNbVSD) { + continue; // it must not be + } + // + // Images + // + TopTools_ListOfShape aLVSD; + // + const TColStd_ListOfInteger& aLI=aSelector.Indices(); + aIt.Initialize(aLI); + for (j=0; aIt.More(); aIt.Next(), ++j) { + aIndex=aIt.Value(); + const TopoDS_Shape& aVx=aMIS.FindFromKey(aIndex); + if(!j) { + aVF=aVx; + } + aLVSD.Append(aVx); + aMVProcessed.Add(aVx); + } + // + myImages.Bind(aVF, aLVSD); + } + // + // Make new vertices + aMV.Clear(); + aItIm.Initialize(myImages); + for (; aItIm.More(); aItIm.Next()) { + const TopoDS_Shape& aV=aItIm.Key(); + const TopTools_ListOfShape& aLVSD=aItIm.Value(); + aNbVSD=aLVSD.Extent(); + if (aNbVSD>1) { + aMV.Add(aV); + MakeNewVertex(aLVSD, aVnew); + aMVV.Bind(aVnew, aLVSD); + } + } + // + // UnBind old vertices + aNbV=aMV.Extent(); + for (i=1; i<=aNbV; ++i) { + const TopoDS_Shape& aV=aMV(i); + myImages.UnBind(aV); + } + // + // Bind new vertices + aItIm.Initialize(aMVV); + for (; aItIm.More(); aItIm.Next()) { + const TopoDS_Shape& aV=aItIm.Key(); + const TopTools_ListOfShape& aLVSD=aItIm.Value(); + myImages.Bind(aV, aLVSD); + } + // + // Origins + aItIm.Initialize(myImages); + for (; aItIm.More(); aItIm.Next()) { + const TopoDS_Shape& aV=aItIm.Key(); + const TopTools_ListOfShape& aLVSD=aItIm.Value(); + // + aItS.Initialize(aLVSD); + for (; aItS.More(); aItS.Next()) { + const TopoDS_Shape& aVSD=aItS.Value(); + if (!myOrigins.IsBound(aVSD)) { + myOrigins.Bind(aVSD, aV); } } - }// for (i=1; i<=aNb; ++i) {// xx + } +} +//======================================================================= +//function : MakeNewVertex +//purpose : +//======================================================================= +void MakeNewVertex(const TopTools_ListOfShape& aLV, + TopoDS_Vertex& aNewVertex) +{ + Standard_Integer aNbV; + Standard_Real aTolV, aD, aDmax; + gp_XYZ aGC; + gp_Pnt aP3D, aPGC; + TopoDS_Vertex aVx; + BRep_Builder aBB; + TopTools_ListIteratorOfListOfShape aIt; + // + aNbV=aLV.Extent(); + if (!aNbV) { + return; + } + // + // center of gravity + aGC.SetCoord(0.,0.,0.); + aIt.Initialize(aLV); + for (; aIt.More(); aIt.Next()) { + aVx=TopoDS::Vertex(aIt.Value()); + aP3D=BRep_Tool::Pnt(aVx); + aGC+=aP3D.XYZ(); + } + aGC/=(Standard_Real)aNbV; + aPGC.SetXYZ(aGC); + // + // tolerance value + aDmax=-1.; + aIt.Initialize(aLV); + for (; aIt.More(); aIt.Next()) { + aVx=TopoDS::Vertex(aIt.Value()); + aP3D=BRep_Tool::Pnt(aVx); + aTolV=BRep_Tool::Tolerance(aVx); + aD=aPGC.Distance(aP3D)+aTolV; + if (aD>aDmax) { + aDmax=aD; + } + } + // + aBB.MakeVertex (aNewVertex, aPGC, aDmax); } //======================================================================= // function:EENewVertices @@ -775,10 +914,10 @@ static Standard_Real d1121, d1122, d1222, d1221, aTolSum, aCoeff=1.05; gp_Pnt aP11, aP12, aP21, aP22; - const TopoDS_Vertex& aV11=TopoDS::Vertex(myDS->Shape(aPB1.Pave1().Index())); - const TopoDS_Vertex& aV12=TopoDS::Vertex(myDS->Shape(aPB1.Pave2().Index())); - const TopoDS_Vertex& aV21=TopoDS::Vertex(myDS->Shape(aPB2.Pave1().Index())); - const TopoDS_Vertex& aV22=TopoDS::Vertex(myDS->Shape(aPB2.Pave2().Index())); + const TopoDS_Vertex aV11=TopoDS::Vertex(myDS->Shape(aPB1.Pave1().Index()));//mpv + const TopoDS_Vertex aV12=TopoDS::Vertex(myDS->Shape(aPB1.Pave2().Index()));//mpv + const TopoDS_Vertex aV21=TopoDS::Vertex(myDS->Shape(aPB2.Pave1().Index()));//mpv + const TopoDS_Vertex aV22=TopoDS::Vertex(myDS->Shape(aPB2.Pave2().Index()));//mpv aTolV11=BRep_Tool::Tolerance(aV11); aTolV12=BRep_Tool::Tolerance(aV12); @@ -854,6 +993,65 @@ static } } } + // Modified to provide the order of edges + // in common block where the edge with max + // tolerance value will be the first + // Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + Standard_Integer i, iMax, aNb, aNbCB, nSp; + Standard_Real aTolSp, aTolMax; + BOPTools_ListOfPaveBlock *pLPBE; + // + aNb=myDS->NumberOfShapesOfTheObject(); + for (nE=1; nE<=aNb; ++nE) { + const TopoDS_Shape& aE=myDS->Shape(nE); + if (aE.ShapeType()!=TopAbs_EDGE) { + continue; + } + // + NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE)); + aNbCB=aLCBE.Extent(); + if (!aNbCB) { + continue; + } + // + anIt.Initialize(aLCBE); + for (; anIt.More(); anIt.Next()) { + NMTTools_CommonBlock& aCBE=anIt.Value(); + const BOPTools_ListOfPaveBlock& aLPBE=aCBE.PaveBlocks(); + // + aTolMax=-1.; + anItLPE.Initialize(aLPBE); + for (i=0; anItLPE.More(); anItLPE.Next(), ++i) { + const BOPTools_PaveBlock& aPB=anItLPE.Value(); + nSp=aPB.OriginalEdge(); + const TopoDS_Edge& aSp=TopoDS::Edge(myDS->Shape(nSp)); + aTolSp=BRep_Tool::Tolerance(aSp); + if (aTolSp>aTolMax) { + iMax=i; + aTolSp=aTolMax; + } + } + // + BOPTools_ListOfPaveBlock aLPBx; + // + anItLPE.Initialize(aLPBE); + for (i=0; anItLPE.More(); anItLPE.Next(), ++i) { + const BOPTools_PaveBlock& aPB=anItLPE.Value(); + if (i==iMax) { + aLPBx.Prepend(aPB); + } + else { + aLPBx.Append(aPB); + } + } + // + pLPBE=(BOPTools_ListOfPaveBlock *)&aLPBE; + pLPBE->Clear(); + pLPBE->Append(aLPBx); + }//for (; anIt.More(); anIt.Next()) { + }//for (nE=1; nE<=aNb; ++nE) { + // Contribution of Samtech www.samcef.com END } //======================================================================= // function: RemoveCommonBlocks @@ -1093,3 +1291,76 @@ void ProcessBlock(const BOPTools_PaveBlock& aPB, ProcessBlock(aPBx, aMapCB, aProcessedBlocks, aChain); } } +// Modified to provide VS interference between +// vertex as result of EE and a Face of argument +// Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN +//======================================================================= +// function: PerformVF1 +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PerformVF1() +{ + Standard_Integer i, aNbEE, n1, n2, nNewShape, aNbS, nF; + Standard_Integer anIndexIn, aFlag; + Standard_Real aU, aV; + TColStd_ListOfInteger aLFI; + TColStd_ListIteratorOfListOfInteger aItLFI; + // + BOPTools_CArray1OfVSInterference& aVSs=myIntrPool->VSInterferences(); + BOPTools_CArray1OfEEInterference& aEEs=myIntrPool->EEInterferences(); + // + aNbS=myDS->NumberOfShapesOfTheObject(); + for (i=1; i<=aNbS; ++i) { + const TopoDS_Shape& aF=myDS->Shape(i); + if (aF.ShapeType()==TopAbs_FACE) { + aLFI.Append(i); + } + } + if (!aLFI.Extent()) { + return; + } + // + aNbEE=aEEs.Extent(); + for (i=1; i<=aNbEE; ++i) { + BOPTools_EEInterference& aEE=aEEs(i); + aEE.Indices(n1, n2); + nNewShape=aEE.NewShape(); + if (!nNewShape) { + continue; + } + // + const TopoDS_Shape& aSnew=myDS->Shape(nNewShape); + if (aSnew.ShapeType()!=TopAbs_VERTEX) { + continue; + } + // + const TopoDS_Vertex& aVnew=TopoDS::Vertex(aSnew); + // + Bnd_Box aBV; + // + BRepBndLib::Add(aVnew, aBV); + // + aItLFI.Initialize(aLFI); + for (; aItLFI.More(); aItLFI.Next()) { + nF=aItLFI.Value(); + // + const TopoDS_Face& aF=TopoDS::Face(myDS->Shape(nF)); + const Bnd_Box& aBF=myDS->GetBoundingBox(nF); + if (aBF.IsOut(aBV)) { + continue; + } + // + anIndexIn=0; + aFlag=myContext.ComputeVS (aVnew, aF, aU, aV); + if (!aFlag) { + BOPTools_VSInterference anInterf (nNewShape, nF, aU, aV); + // + anIndexIn=aVSs.Append(anInterf); + BOPTools_VSInterference& aVS=aVSs(anIndexIn); + aVS.SetNewShape(nNewShape);//-> + } + } + } +} +// Contribution of Samtech www.samcef.com END diff --git a/src/NMTTools/NMTTools_PaveFiller_5.cxx b/src/NMTTools/NMTTools_PaveFiller_5.cxx index db8930c00..0c6dbab26 100644 --- a/src/NMTTools/NMTTools_PaveFiller_5.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_5.cxx @@ -78,6 +78,8 @@ #include #include #include +#include +#include static void VertexParameter(const IntTools_CommonPrt& aCPart, @@ -86,7 +88,7 @@ static Standard_Boolean IsOnPave(const Standard_Real& aTR, const IntTools_Range& aCPRange, const Standard_Real& aTolerance); - +// //======================================================================= // function: PerformEF // purpose: @@ -102,7 +104,6 @@ static BooleanOperations_IndexedDataMapOfShapeInteger aMapVI; BOPTools_IDMapOfPaveBlockIMapOfInteger aMapCB; BOPTools_IMapOfPaveBlock aIMPBx; - // BOPTools_CArray1OfESInterference& aEFs=myIntrPool->ESInterferences(); // @@ -138,14 +139,32 @@ static continue; } // Edge - const TopoDS_Edge& aE=TopoDS::Edge(myDS->GetShape(nE)); + const TopoDS_Edge aE=TopoDS::Edge(myDS->GetShape(nE));//mpv if (BRep_Tool::Degenerated(aE)){ continue; } - aTolE=BRep_Tool::Tolerance(aE); // Face - const TopoDS_Face& aF=TopoDS::Face(myDS->GetShape(nF)); + const TopoDS_Face aF=TopoDS::Face(myDS->GetShape(nF));//mpv + // + // Modified + // to avoid intersection between face and edge from that face + // Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + TopTools_IndexedMapOfShape aME; + // + TopExp::MapShapes(aF, TopAbs_EDGE, aME); + if (aME.Contains(aE)) { + continue; + } + // Contribution of Samtech www.samcef.com END + // aTolF=BRep_Tool::Tolerance(aF); + + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + aTolE=BRep_Tool::Tolerance(aE); + // Contribution of Samtech www.samcef.com END + const Bnd_Box& aBBF=myDS->GetBoundingBox(nF); // // Process each PaveBlock on edge nE @@ -492,7 +511,7 @@ static aNbEdges=aME.Extent(); for (j=1; j<=aNbEdges; ++j) { nE=aME(j); - const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); + const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv // aFlag=myContext.ComputeVE (aNewVertex, aE, aT); // @@ -575,7 +594,7 @@ static aNbV=aMVF.Extent(); for (i=1; i<=aNbV; ++i) { nVF=aMVF(i); - const TopoDS_Vertex& aVF=TopoDS::Vertex(myDS->Shape(nVF)); + const TopoDS_Vertex aVF=TopoDS::Vertex(myDS->Shape(nVF));//mpv iFlag=IntTools_Tools::ComputeVV(aNewVertex, aVF); if (!iFlag) { return nVF; diff --git a/src/NMTTools/NMTTools_PaveFiller_6.cxx b/src/NMTTools/NMTTools_PaveFiller_6.cxx index 8c4852a4b..27a62d3c3 100644 --- a/src/NMTTools/NMTTools_PaveFiller_6.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_6.cxx @@ -1,3 +1,6 @@ +// +// IMPROVED by NIZNHY-PKV Thu Oct 12 16:03:33 2006 +// // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // @@ -30,7 +33,6 @@ #include #include -#include #include #include @@ -45,7 +47,6 @@ #include #include #include -#include #include @@ -81,7 +82,31 @@ #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 static Standard_Boolean IsPairFound(const Standard_Integer nF1, @@ -102,6 +127,13 @@ static Standard_Boolean IsFound(const TColStd_IndexedMapOfInteger& aMapWhat, const TColStd_IndexedMapOfInteger& aMapWith); +// Modified Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN +static + void SharedEdges1(const TopoDS_Face& aF1, + const TopoDS_Face& aF2, + TopTools_ListOfShape& aLS); +// Contribution of Samtech www.samcef.com END //======================================================================= // function: PerformFF @@ -165,8 +197,8 @@ static continue; } // - const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); - const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); + const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv + const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv // // FF bToApproxC3d = mySectionAttribute.Approximation(); @@ -235,7 +267,11 @@ static { myIsDone=Standard_False; // - Standard_Boolean bIsExistingPaveBlock, bIsValidIn2D; + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + Standard_Boolean bIsExistingPaveBlock, bIsValidIn2D, bIsCoincided; + // Contribution of Samtech www.samcef.com END + // Standard_Integer i, aNbFFs, nF1, nF2, aBid=0; Standard_Integer nV1, nV2, j, aNbCurves; Standard_Real aTolR3D, aTol2D, aT1, aT2, aTolPPC=Precision::PConfusion(); @@ -245,61 +281,142 @@ static // BOPTools_CArray1OfSSInterference& aFFs=myIntrPool->SSInterferences(); // + aNbFFs=aFFs.Extent(); + // + NMTTools_DataMapOfIntegerListOfPaveBlock aMFInOn; + NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock aItMF; + //--- + { + Standard_Integer aNbS, aNbF, nF, aNbOn, nSp; + TopAbs_ShapeEnum aType; + BOPTools_ListIteratorOfListOfPaveBlock anItPB; + NMTTools_ListIteratorOfListOfCommonBlock aItCB; + TColStd_ListIteratorOfListOfInteger aItF; + // + aNbS=myDS->NumberOfShapesOfTheObject(); + for (i=1; i<=aNbS; ++i) { + const TopoDS_Shape& aS=myDS->Shape(i); + aType=aS.ShapeType(); + // + if (aType==TopAbs_EDGE) { + const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(i)); + aItCB.Initialize(aLCB); + for (; aItCB.More(); aItCB.Next()) { + const NMTTools_CommonBlock& aCB=aItCB.Value(); + const BOPTools_PaveBlock &aPB1=aCB.PaveBlock1(); + // + const TColStd_ListOfInteger& aLF=aCB.Faces(); + aNbF=aLF.Extent(); + if (aNbF) { + aItF.Initialize(aLF); + for (; aItF.More(); aItF.Next()) { + nF=aItF.Value(); + if (aMFInOn.IsBound(nF)) { + BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF); + aLPB.Append(aPB1); + } + else { + BOPTools_ListOfPaveBlock aLPB; + aLPB.Append(aPB1); + aMFInOn.Bind(nF, aLPB); + } + } + }// if (aNbF) { + } // for (; aItCB.More(); aItCB.Next()) { + }//if (aS.ShapeType()==TopAbs_EDGE) { + // + else if (aType==TopAbs_FACE) { + BOPTools_ListOfPaveBlock aLPBOn; + // + nF=i; + RealSplitsFace(nF, aLPBOn); + // + aNbOn=aLPBOn.Extent(); + if (aNbOn) { + if (aMFInOn.IsBound(nF)) { + BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF); + aLPB.Append(aLPBOn); + } + else { + aMFInOn.Bind(nF, aLPBOn); + } + } + } + } // for (i=1; i<=aNbS; ++i) { + // + // Refine ListOfPaveBlocks + aItMF.Initialize(aMFInOn); + for(; aItMF.More(); aItMF.Next()) { + TColStd_MapOfInteger aMTmp; + BOPTools_ListOfPaveBlock aLPBX; + // + nF=aItMF.Key(); + BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF); + anItPB.Initialize(aLPB); + for (; anItPB.More(); anItPB.Next()) { + const BOPTools_PaveBlock& aPB=anItPB.Value(); + nSp=aPB.Edge(); + if (aMTmp.Add(nSp)) { + aLPBX.Append(aPB); + } + } + aLPB.Clear(); + aLPB.Append(aLPBX); + } + } + //--- + // // 1. Produce Section Edges from intersection curves // between each pair of faces // aNbFFs=aFFs.Extent(); + // for (i=1; i<=aNbFFs; ++i) { + BOPTools_SSInterference& aFFi=aFFs(i); // // Faces aFFi.Indices(nF1, nF2); - const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); - const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); + const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv + const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv // - BOPTools_ListOfPaveBlock aLPB, aLPBC; + BOPTools_ListOfPaveBlock aLPB; // + //--- { - Standard_Integer nFj1, nFj2, nE; - TColStd_IndexedMapOfInteger aMFence; - BOPTools_ListOfPaveBlock aLPBCx; + BOPTools_ListIteratorOfListOfPaveBlock anItPB; + NMTTools_MapOfPaveBlock aMPB; // - for (j=1; j<=aNbFFs; ++j) { - BOPTools_SSInterference& aFFj=aFFs(j); - aFFj.Indices(nFj1, nFj2); - // - if ((nF1==nFj1 && nFj2!=nF2) || - (nF1==nFj2 && nFj1!=nF2) || - (nF2==nFj1 && nFj2!=nF1) || - (nF2==nFj2 && nFj1!=nF1)) { - RealSplitsInFace (aBid, nFj1, nFj2, aLPBCx); - RealSplitsInFace (aBid, nFj2, nFj1, aLPBCx); - RealSplitsOnFace (aBid, nFj1, nFj2, aLPBCx); + if (aMFInOn.IsBound(nF1)) { + const BOPTools_ListOfPaveBlock& aLPBF1=aMFInOn.Find(nF1); + anItPB.Initialize(aLPBF1); + for (; anItPB.More(); anItPB.Next()) { + const BOPTools_PaveBlock& aPB=anItPB.Value(); + if (aMPB.Add(aPB)) { + aLPB.Append(aPB); + } } } - // - anIt.Initialize(aLPBCx); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPBCx=anIt.Value(); - // - nE=aPBCx.Edge(); - if (!aMFence.Contains(nE)) { - aMFence.Add(nE); - aLPBC.Append(aPBCx); + if (aMFInOn.IsBound(nF2)) { + const BOPTools_ListOfPaveBlock& aLPBF2=aMFInOn.Find(nF2); + anItPB.Initialize(aLPBF2); + for (; anItPB.More(); anItPB.Next()) { + const BOPTools_PaveBlock& aPB=anItPB.Value(); + if (aMPB.Contains(aPB)) { + aFFi.AppendBlock(aPB); + } + else { + aLPB.Append(aPB); + } } } } + //--- // - // - RealSplitsInFace (aBid, nF1, nF2, aLPB); - RealSplitsInFace (aBid, nF2, nF1, aLPB); - RealSplitsOnFace (aBid, nF1, nF2, aLPB); - // - anIt.Initialize(aLPB); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB=anIt.Value(); - aFFi.AppendBlock(aPB); - } + TopTools_ListOfShape aLSE; + TColStd_ListOfInteger aLNE; + SharedEdges(nF1, nF2, aLNE, aLSE); + aFFi.SetSharedEdges(aLNE); // BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves(); aNbCurves=aSCvs.Length(); @@ -307,13 +424,13 @@ static continue; } // + // Contribution of Samtech www.samcef.com END aTolR3D=aFFi.TolR3D(); aTol2D=(aTolR3D < 1.e-3) ? 1.e-3 : aTolR3D; // BOPTools_PaveSet aPSF; // - PrepareSetForFace (nF1, nF2, aLPBC, aPSF); - //PrepareSetForFace (nF1, nF2, aPSF); + PrepareSetForFace (nF1, nF2, aLPB, aPSF); // // Put Paves On Curves for (j=1; j<=aNbCurves; ++j) { @@ -354,17 +471,29 @@ static } // // 1 - const BOPTools_ListOfPaveBlock& aLPBFF=aFFi.PaveBlocks(); - bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLPBFF, aTolR3D); - //bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aFFi); + + bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLPB, aTolR3D); if (bIsExistingPaveBlock) { continue; } + // + bIsCoincided=CheckCoincidence(aPBNew, aLPB); + if(bIsCoincided) { + continue; + } + // + // Modified + // to provide checking whether aPBNew already exists in list + // of section edges aLSE + // Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN // 2 - bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLPBC, aTolR3D); + bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLSE, aTolR3D); if (bIsExistingPaveBlock) { continue; } + // Contribution of Samtech www.samcef.com END + // // Checking of validity in 2D // bIsValidIn2D=myContext.IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D); @@ -372,30 +501,47 @@ static continue; } // - //aBC.AppendNewBlock(aPBNew); // // Make Section Edge TopoDS_Edge aES; // - const TopoDS_Vertex& aV1=TopoDS::Vertex(myDS->Shape(nV1)); - const TopoDS_Vertex& aV2=TopoDS::Vertex(myDS->Shape(nV2)); + const TopoDS_Vertex aV1=TopoDS::Vertex(myDS->Shape(nV1));//mpv + const TopoDS_Vertex aV2=TopoDS::Vertex(myDS->Shape(nV2));//mpv // BOPTools_Tools::MakeSectEdge (aIC, aV1, aT1, aV2, aT2, aES); // + //modified by NIZNHY-PKV Thu Nov 16 11:13:46 2006f SKL/PartC5 + { + Handle(Geom2d_Curve) aC2D1, aC2D2; + // + aC2D1=aIC.FirstCurve2d(); + aC2D2=aIC.SecondCurve2d(); + // + NMTTools_Tools::MakePCurve(aES, aF1, aC2D1); + NMTTools_Tools::MakePCurve(aES, aF2, aC2D2); + NMTTools_Tools::UpdateEdge (aES, aTolR3D); + } + + // + /* { Standard_Real aTolR2D; + Handle(Geom2d_Curve) aC2D1, aC2D2; // aTolR2D=aFFi.TolR2D(); - Handle(Geom2d_Curve) aC2D1=aIC.FirstCurve2d(); - Handle(Geom2d_Curve) aC2D2=aIC.SecondCurve2d(); + aC2D1=aIC.FirstCurve2d(); + aC2D2=aIC.SecondCurve2d(); // NMTTools_Tools::MakePCurve(aES, aF1, aC2D1, aTolR2D); NMTTools_Tools::MakePCurve(aES, aF2, aC2D2, aTolR2D); } + */ + //modified by NIZNHY-PKV Thu Nov 16 11:17:34 2006t // aMEPB.Add(aES, aPBNew); aMapEI.Add(aES, i); } + } // end of for (j=1; j<=aNbCurves; ++j) }// for (i=1; i<=aNbFFs; ++i) //============================================================= @@ -489,13 +635,13 @@ static for (j=1; j<=aNbSE; ++j) { const BOPTools_PaveBlock& aPBSE=aMEPB(j); nV1=aPBSE.Pave1().Index(); - const TopoDS_Shape& aV1=myDS->Shape(nV1); + const TopoDS_Shape aV1=myDS->Shape(nV1);//mpv if (aV1.IsSame(aV)) { aMNewOld.Add(i, nV1); break; } nV2=aPBSE.Pave2().Index(); - const TopoDS_Shape& aV2=myDS->Shape(nV2); + const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv if (aV2.IsSame(aV)) { aMNewOld.Add(i, nV2); break; @@ -546,9 +692,9 @@ static BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; // nV1=aPBSE.Pave1().Index(); - const TopoDS_Shape& aV1=myDS->Shape(nV1); + const TopoDS_Shape aV1=myDS->Shape(nV1);//mpv nV2=aPBSE.Pave2().Index(); - const TopoDS_Shape& aV2=myDS->Shape(nV2); + const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv // anASSeq.SetNewSuccessor(nV1); anASSeq.SetNewOrientation(aV1.Orientation()); @@ -567,11 +713,6 @@ static nF1=aPBSE.Face1(); nF2=aPBSE.Face2(); // - //modified by NIZNHY-PKV Thu Jan 26 10:17:04 2006f - //const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); - //const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); - //modified by NIZNHY-PKV Thu Jan 26 10:17:08 2006t - // const NMTTools_ListOfCommonBlock& aLCB=aCBP(tDS.RefEdge(i)); NMTTools_CommonBlockAPI aCBAPI(aLCB); // @@ -579,10 +720,8 @@ static for (; aIt.More(); aIt.Next()) { BOPTools_PaveBlock aPB=aIt.Value(); // - ////modified by NIZNHY-PKV Thu Jan 26 10:16:36 2006f - const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); - const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); - ////modified by NIZNHY-PKV Thu Jan 26 10:16:39 2006t + const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1)); + const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2)); // if (aCBAPI.IsCommonBlock(aPB)) { // it can be Common Block @@ -598,15 +737,18 @@ static const TopoDS_Edge& aEx=TopoDS::Edge(tDS.Shape(mE)); aTolEx=BRep_Tool::Tolerance(aEx); // - // <- Block A was here - // aF1FWD=aF1; aF1FWD.Orientation(TopAbs_FORWARD); - NMTTools_Tools::MakePCurve(aEx, aF1FWD, aC2D1, aTolEx); - // aF2FWD=aF2; aF2FWD.Orientation(TopAbs_FORWARD); - NMTTools_Tools::MakePCurve(aEx, aF2FWD, aC2D2, aTolEx); + // + //modified by NIZNHY-PKV Thu Nov 16 12:49:13 2006f SKL/PartC5 + //NMTTools_Tools::MakePCurve(aEx, aF1FWD, aC2D1, aTolEx); + //NMTTools_Tools::MakePCurve(aEx, aF2FWD, aC2D2, aTolEx); + NMTTools_Tools::MakePCurve(aEx, aF1FWD, aC2D1); + NMTTools_Tools::MakePCurve(aEx, aF2FWD, aC2D2); + NMTTools_Tools::UpdateEdge (aEx, aTolEx); + //modified by NIZNHY-PKV Thu Nov 16 12:49:24 2006t } //if (aCBAPI.IsCommonBlock(aPB)) // // new SE @@ -617,13 +759,13 @@ static aT1=aPave1.Param(); mV1=aPave1.Index(); // index in tDS nV1=aMNewOld.FindFromKey(mV1); // index in myDS - const TopoDS_Shape& aV1=myDS->Shape(nV1); + const TopoDS_Shape aV1=myDS->Shape(nV1);//mpv // const BOPTools_Pave& aPave2=aPB.Pave2(); aT2=aPave2.Param(); mV2=aPave2.Index(); nV2=aMNewOld.FindFromKey(mV2); - const TopoDS_Shape& aV2=myDS->Shape(nV2); + const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv // if (!aMNewOld.Contains(mE)) { // add new SE to the myDS @@ -684,8 +826,8 @@ static BOPTools_SSInterference& aFF=aFFs(i); aFF.Indices(nF1, nF2); // - const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); - const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); + const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv + const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv // aF1FWD=aF1; aF1FWD.Orientation(TopAbs_FORWARD); @@ -699,7 +841,7 @@ static for (; anIt.More(); anIt.Next()) { const BOPTools_PaveBlock& aPB=anIt.Value(); nE=aPB.Edge(); - const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); + const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD); BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD); @@ -738,6 +880,35 @@ static return bFlag; } //======================================================================= +// function: IsExistingPaveBlock +// purpose: +//======================================================================= + Standard_Boolean NMTTools_PaveFiller::IsExistingPaveBlock(const BOPTools_PaveBlock& aPBNew, + const TopTools_ListOfShape& aLSE, + const Standard_Real aTolR3D) +{ + Standard_Boolean bFlag; + Standard_Integer aNbSE, iC; + TopTools_ListIteratorOfListOfShape anIt; + // + bFlag=Standard_False; + // + aNbSE=aLSE.Extent(); + if (!aNbSE) { + return bFlag; + } + // + anIt.Initialize(aLSE); + for (; anIt.More(); anIt.Next()) { + const TopoDS_Edge& aE=TopoDS::Edge(anIt.Value()); + iC=CheckIntermediatePoint(aPBNew, aE, aTolR3D); + if (!iC) { + return !bFlag; + } + } + return bFlag; +} +//======================================================================= // function: CheckIntermediatePoint // purpose: //======================================================================= @@ -746,8 +917,24 @@ static const Standard_Real aTolC) { - Standard_Real aT11, aT12, aTM, aTmp; Standard_Integer iVM, nE2; + // + nE2=aPBR.Edge(); + const TopoDS_Edge aE2=TopoDS::Edge(myDS->Shape(nE2));//mpv + iVM=CheckIntermediatePoint(aPB, aE2, aTolC); + // + return iVM; +} +//======================================================================= +// function: CheckIntermediatePoint +// purpose: +//======================================================================= + Standard_Integer NMTTools_PaveFiller::CheckIntermediatePoint(const BOPTools_PaveBlock& aPB, + const TopoDS_Edge& aE2, + const Standard_Real aTolC) +{ + Standard_Real aT11, aT12, aTM, aTmp; + Standard_Integer iVM; gp_Pnt aPM; BRep_Builder aBB; TopoDS_Vertex aVM; @@ -766,10 +953,6 @@ static // aBB.MakeVertex (aVM, aPM, aTolC); // - //Edge - nE2=aPBR.Edge(); - const TopoDS_Edge& aE2=TopoDS::Edge(myDS->GetShape(nE2)); - // VE iVM=myContext.ComputeVE(aVM, aE2, aTmp); // return iVM; @@ -799,8 +982,8 @@ static aFFi.Indices(nF1, nF2); aTolR3D=aFFi.TolR3D(); // - const TopoDS_Face& aF1=TopoDS::Face(myDS->GetShape(nF1)); - const TopoDS_Face& aF2=TopoDS::Face(myDS->GetShape(nF2)); + const TopoDS_Face aF1=TopoDS::Face(myDS->GetShape(nF1));//mpv + const TopoDS_Face aF2=TopoDS::Face(myDS->GetShape(nF2));//mpv // bVF=myContext.IsValidPointForFaces (aP1, aF1, aF2, aTolR3D); if (bVF) { @@ -850,14 +1033,13 @@ static TColStd_ListOfInteger& aTVs=aBC.TechnoVertices(); aTVs.Append(nV); } - if (bFound1 && !bFound2) { nV=aPave1.Index(); aPave.SetIndex(nV); aPave.SetParam(aT); aFFiPS.Append(aPave); // - const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV)); + const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv BOPTools_Tools::UpdateVertex (aIC, aT, aV); } @@ -867,7 +1049,7 @@ static aPave.SetParam(aT); aCPS.Append(aPave); // - const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV)); + const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv BOPTools_Tools::UpdateVertex (aIC, aT, aV); } } @@ -888,7 +1070,7 @@ static for (; anIt.More(); anIt.Next()) { const BOPTools_Pave& aPC=anIt.Value(); nV=aPC.Index(); - const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV)); + const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv bIsVertex=IntTools_Tools::IsVertex (aP, aTolPV, aV); if (bIsVertex) { aPave=aPC; @@ -901,37 +1083,16 @@ static // function: PrepareSetForFace // purpose: //======================================================================= - void NMTTools_PaveFiller::PrepareSetForFace(const Standard_Integer nF1, - const Standard_Integer nF2, + void NMTTools_PaveFiller::PrepareSetForFace(const Standard_Integer ,//nF1, + const Standard_Integer ,//nF2, const BOPTools_ListOfPaveBlock& aLPBC, BOPTools_PaveSet& aPSF) { Standard_Integer nV1, nV2; TColStd_MapOfInteger aMap; - BOPTools_ListOfPaveBlock aLPB1, aLPB2, aLPBS; BOPTools_ListIteratorOfListOfPaveBlock anIt; // - RealSplitsFace(nF1, aLPB1); - anIt.Initialize(aLPB1); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB=anIt.Value(); - aLPBS.Append(aPB); - } - // - RealSplitsFace(nF2, aLPB2); - anIt.Initialize(aLPB2); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB=anIt.Value(); - aLPBS.Append(aPB); - } - // anIt.Initialize(aLPBC); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB=anIt.Value(); - aLPBS.Append(aPB); - } - // - anIt.Initialize(aLPBS); for (; anIt.More(); anIt.Next()) { const BOPTools_PaveBlock& aPB=anIt.Value(); const BOPTools_Pave& aPave1=aPB.Pave1(); @@ -974,7 +1135,7 @@ static const BOPTools_Pave& aPave=anIt.Value(); // nV=aPave.Index(); - const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV)); + const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv // Bnd_Box aBBV; BRepBndLib::Add(aV, aBBV); @@ -1110,60 +1271,150 @@ Standard_Boolean IsFound(const TColStd_IndexedMapOfInteger& aMapWhat, } return bFlag; } -// -// Block A -// - // - // Commented out by EAP in the frame of PAL9151 - // -// Standard_Boolean bHasPCOnF, bFound; -// Standard_Integer nF, k, nEOrx, nF1x, nF2x; -// Standard_Real aTolEx, aT1x, aT2x; -// BOPTools_ListIteratorOfListOfPaveBlock aItPBx; - // -// for (k=0; k<2; ++k) { -// nF=(!k) ? nF1 : nF2; -// const TopoDS_Face& aF=TopoDS::Face(myDS->Shape(nF)); -// // -// bHasPCOnF=BOPTools_Tools2D::HasCurveOnSurface(aEx, aF); -// if (bHasPCOnF) { -// continue; -// } -// // -// bFound=Standard_False; -// aItPBx.Initialize(aLPBx); -// for (; aItPBx.More(); aItPBx.Next()) { -// BOPTools_PaveBlock& aPBx=aIt.Value(); -// nEOrx=aPBx.OriginalEdge(); -// const TopoDS_Shape& aEOrx=tDS.Shape(nEOrx); -// BOPTools_PaveBlock& aPBSEx=aMEPB.ChangeFromKey(aEOrx); -// aT1x=aPBSEx.Pave1().Param(); -// aT2x=aPBSEx.Pave2().Param(); -// const IntTools_Curve& aICx=aPBSEx.Curve(); -// // -// nF1x=aPBSEx.Face1(); -// nF2x=aPBSEx.Face2(); -// // -// if (nF1x==nF) { -// Handle(Geom2d_Curve) aC2D1x=aICx.FirstCurve2d(); -// Handle(Geom2d_TrimmedCurve)aC2D1xT =new Geom2d_TrimmedCurve(aC2D1x, aT1x, aT2x); -// aBB.UpdateEdge(aEx, aC2D1xT, aF, aTolEx); -// bFound=!bFound; -// break; -// } -// // -// if (nF2x==nF) { -// Handle(Geom2d_Curve) aC2D2x=aICx.SecondCurve2d(); -// Handle(Geom2d_TrimmedCurve)aC2D2xT =new Geom2d_TrimmedCurve(aC2D2x, aT1x, aT2x); -// aBB.UpdateEdge(aEx, aC2D2xT, aF, aTolEx); -// bFound=!bFound; -// break; -// } -// } -// if (bFound){ -// BRepLib::SameParameter(aEx, aTolEx, Standard_True); -// } -// } - // - // The code till the if block end is restored from V2_2_2 revision +// Modified Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN +//======================================================================= +//function : SharedEdges1 +//purpose : +//======================================================================= +void SharedEdges1(const TopoDS_Face& aF1, + const TopoDS_Face& aF2, + TopTools_ListOfShape& aLS) +{ + Standard_Integer i, aNbE, aNbF;; + TopTools_IndexedDataMapOfShapeListOfShape aMEF; + // + TopExp::MapShapesAndAncestors(aF1, TopAbs_EDGE, TopAbs_FACE, aMEF); + TopExp::MapShapesAndAncestors(aF2, TopAbs_EDGE, TopAbs_FACE, aMEF); + // + aNbE=aMEF.Extent(); + for (i=1; i<=aNbE; ++i) { + const TopTools_ListOfShape& aLF=aMEF.FindFromIndex(i); + aNbF=aLF.Extent(); + if (aNbF>1) { + if (aNbF==2) { + const TopoDS_Shape& aF1x=aLF.First(); + const TopoDS_Shape& aF2x=aLF.Last(); + if (aF1x.IsSame(aF2x)) { + continue; + } + } + const TopoDS_Shape& aE=aMEF.FindKey(i); + aLS.Append (aE); + } + } +} +//======================================================================= +// function: CheckCoincidence +// purpose: +//======================================================================= + Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& aPBNew, + const BOPTools_ListOfPaveBlock& aLPBFF) + +{ + Standard_Boolean bRet; + Standard_Real aTE; + Standard_Integer nV11, nV12, nV21, nV22, iVV, iVE, nE2; + Standard_Integer iV, iCount, iCountExt; + BOPTools_ListIteratorOfListOfPaveBlock anIt; + // V11 + const BOPTools_Pave& aPave11=aPBNew.Pave1(); + nV11=aPave11.Index(); + const TopoDS_Vertex& aV11=TopoDS::Vertex(myDS->Shape(nV11)); + + // V12 + const BOPTools_Pave& aPave12=aPBNew.Pave2(); + nV12=aPave12.Index(); + const TopoDS_Vertex& aV12=TopoDS::Vertex(myDS->Shape(nV12)); + // + iCountExt=1; + iCount=0; + anIt.Initialize(aLPBFF); + for (; anIt.More(); anIt.Next()) { + iCount=0; + // + const BOPTools_PaveBlock& aPBR=anIt.Value(); + // V21 + const BOPTools_Pave& aPave21=aPBR.Pave1(); + nV21=aPave21.Index(); + + // V22 + const BOPTools_Pave& aPave22=aPBR.Pave2(); + nV22=aPave22.Index(); + //modified by NIZNHY-PKV Wed Nov 15 13:08:13 2006f + if (nV11==nV21 || nV11==nV22 || nV12==nV21 || nV12==nV22) { + continue; + } + //modified by NIZNHY-PKV Wed Nov 15 13:08:15 2006t + // E2 + nE2=aPBR.Edge(); + // + const TopoDS_Vertex& aV21=TopoDS::Vertex(myDS->Shape(nV21)); + const TopoDS_Vertex& aV22=TopoDS::Vertex(myDS->Shape(nV22)); + const TopoDS_Edge& aE2=TopoDS::Edge(myDS->Shape(nE2)); + // + // VV + iV=0; + iVV=IntTools_Tools::ComputeVV (aV11, aV21); + if (!iVV) { + iCount++; + iV++; + if (iCount>iCountExt) { + break; + } + } + // + iVV=IntTools_Tools::ComputeVV (aV11, aV22); + if (!iVV) { + iCount++; + iV++; + if (iCount>iCountExt) { + break; + } + } + // VE + if (!iV) { + iVE=myContext.ComputeVE (aV11, aE2, aTE); + if (!iVE) { + iCount++; + if (iCount>iCountExt) { + break; + } + } + } + // VV + iV=0; + iVV=IntTools_Tools::ComputeVV (aV12, aV21); + if (!iVV) { + iCount++; + iV++; + if (iCount>iCountExt) { + break; + } + } + // + iVV=IntTools_Tools::ComputeVV (aV12, aV22); + if (!iVV) { + iCount++; + iV++; + if (iCount>iCountExt) { + break; + } + } + // VE + if (!iV) { + iVE=myContext.ComputeVE (aV12, aE2, aTE); + if (!iVE) { + iCount++; + if (iCount>iCountExt) { + break; + } + } + } + } // next aPBR + bRet=(Standard_Boolean)(iCount>iCountExt); + return bRet; +} +// +// Contribution of Samtech www.samcef.com END diff --git a/src/NMTTools/NMTTools_PaveFiller_7.cxx b/src/NMTTools/NMTTools_PaveFiller_7.cxx index 50d899ad9..85be6851f 100644 --- a/src/NMTTools/NMTTools_PaveFiller_7.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_7.cxx @@ -46,6 +46,40 @@ #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 + +// Modified Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN +static + void FuseVertices(const TopoDS_Shape& aCompound, + TopTools_DataMapOfShapeShape& aDMVV); +// Contribution of Samtech www.samcef.com END + //======================================================================= // function: MakeSplitEdges // purpose: @@ -236,7 +270,7 @@ for(i=1; i<=aNbF; ++i) { nF=aMF(i); iRankF=myDS->Rank(nF); - const TopoDS_Shape& aF=myDS->Shape(nF); + const TopoDS_Shape aF=myDS->Shape(nF);//mpv aExp.Init(aF, TopAbs_EDGE); for(; aExp.More(); aExp.Next()) { aE=TopoDS::Edge(aExp.Current()); @@ -278,3 +312,253 @@ } } } +// Modified +// to treat Alone Vertices between faces +// Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN +//======================================================================= +// function: MakeAloneVertices +// purpose: +//======================================================================= + void NMTTools_PaveFiller::MakeAloneVertices() +{ + Standard_Integer i, aNbFFs, nF1, nF2, j, aNbPnts, nFx, aNbV; + Standard_Real aTolF1, aTolF2, aTolSum, aTolV; + TColStd_ListIteratorOfListOfInteger aIt; + TColStd_ListOfInteger aLI; + TopoDS_Vertex aV; + TopoDS_Compound aCompound; + BRep_Builder aBB; + TopTools_DataMapOfShapeListOfInteger aDMVFF, aDMVFF1; + TopTools_DataMapIteratorOfDataMapOfShapeListOfInteger aItDMVFF; + TopTools_DataMapOfShapeShape aDMVV; + TopTools_DataMapOfIntegerShape aDMIV; + TopTools_DataMapOfShapeInteger aDMVI; + TopTools_DataMapIteratorOfDataMapOfShapeInteger aItDMVI; + TopTools_DataMapIteratorOfDataMapOfIntegerShape aItDMIV; + // + aBB.MakeCompound(aCompound); + // + myAloneVertices.Clear(); + // + BOPTools_CArray1OfSSInterference& aFFs=myIntrPool->SSInterferences(); + // + // 1. Collect alone vertices from FFs + aNbV=0; + aNbFFs=aFFs.Extent(); + for (i=1; i<=aNbFFs; ++i) { + BOPTools_SSInterference& aFFi=aFFs(i); + aFFi.Indices(nF1, nF2); + // + const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv + const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv + // + aTolF1=BRep_Tool::Tolerance(aF1); + aTolF2=BRep_Tool::Tolerance(aF2); + aTolSum=aTolF1+aTolF2; + // + aLI.Clear(); + aLI.Append(nF1); + aLI.Append(nF2); + // + const IntTools_SequenceOfPntOn2Faces& aSeqAlonePnts=aFFi.AlonePnts(); + aNbPnts=aSeqAlonePnts.Length(); + for (j=1; j<=aNbPnts; ++j) { + const gp_Pnt& aP=aSeqAlonePnts(j).P1().Pnt(); + BOPTools_Tools::MakeNewVertex(aP, aTolSum, aV); + aDMVFF.Bind(aV, aLI); + aBB.Add(aCompound, aV); + ++aNbV; + } + } + if (!aNbV) { + return; + } + // + // 2. Try to fuse alone vertices themselves; + FuseVertices(aCompound, aDMVV); + // + // if some are fused, replace them by new ones + aItDMVFF.Initialize(aDMVFF); + for (; aItDMVFF.More(); aItDMVFF.Next()) { + const TopoDS_Shape& aVx=aItDMVFF.Key(); + const TColStd_ListOfInteger& aLIx=aItDMVFF.Value(); + // + if (!aDMVV.IsBound(aVx)) { + aDMVFF1.Bind(aVx, aLIx); + } + else { + const TopoDS_Shape& aVy=aDMVV.Find(aVx); + + if (aDMVFF1.IsBound(aVy)) { + TColStd_ListOfInteger& aLIy=aDMVFF1.ChangeFind(aVy); + aIt.Initialize(aLIx); + for(; aIt.More(); aIt.Next()) { + nFx=aIt.Value(); + aLIy.Append(nFx); + } + } + else { + aDMVFF1.Bind(aVy, aLIx); + } + } + } + aDMVFF.Clear(); + // + // refine lists of faces in aDMVFF1; + aItDMVFF.Initialize(aDMVFF1); + for (; aItDMVFF.More(); aItDMVFF.Next()) { + TColStd_MapOfInteger aMIy; + TColStd_ListOfInteger aLIy; + // + const TopoDS_Shape& aVx=aItDMVFF.Key(); + TColStd_ListOfInteger& aLIx=aDMVFF1.ChangeFind(aVx); + aIt.Initialize(aLIx); + for(; aIt.More(); aIt.Next()) { + nFx=aIt.Value(); + if (aMIy.Add(nFx)) { + aLIy.Append(nFx); + } + } + aLIx.Clear(); + aLIx.Append(aLIy); + } + //================================== + // + // 3. Collect vertices from DS + Standard_Integer aNbS, nV, nVSD, aNbVDS, i1, i2, aNbVSD; + // + aNbS=myDS->NumberOfShapesOfTheObject(); + // old shapes + for (i=1; i<=aNbS; ++i) { + const TopoDS_Shape& aS=myDS->Shape(i); + if (aS.ShapeType() != TopAbs_VERTEX){ + continue; + } + // + nVSD=FindSDVertex(i); + nV=(nVSD) ? nVSD : i; + const TopoDS_Shape& aVx=myDS->Shape(nV); + if (!aDMVI.IsBound(aVx)) { + aDMVI.Bind(aVx, nV); + } + } + // new shapes + i1=myDS->NumberOfSourceShapes()+1; + i2=myDS->NumberOfInsertedShapes(); + for (i=i1; i<=i2; ++i) { + const TopoDS_Shape aS=myDS->Shape(i);//mpv + if (aS.ShapeType() != TopAbs_VERTEX){ + continue; + } + if (!aDMVI.IsBound(aS)) { + aDMVI.Bind(aS, i); + } + } + // + // 4. Initialize BoundSortBox on aDMVI + // + Handle(Bnd_HArray1OfBox) aHAB; + Bnd_BoundSortBox aBSB; + // + aNbVDS=aDMVI.Extent(); + aHAB=new Bnd_HArray1OfBox(1, aNbVDS); + // + aItDMVI.Initialize(aDMVI); + for (i=1; aItDMVI.More(); aItDMVI.Next(), ++i) { + Bnd_Box aBox; + // + nV=aItDMVI.Value(); + aV=TopoDS::Vertex(aItDMVI.Key()); + aTolV=BRep_Tool::Tolerance(aV); + aBox.SetGap(aTolV); + BRepBndLib::Add(aV, aBox); + aHAB->SetValue(i, aBox); + // + aDMIV.Bind(i, aV); + } + aBSB.Initialize(aHAB); + // + // 5. Compare + aItDMVFF.Initialize(aDMVFF1); + for (; aItDMVFF.More(); aItDMVFF.Next()) { + Bnd_Box aBoxV; + // + const TColStd_ListOfInteger& aLIFF=aItDMVFF.Value(); + aV=TopoDS::Vertex(aItDMVFF.Key()); + // + aTolV=BRep_Tool::Tolerance(aV); + aBoxV.SetGap(aTolV); + BRepBndLib::Add(aV, aBoxV); + // + const TColStd_ListOfInteger& aLIVSD=aBSB.Compare(aBoxV); + aNbVSD=aLIVSD.Extent(); + if (aNbVSD==0) { + // add new vertex in DS and update map myAloneVertices + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + // + myDS->InsertShapeAndAncestorsSuccessors(aV, anASSeq); + nV=myDS->NumberOfInsertedShapes(); + // + aIt.Initialize(aLIFF); + for (; aIt.More(); aIt.Next()) { + nFx=aIt.Value(); + if (myAloneVertices.Contains(nFx)) { + TColStd_IndexedMapOfInteger& aMVx=myAloneVertices.ChangeFromKey(nFx); + aMVx.Add(nV); + } + else { + TColStd_IndexedMapOfInteger aMVx; + aMVx.Add(nV); + myAloneVertices.Add(nFx, aMVx); + } + } + } + } +} +//======================================================================= +// function: AloneVertices +// purpose: +//======================================================================= + const NMTTools_IndexedDataMapOfIndexedMapOfInteger& NMTTools_PaveFiller::AloneVertices()const +{ + return myAloneVertices; +} +//======================================================================= +// function: FuseVertices +// purpose: +//======================================================================= +void FuseVertices(const TopoDS_Shape& aCompound, + TopTools_DataMapOfShapeShape& aDMVV) +{ + Standard_Integer i, aNbVV, n1, n2, nX; + NMTDS_ShapesDataStructure tDS; + // + tDS.SetCompositeShape(aCompound); + tDS.Init(); + // + BOPTools_InterferencePool tInterfPool(tDS); + NMTTools_PaveFiller tPaveFiller(tInterfPool); + // + tPaveFiller.Init(); + // + tPaveFiller.PerformVV(); + tPaveFiller.PerformNewVertices(); + // + const BOPTools_CArray1OfVVInterference& aVVt=tInterfPool.VVInterfs(); + // + aNbVV=aVVt.Extent(); + for (i=1; i<=aNbVV; ++i) { + const BOPTools_VVInterference& aVV=aVVt(i); + aVV.Indices(n1, n2); + nX=aVV.NewShape(); + if (nX) { + const TopoDS_Shape& aV1=tDS.Shape(n1); + const TopoDS_Shape& aV2=tDS.Shape(n2); + const TopoDS_Shape& aVx=tDS.Shape(nX); + aDMVV.Bind(aV1, aVx); + aDMVV.Bind(aV2, aVx); + } + } +} +// Contribution of Samtech www.samcef.com END diff --git a/src/NMTTools/NMTTools_PaveFiller_8.cxx b/src/NMTTools/NMTTools_PaveFiller_8.cxx index 0226377d1..b8686673e 100644 --- a/src/NMTTools/NMTTools_PaveFiller_8.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_8.cxx @@ -25,6 +25,7 @@ #include +#include #include #include @@ -42,6 +43,73 @@ #include #include + +// Modified to add new method Thu Sep 14 14:35:18 2006 +// Contribution of Samtech www.samcef.com BEGIN +//======================================================================= +// function: SharedEdges +// purpose: +//======================================================================= + void NMTTools_PaveFiller::SharedEdges(const Standard_Integer nF1, + const Standard_Integer nF2, + TColStd_ListOfInteger& aLNE, + TopTools_ListOfShape& aLSE) +{ + Standard_Integer nE1, nE2; + TColStd_MapOfInteger aM1; + // + BooleanOperations_ShapesDataStructure *pDS=myDS; + BooleanOperations_OnceExplorer aExp(*pDS); + // + aExp.Init(nF1, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE1=aExp.Current(); + aM1.Add(nE1); + } + + aExp.Init(nF2, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE2=aExp.Current(); + if (aM1.Contains(nE2)) { + aLNE.Append(nE2); + const TopoDS_Shape& aE2=myDS->Shape(nE2); + aLSE.Append(aE2); + } + } +} +// Contribution of Samtech www.samcef.com END +// +//======================================================================= +// function: RealPaveBlock +// purpose: +//======================================================================= + const BOPTools_PaveBlock& NMTTools_PaveFiller::RealPaveBlock(const BOPTools_PaveBlock& aPB, + TColStd_ListOfInteger& aLB) +{ + Standard_Integer nE, nSpx; + BOPTools_ListIteratorOfListOfPaveBlock aItPBx; + // + aLB.Clear(); + nE=aPB.OriginalEdge(); + const NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE)); + NMTTools_CommonBlockAPI aCBAPI(aLCBE); + if (aCBAPI.IsCommonBlock(aPB)) { + NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB); + // + const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); + aItPBx.Initialize(aLPBx); + for (; aItPBx.More(); aItPBx.Next()) { + const BOPTools_PaveBlock& aPBx=aItPBx.Value(); + nSpx=aPBx.Edge(); + aLB.Append(nSpx); + } + // + const BOPTools_PaveBlock& aPBx=aCB.PaveBlock1(); + return aPBx; + } + return aPB; +} +// //======================================================================= // function: RealPaveBlock // purpose: diff --git a/src/NMTTools/NMTTools_Tools.cdl b/src/NMTTools/NMTTools_Tools.cdl index da32326ff..cab93959a 100644 --- a/src/NMTTools/NMTTools_Tools.cdl +++ b/src/NMTTools/NMTTools_Tools.cdl @@ -1,27 +1,27 @@ -// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +-- Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +-- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License. +-- +-- This library is distributed in the hope that it will be useful +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- You should have received a copy of the GNU Lesser General Public +-- License along with this library; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// +-- + -- File: NMTTools_Tools.cdl -- Created: Mon Dec 8 10:32:34 2003 -- Author: Peter KURNEV -- ----Copyright: Matra Datavision 2003 class Tools from NMTTools @@ -80,12 +80,23 @@ is FindChains(myclass; aM1: IndexedDataMapOfShapeIndexedMapOfShape from NMTTools; aM2:out IndexedDataMapOfShapeIndexedMapOfShape from NMTTools); - + +--modified by NIZNHY-PKV Thu Nov 16 10:58:08 2006f +-- MakePCurve(myclass; +-- aE : Edge from TopoDS; +-- aF : Face from TopoDS; +-- aC2D: Curve from Geom2d; +-- aTolR2D: Real from Standard); + MakePCurve(myclass; - aE : Edge from TopoDS; - aF : Face from TopoDS; - aC2D: Curve from Geom2d; - aTolR2D: Real from Standard); + aE : Edge from TopoDS; + aF : Face from TopoDS; + aC2D : Curve from Geom2d); + + UpdateEdge(myclass; + aE : Edge from TopoDS; + aTol : Real from Standard); +--modified by NIZNHY-PKV Thu Nov 16 10:58:14 2006t --fields end Tools; diff --git a/src/NMTTools/NMTTools_Tools.cxx b/src/NMTTools/NMTTools_Tools.cxx index 9963ce4d0..3f986765e 100644 --- a/src/NMTTools/NMTTools_Tools.cxx +++ b/src/NMTTools/NMTTools_Tools.cxx @@ -67,6 +67,10 @@ #include #include #include +// +#include +#include +#include static void ProcessBlock(const Standard_Integer iV, @@ -79,6 +83,70 @@ static TopTools_IndexedMapOfShape& aProcessed, TopTools_IndexedMapOfShape& aChain); +//modified by NIZNHY-PKV Thu Nov 16 10:46:53 2006f SKL/PartC5 +//======================================================================= +// function: UpdateEdge +// purpose: +//======================================================================= + void NMTTools_Tools::UpdateEdge(const TopoDS_Edge& aE, + const Standard_Real aTolR) +{ + Standard_Real aTolE, aTolES, aTolV; + TopoDS_Iterator aIt; + BRep_Builder aBB; + // + aTolE=BRep_Tool::Tolerance(aE); + aTolES=Max(aTolR, aTolE); + aBB.UpdateEdge(aE, aTolES); + // + aIt.Initialize(aE); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Vertex& aV=TopoDS::Vertex(aIt.Value()); + aTolV=BRep_Tool::Tolerance(aV); + if (aTolVIsPeriodic()) { + BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aT1, aT2, aC2D, aC2DA); + } + else { + BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aC3DETrim, aC2D, aC2DA); + } + // + aBB.UpdateEdge(aE, aC2DA, aFFWD, aTolE); + BRepLib::SameParameter(aE); +} +/* //======================================================================= // function: MakePCurve // purpose: @@ -137,7 +205,8 @@ static aBB.UpdateEdge(aE, aC2DA, aFFWD, aTolFact); BRepLib::SameParameter(aE); } - +*/ +//modified by NIZNHY-PKV Thu Nov 16 10:46:55 2006t //======================================================================= // function: IsSplitInOnFace // purpose: @@ -373,21 +442,49 @@ void ProcessBlock(const Standard_Integer iV, IntTools_Context& aCtx) { Standard_Boolean bFlag; - Standard_Integer i, aNbE1, aNbE2; - - TopTools_IndexedMapOfShape aME1, aME2; - TopoDS_Edge aEF1, aEF2; + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + Standard_Integer aNbE1, aNbE2; + Standard_Real aTolF1, aTolF2, aTol; + gp_Pnt2d aP2D; + gp_Pnt aP; TopoDS_Face aF1, aF2; + TopExp_Explorer aExp; + TopTools_MapOfShape aME1, aME2; + TopTools_MapIteratorOfMapOfShape aIt; + // + bFlag=Standard_False; + // Contribution of Samtech www.samcef.com END // aF1=aF1x; aF1.Orientation(TopAbs_FORWARD); aF2=aF2y; aF2.Orientation(TopAbs_FORWARD); // - TopExp::MapShapes(aF1, TopAbs_EDGE, aME1); - TopExp::MapShapes(aF2, TopAbs_EDGE, aME2); + // Modified Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN // - bFlag=Standard_False; + // 1 + aExp.Init(aF1, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current()); + if (!BRep_Tool::Degenerated(aE)) { + aME1.Add(aE); + } + } + // + aExp.Init(aF2, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current()); + if (!BRep_Tool::Degenerated(aE)) { + if (!aME1.Contains(aE)) { + return bFlag; + } + aME2.Add(aE); + } + } + // + // Contribution of Samtech www.samcef.com END // aNbE1=aME1.Extent(); aNbE2=aME2.Extent(); @@ -400,72 +497,18 @@ void ProcessBlock(const Standard_Integer iV, return bFlag; } // - for (i=1; i<=aNbE1; ++i) { - const TopoDS_Edge& aE1=TopoDS::Edge(aME1(i)); - if (BRep_Tool::Degenerated(aE1)) { - // not try to compare deg edges because it - // can not have same TShape on different faces at all - continue; - } - if (!aME2.Contains(aE1)) { - return bFlag; - } - } - // - Standard_Real aTolF1, aTolF2, aTol; - gp_Pnt2d aP2D; - gp_Pnt aP; - TopExp_Explorer anExp; - // + // 2 aTolF1=BRep_Tool::Tolerance(aF1); aTolF2=BRep_Tool::Tolerance(aF2); aTol=aTolF1+aTolF2; // - anExp.Init(aF1, TopAbs_EDGE); - for (; anExp.More(); anExp.Next()) { - const TopoDS_Edge& aE1=TopoDS::Edge(anExp.Current()); - if (!BRep_Tool::Degenerated(aE1)) { - BOPTools_Tools3D::PointNearEdge(aE1, aF1, aP2D, aP); - bFlag=aCtx.IsValidPointForFace(aP, aF2, aTol); - break; - } + aIt.Initialize(aME1); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Edge& aE=TopoDS::Edge(aIt.Key()); + BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP); + bFlag=aCtx.IsValidPointForFace(aP, aF2, aTol); + break; } - return bFlag; - /* - // - Standard_Real aU1, aU2, aV1, aV2; - Standard_Real dU, dV, aU, aV; - Standard_Integer aNbP=5, aNbP1, j; - gp_Pnt2d aP2D; - gp_Pnt aP; - // - aTolF1=BRep_Tool::Tolerance(aF1); - aTolF2=BRep_Tool::Tolerance(aF2); - aTol=aTolF1+aTolF2; - // - BRepTools::UVBounds(aF1, aU1, aU2, aV1, aV2); - Handle(Geom_Surface) aS1=BRep_Tool::Surface(aF1); - // - aNbP1=aNbP+1; - dU=(aU2-aU1)/aNbP1; - dV=(aV2-aV1)/aNbP1; - // - for (i=1; i<=aNbP; ++i) { - aU=aU1+i*dU; - for (j=1; j<=aNbP; ++j) { - aV=aV1+j*dV; - aP2D.SetCoord(aU, aV); - // - if(aCtx.IsPointInFace(aF1, aP2D)) { - aP=aS1->Value(aU, aV); - bFlag=aCtx.IsValidPointForFace(aP, aF2, aTol); - if (!bFlag) { - return bFlag; - } - } - } - } - */ // return bFlag; } diff --git a/src/NMTTools/NMTTools_Tools.hxx b/src/NMTTools/NMTTools_Tools.hxx index e85e495f1..96913473b 100644 --- a/src/NMTTools/NMTTools_Tools.hxx +++ b/src/NMTTools/NMTTools_Tools.hxx @@ -49,6 +49,7 @@ class Geom2d_Curve; #include #endif + class NMTTools_Tools { public: @@ -67,15 +68,36 @@ public: } // Methods PUBLIC // + + Standard_EXPORT static void MakeNewVertex(const TopTools_ListOfShape& aLV,TopoDS_Vertex& aNewVertex) ; + + Standard_EXPORT static void FindChains(const BOPTools_CArray1OfVVInterference& aVVs,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ; + + Standard_EXPORT static void FindChains(const BOPTools_CArray1OfSSInterference& aVVs,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ; + + Standard_EXPORT static void FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ; + + Standard_EXPORT static Standard_Boolean IsSplitInOnFace(const TopoDS_Edge& aE,const TopoDS_Face& aF,IntTools_Context& aCtx) ; + + Standard_EXPORT static Standard_Boolean AreFacesSameDomain(const TopoDS_Face& aF1,const TopoDS_Face& aF2,IntTools_Context& aCtx) ; + + Standard_EXPORT static void FindChains(const NMTTools_ListOfCoupleOfShape& aLCS,NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM) ; + + Standard_EXPORT static void FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM1,NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM2) ; -Standard_EXPORT static void MakePCurve(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Handle(Geom2d_Curve)& aC2D,const Standard_Real aTolR2D) ; + + +Standard_EXPORT static void MakePCurve(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Handle(Geom2d_Curve)& aC2D) ; + + +Standard_EXPORT static void UpdateEdge(const TopoDS_Edge& aE,const Standard_Real aTol) ; diff --git a/src/NMTTools/NMTTools_Tools.ixx b/src/NMTTools/NMTTools_Tools.ixx index 0d09ae5ae..78e114729 100644 --- a/src/NMTTools/NMTTools_Tools.ixx +++ b/src/NMTTools/NMTTools_Tools.ixx @@ -1,18 +1,18 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com diff --git a/src/NMTTools/NMTTools_Tools.jxx b/src/NMTTools/NMTTools_Tools.jxx index f1360a8de..8f3817efa 100644 --- a/src/NMTTools/NMTTools_Tools.jxx +++ b/src/NMTTools/NMTTools_Tools.jxx @@ -1,22 +1,22 @@ // Copyright (C) 2005 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 +// License as published by the Free Software Foundation; either // version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software // 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 _TopTools_ListOfShape_HeaderFile #include #endif diff --git a/src/OBJECT/GEOM_AISShape.hxx b/src/OBJECT/GEOM_AISShape.hxx index 2cbf8b2b0..1fa87d0a8 100644 --- a/src/OBJECT/GEOM_AISShape.hxx +++ b/src/OBJECT/GEOM_AISShape.hxx @@ -27,6 +27,8 @@ #ifndef _GEOM_AISShape_HeaderFile #define _GEOM_AISShape_HeaderFile +#include "GEOM_OBJECT_defs.hxx" + #ifndef _Standard_HeaderFile #include #endif @@ -58,12 +60,7 @@ class Prs3d_Presentation; class SALOME_InteractiveObject; class TopoDS_Shape; -#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS -#define OBJECT_WNT_EXPORT __declspec( dllexport ) -#else -#define OBJECT_WNT_EXPORT -#endif -class OBJECT_WNT_EXPORT GEOM_AISShape : public SALOME_AISShape { +class GEOM_OBJECT_EXPORT GEOM_AISShape : public SALOME_AISShape { public: diff --git a/src/OBJECT/GEOM_AISTrihedron.cxx b/src/OBJECT/GEOM_AISTrihedron.cxx index a3157f53b..acf93656d 100755 --- a/src/OBJECT/GEOM_AISTrihedron.cxx +++ b/src/OBJECT/GEOM_AISTrihedron.cxx @@ -1,72 +1,72 @@ -// GEOM_AISTrihedron : Filter for VTK viewer -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +// GEOM_AISTrihedron : Filter for VTK viewer +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// -// -// File : GEOM_AISTrihedron.cxx -// Author : Sergey LITONIN -// Module : SALOME - -#include "GEOM_AISTrihedron.hxx" -#include - -IMPLEMENT_STANDARD_HANDLE(GEOM_AISTrihedron, AIS_Trihedron) -IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISTrihedron, AIS_Trihedron) - -/* - Class : GEOM_AISTrihedron - Description : Interactive object for displaying local CS -*/ - -GEOM_AISTrihedron::GEOM_AISTrihedron( const Handle(Geom_Axis2Placement)& thePlc ) -: AIS_Trihedron( thePlc ) -{ - -} -Handle(SALOME_InteractiveObject) GEOM_AISTrihedron::getIO() -{ - return myObject; -} -Standard_Boolean GEOM_AISTrihedron::hasIO() -{ - return !myObject.IsNull(); -} - -Standard_CString GEOM_AISTrihedron::getName() -{ - return myName.ToCString(); -} -void GEOM_AISTrihedron::setName( Standard_CString aName ) -{ - myName = TCollection_AsciiString( aName ); -} - -void GEOM_AISTrihedron::setIO( const Handle(SALOME_InteractiveObject)& theIO ) -{ - myObject = theIO; -} - - - - - - - \ No newline at end of file +// +// +// +// File : GEOM_AISTrihedron.cxx +// Author : Sergey LITONIN +// Module : SALOME + +#include "GEOM_AISTrihedron.hxx" +#include + +IMPLEMENT_STANDARD_HANDLE(GEOM_AISTrihedron, AIS_Trihedron) +IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISTrihedron, AIS_Trihedron) + +/* + Class : GEOM_AISTrihedron + Description : Interactive object for displaying local CS +*/ + +GEOM_AISTrihedron::GEOM_AISTrihedron( const Handle(Geom_Axis2Placement)& thePlc ) +: AIS_Trihedron( thePlc ) +{ + +} +Handle(SALOME_InteractiveObject) GEOM_AISTrihedron::getIO() +{ + return myObject; +} +Standard_Boolean GEOM_AISTrihedron::hasIO() +{ + return !myObject.IsNull(); +} + +Standard_CString GEOM_AISTrihedron::getName() +{ + return myName.ToCString(); +} +void GEOM_AISTrihedron::setName( Standard_CString aName ) +{ + myName = TCollection_AsciiString( aName ); +} + +void GEOM_AISTrihedron::setIO( const Handle(SALOME_InteractiveObject)& theIO ) +{ + myObject = theIO; +} + + + + + + + diff --git a/src/OBJECT/GEOM_AISTrihedron.hxx b/src/OBJECT/GEOM_AISTrihedron.hxx index 775409086..60071c842 100755 --- a/src/OBJECT/GEOM_AISTrihedron.hxx +++ b/src/OBJECT/GEOM_AISTrihedron.hxx @@ -1,81 +1,81 @@ -// GEOM_AISTrihedron : Filter for VTK viewer -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// +// GEOM_AISTrihedron : Filter for VTK viewer +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// -// -// File : GEOM_AISTrihedron.hxx -// Author : Sergey LITONIN -// Module : SALOME - -#ifndef GEOM_AISTrihedron_HeaderFile -#define GEOM_AISTrihedron_HeaderFile - -#include - -#include -#include -#include - -class Handle(Geom_Axis2Placement); - -DEFINE_STANDARD_HANDLE(GEOM_AISTrihedron, AIS_Trihedron) - -/* - Class : GEOM_AISTrihedron - Description : Interactive object for displaying local CS -*/ - -class GEOM_AISTrihedron : public AIS_Trihedron -{ -public: - - Standard_EXPORT GEOM_AISTrihedron( const Handle(Geom_Axis2Placement)& ); - - Standard_EXPORT Handle(SALOME_InteractiveObject) getIO(); - Standard_EXPORT void setIO( const Handle(SALOME_InteractiveObject)& ); - Standard_EXPORT Standard_Boolean hasIO(); - Standard_EXPORT Standard_CString getName(); - Standard_EXPORT void setName( Standard_CString aName ); - -private: - - TCollection_AsciiString myName; - Handle(SALOME_InteractiveObject) myObject; - -public: - DEFINE_STANDARD_RTTI(GEOM_AISTrihedron) -}; - -#endif - - - - - - - - - - - - - - +// +// +// +// File : GEOM_AISTrihedron.hxx +// Author : Sergey LITONIN +// Module : SALOME + +#ifndef GEOM_AISTrihedron_HeaderFile +#define GEOM_AISTrihedron_HeaderFile + +#include + +#include +#include +#include + +class Handle(Geom_Axis2Placement); + +DEFINE_STANDARD_HANDLE(GEOM_AISTrihedron, AIS_Trihedron) + +/* + Class : GEOM_AISTrihedron + Description : Interactive object for displaying local CS +*/ + +class GEOM_AISTrihedron : public AIS_Trihedron +{ +public: + + Standard_EXPORT GEOM_AISTrihedron( const Handle(Geom_Axis2Placement)& ); + + Standard_EXPORT Handle(SALOME_InteractiveObject) getIO(); + Standard_EXPORT void setIO( const Handle(SALOME_InteractiveObject)& ); + Standard_EXPORT Standard_Boolean hasIO(); + Standard_EXPORT Standard_CString getName(); + Standard_EXPORT void setName( Standard_CString aName ); + +private: + + TCollection_AsciiString myName; + Handle(SALOME_InteractiveObject) myObject; + +public: + DEFINE_STANDARD_RTTI(GEOM_AISTrihedron) +}; + +#endif + + + + + + + + + + + + + + diff --git a/src/OBJECT/GEOM_Actor.h b/src/OBJECT/GEOM_Actor.h index f2236aea1..9fb32dc83 100644 --- a/src/OBJECT/GEOM_Actor.h +++ b/src/OBJECT/GEOM_Actor.h @@ -29,6 +29,8 @@ #ifndef GEOM_ACTOR_H #define GEOM_ACTOR_H +#include "GEOM_OBJECT_defs.hxx" + #include "SALOME_Actor.h" //OpenCASCADE @@ -38,13 +40,7 @@ class vtkCamera; class TopoDS_Shape; -#ifdef WNT -#include -#else -#define SALOME_WNT_EXPORT -#endif - -class SALOME_WNT_EXPORT GEOM_Actor : public SALOME_Actor { +class GEOM_OBJECT_EXPORT GEOM_Actor : public SALOME_Actor { public: vtkTypeMacro(GEOM_Actor,SALOME_Actor); diff --git a/src/OBJECT/GEOM_AssemblyBuilder.h b/src/OBJECT/GEOM_AssemblyBuilder.h index 2fd7014bd..36149732c 100644 --- a/src/OBJECT/GEOM_AssemblyBuilder.h +++ b/src/OBJECT/GEOM_AssemblyBuilder.h @@ -26,6 +26,8 @@ // Module : GEOM // $Header$ +#include "GEOM_OBJECT_defs.hxx" + #include #include #include @@ -34,13 +36,7 @@ #include #include -#ifdef WNT -#include -#else -#define SALOME_WNT_EXPORT -#endif - -class SALOME_WNT_EXPORT GEOM_AssemblyBuilder { +class GEOM_OBJECT_EXPORT GEOM_AssemblyBuilder { private: diff --git a/src/OBJECT/GEOM_OCCReader.h b/src/OBJECT/GEOM_OCCReader.h index 6592e42d4..d17f6d484 100644 --- a/src/OBJECT/GEOM_OCCReader.h +++ b/src/OBJECT/GEOM_OCCReader.h @@ -34,6 +34,8 @@ #ifndef GEOM_OCCREADER_H #define GEOM_OCCREADER_H +#include "GEOM_OBJECT_defs.hxx" + #include class vtkPoints; @@ -47,13 +49,7 @@ class vtkCellArray; #include #include -#ifdef _WIN_32 -#define VTKOCC_EXPORT __declspec (dllexport) -#else -#define VTKOCC_EXPORT -#endif - -class VTKOCC_EXPORT GEOM_OCCReader : public vtkPolyDataSource { +class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkPolyDataSource { // methods diff --git a/src/OBJECT/GEOM_VTKTrihedron.hxx b/src/OBJECT/GEOM_VTKTrihedron.hxx index 4250b3d70..1d9e85347 100644 --- a/src/OBJECT/GEOM_VTKTrihedron.hxx +++ b/src/OBJECT/GEOM_VTKTrihedron.hxx @@ -29,17 +29,12 @@ #ifndef GEOM_VTKTrihedron_H #define GEOM_VTKTrihedron_H +#include "GEOM_OBJECT_defs.hxx" + #include #include "SALOME_Actor.h" #include "VTKViewer_Trihedron.h" -#ifdef WNT -#include -#else -#define SALOME_WNT_EXPORT -#endif - - class vtkActorCollection; class vtkRenderer; class vtkPolyDataMapper; @@ -50,7 +45,7 @@ class vtkPolyDataMapper; Placement of trihedron is chahged with SetPlacement() method */ -class SALOME_WNT_EXPORT GEOM_VTKTrihedron : public SALOME_Actor +class GEOM_OBJECT_EXPORT GEOM_VTKTrihedron : public SALOME_Actor { protected: diff --git a/src/OBJECT/Makefile.in b/src/OBJECT/Makefile.in index 0677ec36c..3ca29fdce 100644 --- a/src/OBJECT/Makefile.in +++ b/src/OBJECT/Makefile.in @@ -39,7 +39,8 @@ EXPORT_HEADERS = GEOM_Actor.h \ GEOM_InteractiveObject.hxx \ Handle_GEOM_InteractiveObject.hxx \ GEOM_AISTrihedron.hxx \ - GEOM_VTKTrihedron.hxx + GEOM_VTKTrihedron.hxx \ + GEOM_OBJECT_defs.hxx # Libraries targets diff --git a/src/OperationGUI/OperationGUI_PartitionDlg.cxx b/src/OperationGUI/OperationGUI_PartitionDlg.cxx index 5f393aa2e..12ebfba3c 100644 --- a/src/OperationGUI/OperationGUI_PartitionDlg.cxx +++ b/src/OperationGUI/OperationGUI_PartitionDlg.cxx @@ -67,24 +67,15 @@ OperationGUI_PartitionDlg::OperationGUI_PartitionDlg(GeometryGUI* theGeometryGUI RadioButton3->close(TRUE); // Full partition (contains half-space partition) - GroupPoints = new DlgRef_4Sel1List1Check_QTD(this, "GroupPoints"); + GroupPoints = new DlgRef_2Sel1List_QTD(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION")); - GroupPoints->GroupBox2->setTitle(tr("SUPPRESS_RESULT")); GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); GroupPoints->TextLabel2->setText(tr("GEOM_TOOL_OBJECT")); GroupPoints->TextLabel3->setText(tr("GEOM_RECONSTRUCTION_LIMIT")); - GroupPoints->TextLabel4->setText(tr("GEOM_SUPPRESS_RESULT_INSIDE")); - GroupPoints->TextLabel5->setText(tr("GEOM_SUPPRESS_RESULT_OUTSIDE")); - GroupPoints->CheckBox1->setText(tr("GEOM_REMOVE_WEBS")); GroupPoints->PushButton1->setPixmap(image2); GroupPoints->PushButton2->setPixmap(image2); - GroupPoints->PushButton3->setPixmap(image2); - GroupPoints->PushButton4->setPixmap(image2); - GroupPoints->PushButton5->setText(tr("GEOM_SET_MATERIALS")); GroupPoints->LineEdit1->setReadOnly( true ); GroupPoints->LineEdit2->setReadOnly( true ); - GroupPoints->LineEdit3->setReadOnly( true ); - GroupPoints->LineEdit4->setReadOnly( true ); Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ @@ -126,16 +117,9 @@ void OperationGUI_PartitionDlg::Init() connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->PushButton5, SIGNAL(clicked()), this, SLOT(SetMaterials())); connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->LineEdit4, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - - connect(GroupPoints->CheckBox1, SIGNAL(toggled(bool)), this, SLOT(onRemoveWebs(bool))); connect(GroupPoints->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged())); @@ -171,18 +155,14 @@ void OperationGUI_PartitionDlg::ConstructorsClicked(int constructorId) resize(0, 0); GroupPoints->TextLabel3->show(); GroupPoints->ComboBox1->show(); - GroupPoints->GroupBox2->show(); GroupPoints->ComboBox1->setCurrentItem(0); - GroupPoints->LineEdit3->clear(); - GroupPoints->LineEdit4->clear(); break; } case 1: /*Half-space partition */ { GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION_HALFSPACE")); - GroupPoints->GroupBox2->hide(); GroupPoints->TextLabel3->hide(); GroupPoints->ComboBox1->hide(); GroupPoints->TextLabel2->setText(tr("GEOM_PLANE")); @@ -194,7 +174,6 @@ void OperationGUI_PartitionDlg::ConstructorsClicked(int constructorId) myEditCurrentArgument = GroupPoints->LineEdit1; GroupPoints->LineEdit1->clear(); GroupPoints->LineEdit2->clear(); - onRemoveWebs(false); myEditCurrentArgument->setFocus(); connect(myGeomGUI->getApp()->selectionMgr(), @@ -249,10 +228,6 @@ void OperationGUI_PartitionDlg::SelectionIntoArgument() } else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myListTools.length( 0 ); - else if ( myEditCurrentArgument == GroupPoints->LineEdit3 ) - myListRemoveInside.length( 0 ); - else if ( myEditCurrentArgument == GroupPoints->LineEdit4 ) - myListKeepInside.length( 0 ); } // One and only one plane can be selected @@ -276,18 +251,6 @@ void OperationGUI_PartitionDlg::SelectionIntoArgument() if ( !myListTools.length() ) return; } - else if(myEditCurrentArgument == GroupPoints->LineEdit3) - { - GEOMBase::ConvertListOfIOInListOfGO( selectedIO(), myListRemoveInside, true ); - if (!myListRemoveInside.length()) - return; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit4) - { - GEOMBase::ConvertListOfIOInListOfGO( selectedIO(), myListKeepInside, true ); - if ( !myListKeepInside.length() ) - return; - } myEditCurrentArgument->setText( aString ); } @@ -309,10 +272,6 @@ void OperationGUI_PartitionDlg::SetEditCurrentArgument() if( getConstructorId()==1 ) globalSelection( GEOM_PLANE ); } - else if(send == GroupPoints->PushButton3) - myEditCurrentArgument = GroupPoints->LineEdit3; - else if(send == GroupPoints->PushButton4) - myEditCurrentArgument = GroupPoints->LineEdit4; globalSelection( GEOM_ALLSHAPES ); @@ -330,9 +289,7 @@ void OperationGUI_PartitionDlg::LineEditReturnPressed() QLineEdit* send = (QLineEdit*)sender(); if(send == GroupPoints->LineEdit1 || - send == GroupPoints->LineEdit2 || - send == GroupPoints->LineEdit3 || - send == GroupPoints->LineEdit4 ) + send == GroupPoints->LineEdit2 ) { myEditCurrentArgument = send; GEOMBase_Skeleton::LineEditReturnPressed(); @@ -404,13 +361,11 @@ bool OperationGUI_PartitionDlg::execute( ObjectList& objects ) aLimit = GEOM::SHAPE; if (isValid( msg )) { - if (aConstructorId == 0 && !toRemoveWebs()) - myListMaterials.length(0); anObj = GEOM::GEOM_IBooleanOperations::_narrow(getOperation())-> MakePartition(myListShapes, myListTools, myListKeepInside, myListRemoveInside, - aLimit, toRemoveWebs(), myListMaterials); + aLimit, false, myListMaterials); res = true; } @@ -438,47 +393,12 @@ void OperationGUI_PartitionDlg::closeEvent( QCloseEvent* e ) void OperationGUI_PartitionDlg::ComboTextChanged() { bool IsEnabled = GroupPoints->ComboBox1->currentItem() < 3; - GroupPoints->LineEdit3->setEnabled(IsEnabled); - GroupPoints->LineEdit4->setEnabled(IsEnabled); - GroupPoints->TextLabel4->setEnabled(IsEnabled); - GroupPoints->TextLabel5->setEnabled(IsEnabled); - GroupPoints->PushButton3->setEnabled(IsEnabled); - GroupPoints->PushButton4->setEnabled(IsEnabled); -} - - -//================================================================================= -// function : SetMaterials() -// purpose : -//================================================================================= -void OperationGUI_PartitionDlg::SetMaterials() -{ - OperationGUI_MaterialDlg* aDlg = - new OperationGUI_MaterialDlg(myGeomGUI, this, "", myListShapes, true); - aDlg->show(); -} - - -//================================================================================= -// function : onRemoveWebs() -// purpose : -//================================================================================= -void OperationGUI_PartitionDlg::onRemoveWebs(bool isChecked) -{ - if (GroupPoints->CheckBox1->isChecked() != isChecked) - GroupPoints->CheckBox1->setChecked(isChecked); - - GroupPoints->PushButton5->setEnabled(isChecked); -} - - -//================================================================================= -// function : toRemoveWebs() -// purpose : -//================================================================================= -bool OperationGUI_PartitionDlg::toRemoveWebs() const -{ - return GroupPoints->CheckBox1->isChecked(); + //GroupPoints->LineEdit3->setEnabled(IsEnabled); + //GroupPoints->LineEdit4->setEnabled(IsEnabled); + //GroupPoints->TextLabel4->setEnabled(IsEnabled); + //GroupPoints->TextLabel5->setEnabled(IsEnabled); + //GroupPoints->PushButton3->setEnabled(IsEnabled); + //GroupPoints->PushButton4->setEnabled(IsEnabled); } diff --git a/src/OperationGUI/OperationGUI_PartitionDlg.h b/src/OperationGUI/OperationGUI_PartitionDlg.h index 5a95b5d9b..dbfbd4dcc 100644 --- a/src/OperationGUI/OperationGUI_PartitionDlg.h +++ b/src/OperationGUI/OperationGUI_PartitionDlg.h @@ -29,7 +29,7 @@ #define DIALOGBOX_PARTITION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_4Sel1List1Check_QTD.h" +#include "DlgRef_2Sel1List_QTD.h" //================================================================================= // class : OperationGUI_PartitionDlg @@ -60,7 +60,6 @@ protected: private: void Init(); void enterEvent(QEvent* e); - bool toRemoveWebs() const; int GetLimit() const; GEOM::ListOfGO myListShapes; @@ -69,7 +68,7 @@ private: GEOM::ListOfGO myListRemoveInside; GEOM::ListOfGO myListKeepInside; - DlgRef_4Sel1List1Check_QTD* GroupPoints; + DlgRef_2Sel1List_QTD* GroupPoints; private slots: void ClickOnOk(); @@ -79,8 +78,6 @@ private slots: void SelectionIntoArgument(); void SetEditCurrentArgument(); void ComboTextChanged(); - void onRemoveWebs(bool); - void SetMaterials(); void ConstructorsClicked(int constructorId); }; diff --git a/src/PARTITION/Partition_Inter2d.cxx b/src/PARTITION/Partition_Inter2d.cxx index 4394e45a6..2760b23e6 100644 --- a/src/PARTITION/Partition_Inter2d.cxx +++ b/src/PARTITION/Partition_Inter2d.cxx @@ -26,7 +26,6 @@ // Module : GEOM // $Header$ -using namespace std; #include "Partition_Inter2d.ixx" #include "utilities.h" @@ -58,6 +57,8 @@ static Standard_Integer NbF2d = 0; static Standard_Integer NbE2d = 0; #endif +using namespace std; + //======================================================================= //function : getOtherShape //purpose : diff --git a/src/PARTITION/Partition_Inter3d.cxx b/src/PARTITION/Partition_Inter3d.cxx index dff1ad3b8..771fc19d1 100644 --- a/src/PARTITION/Partition_Inter3d.cxx +++ b/src/PARTITION/Partition_Inter3d.cxx @@ -26,7 +26,6 @@ // Module : GEOM // $Header$ -using namespace std; #include "Partition_Inter2d.hxx" #include "Partition_Inter3d.ixx" #include "utilities.h" @@ -84,6 +83,8 @@ using namespace std; #include #include +using namespace std; + //======================================================================= //function : Partition_Inter3d //purpose : diff --git a/src/PARTITION/Partition_Loop.cxx b/src/PARTITION/Partition_Loop.cxx index 42afc3882..f118f857d 100644 --- a/src/PARTITION/Partition_Loop.cxx +++ b/src/PARTITION/Partition_Loop.cxx @@ -26,7 +26,6 @@ // Module : GEOM // $Header$ -using namespace std; #include #include "Partition_Loop.ixx" @@ -63,6 +62,8 @@ using namespace std; #include #include +using namespace std; + static char* name = new char[100]; static int nbe = 0; diff --git a/src/PARTITION/Partition_Loop2d.cxx b/src/PARTITION/Partition_Loop2d.cxx index 386bd03e4..731728778 100644 --- a/src/PARTITION/Partition_Loop2d.cxx +++ b/src/PARTITION/Partition_Loop2d.cxx @@ -24,7 +24,6 @@ // Module : GEOM // $Header$ -using namespace std; #include "Partition_Loop2d.ixx" #include "utilities.h" @@ -63,6 +62,8 @@ using namespace std; #include #include +using namespace std; + //======================================================================= //function : Partition_Loop2d //purpose : diff --git a/src/PARTITION/Partition_Loop3d.cxx b/src/PARTITION/Partition_Loop3d.cxx index bbc5c3c2f..4d83a4616 100644 --- a/src/PARTITION/Partition_Loop3d.cxx +++ b/src/PARTITION/Partition_Loop3d.cxx @@ -22,7 +22,6 @@ // File : Partition_Loop3d.cxx // Module : GEOM -using namespace std; #include "Partition_Loop3d.ixx" #include @@ -44,6 +43,8 @@ using namespace std; #include #include +using namespace std; + //======================================================================= //function : Partition_Loop3d //purpose : diff --git a/src/PARTITION/Partition_Spliter.cxx b/src/PARTITION/Partition_Spliter.cxx index 50edabbb5..1bb919fe5 100644 --- a/src/PARTITION/Partition_Spliter.cxx +++ b/src/PARTITION/Partition_Spliter.cxx @@ -26,7 +26,6 @@ // Module : GEOM // $Header$ -using namespace std; #include "Partition_Inter2d.hxx" #include "Partition_Inter3d.hxx" #include "Partition_Loop2d.hxx" @@ -84,6 +83,8 @@ using namespace std; # include #endif +using namespace std; + //======================================================================= //function : isClosed //purpose : check id a shape is closed, ie is a solid or a closed shell diff --git a/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx b/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx index a2fab2359..9b8f1e085 100644 --- a/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx +++ b/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx @@ -136,9 +136,15 @@ void RepairGUI_FreeBoundDlg::onHelp() if (app) app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName); else { + QString platform; +#ifdef WIN32 + platform = "winapplication"; +#else + platform = "application"; +#endif SUIT_MessageBox::warn1 (0, tr("WRN_WARNING"), tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName), + arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), tr("BUT_OK")); } } diff --git a/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx b/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx index ea6491ff0..61881b7c3 100644 --- a/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx @@ -157,9 +157,15 @@ void RepairGUI_FreeFacesDlg::onHelp() if (app) app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName); else { + QString platform; +#ifdef WIN32 + platform = "winapplication"; +#else + platform = "application"; +#endif SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(myHelpFileName), + arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), QObject::tr("BUT_OK")); } } diff --git a/src/RepairGUI/RepairGUI_GlueDlg.cxx b/src/RepairGUI/RepairGUI_GlueDlg.cxx index bcdb30715..1b2407c42 100644 --- a/src/RepairGUI/RepairGUI_GlueDlg.cxx +++ b/src/RepairGUI/RepairGUI_GlueDlg.cxx @@ -297,15 +297,15 @@ void RepairGUI_GlueDlg::clearShapeBufferLocal( GEOM::GEOM_Object_ptr theObj ) if ( CORBA::is_nil( theObj ) ) return; - string IOR = myGeomGUI->getApp()->orb()->object_to_string( theObj ); - TCollection_AsciiString asciiIOR( strdup( IOR.c_str() ) ); + CORBA::String_var IOR = myGeomGUI->getApp()->orb()->object_to_string( theObj ); + TCollection_AsciiString asciiIOR( (char *)( IOR.in() ) ); myGeomGUI->GetShapeReader().RemoveShapeFromBuffer( asciiIOR ); if ( !getStudy() || !( getStudy()->studyDS() ) ) return; _PTR(Study) aStudy = getStudy()->studyDS(); - _PTR(SObject) aSObj ( aStudy->FindObjectIOR( IOR ) ); + _PTR(SObject) aSObj ( aStudy->FindObjectIOR( string( IOR.in() ) ) ); if ( !aSObj ) return; diff --git a/src/STEPExport/STEPExport.cxx b/src/STEPExport/STEPExport.cxx index 061e49dc6..290ab74b2 100644 --- a/src/STEPExport/STEPExport.cxx +++ b/src/STEPExport/STEPExport.cxx @@ -32,9 +32,21 @@ #include #ifdef WNT -#include + #if defined STEPEXPORT_EXPORTS + #if defined WIN32 + #define STEPEXPORT_EXPORT __declspec( dllexport ) + #else + #define STEPEXPORT_EXPORT + #endif + #else + #if defined WIN32 + #define STEPEXPORT_EXPORT __declspec( dllimport ) + #else + #define STEPEXPORT_EXPORT + #endif + #endif #else -#define SALOME_WNT_EXPORT + #define STEPEXPORT_EXPORT #endif //============================================================================= @@ -45,10 +57,8 @@ extern "C" { -SALOME_WNT_EXPORT - int Export(const TopoDS_Shape& theShape, - const TCollection_AsciiString& theFileName, - const TCollection_AsciiString& /*theFormatName*/) +STEPEXPORT_EXPORT + int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName) { MESSAGE("Export STEP into file " << theFileName.ToCString()); diff --git a/src/STEPImport/STEPImport.cxx b/src/STEPImport/STEPImport.cxx index f55a36838..05f5b480c 100644 --- a/src/STEPImport/STEPImport.cxx +++ b/src/STEPImport/STEPImport.cxx @@ -38,9 +38,21 @@ #include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC #ifdef WNT -#include + #if defined STEPIMPORT_EXPORTS + #if defined WIN32 + #define STEPIMPORT_EXPORT __declspec( dllexport ) + #else + #define STEPIMPORT_EXPORT + #endif + #else + #if defined WIN32 + #define STEPIMPORT_EXPORT __declspec( dllimport ) + #else + #define STEPIMPORT_EXPORT + #endif + #endif #else -#define SALOME_WNT_EXPORT + #define STEPIMPORT_EXPORT #endif //============================================================================= @@ -51,7 +63,7 @@ extern "C" { -SALOME_WNT_EXPORT +STEPIMPORT_EXPORT TopoDS_Shape Import (const TCollection_AsciiString& theFileName, const TCollection_AsciiString& /*theFormatName*/, TCollection_AsciiString& theError) diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx index df59894a7..6a33e47e8 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -270,7 +270,18 @@ GEOM::GEOM_IOperations_ptr TransformationGUI_OffsetDlg::createOperation() //================================================================================= bool TransformationGUI_OffsetDlg::isValid( QString& msg ) { - return !(myObjects.length() == 0); + //return !(myObjects.length() == 0); + if (myObjects.length() == 0) return false; + + for (int i = 0; i < myObjects.length(); i++) + { + GEOM::shape_type aType = myObjects[i]->GetShapeType(); + if( aType != GEOM::FACE && aType != GEOM::SHELL && aType != GEOM::SOLID ){ + msg = tr("ERROR_SHAPE_TYPE"); + return false; + } + } + return true; } @@ -288,6 +299,7 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects ) if (GroupPoints->CheckButton1->isChecked() || IsPreview()) for (int i = 0; i < myObjects.length(); i++) { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->OffsetShapeCopy( myObjects[i], GetOffset() ); if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx index c22db8006..39f71533b 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx @@ -54,26 +54,35 @@ TransformationGUI_RotationDlg::TransformationGUI_RotationDlg :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { - QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_ROTATION"))); - QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); + SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr(); + QPixmap image0 (aResMgr->loadPixmap("GEOM",tr("ICON_DLG_ROTATION"))); + QPixmap image1 (aResMgr->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image2 (aResMgr->loadPixmap("GEOM",tr("ICON_DLG_ROTATION_THREE_POINTS"))); setCaption(tr("GEOM_ROTATION_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_ROTATION")); RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); + RadioButton2->setPixmap(image2); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints"); + GroupPoints = new DlgRef_4Sel1Spin2Check(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); GroupPoints->TextLabel2->setText(tr("GEOM_AXIS")); GroupPoints->TextLabel3->setText(tr("GEOM_ANGLE")); + GroupPoints->TextLabel4->setText(tr("GEOM_POINT_I").arg("1")); + GroupPoints->TextLabel5->setText(tr("GEOM_POINT_I").arg("2")); + GroupPoints->LineEdit1->setReadOnly(true); GroupPoints->LineEdit2->setReadOnly(true); + GroupPoints->LineEdit4->setReadOnly(true); + GroupPoints->LineEdit5->setReadOnly(true); GroupPoints->PushButton1->setPixmap(image1); GroupPoints->PushButton2->setPixmap(image1); + GroupPoints->PushButton4->setPixmap(image1); + GroupPoints->PushButton5->setPixmap(image1); GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY")); GroupPoints->CheckButton2->setText(tr("GEOM_REVERSE")); @@ -92,10 +101,13 @@ TransformationGUI_RotationDlg::TransformationGUI_RotationDlg /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - + connect(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int))); + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - + connect(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->PushButton5, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); @@ -132,11 +144,55 @@ void TransformationGUI_RotationDlg::Init() myEditCurrentArgument = GroupPoints->LineEdit1; GroupPoints->LineEdit2->clear(); - myAxis = GEOM::GEOM_Object::_nil(); + myAxis = myCentPoint = myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); initName( tr( "GEOM_ROTATION" ) ); + ConstructorsClicked( 0 ); } +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void TransformationGUI_RotationDlg::ConstructorsClicked(int constructorId) +{ + disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); + + myEditCurrentArgument = GroupPoints->LineEdit1; + globalSelection(); + + switch (constructorId) + { + case 0: /* rotation an object angle and axis */ + { + GroupPoints->ShowRows(2,3,false); + resize(0,0); + GroupPoints->TextLabel2->setText(tr("GEOM_AXIS")); + GroupPoints->LineEdit2->clear(); + GroupPoints->ShowRows(4,4,true); + myAxis = GEOM::GEOM_Object::_nil(); + break; + } + case 1: /* rotation an object by 3 points */ + { + GroupPoints->ShowRows(4,4,false); + resize(0,0); + GroupPoints->ShowRows(2,3,true); + GroupPoints->TextLabel2->setText(tr("GEOM_CENTRAL_POINT")); + GroupPoints->TextLabel4->setText(tr("GEOM_POINT_I").arg("1")); + GroupPoints->TextLabel5->setText(tr("GEOM_POINT_I").arg("2")); + GroupPoints->LineEdit2->clear(); + GroupPoints->LineEdit4->clear(); + GroupPoints->LineEdit5->clear(); + myCentPoint = myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); + break; + } + } + + myEditCurrentArgument->setFocus(); + connect(myGeomGUI->getApp()->selectionMgr(), + SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); +} //================================================================================= // function : ClickOnOk() @@ -158,7 +214,8 @@ bool TransformationGUI_RotationDlg::ClickOnApply() if ( !onAccept( GroupPoints->CheckButton1->isChecked()) ) return false; - Init(); + initName(); + ConstructorsClicked( getConstructorId() ); return true; } @@ -184,18 +241,36 @@ void TransformationGUI_RotationDlg::SelectionIntoArgument() if (!myObjects.length()) return; } - else if(myEditCurrentArgument == GroupPoints->LineEdit2) + else { if(IObjectCount() != 1) { - myAxis = GEOM::GEOM_Object::_nil(); + if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 0) + myAxis = GEOM::GEOM_Object::_nil(); + else if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 1) + myCentPoint = GEOM::GEOM_Object::_nil(); + else if(myEditCurrentArgument == GroupPoints->LineEdit4) + myPoint1 = GEOM::GEOM_Object::_nil(); + else if(myEditCurrentArgument == GroupPoints->LineEdit5) + myPoint2 = GEOM::GEOM_Object::_nil(); return; } + Standard_Boolean testResult = Standard_False; - myAxis = GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult ); - if(!testResult || CORBA::is_nil( myAxis )) + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult ); + if(!testResult || CORBA::is_nil( aSelectedObject )) return; - aName = GEOMBase::GetName( myAxis ); + + if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 0) + myAxis = aSelectedObject; + else if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 1) + myCentPoint = aSelectedObject; + else if(myEditCurrentArgument == GroupPoints->LineEdit4) + myPoint1 = aSelectedObject; + else if(myEditCurrentArgument == GroupPoints->LineEdit5) + myPoint2 = aSelectedObject; + + aName = GEOMBase::GetName( aSelectedObject ); } myEditCurrentArgument->setText( aName ); @@ -217,9 +292,20 @@ void TransformationGUI_RotationDlg::SetEditCurrentArgument() } else if(send == GroupPoints->PushButton2) { myEditCurrentArgument = GroupPoints->LineEdit2; - globalSelection( GEOM_LINE ); + getConstructorId() == 0 ? globalSelection( GEOM_LINE ) : + globalSelection( GEOM_POINT ); } - + else if (send == GroupPoints->PushButton4) + { + myEditCurrentArgument = GroupPoints->LineEdit4; + globalSelection( GEOM_POINT ); + } + else if (send == GroupPoints->PushButton5) + { + myEditCurrentArgument = GroupPoints->LineEdit5; + globalSelection( GEOM_POINT ); + } + myEditCurrentArgument->setFocus(); SelectionIntoArgument(); } @@ -250,11 +336,8 @@ void TransformationGUI_RotationDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - globalSelection(); - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - GroupPoints->LineEdit2->clear(); - myAxis = GEOM::GEOM_Object::_nil(); + + ConstructorsClicked( getConstructorId() ); } @@ -295,7 +378,20 @@ GEOM::GEOM_IOperations_ptr TransformationGUI_RotationDlg::createOperation() //================================================================================= bool TransformationGUI_RotationDlg::isValid( QString& msg ) { - return !(myObjects.length() == 0 || myAxis->_is_nil()); + switch (getConstructorId()) + { + case 0: + { + return !(myObjects.length() == 0 || myAxis->_is_nil()); + break; + } + case 1: + { + return !(myObjects.length() == 0 || myCentPoint->_is_nil() || myPoint1->_is_nil() || myPoint2->_is_nil() ); + break; + } + default: return false; + } } @@ -306,24 +402,51 @@ bool TransformationGUI_RotationDlg::isValid( QString& msg ) bool TransformationGUI_RotationDlg::execute( ObjectList& objects ) { bool res = false; - + bool toCreateCopy = IsPreview() || GroupPoints->CheckButton1->isChecked(); + GEOM::GEOM_Object_var anObj; - if (GroupPoints->CheckButton1->isChecked() || IsPreview()) - for (int i = 0; i < myObjects.length(); i++) + switch ( getConstructorId() ) + { + case 0 : { - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateCopy( myObjects[i], myAxis, GetAngle() * PI180 ); - if ( !anObj->_is_nil() ) - objects.push_back( anObj._retn() ); + if (toCreateCopy) + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateCopy( myObjects[i], myAxis, GetAngle() * PI180 ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + else + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->Rotate( myObjects[i], myAxis, GetAngle() * PI180 ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + break; } - else - for (int i = 0; i < myObjects.length(); i++) + case 1 : { - anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->Rotate( myObjects[i], myAxis, GetAngle() * PI180 ); - if ( !anObj->_is_nil() ) - objects.push_back( anObj._retn() ); + if (toCreateCopy) + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateThreePointsCopy( myObjects[i], myCentPoint, myPoint1, myPoint2 ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + else + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateThreePoints( myObjects[i], myCentPoint, myPoint1, myPoint2 ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + break; } - res = true; + } return res; } diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.h b/src/TransformationGUI/TransformationGUI_RotationDlg.h index 482444450..4a18bbc1d 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.h +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.h @@ -29,7 +29,7 @@ #define DIALOGBOX_ROTATION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel1Spin2Check.h" +#include "DlgRef_4Sel1Spin2Check.h" //================================================================================= // class : TransformationGUI_RotationDlg @@ -58,9 +58,9 @@ private: double GetAngle() const; GEOM::ListOfGO myObjects; - GEOM::GEOM_Object_var myAxis; + GEOM::GEOM_Object_var myAxis, myCentPoint, myPoint1, myPoint2; - DlgRef_2Sel1Spin2Check* GroupPoints; + DlgRef_4Sel1Spin2Check* GroupPoints; private slots: void ClickOnOk(); @@ -71,6 +71,7 @@ private slots: void SetEditCurrentArgument(); void ValueChangedInSpinBox(); void CreateCopyModeChanged(bool isCreateCopy); + void ConstructorsClicked(int constructorId); void onReverse(); };