From a67dc446ebf39c08e25d66003d2ef8b25f16c45b Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 26 Apr 2012 15:59:16 +0000 Subject: [PATCH] Replace obsolete packages by new ones --- configure.ac | 16 - src/GEOMAlgo/BlockFix.cdl | 10 +- src/GEOMAlgo/BlockFix.cxx | 246 ++- src/GEOMAlgo/BlockFix.hxx | 61 +- src/GEOMAlgo/BlockFix.ixx | 2 +- src/GEOMAlgo/BlockFix_BlockFixAPI.cdl | 20 +- src/GEOMAlgo/BlockFix_BlockFixAPI.cxx | 20 +- src/GEOMAlgo/BlockFix_BlockFixAPI.hxx | 18 +- src/GEOMAlgo/BlockFix_BlockFixAPI.ixx | 18 +- src/GEOMAlgo/BlockFix_BlockFixAPI.lxx | 10 +- src/GEOMAlgo/BlockFix_CheckTool.cdl | 14 +- src/GEOMAlgo/BlockFix_CheckTool.cxx | 16 +- src/GEOMAlgo/BlockFix_CheckTool.hxx | 22 +- src/GEOMAlgo/BlockFix_CheckTool.ixx | 2 +- .../BlockFix_PeriodicSurfaceModifier.cdl | 24 +- .../BlockFix_PeriodicSurfaceModifier.cxx | 58 +- .../BlockFix_PeriodicSurfaceModifier.hxx | 22 +- .../BlockFix_PeriodicSurfaceModifier.ixx | 18 +- src/GEOMAlgo/BlockFix_SphereSpaceModifier.cdl | 24 +- src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx | 64 +- src/GEOMAlgo/BlockFix_SphereSpaceModifier.hxx | 22 +- src/GEOMAlgo/BlockFix_SphereSpaceModifier.ixx | 18 +- src/GEOMAlgo/BlockFix_UnionEdges.cdl | 14 +- src/GEOMAlgo/BlockFix_UnionEdges.cxx | 228 ++- src/GEOMAlgo/BlockFix_UnionEdges.hxx | 22 +- src/GEOMAlgo/BlockFix_UnionEdges.ixx | 2 +- src/GEOMAlgo/BlockFix_UnionFaces.cdl | 16 +- src/GEOMAlgo/BlockFix_UnionFaces.hxx | 18 +- src/GEOMAlgo/BlockFix_UnionFaces.ixx | 2 +- src/{GEOMAlgo_NEW => GEOMAlgo}/FILES | 0 src/GEOMAlgo/GEOMAlgo.cdl | 525 +++--- src/GEOMAlgo/GEOMAlgo.pro | 247 --- src/GEOMAlgo/GEOMAlgo_Algo.cdl | 64 - src/GEOMAlgo/GEOMAlgo_Algo.cxx | 18 +- src/GEOMAlgo/GEOMAlgo_Algo.hxx | 110 +- src/GEOMAlgo/GEOMAlgo_Algo.ixx | 27 - src/GEOMAlgo/GEOMAlgo_Algo.jxx | 25 - src/GEOMAlgo/GEOMAlgo_Builder.cdl | 255 --- src/GEOMAlgo/GEOMAlgo_Builder.cxx | 62 +- src/GEOMAlgo/GEOMAlgo_Builder.hxx | 397 ++-- src/GEOMAlgo/GEOMAlgo_Builder.ixx | 27 - src/GEOMAlgo/GEOMAlgo_Builder.jxx | 37 - src/GEOMAlgo/GEOMAlgo_BuilderArea.cdl | 108 -- src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx | 28 +- src/GEOMAlgo/GEOMAlgo_BuilderArea.hxx | 162 +- src/GEOMAlgo/GEOMAlgo_BuilderArea.ixx | 27 - src/GEOMAlgo/GEOMAlgo_BuilderArea.jxx | 31 - src/GEOMAlgo/GEOMAlgo_BuilderFace.cdl | 83 - src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx | 110 +- src/GEOMAlgo/GEOMAlgo_BuilderFace.hxx | 155 +- src/GEOMAlgo/GEOMAlgo_BuilderFace.ixx | 27 - src/GEOMAlgo/GEOMAlgo_BuilderFace.jxx | 28 - src/GEOMAlgo/GEOMAlgo_BuilderShape.cdl | 115 -- src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx | 32 +- src/GEOMAlgo/GEOMAlgo_BuilderShape.hxx | 174 +- src/GEOMAlgo/GEOMAlgo_BuilderShape.ixx | 27 - src/GEOMAlgo/GEOMAlgo_BuilderShape.jxx | 31 - src/GEOMAlgo/GEOMAlgo_BuilderSolid.cdl | 70 - src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx | 115 +- src/GEOMAlgo/GEOMAlgo_BuilderSolid.hxx | 130 +- src/GEOMAlgo/GEOMAlgo_BuilderSolid.ixx | 27 - src/GEOMAlgo/GEOMAlgo_BuilderSolid.jxx | 25 - src/GEOMAlgo/GEOMAlgo_BuilderTools.cdl | 49 - src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx | 22 +- src/GEOMAlgo/GEOMAlgo_BuilderTools.hxx | 89 +- src/GEOMAlgo/GEOMAlgo_BuilderTools.ixx | 27 - src/GEOMAlgo/GEOMAlgo_BuilderTools.jxx | 28 - src/GEOMAlgo/GEOMAlgo_Builder_0.cxx | 6 +- src/GEOMAlgo/GEOMAlgo_Builder_1.cxx | 73 +- src/GEOMAlgo/GEOMAlgo_Builder_2.cxx | 103 +- src/GEOMAlgo/GEOMAlgo_Builder_3.cxx | 48 +- src/GEOMAlgo/GEOMAlgo_Builder_4.cxx | 26 +- src/GEOMAlgo/GEOMAlgo_Clsf.cdl | 77 - src/GEOMAlgo/GEOMAlgo_Clsf.cxx | 27 +- src/GEOMAlgo/GEOMAlgo_Clsf.hxx | 126 +- src/GEOMAlgo/GEOMAlgo_Clsf.ixx | 76 - src/GEOMAlgo/GEOMAlgo_Clsf.jxx | 34 - src/GEOMAlgo/GEOMAlgo_ClsfBox.cdl | 72 - src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx | 34 +- src/GEOMAlgo/GEOMAlgo_ClsfBox.hxx | 105 +- src/GEOMAlgo/GEOMAlgo_ClsfBox.ixx | 77 - src/GEOMAlgo/GEOMAlgo_ClsfBox.jxx | 34 - src/GEOMAlgo/GEOMAlgo_ClsfSolid.cdl | 58 - src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx | 21 +- src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx | 99 +- src/GEOMAlgo/GEOMAlgo_ClsfSolid.ixx | 74 - src/GEOMAlgo/GEOMAlgo_ClsfSolid.jxx | 25 - src/GEOMAlgo/GEOMAlgo_ClsfSurf.cdl | 72 - src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx | 25 +- src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx | 115 +- src/GEOMAlgo/GEOMAlgo_ClsfSurf.ixx | 77 - src/GEOMAlgo/GEOMAlgo_ClsfSurf.jxx | 31 - src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cdl | 67 - src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx | 17 +- src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx | 110 +- src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.ixx | 27 - src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.jxx | 28 - ...pIteratorOfDataMapOfOrientedShapeShape.hxx | 96 +- ...teratorOfDataMapOfOrientedShapeShape_0.cxx | 54 - ...taMapIteratorOfDataMapOfPassKeyInteger.hxx | 103 +- ...MapIteratorOfDataMapOfPassKeyInteger_0.cxx | 57 - ...apIteratorOfDataMapOfPassKeyShapeShape.hxx | 98 +- ...IteratorOfDataMapOfPassKeyShapeShape_0.cxx | 57 - ...aMapIteratorOfDataMapOfRealListOfShape.hxx | 103 +- ...apIteratorOfDataMapOfRealListOfShape_0.cxx | 57 - ...aMapIteratorOfDataMapOfShapeMapOfShape.hxx | 95 +- ...apIteratorOfDataMapOfShapeMapOfShape_0.cxx | 60 - ...lgo_DataMapIteratorOfDataMapOfShapePnt.hxx | 95 +- ...o_DataMapIteratorOfDataMapOfShapePnt_0.cxx | 60 - ...go_DataMapIteratorOfDataMapOfShapeReal.hxx | 102 +- ..._DataMapIteratorOfDataMapOfShapeReal_0.cxx | 57 - ...ataMapIteratorOfDataMapOfShapeShapeSet.hxx | 59 +- ...aMapIteratorOfDataMapOfShapeShapeSet_0.cxx | 60 - ...taMapNodeOfDataMapOfOrientedShapeShape.hxx | 93 - ...MapNodeOfDataMapOfOrientedShapeShape_0.cxx | 110 -- ...o_DataMapNodeOfDataMapOfPassKeyInteger.hxx | 99 - ...DataMapNodeOfDataMapOfPassKeyInteger_0.cxx | 115 -- ...ataMapNodeOfDataMapOfPassKeyShapeShape.hxx | 97 - ...aMapNodeOfDataMapOfPassKeyShapeShape_0.cxx | 113 -- ..._DataMapNodeOfDataMapOfRealListOfShape.hxx | 99 - ...ataMapNodeOfDataMapOfRealListOfShape_0.cxx | 113 -- ..._DataMapNodeOfDataMapOfShapeMapOfShape.hxx | 103 -- ...ataMapNodeOfDataMapOfShapeMapOfShape_0.cxx | 118 -- ...EOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx | 103 -- ...MAlgo_DataMapNodeOfDataMapOfShapePnt_0.cxx | 118 -- ...OMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx | 99 - ...Algo_DataMapNodeOfDataMapOfShapeReal_0.cxx | 114 -- ...go_DataMapNodeOfDataMapOfShapeShapeSet.hxx | 103 -- ..._DataMapNodeOfDataMapOfShapeShapeSet_0.cxx | 116 -- .../GEOMAlgo_DataMapOfOrientedShapeShape.hxx | 104 +- ...GEOMAlgo_DataMapOfOrientedShapeShape_0.cxx | 56 - .../GEOMAlgo_DataMapOfPassKeyInteger.hxx | 110 +- .../GEOMAlgo_DataMapOfPassKeyInteger_0.cxx | 60 - .../GEOMAlgo_DataMapOfPassKeyShapeShape.hxx | 107 +- .../GEOMAlgo_DataMapOfPassKeyShapeShape_0.cxx | 60 - .../GEOMAlgo_DataMapOfRealListOfShape.hxx | 113 +- .../GEOMAlgo_DataMapOfRealListOfShape_0.cxx | 60 - .../GEOMAlgo_DataMapOfShapeMapOfShape.hxx | 128 +- .../GEOMAlgo_DataMapOfShapeMapOfShape_0.cxx | 63 - src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt.hxx | 128 +- src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt_0.cxx | 63 - src/GEOMAlgo/GEOMAlgo_DataMapOfShapeReal.hxx | 134 +- .../GEOMAlgo_DataMapOfShapeReal_0.cxx | 60 - .../GEOMAlgo_DataMapOfShapeShapeSet.hxx | 103 +- .../GEOMAlgo_DataMapOfShapeShapeSet_0.cxx | 63 - src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl | 118 -- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx | 63 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx | 153 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx | 27 - src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx | 37 - src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl | 144 -- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx | 26 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx | 223 +-- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx | 27 - src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx | 46 - src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cdl | 140 -- src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx | 113 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.hxx | 208 +-- src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.ixx | 27 - src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.jxx | 43 - src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.cxx | 6 +- src/GEOMAlgo/GEOMAlgo_GetInPlace.cxx | 15 +- src/GEOMAlgo/GEOMAlgo_GetInPlace.hxx | 146 +- src/GEOMAlgo/GEOMAlgo_GetInPlace_1.cxx | 73 +- src/GEOMAlgo/GEOMAlgo_GetInPlace_2.cxx | 18 +- src/GEOMAlgo/GEOMAlgo_GetInPlace_3.cxx | 24 +- src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cdl | 83 - src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx | 78 +- src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx | 135 +- src/GEOMAlgo/GEOMAlgo_GlueAnalyser.ixx | 27 - src/GEOMAlgo/GEOMAlgo_GlueAnalyser.jxx | 31 - src/GEOMAlgo/GEOMAlgo_GlueDetector.cxx | 320 +++- src/GEOMAlgo/GEOMAlgo_GlueDetector.hxx | 89 +- src/GEOMAlgo/GEOMAlgo_Gluer.cdl | 161 -- src/GEOMAlgo/GEOMAlgo_Gluer.cxx | 155 +- src/GEOMAlgo/GEOMAlgo_Gluer.hxx | 238 ++- src/GEOMAlgo/GEOMAlgo_Gluer.ixx | 27 - src/GEOMAlgo/GEOMAlgo_Gluer.jxx | 49 - src/GEOMAlgo/GEOMAlgo_Gluer2.cxx | 111 +- src/GEOMAlgo/GEOMAlgo_Gluer2.hxx | 220 ++- src/GEOMAlgo/GEOMAlgo_Gluer2_2.cxx | 22 +- src/GEOMAlgo/GEOMAlgo_Gluer2_3.cxx | 107 +- src/GEOMAlgo/GEOMAlgo_GluerAlgo.cxx | 59 +- src/GEOMAlgo/GEOMAlgo_GluerAlgo.hxx | 68 +- src/GEOMAlgo/GEOMAlgo_HAlgo.cdl | 59 - src/GEOMAlgo/GEOMAlgo_HAlgo.cxx | 21 +- src/GEOMAlgo/GEOMAlgo_HAlgo.hxx | 101 +- src/GEOMAlgo/GEOMAlgo_HAlgo.ixx | 75 - src/GEOMAlgo/GEOMAlgo_HAlgo.jxx | 25 - ...aMapNodeOfIndexedDataMapOfIntegerShape.hxx | 135 -- ...apNodeOfIndexedDataMapOfIntegerShape_0.cxx | 98 - ...deOfIndexedDataMapOfPassKeyListOfShape.hxx | 147 -- ...OfIndexedDataMapOfPassKeyListOfShape_0.cxx | 104 -- ...ndexedDataMapOfPassKeyShapeListOfShape.hxx | 139 -- ...exedDataMapOfPassKeyShapeListOfShape_0.cxx | 101 -- ...dDataMapNodeOfIndexedDataMapOfShapeBox.hxx | 139 -- ...ataMapNodeOfIndexedDataMapOfShapeBox_0.cxx | 101 -- ...apNodeOfIndexedDataMapOfShapeShapeInfo.hxx | 136 -- ...NodeOfIndexedDataMapOfShapeShapeInfo_0.cxx | 98 - ...ataMapNodeOfIndexedDataMapOfShapeState.hxx | 138 -- ...aMapNodeOfIndexedDataMapOfShapeState_0.cxx | 98 - .../GEOMAlgo_IndexedDataMapOfIntegerShape.hxx | 114 +- ...EOMAlgo_IndexedDataMapOfIntegerShape_0.cxx | 58 - ...lgo_IndexedDataMapOfPassKeyListOfShape.hxx | 148 -- ...o_IndexedDataMapOfPassKeyListOfShape_0.cxx | 61 - ...ndexedDataMapOfPassKeyShapeListOfShape.hxx | 158 +- ...exedDataMapOfPassKeyShapeListOfShape_0.cxx | 61 - .../GEOMAlgo_IndexedDataMapOfShapeBox.hxx | 155 +- .../GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx | 61 - ...EOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx | 155 +- ...MAlgo_IndexedDataMapOfShapeShapeInfo_0.cxx | 58 - .../GEOMAlgo_IndexedDataMapOfShapeState.hxx | 177 +- .../GEOMAlgo_IndexedDataMapOfShapeState_0.cxx | 58 - src/GEOMAlgo/GEOMAlgo_KindOfBounds.hxx | 8 +- src/GEOMAlgo/GEOMAlgo_KindOfClosed.hxx | 9 +- src/GEOMAlgo/GEOMAlgo_KindOfName.hxx | 8 +- src/GEOMAlgo/GEOMAlgo_KindOfShape.hxx | 9 +- ...lgo_ListIteratorOfListOfCoupleOfShapes.hxx | 129 +- ...o_ListIteratorOfListOfCoupleOfShapes_0.cxx | 53 - .../GEOMAlgo_ListIteratorOfListOfPnt.hxx | 128 +- .../GEOMAlgo_ListIteratorOfListOfPnt_0.cxx | 53 - ...EOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx | 119 -- ...MAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx | 96 - src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx | 119 -- .../GEOMAlgo_ListNodeOfListOfPnt_0.cxx | 96 - .../GEOMAlgo_ListOfCoupleOfShapes.hxx | 184 +- .../GEOMAlgo_ListOfCoupleOfShapes_0.cxx | 50 - src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx | 183 +- src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx | 50 - src/GEOMAlgo/GEOMAlgo_PWireEdgeSet.hxx | 5 + src/GEOMAlgo/GEOMAlgo_PassKey.cdl | 101 -- src/GEOMAlgo/GEOMAlgo_PassKey.cxx | 46 +- src/GEOMAlgo/GEOMAlgo_PassKey.hxx | 158 +- src/GEOMAlgo/GEOMAlgo_PassKey.ixx | 27 - src/GEOMAlgo/GEOMAlgo_PassKey.jxx | 28 - src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cdl | 49 - src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx | 91 +- src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.ixx | 27 - src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.jxx | 28 - src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl | 97 - src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx | 38 +- src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx | 156 +- src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx | 27 - src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx | 31 - .../GEOMAlgo_PassKeyShapeMapHasher.cdl | 49 - .../GEOMAlgo_PassKeyShapeMapHasher.cxx | 8 +- .../GEOMAlgo_PassKeyShapeMapHasher.hxx | 96 +- .../GEOMAlgo_PassKeyShapeMapHasher.ixx | 27 - .../GEOMAlgo_PassKeyShapeMapHasher.jxx | 28 - src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cdl | 78 - src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx | 59 +- src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx | 87 +- src/GEOMAlgo/GEOMAlgo_ShapeAlgo.ixx | 27 - src/GEOMAlgo/GEOMAlgo_ShapeAlgo.jxx | 31 - src/GEOMAlgo/GEOMAlgo_ShapeInfo.cdl | 206 --- src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx | 198 +- src/GEOMAlgo/GEOMAlgo_ShapeInfo.hxx | 306 ++-- src/GEOMAlgo/GEOMAlgo_ShapeInfo.ixx | 24 - src/GEOMAlgo/GEOMAlgo_ShapeInfo.jxx | 34 - src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cdl | 148 -- src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx | 108 +- src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.hxx | 199 +- src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.ixx | 24 - src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.jxx | 49 - src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx | 2 +- src/GEOMAlgo/GEOMAlgo_ShapeSet.cdl | 88 - src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx | 28 +- src/GEOMAlgo/GEOMAlgo_ShapeSet.hxx | 115 +- src/GEOMAlgo/GEOMAlgo_ShapeSet.ixx | 27 - src/GEOMAlgo/GEOMAlgo_ShapeSet.jxx | 31 - src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl | 67 - src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx | 14 +- src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx | 118 +- src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx | 27 - src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx | 31 - src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl | 53 - src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx | 71 +- src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx | 99 +- src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx | 27 - src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx | 25 - src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl | 58 - src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx | 28 +- src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx | 102 +- src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx | 27 - src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx | 28 - src/GEOMAlgo/GEOMAlgo_Splitter.cdl | 103 -- src/GEOMAlgo/GEOMAlgo_Splitter.cxx | 2 +- src/GEOMAlgo/GEOMAlgo_Splitter.hxx | 177 +- src/GEOMAlgo/GEOMAlgo_Splitter.ixx | 27 - src/GEOMAlgo/GEOMAlgo_Splitter.jxx | 31 - src/GEOMAlgo/GEOMAlgo_State.hxx | 20 +- src/GEOMAlgo/GEOMAlgo_StateCollector.cdl | 50 - src/GEOMAlgo/GEOMAlgo_StateCollector.cxx | 16 +- src/GEOMAlgo/GEOMAlgo_StateCollector.hxx | 96 +- src/GEOMAlgo/GEOMAlgo_StateCollector.ixx | 27 - src/GEOMAlgo/GEOMAlgo_StateCollector.jxx | 25 - src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl | 97 - src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx | 38 +- src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx | 166 +- src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx | 27 - src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx | 43 - src/GEOMAlgo/GEOMAlgo_Tools.cdl | 124 -- src/GEOMAlgo/GEOMAlgo_Tools.cxx | 56 +- src/GEOMAlgo/GEOMAlgo_Tools.hxx | 203 +-- src/GEOMAlgo/GEOMAlgo_Tools.ixx | 27 - src/GEOMAlgo/GEOMAlgo_Tools.jxx | 52 - src/GEOMAlgo/GEOMAlgo_Tools3D.cdl | 254 --- src/GEOMAlgo/GEOMAlgo_Tools3D.cxx | 107 +- src/GEOMAlgo/GEOMAlgo_Tools3D.hxx | 270 ++- src/GEOMAlgo/GEOMAlgo_Tools3D.ixx | 27 - src/GEOMAlgo/GEOMAlgo_Tools3D.jxx | 61 - src/GEOMAlgo/GEOMAlgo_Tools_1.cxx | 34 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl | 51 - src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx | 35 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx | 93 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx | 27 - src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx | 25 - src/GEOMAlgo/GEOMAlgo_WESCorrector.cdl | 84 - src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx | 15 +- src/GEOMAlgo/GEOMAlgo_WESCorrector.hxx | 144 +- src/GEOMAlgo/GEOMAlgo_WESCorrector.ixx | 27 - src/GEOMAlgo/GEOMAlgo_WESCorrector.jxx | 28 - src/GEOMAlgo/GEOMAlgo_WESScaler.cdl | 121 -- src/GEOMAlgo/GEOMAlgo_WESScaler.cxx | 48 +- src/GEOMAlgo/GEOMAlgo_WESScaler.hxx | 174 +- src/GEOMAlgo/GEOMAlgo_WESScaler.ixx | 24 - src/GEOMAlgo/GEOMAlgo_WESScaler.jxx | 34 - src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cdl | 70 - src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx | 24 +- src/GEOMAlgo/GEOMAlgo_WireEdgeSet.hxx | 118 +- src/GEOMAlgo/GEOMAlgo_WireEdgeSet.ixx | 27 - src/GEOMAlgo/GEOMAlgo_WireEdgeSet.jxx | 34 - src/GEOMAlgo/GEOMAlgo_WireSolid.cdl | 50 - src/GEOMAlgo/GEOMAlgo_WireSolid.cxx | 20 +- src/GEOMAlgo/GEOMAlgo_WireSolid.hxx | 95 +- src/GEOMAlgo/GEOMAlgo_WireSolid.ixx | 27 - src/GEOMAlgo/GEOMAlgo_WireSolid.jxx | 25 - src/GEOMAlgo/GEOMAlgo_WireSplitter.cdl | 89 - src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx | 78 +- src/GEOMAlgo/GEOMAlgo_WireSplitter.hxx | 130 +- src/GEOMAlgo/GEOMAlgo_WireSplitter.ixx | 27 - src/GEOMAlgo/GEOMAlgo_WireSplitter.jxx | 34 - src/GEOMAlgo/Handle_BlockFix_BlockFixAPI.hxx | 26 +- ...andle_BlockFix_PeriodicSurfaceModifier.hxx | 26 +- .../Handle_BlockFix_SphereSpaceModifier.hxx | 26 +- src/GEOMAlgo/Handle_GEOMAlgo_Clsf.hxx | 75 - src/GEOMAlgo/Handle_GEOMAlgo_ClsfBox.hxx | 75 - src/GEOMAlgo/Handle_GEOMAlgo_ClsfSolid.hxx | 72 - src/GEOMAlgo/Handle_GEOMAlgo_ClsfSurf.hxx | 75 - ...taMapNodeOfDataMapOfOrientedShapeShape.hxx | 41 - ...o_DataMapNodeOfDataMapOfPassKeyInteger.hxx | 44 - ...ataMapNodeOfDataMapOfPassKeyShapeShape.hxx | 41 - ..._DataMapNodeOfDataMapOfRealListOfShape.hxx | 44 - ..._DataMapNodeOfDataMapOfShapeMapOfShape.hxx | 44 - ...EOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx | 44 - ...OMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx | 44 - ...go_DataMapNodeOfDataMapOfShapeShapeSet.hxx | 44 - src/GEOMAlgo/Handle_GEOMAlgo_HAlgo.hxx | 75 - ...aMapNodeOfIndexedDataMapOfIntegerShape.hxx | 75 - ...deOfIndexedDataMapOfPassKeyListOfShape.hxx | 92 - ...ndexedDataMapOfPassKeyShapeListOfShape.hxx | 75 - ...dDataMapNodeOfIndexedDataMapOfShapeBox.hxx | 75 - ...apNodeOfIndexedDataMapOfShapeShapeInfo.hxx | 72 - ...ataMapNodeOfIndexedDataMapOfShapeState.hxx | 75 - ...EOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx | 75 - .../Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx | 75 - src/GEOMAlgo/Makefile.am | 222 +-- src/GEOMAlgo_NEW/BlockFix.cdl | 67 - src/GEOMAlgo_NEW/BlockFix.cxx | 344 ---- src/GEOMAlgo_NEW/BlockFix.hxx | 81 - src/GEOMAlgo_NEW/BlockFix.ixx | 27 - src/GEOMAlgo_NEW/BlockFix.jxx | 28 - src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cdl | 68 - src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cxx | 82 - src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.hxx | 94 - src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.ixx | 77 - src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.jxx | 31 - src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.lxx | 73 - src/GEOMAlgo_NEW/BlockFix_CheckTool.cdl | 67 - src/GEOMAlgo_NEW/BlockFix_CheckTool.cxx | 279 --- src/GEOMAlgo_NEW/BlockFix_CheckTool.hxx | 120 -- src/GEOMAlgo_NEW/BlockFix_CheckTool.ixx | 27 - src/GEOMAlgo_NEW/BlockFix_CheckTool.jxx | 28 - .../BlockFix_PeriodicSurfaceModifier.cdl | 135 -- .../BlockFix_PeriodicSurfaceModifier.cxx | 251 --- .../BlockFix_PeriodicSurfaceModifier.hxx | 140 -- .../BlockFix_PeriodicSurfaceModifier.ixx | 79 - .../BlockFix_PeriodicSurfaceModifier.jxx | 49 - .../BlockFix_SphereSpaceModifier.cdl | 139 -- .../BlockFix_SphereSpaceModifier.cxx | 263 --- .../BlockFix_SphereSpaceModifier.hxx | 141 -- .../BlockFix_SphereSpaceModifier.ixx | 79 - .../BlockFix_SphereSpaceModifier.jxx | 49 - src/GEOMAlgo_NEW/BlockFix_UnionEdges.cdl | 49 - src/GEOMAlgo_NEW/BlockFix_UnionEdges.cxx | 589 ------ src/GEOMAlgo_NEW/BlockFix_UnionEdges.hxx | 100 - src/GEOMAlgo_NEW/BlockFix_UnionEdges.ixx | 27 - src/GEOMAlgo_NEW/BlockFix_UnionEdges.jxx | 31 - src/GEOMAlgo_NEW/BlockFix_UnionFaces.cdl | 65 - src/GEOMAlgo_NEW/BlockFix_UnionFaces.cxx | 722 -------- src/GEOMAlgo_NEW/BlockFix_UnionFaces.hxx | 90 - src/GEOMAlgo_NEW/BlockFix_UnionFaces.ixx | 27 - src/GEOMAlgo_NEW/BlockFix_UnionFaces.jxx | 31 - src/GEOMAlgo_NEW/GEOMAlgo.cdl | 342 ---- src/GEOMAlgo_NEW/GEOMAlgo_Algo.cxx | 90 - src/GEOMAlgo_NEW/GEOMAlgo_Algo.hxx | 75 - src/GEOMAlgo_NEW/GEOMAlgo_Builder.cxx | 416 ----- src/GEOMAlgo_NEW/GEOMAlgo_Builder.hxx | 224 --- src/GEOMAlgo_NEW/GEOMAlgo_BuilderArea.cxx | 142 -- src/GEOMAlgo_NEW/GEOMAlgo_BuilderArea.hxx | 112 -- src/GEOMAlgo_NEW/GEOMAlgo_BuilderFace.cxx | 711 -------- src/GEOMAlgo_NEW/GEOMAlgo_BuilderFace.hxx | 91 - src/GEOMAlgo_NEW/GEOMAlgo_BuilderShape.cxx | 133 -- src/GEOMAlgo_NEW/GEOMAlgo_BuilderShape.hxx | 105 -- src/GEOMAlgo_NEW/GEOMAlgo_BuilderSolid.cxx | 931 ---------- src/GEOMAlgo_NEW/GEOMAlgo_BuilderSolid.hxx | 77 - src/GEOMAlgo_NEW/GEOMAlgo_BuilderTools.cxx | 292 --- src/GEOMAlgo_NEW/GEOMAlgo_BuilderTools.hxx | 48 - src/GEOMAlgo_NEW/GEOMAlgo_Builder_0.cxx | 64 - src/GEOMAlgo_NEW/GEOMAlgo_Builder_1.cxx | 360 ---- src/GEOMAlgo_NEW/GEOMAlgo_Builder_2.cxx | 984 ---------- src/GEOMAlgo_NEW/GEOMAlgo_Builder_3.cxx | 768 -------- src/GEOMAlgo_NEW/GEOMAlgo_Builder_4.cxx | 316 ---- src/GEOMAlgo_NEW/GEOMAlgo_Clsf.cxx | 107 -- src/GEOMAlgo_NEW/GEOMAlgo_Clsf.hxx | 87 - src/GEOMAlgo_NEW/GEOMAlgo_ClsfBox.cxx | 222 --- src/GEOMAlgo_NEW/GEOMAlgo_ClsfBox.hxx | 97 - src/GEOMAlgo_NEW/GEOMAlgo_ClsfSolid.cxx | 141 -- src/GEOMAlgo_NEW/GEOMAlgo_ClsfSolid.hxx | 69 - src/GEOMAlgo_NEW/GEOMAlgo_ClsfSurf.cxx | 141 -- src/GEOMAlgo_NEW/GEOMAlgo_ClsfSurf.hxx | 81 - src/GEOMAlgo_NEW/GEOMAlgo_CoupleOfShapes.cxx | 85 - src/GEOMAlgo_NEW/GEOMAlgo_CoupleOfShapes.hxx | 64 - ...pIteratorOfDataMapOfOrientedShapeShape.hxx | 32 - ...taMapIteratorOfDataMapOfPassKeyInteger.hxx | 31 - ...apIteratorOfDataMapOfPassKeyShapeShape.hxx | 31 - ...aMapIteratorOfDataMapOfRealListOfShape.hxx | 31 - ...aMapIteratorOfDataMapOfShapeMapOfShape.hxx | 31 - ...lgo_DataMapIteratorOfDataMapOfShapePnt.hxx | 31 - ...go_DataMapIteratorOfDataMapOfShapeReal.hxx | 32 - ...ataMapIteratorOfDataMapOfShapeShapeSet.hxx | 32 - .../GEOMAlgo_DataMapOfOrientedShapeShape.hxx | 42 - .../GEOMAlgo_DataMapOfPassKeyInteger.hxx | 41 - .../GEOMAlgo_DataMapOfPassKeyShapeShape.hxx | 40 - .../GEOMAlgo_DataMapOfRealListOfShape.hxx | 43 - .../GEOMAlgo_DataMapOfShapeMapOfShape.hxx | 44 - .../GEOMAlgo_DataMapOfShapePnt.hxx | 44 - .../GEOMAlgo_DataMapOfShapeReal.hxx | 41 - .../GEOMAlgo_DataMapOfShapeShapeSet.hxx | 42 - src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn.cxx | 617 ------- src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn.hxx | 121 -- src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn1.cxx | 855 --------- src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn1.hxx | 146 -- src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn2.cxx | 845 --------- src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn2.hxx | 136 -- .../GEOMAlgo_FinderShapeOnQuad.cxx | 144 -- .../GEOMAlgo_FinderShapeOnQuad.hxx | 61 - src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace.cxx | 1151 ------------ src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace.hxx | 324 ---- src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_1.cxx | 402 ---- src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_2.cxx | 232 --- src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_3.cxx | 172 -- src/GEOMAlgo_NEW/GEOMAlgo_GlueAnalyser.cxx | 467 ----- src/GEOMAlgo_NEW/GEOMAlgo_GlueAnalyser.hxx | 87 - src/GEOMAlgo_NEW/GEOMAlgo_GlueDetector.cxx | 612 ------- src/GEOMAlgo_NEW/GEOMAlgo_GlueDetector.hxx | 100 - src/GEOMAlgo_NEW/GEOMAlgo_Gluer.cxx | 1178 ------------ src/GEOMAlgo_NEW/GEOMAlgo_Gluer.hxx | 164 -- src/GEOMAlgo_NEW/GEOMAlgo_Gluer2.cxx | 650 ------- src/GEOMAlgo_NEW/GEOMAlgo_Gluer2.hxx | 188 -- src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_1.cxx | 323 ---- src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_2.cxx | 156 -- src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_3.cxx | 360 ---- src/GEOMAlgo_NEW/GEOMAlgo_GluerAlgo.cxx | 146 -- src/GEOMAlgo_NEW/GEOMAlgo_GluerAlgo.hxx | 98 - src/GEOMAlgo_NEW/GEOMAlgo_HAlgo.cxx | 83 - src/GEOMAlgo_NEW/GEOMAlgo_HAlgo.hxx | 75 - .../GEOMAlgo_IndexedDataMapOfIntegerShape.hxx | 44 - ...ndexedDataMapOfPassKeyShapeListOfShape.hxx | 43 - .../GEOMAlgo_IndexedDataMapOfShapeBox.hxx | 44 - ...EOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx | 43 - .../GEOMAlgo_IndexedDataMapOfShapeState.hxx | 60 - src/GEOMAlgo_NEW/GEOMAlgo_KindOfBounds.hxx | 37 - src/GEOMAlgo_NEW/GEOMAlgo_KindOfClosed.hxx | 36 - src/GEOMAlgo_NEW/GEOMAlgo_KindOfName.hxx | 54 - src/GEOMAlgo_NEW/GEOMAlgo_KindOfShape.hxx | 44 - ...lgo_ListIteratorOfListOfCoupleOfShapes.hxx | 31 - .../GEOMAlgo_ListIteratorOfListOfPnt.hxx | 32 - .../GEOMAlgo_ListOfCoupleOfShapes.hxx | 34 - src/GEOMAlgo_NEW/GEOMAlgo_ListOfPnt.hxx | 35 - src/GEOMAlgo_NEW/GEOMAlgo_PWireEdgeSet.hxx | 35 - src/GEOMAlgo_NEW/GEOMAlgo_PassKey.cxx | 240 --- src/GEOMAlgo_NEW/GEOMAlgo_PassKey.hxx | 104 -- .../GEOMAlgo_PassKeyMapHasher.cxx | 47 - .../GEOMAlgo_PassKeyMapHasher.hxx | 51 - src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShape.cxx | 229 --- src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShape.hxx | 105 -- .../GEOMAlgo_PassKeyShapeMapHasher.cxx | 47 - .../GEOMAlgo_PassKeyShapeMapHasher.hxx | 52 - src/GEOMAlgo_NEW/GEOMAlgo_ShapeAlgo.cxx | 114 -- src/GEOMAlgo_NEW/GEOMAlgo_ShapeAlgo.hxx | 85 - src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfo.cxx | 890 --------- src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfo.hxx | 202 --- src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfoFiller.cxx | 818 --------- src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfoFiller.hxx | 123 -- .../GEOMAlgo_ShapeInfoFiller_1.cxx | 762 -------- src/GEOMAlgo_NEW/GEOMAlgo_ShapeSet.cxx | 177 -- src/GEOMAlgo_NEW/GEOMAlgo_ShapeSet.hxx | 92 - src/GEOMAlgo_NEW/GEOMAlgo_ShapeSolid.cxx | 82 - src/GEOMAlgo_NEW/GEOMAlgo_ShapeSolid.hxx | 73 - src/GEOMAlgo_NEW/GEOMAlgo_ShellSolid.cxx | 371 ---- src/GEOMAlgo_NEW/GEOMAlgo_ShellSolid.hxx | 61 - src/GEOMAlgo_NEW/GEOMAlgo_SolidSolid.cxx | 203 --- src/GEOMAlgo_NEW/GEOMAlgo_SolidSolid.hxx | 65 - src/GEOMAlgo_NEW/GEOMAlgo_Splitter.cxx | 339 ---- src/GEOMAlgo_NEW/GEOMAlgo_Splitter.hxx | 97 - src/GEOMAlgo_NEW/GEOMAlgo_State.hxx | 40 - src/GEOMAlgo_NEW/GEOMAlgo_StateCollector.cxx | 92 - src/GEOMAlgo_NEW/GEOMAlgo_StateCollector.hxx | 56 - src/GEOMAlgo_NEW/GEOMAlgo_SurfaceTools.cxx | 270 --- src/GEOMAlgo_NEW/GEOMAlgo_SurfaceTools.hxx | 94 - src/GEOMAlgo_NEW/GEOMAlgo_Tools.cxx | 613 ------- src/GEOMAlgo_NEW/GEOMAlgo_Tools.hxx | 121 -- src/GEOMAlgo_NEW/GEOMAlgo_Tools3D.cxx | 1301 ------------- src/GEOMAlgo_NEW/GEOMAlgo_Tools3D.hxx | 240 --- src/GEOMAlgo_NEW/GEOMAlgo_Tools_1.cxx | 341 ---- src/GEOMAlgo_NEW/GEOMAlgo_VertexSolid.cxx | 239 --- src/GEOMAlgo_NEW/GEOMAlgo_VertexSolid.hxx | 58 - src/GEOMAlgo_NEW/GEOMAlgo_WESCorrector.cxx | 429 ----- src/GEOMAlgo_NEW/GEOMAlgo_WESCorrector.hxx | 87 - src/GEOMAlgo_NEW/GEOMAlgo_WESScaler.cxx | 267 --- src/GEOMAlgo_NEW/GEOMAlgo_WESScaler.hxx | 110 -- src/GEOMAlgo_NEW/GEOMAlgo_WireEdgeSet.cxx | 95 - src/GEOMAlgo_NEW/GEOMAlgo_WireEdgeSet.hxx | 73 - src/GEOMAlgo_NEW/GEOMAlgo_WireSolid.cxx | 173 -- src/GEOMAlgo_NEW/GEOMAlgo_WireSolid.hxx | 58 - src/GEOMAlgo_NEW/GEOMAlgo_WireSplitter.cxx | 899 --------- src/GEOMAlgo_NEW/GEOMAlgo_WireSplitter.hxx | 84 - .../Handle_BlockFix_BlockFixAPI.hxx | 92 - ...andle_BlockFix_PeriodicSurfaceModifier.hxx | 92 - .../Handle_BlockFix_SphereSpaceModifier.hxx | 92 - src/GEOMAlgo_NEW/Makefile.am | 226 --- src/GEOMImpl/Makefile.am | 8 +- src/GEOM_I/Makefile.am | 2 +- src/GEOM_I_Superv/Makefile.am | 2 +- src/Makefile.am | 17 +- src/{NMTDS_NEW => NMTDS}/FILES | 0 ...aMapNodeOfDataMapOfIntegerMapOfInteger.hxx | 72 - ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 75 - ...aMapNodeOfIndexedDataMapOfIntegerShape.hxx | 75 - ...apNodeOfIndexedDataMapOfShapeBndSphere.hxx | 72 - ...dDataMapNodeOfIndexedDataMapOfShapeBox.hxx | 75 - ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 75 - .../Handle_NMTDS_ListNodeOfListOfPair.hxx | 44 - ...ndle_NMTDS_ListNodeOfListOfPairBoolean.hxx | 44 - .../Handle_NMTDS_ListNodeOfListOfPassKey.hxx | 75 - ...e_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx | 75 - ...dle_NMTDS_StdMapNodeOfMapOfPairBoolean.hxx | 44 - .../Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx | 75 - ..._NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx | 75 - src/NMTDS/Makefile.am | 165 +- src/NMTDS/NMTDS.cdl | 150 +- src/NMTDS/NMTDS.pro | 117 -- src/NMTDS/NMTDS_BndSphere.cdl | 78 - src/NMTDS/NMTDS_BndSphere.cxx | 2 +- src/NMTDS/NMTDS_BndSphere.hxx | 116 +- src/NMTDS/NMTDS_BndSphere.ixx | 24 - src/NMTDS/NMTDS_BndSphere.jxx | 25 - .../NMTDS_CArray1OfIndexRange.cxx | 0 src/NMTDS/NMTDS_CArray1OfIndexRange.hxx | 206 +-- src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx | 41 - ...IteratorOfDataMapOfIntegerMapOfInteger.hxx | 99 +- ...eratorOfDataMapOfIntegerMapOfInteger_0.cxx | 54 - ...aMapNodeOfDataMapOfIntegerMapOfInteger.hxx | 131 -- ...apNodeOfDataMapOfIntegerMapOfInteger_0.cxx | 100 - .../NMTDS_DataMapOfIntegerMapOfInteger.hxx | 103 +- .../NMTDS_DataMapOfIntegerMapOfInteger_0.cxx | 57 - src/NMTDS/NMTDS_IndexRange.cdl | 58 - src/NMTDS/NMTDS_IndexRange.cxx | 3 +- src/NMTDS/NMTDS_IndexRange.hxx | 109 +- src/NMTDS/NMTDS_IndexRange.ixx | 27 - src/NMTDS/NMTDS_IndexRange.jxx | 25 - ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 135 -- ...fIntegerIndexedDataMapOfShapeInteger_0.cxx | 98 - ...aMapNodeOfIndexedDataMapOfIntegerShape.hxx | 135 -- ...apNodeOfIndexedDataMapOfIntegerShape_0.cxx | 98 - ...apNodeOfIndexedDataMapOfShapeBndSphere.hxx | 136 -- ...NodeOfIndexedDataMapOfShapeBndSphere_0.cxx | 98 - ...dDataMapNodeOfIndexedDataMapOfShapeBox.hxx | 139 -- ...ataMapNodeOfIndexedDataMapOfShapeBox_0.cxx | 101 -- ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 153 -- ...fIntegerIndexedDataMapOfShapeInteger_0.cxx | 58 - .../NMTDS_IndexedDataMapOfIntegerShape.hxx | 150 +- .../NMTDS_IndexedDataMapOfIntegerShape_0.cxx | 58 - .../NMTDS_IndexedDataMapOfShapeBndSphere.hxx | 134 +- ...NMTDS_IndexedDataMapOfShapeBndSphere_0.cxx | 58 - src/NMTDS/NMTDS_IndexedDataMapOfShapeBox.hxx | 159 +- .../NMTDS_IndexedDataMapOfShapeBox_0.cxx | 61 - src/NMTDS/NMTDS_InterfPool.cdl | 150 -- src/NMTDS/NMTDS_InterfPool.cxx | 2 +- src/NMTDS/NMTDS_InterfPool.hxx | 253 ++- src/NMTDS/NMTDS_InterfPool.ixx | 24 - src/NMTDS/NMTDS_InterfPool.jxx | 46 - src/NMTDS/NMTDS_InterfType.hxx | 11 +- src/NMTDS/NMTDS_Iterator.cdl | 96 - src/NMTDS/NMTDS_Iterator.cxx | 3 +- src/NMTDS/NMTDS_Iterator.hxx | 184 +- src/NMTDS/NMTDS_Iterator.ixx | 27 - src/NMTDS/NMTDS_Iterator.jxx | 31 - src/NMTDS/NMTDS_IteratorCheckerSI.cdl | 41 - src/NMTDS/NMTDS_IteratorCheckerSI.cxx | 4 +- src/NMTDS/NMTDS_IteratorCheckerSI.hxx | 82 +- src/NMTDS/NMTDS_IteratorCheckerSI.ixx | 24 - src/NMTDS/NMTDS_IteratorCheckerSI.jxx | 22 - ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 130 +- ...xedDataMapOfShapeAncestorsSuccessors_0.cxx | 53 - src/NMTDS/NMTDS_ListIteratorOfListOfPair.hxx | 124 +- .../NMTDS_ListIteratorOfListOfPairBoolean.hxx | 124 +- ...MTDS_ListIteratorOfListOfPairBoolean_0.cxx | 53 - .../NMTDS_ListIteratorOfListOfPair_0.cxx | 53 - .../NMTDS_ListIteratorOfListOfPassKey.hxx | 130 +- ...TDS_ListIteratorOfListOfPassKeyBoolean.hxx | 130 +- ...S_ListIteratorOfListOfPassKeyBoolean_0.cxx | 53 - .../NMTDS_ListIteratorOfListOfPassKey_0.cxx | 53 - ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 119 -- ...xedDataMapOfShapeAncestorsSuccessors_0.cxx | 96 - src/NMTDS/NMTDS_ListNodeOfListOfPair.hxx | 106 -- .../NMTDS_ListNodeOfListOfPairBoolean.hxx | 106 -- .../NMTDS_ListNodeOfListOfPairBoolean_0.cxx | 67 - src/NMTDS/NMTDS_ListNodeOfListOfPair_0.cxx | 67 - src/NMTDS/NMTDS_ListNodeOfListOfPassKey.hxx | 119 -- .../NMTDS_ListNodeOfListOfPassKeyBoolean.hxx | 119 -- ...NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx | 96 - src/NMTDS/NMTDS_ListNodeOfListOfPassKey_0.cxx | 96 - ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 184 +- ...xedDataMapOfShapeAncestorsSuccessors_0.cxx | 50 - src/NMTDS/NMTDS_ListOfPair.hxx | 164 +- src/NMTDS/NMTDS_ListOfPairBoolean.hxx | 164 +- src/NMTDS/NMTDS_ListOfPairBoolean_0.cxx | 50 - src/NMTDS/NMTDS_ListOfPair_0.cxx | 50 - src/NMTDS/NMTDS_ListOfPassKey.hxx | 184 +- src/NMTDS/NMTDS_ListOfPassKeyBoolean.hxx | 184 +- src/NMTDS/NMTDS_ListOfPassKeyBoolean_0.cxx | 50 - src/NMTDS/NMTDS_ListOfPassKey_0.cxx | 50 - .../NMTDS_MapIteratorOfMapOfPairBoolean.hxx | 94 +- .../NMTDS_MapIteratorOfMapOfPairBoolean_0.cxx | 55 - src/NMTDS/NMTDS_MapIteratorOfMapOfPassKey.hxx | 95 +- ...NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx | 95 +- ...TDS_MapIteratorOfMapOfPassKeyBoolean_0.cxx | 55 - .../NMTDS_MapIteratorOfMapOfPassKey_0.cxx | 55 - src/NMTDS/NMTDS_MapOfPairBoolean.hxx | 123 +- src/NMTDS/NMTDS_MapOfPairBoolean_0.cxx | 55 - src/NMTDS/NMTDS_MapOfPassKey.hxx | 126 +- src/NMTDS/NMTDS_MapOfPassKeyBoolean.hxx | 126 +- src/NMTDS/NMTDS_MapOfPassKeyBoolean_0.cxx | 55 - src/NMTDS/NMTDS_MapOfPassKey_0.cxx | 55 - src/NMTDS/NMTDS_PInterfPool.hxx | 6 + src/NMTDS/NMTDS_PIterator.hxx | 6 + src/NMTDS/NMTDS_PShapesDataStructure.hxx | 3 + src/NMTDS/NMTDS_Pair.cdl | 66 - src/NMTDS/NMTDS_Pair.cxx | 2 +- src/NMTDS/NMTDS_Pair.hxx | 133 +- src/NMTDS/NMTDS_Pair.ixx | 27 - src/NMTDS/NMTDS_Pair.jxx | 25 - src/NMTDS/NMTDS_PairBoolean.cdl | 53 - src/NMTDS/NMTDS_PairBoolean.cxx | 2 +- src/NMTDS/NMTDS_PairBoolean.hxx | 109 +- src/NMTDS/NMTDS_PairBoolean.ixx | 27 - src/NMTDS/NMTDS_PairBoolean.jxx | 25 - src/NMTDS/NMTDS_PairMapHasher.cdl | 47 - src/NMTDS/NMTDS_PairMapHasher.cxx | 2 +- src/NMTDS/NMTDS_PairMapHasher.hxx | 96 +- src/NMTDS/NMTDS_PairMapHasher.ixx | 27 - src/NMTDS/NMTDS_PairMapHasher.jxx | 28 - src/NMTDS/NMTDS_PassKey.cdl | 98 - src/NMTDS/NMTDS_PassKey.cxx | 6 +- src/NMTDS/NMTDS_PassKey.hxx | 181 +- src/NMTDS/NMTDS_PassKey.ixx | 27 - src/NMTDS/NMTDS_PassKey.jxx | 28 - src/NMTDS/NMTDS_PassKeyBoolean.cdl | 53 - src/NMTDS/NMTDS_PassKeyBoolean.cxx | 2 +- src/NMTDS/NMTDS_PassKeyBoolean.hxx | 105 +- src/NMTDS/NMTDS_PassKeyBoolean.ixx | 27 - src/NMTDS/NMTDS_PassKeyBoolean.jxx | 25 - src/NMTDS/NMTDS_PassKeyMapHasher.cdl | 48 - src/NMTDS/NMTDS_PassKeyMapHasher.cxx | 2 +- src/NMTDS/NMTDS_PassKeyMapHasher.hxx | 90 +- src/NMTDS/NMTDS_PassKeyMapHasher.ixx | 27 - src/NMTDS/NMTDS_PassKeyMapHasher.jxx | 28 - src/NMTDS/NMTDS_PassKeyShape.cdl | 93 - src/NMTDS/NMTDS_PassKeyShape.cxx | 3 +- src/NMTDS/NMTDS_PassKeyShape.hxx | 188 +- src/NMTDS/NMTDS_PassKeyShape.ixx | 24 - src/NMTDS/NMTDS_PassKeyShape.jxx | 28 - src/NMTDS/NMTDS_PassKeyShapeMapHasher.cdl | 45 - src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx | 2 +- src/NMTDS/NMTDS_PassKeyShapeMapHasher.hxx | 91 +- src/NMTDS/NMTDS_PassKeyShapeMapHasher.ixx | 24 - src/NMTDS/NMTDS_PassKeyShapeMapHasher.jxx | 25 - src/NMTDS/NMTDS_ShapesDataStructure.cdl | 102 -- src/NMTDS/NMTDS_ShapesDataStructure.cxx | 2 +- src/NMTDS/NMTDS_ShapesDataStructure.hxx | 179 +- src/NMTDS/NMTDS_ShapesDataStructure.ixx | 27 - src/NMTDS/NMTDS_ShapesDataStructure.jxx | 40 - .../NMTDS_StdMapNodeOfMapOfPairBoolean.hxx | 111 -- .../NMTDS_StdMapNodeOfMapOfPairBoolean_0.cxx | 72 - src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey.hxx | 124 -- .../NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx | 124 -- ...MTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx | 101 -- .../NMTDS_StdMapNodeOfMapOfPassKey_0.cxx | 101 -- src/NMTDS/NMTDS_Tools.cdl | 61 - src/NMTDS/NMTDS_Tools.cxx | 5 +- src/NMTDS/NMTDS_Tools.hxx | 122 +- src/NMTDS/NMTDS_Tools.ixx | 24 - src/NMTDS/NMTDS_Tools.jxx | 31 - src/NMTDS_NEW/Makefile.am | 112 -- src/NMTDS_NEW/NMTDS.cdl | 94 - src/NMTDS_NEW/NMTDS_BndSphere.cxx | 57 - src/NMTDS_NEW/NMTDS_BndSphere.hxx | 73 - src/NMTDS_NEW/NMTDS_BndSphere.lxx | 108 -- src/NMTDS_NEW/NMTDS_BndSphereTree.cxx | 89 - src/NMTDS_NEW/NMTDS_BndSphereTree.hxx | 53 - src/NMTDS_NEW/NMTDS_BoxBndTree.cxx | 92 - src/NMTDS_NEW/NMTDS_BoxBndTree.hxx | 56 - src/NMTDS_NEW/NMTDS_CArray1OfIndexRange.hxx | 121 -- ...IteratorOfDataMapOfIntegerMapOfInteger.hxx | 32 - .../NMTDS_DataMapOfIntegerMapOfInteger.hxx | 40 - src/NMTDS_NEW/NMTDS_IndexRange.cxx | 79 - src/NMTDS_NEW/NMTDS_IndexRange.hxx | 62 - .../NMTDS_IndexedDataMapOfIntegerShape.hxx | 42 - .../NMTDS_IndexedDataMapOfShapeBndSphere.hxx | 45 - .../NMTDS_IndexedDataMapOfShapeBox.hxx | 44 - src/NMTDS_NEW/NMTDS_InterfPool.cxx | 302 --- src/NMTDS_NEW/NMTDS_InterfPool.hxx | 123 -- src/NMTDS_NEW/NMTDS_InterfType.hxx | 44 - src/NMTDS_NEW/NMTDS_Iterator.cxx | 468 ----- src/NMTDS_NEW/NMTDS_Iterator.hxx | 103 -- src/NMTDS_NEW/NMTDS_IteratorCheckerSI.cxx | 224 --- src/NMTDS_NEW/NMTDS_IteratorCheckerSI.hxx | 46 - ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 32 - .../NMTDS_ListIteratorOfListOfPair.hxx | 32 - .../NMTDS_ListIteratorOfListOfPairBoolean.hxx | 32 - .../NMTDS_ListIteratorOfListOfPassKey.hxx | 32 - ...TDS_ListIteratorOfListOfPassKeyBoolean.hxx | 32 - ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 34 - src/NMTDS_NEW/NMTDS_ListOfPair.hxx | 34 - src/NMTDS_NEW/NMTDS_ListOfPairBoolean.hxx | 34 - src/NMTDS_NEW/NMTDS_ListOfPassKey.hxx | 34 - src/NMTDS_NEW/NMTDS_ListOfPassKeyBoolean.hxx | 34 - .../NMTDS_MapIteratorOfMapOfPairBoolean.hxx | 33 - .../NMTDS_MapIteratorOfMapOfPassKey.hxx | 33 - ...NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx | 33 - src/NMTDS_NEW/NMTDS_MapOfPairBoolean.hxx | 40 - src/NMTDS_NEW/NMTDS_MapOfPassKey.hxx | 40 - src/NMTDS_NEW/NMTDS_MapOfPassKeyBoolean.hxx | 40 - src/NMTDS_NEW/NMTDS_PInterfPool.hxx | 33 - src/NMTDS_NEW/NMTDS_PIterator.hxx | 33 - src/NMTDS_NEW/NMTDS_PShapesDataStructure.hxx | 33 - src/NMTDS_NEW/NMTDS_Pair.cxx | 150 -- src/NMTDS_NEW/NMTDS_Pair.hxx | 73 - src/NMTDS_NEW/NMTDS_PairBoolean.cxx | 70 - src/NMTDS_NEW/NMTDS_PairBoolean.hxx | 58 - src/NMTDS_NEW/NMTDS_PairMapHasher.cxx | 45 - src/NMTDS_NEW/NMTDS_PairMapHasher.hxx | 49 - src/NMTDS_NEW/NMTDS_PassKey.cxx | 362 ---- src/NMTDS_NEW/NMTDS_PassKey.hxx | 103 -- src/NMTDS_NEW/NMTDS_PassKeyBoolean.cxx | 72 - src/NMTDS_NEW/NMTDS_PassKeyBoolean.hxx | 60 - src/NMTDS_NEW/NMTDS_PassKeyMapHasher.cxx | 47 - src/NMTDS_NEW/NMTDS_PassKeyMapHasher.hxx | 52 - src/NMTDS_NEW/NMTDS_PassKeyShape.cxx | 227 --- src/NMTDS_NEW/NMTDS_PassKeyShape.hxx | 100 - src/NMTDS_NEW/NMTDS_PassKeyShapeMapHasher.cxx | 44 - src/NMTDS_NEW/NMTDS_PassKeyShapeMapHasher.hxx | 48 - src/NMTDS_NEW/NMTDS_ShapesDataStructure.cxx | 390 ---- src/NMTDS_NEW/NMTDS_ShapesDataStructure.hxx | 96 - src/NMTDS_NEW/NMTDS_Tools.cxx | 181 -- src/NMTDS_NEW/NMTDS_Tools.hxx | 63 - src/{NMTTools_NEW => NMTTools}/FILES | 0 ..._DataMapNodeOfDataMapOfIntegerFaceInfo.hxx | 75 - ...pNodeOfDataMapOfIntegerListOfPaveBlock.hxx | 75 - ...eOfIndexedDataMapOfIndexedMapOfInteger.hxx | 75 - ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 75 - ...apNodeOfIndexedDataMapOfShapePaveBlock.hxx | 75 - ...e_NMTTools_ListNodeOfListOfCommonBlock.hxx | 75 - ...NMTTools_ListNodeOfListOfCoupleOfShape.hxx | 75 - ...le_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx | 75 - src/NMTTools/Makefile.am | 75 +- src/NMTTools/NMTTools.cdl | 147 +- src/NMTTools/NMTTools.pro | 127 -- src/NMTTools/NMTTools_CheckerSI.cdl | 64 - src/NMTTools/NMTTools_CheckerSI.cxx | 48 +- src/NMTTools/NMTTools_CheckerSI.hxx | 113 +- src/NMTTools/NMTTools_CheckerSI.ixx | 24 - src/NMTTools/NMTTools_CheckerSI.jxx | 22 - src/NMTTools/NMTTools_CheckerSI_1.cxx | 18 +- src/NMTTools/NMTTools_CommonBlock.cdl | 108 -- src/NMTTools/NMTTools_CommonBlock.cxx | 32 +- src/NMTTools/NMTTools_CommonBlock.hxx | 140 +- src/NMTTools/NMTTools_CommonBlock.ixx | 27 - src/NMTTools/NMTTools_CommonBlock.jxx | 34 - src/NMTTools/NMTTools_CommonBlockAPI.cdl | 74 - src/NMTTools/NMTTools_CommonBlockAPI.cxx | 12 +- src/NMTTools/NMTTools_CommonBlockAPI.hxx | 113 +- src/NMTTools/NMTTools_CommonBlockAPI.ixx | 27 - src/NMTTools/NMTTools_CommonBlockAPI.jxx | 37 - .../NMTTools_CommonBlockPool.cxx | 0 src/NMTTools/NMTTools_CommonBlockPool.hxx | 164 +- src/NMTTools/NMTTools_CommonBlockPool_0.cxx | 41 - src/NMTTools/NMTTools_CoupleOfShape.cdl | 59 - src/NMTTools/NMTTools_CoupleOfShape.cxx | 12 +- src/NMTTools/NMTTools_CoupleOfShape.hxx | 101 +- src/NMTTools/NMTTools_CoupleOfShape.ixx | 27 - src/NMTTools/NMTTools_CoupleOfShape.jxx | 28 - src/NMTTools/NMTTools_DEProcessor.cdl | 125 -- src/NMTTools/NMTTools_DEProcessor.cxx | 66 +- src/NMTTools/NMTTools_DEProcessor.hxx | 157 +- src/NMTTools/NMTTools_DEProcessor.ixx | 27 - src/NMTTools/NMTTools_DEProcessor.jxx | 40 - ...aMapIteratorOfDataMapOfIntegerFaceInfo.hxx | 102 +- ...apIteratorOfDataMapOfIntegerFaceInfo_0.cxx | 57 - ...ratorOfDataMapOfIntegerListOfPaveBlock.hxx | 102 +- ...torOfDataMapOfIntegerListOfPaveBlock_0.cxx | 57 - ..._DataMapNodeOfDataMapOfIntegerFaceInfo.hxx | 134 -- ...ataMapNodeOfDataMapOfIntegerFaceInfo_0.cxx | 103 -- ...pNodeOfDataMapOfIntegerListOfPaveBlock.hxx | 134 -- ...odeOfDataMapOfIntegerListOfPaveBlock_0.cxx | 103 -- .../NMTTools_DataMapOfIntegerFaceInfo.hxx | 144 +- .../NMTTools_DataMapOfIntegerFaceInfo_0.cxx | 60 - ...TTools_DataMapOfIntegerListOfPaveBlock.hxx | 133 +- ...ools_DataMapOfIntegerListOfPaveBlock_0.cxx | 60 - src/NMTTools/NMTTools_FaceInfo.cdl | 161 -- src/NMTTools/NMTTools_FaceInfo.cxx | 2 +- src/NMTTools/NMTTools_FaceInfo.hxx | 193 +- src/NMTTools/NMTTools_FaceInfo.ixx | 27 - src/NMTTools/NMTTools_FaceInfo.jxx | 31 - src/NMTTools/NMTTools_FaceInfo.lxx | 28 +- ...eOfIndexedDataMapOfIndexedMapOfInteger.hxx | 135 -- ...fIndexedDataMapOfIndexedMapOfInteger_0.cxx | 98 - ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 139 -- ...dexedDataMapOfShapeIndexedMapOfShape_0.cxx | 101 -- ...apNodeOfIndexedDataMapOfShapePaveBlock.hxx | 139 -- ...NodeOfIndexedDataMapOfShapePaveBlock_0.cxx | 101 -- ...ls_IndexedDataMapOfIndexedMapOfInteger.hxx | 158 +- ..._IndexedDataMapOfIndexedMapOfInteger_0.cxx | 58 - ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 162 +- ...dexedDataMapOfShapeIndexedMapOfShape_0.cxx | 61 - ...MTTools_IndexedDataMapOfShapePaveBlock.hxx | 161 +- ...Tools_IndexedDataMapOfShapePaveBlock_0.cxx | 61 - ...TTools_ListIteratorOfListOfCommonBlock.hxx | 129 +- ...ools_ListIteratorOfListOfCommonBlock_0.cxx | 53 - ...ools_ListIteratorOfListOfCoupleOfShape.hxx | 129 +- ...ls_ListIteratorOfListOfCoupleOfShape_0.cxx | 53 - .../NMTTools_ListNodeOfListOfCommonBlock.hxx | 119 -- ...NMTTools_ListNodeOfListOfCommonBlock_0.cxx | 96 - ...NMTTools_ListNodeOfListOfCoupleOfShape.hxx | 119 -- ...TTools_ListNodeOfListOfCoupleOfShape_0.cxx | 96 - src/NMTTools/NMTTools_ListOfCommonBlock.hxx | 185 +- src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx | 50 - src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx | 185 +- .../NMTTools_ListOfCoupleOfShape_0.cxx | 50 - .../NMTTools_MapIteratorOfMapOfPaveBlock.hxx | 96 +- ...NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx | 55 - src/NMTTools/NMTTools_MapOfPaveBlock.hxx | 126 +- src/NMTTools/NMTTools_MapOfPaveBlock_0.cxx | 55 - src/NMTTools/NMTTools_PPaveFiller.hxx | 5 + src/NMTTools/NMTTools_PaveFiller.cdl | 538 ------ src/NMTTools/NMTTools_PaveFiller.cxx | 88 +- src/NMTTools/NMTTools_PaveFiller.hxx | 578 +++--- src/NMTTools/NMTTools_PaveFiller.ixx | 27 - src/NMTTools/NMTTools_PaveFiller.jxx | 103 -- src/NMTTools/NMTTools_PaveFiller_0.cxx | 20 +- src/NMTTools/NMTTools_PaveFiller_1.cxx | 14 +- src/NMTTools/NMTTools_PaveFiller_2.cxx | 17 +- src/NMTTools/NMTTools_PaveFiller_3.cxx | 27 +- src/NMTTools/NMTTools_PaveFiller_4.cxx | 23 +- src/NMTTools/NMTTools_PaveFiller_5.cxx | 92 +- src/NMTTools/NMTTools_PaveFiller_6.cxx | 72 +- src/NMTTools/NMTTools_PaveFiller_7.cxx | 20 +- src/NMTTools/NMTTools_PaveFiller_8.cxx | 40 +- src/NMTTools/NMTTools_PaveFiller_9.cxx | 6 +- .../NMTTools_StdMapNodeOfMapOfPaveBlock.hxx | 124 -- .../NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx | 101 -- src/NMTTools/NMTTools_Tools.cdl | 95 - src/NMTTools/NMTTools_Tools.cxx | 67 +- src/NMTTools/NMTTools_Tools.hxx | 150 +- src/NMTTools/NMTTools_Tools.ixx | 27 - src/NMTTools/NMTTools_Tools.jxx | 58 - src/NMTTools_NEW/Makefile.am | 98 - src/NMTTools_NEW/NMTTools.cdl | 129 -- src/NMTTools_NEW/NMTTools_CheckerSI.cxx | 180 -- src/NMTTools_NEW/NMTTools_CheckerSI.hxx | 69 - src/NMTTools_NEW/NMTTools_CheckerSI_1.cxx | 159 -- src/NMTTools_NEW/NMTTools_CommonBlock.cxx | 248 --- src/NMTTools_NEW/NMTTools_CommonBlock.hxx | 91 - src/NMTTools_NEW/NMTTools_CommonBlockAPI.cxx | 135 -- src/NMTTools_NEW/NMTTools_CommonBlockAPI.hxx | 74 - src/NMTTools_NEW/NMTTools_CommonBlockPool.hxx | 122 -- src/NMTTools_NEW/NMTTools_CoupleOfShape.cxx | 67 - src/NMTTools_NEW/NMTTools_CoupleOfShape.hxx | 61 - src/NMTTools_NEW/NMTTools_DEProcessor.cxx | 568 ------ src/NMTTools_NEW/NMTTools_DEProcessor.hxx | 117 -- ...aMapIteratorOfDataMapOfIntegerFaceInfo.hxx | 32 - ...ratorOfDataMapOfIntegerListOfPaveBlock.hxx | 32 - .../NMTTools_DataMapOfIntegerFaceInfo.hxx | 40 - ...TTools_DataMapOfIntegerListOfPaveBlock.hxx | 41 - src/NMTTools_NEW/NMTTools_FaceInfo.cxx | 28 - src/NMTTools_NEW/NMTTools_FaceInfo.hxx | 124 -- src/NMTTools_NEW/NMTTools_FaceInfo.lxx | 136 -- ...ls_IndexedDataMapOfIndexedMapOfInteger.hxx | 42 - ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 47 - ...MTTools_IndexedDataMapOfShapePaveBlock.hxx | 40 - ...TTools_ListIteratorOfListOfCommonBlock.hxx | 31 - ...ools_ListIteratorOfListOfCoupleOfShape.hxx | 31 - .../NMTTools_ListOfCommonBlock.hxx | 33 - .../NMTTools_ListOfCoupleOfShape.hxx | 33 - .../NMTTools_MapIteratorOfMapOfPaveBlock.hxx | 32 - src/NMTTools_NEW/NMTTools_MapOfPaveBlock.hxx | 40 - src/NMTTools_NEW/NMTTools_PPaveFiller.hxx | 35 - src/NMTTools_NEW/NMTTools_PaveFiller.cxx | 303 ---- src/NMTTools_NEW/NMTTools_PaveFiller.hxx | 500 ----- src/NMTTools_NEW/NMTTools_PaveFiller_0.cxx | 128 -- src/NMTTools_NEW/NMTTools_PaveFiller_1.cxx | 163 -- src/NMTTools_NEW/NMTTools_PaveFiller_2.cxx | 276 --- src/NMTTools_NEW/NMTTools_PaveFiller_3.cxx | 155 -- src/NMTTools_NEW/NMTTools_PaveFiller_4.cxx | 1613 ----------------- src/NMTTools_NEW/NMTTools_PaveFiller_5.cxx | 662 ------- src/NMTTools_NEW/NMTTools_PaveFiller_6.cxx | 1605 ---------------- src/NMTTools_NEW/NMTTools_PaveFiller_7.cxx | 818 --------- src/NMTTools_NEW/NMTTools_PaveFiller_8.cxx | 830 --------- src/NMTTools_NEW/NMTTools_PaveFiller_9.cxx | 127 -- src/NMTTools_NEW/NMTTools_Tools.cxx | 614 ------- src/NMTTools_NEW/NMTTools_Tools.hxx | 99 - 934 files changed, 7729 insertions(+), 93227 deletions(-) rename src/{GEOMAlgo_NEW => GEOMAlgo}/FILES (100%) delete mode 100644 src/GEOMAlgo/GEOMAlgo.pro delete mode 100755 src/GEOMAlgo/GEOMAlgo_Algo.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_Algo.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_Algo.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_Builder.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_Builder.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_Builder.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_BuilderArea.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_BuilderArea.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_BuilderArea.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_BuilderFace.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_BuilderFace.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_BuilderFace.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_BuilderShape.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_BuilderShape.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_BuilderShape.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_BuilderSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_BuilderSolid.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_BuilderSolid.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_BuilderTools.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_BuilderTools.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_BuilderTools.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_Clsf.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_Clsf.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_Clsf.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ClsfBox.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_ClsfBox.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ClsfBox.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_ClsfSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_ClsfSolid.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ClsfSolid.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ClsfSurf.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_ClsfSurf.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ClsfSurf.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapOfOrientedShapeShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyShapeShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapOfRealListOfShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapOfShapeMapOfShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapOfShapeReal_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_DataMapOfShapeShapeSet_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_GlueAnalyser.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_GlueAnalyser.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_Gluer.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_Gluer.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_Gluer.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_HAlgo.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_HAlgo.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_HAlgo.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeShapeInfo_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes_0.cxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_PassKey.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_PassKey.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_PassKey.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeAlgo.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeAlgo.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeInfo.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeInfo.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeInfo.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_ShapeSet.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeSet.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeSet.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_Splitter.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_Splitter.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_Splitter.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_StateCollector.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_StateCollector.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_StateCollector.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_Tools.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_Tools.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_Tools.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_Tools3D.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_Tools3D.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_Tools3D.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_WESCorrector.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_WESCorrector.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_WESCorrector.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_WESScaler.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_WESScaler.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_WESScaler.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_WireEdgeSet.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_WireEdgeSet.jxx delete mode 100644 src/GEOMAlgo/GEOMAlgo_WireSolid.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_WireSolid.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_WireSolid.jxx delete mode 100755 src/GEOMAlgo/GEOMAlgo_WireSplitter.cdl delete mode 100644 src/GEOMAlgo/GEOMAlgo_WireSplitter.ixx delete mode 100644 src/GEOMAlgo/GEOMAlgo_WireSplitter.jxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_Clsf.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_ClsfBox.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_ClsfSolid.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_ClsfSurf.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_HAlgo.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx delete mode 100644 src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix.cdl delete mode 100644 src/GEOMAlgo_NEW/BlockFix.cxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix.hxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix.ixx delete mode 100644 src/GEOMAlgo_NEW/BlockFix.jxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cdl delete mode 100644 src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.hxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.ixx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.jxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.lxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_CheckTool.cdl delete mode 100644 src/GEOMAlgo_NEW/BlockFix_CheckTool.cxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_CheckTool.hxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_CheckTool.ixx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_CheckTool.jxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.cdl delete mode 100644 src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.cxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.hxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.ixx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.jxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.cdl delete mode 100644 src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.cxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.hxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.ixx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.jxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_UnionEdges.cdl delete mode 100644 src/GEOMAlgo_NEW/BlockFix_UnionEdges.cxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_UnionEdges.hxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_UnionEdges.ixx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_UnionEdges.jxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_UnionFaces.cdl delete mode 100644 src/GEOMAlgo_NEW/BlockFix_UnionFaces.cxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_UnionFaces.hxx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_UnionFaces.ixx delete mode 100644 src/GEOMAlgo_NEW/BlockFix_UnionFaces.jxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo.cdl delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Algo.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Algo.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Builder.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Builder.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_BuilderArea.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_BuilderArea.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_BuilderFace.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_BuilderFace.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_BuilderShape.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_BuilderShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_BuilderSolid.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_BuilderSolid.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_BuilderTools.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_BuilderTools.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Builder_0.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Builder_1.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Builder_2.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Builder_3.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Builder_4.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Clsf.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Clsf.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ClsfBox.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ClsfBox.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ClsfSolid.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ClsfSolid.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ClsfSurf.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ClsfSurf.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_CoupleOfShapes.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_CoupleOfShapes.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfOrientedShapeShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfPassKeyInteger.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfPassKeyShapeShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfRealListOfShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeMapOfShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapePnt.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeReal.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeShapeSet.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn1.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn1.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn2.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn2.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOnQuad.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOnQuad.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_1.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_2.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_3.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_GlueAnalyser.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_GlueAnalyser.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_GlueDetector.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_GlueDetector.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Gluer.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Gluer.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Gluer2.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Gluer2.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_1.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_2.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_3.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_GluerAlgo.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_GluerAlgo.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_HAlgo.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_HAlgo.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeBox.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeState.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_KindOfBounds.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_KindOfClosed.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_KindOfName.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_KindOfShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ListIteratorOfListOfPnt.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ListOfCoupleOfShapes.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ListOfPnt.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_PWireEdgeSet.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_PassKey.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_PassKey.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_PassKeyMapHasher.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_PassKeyMapHasher.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShape.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShape.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShapeMapHasher.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShapeMapHasher.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShapeAlgo.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShapeAlgo.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfo.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfo.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfoFiller.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfoFiller.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfoFiller_1.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShapeSet.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShapeSet.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShapeSolid.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShapeSolid.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShellSolid.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_ShellSolid.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_SolidSolid.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_SolidSolid.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Splitter.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Splitter.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_State.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_StateCollector.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_StateCollector.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_SurfaceTools.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_SurfaceTools.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Tools.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Tools.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Tools3D.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Tools3D.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_Tools_1.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_VertexSolid.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_VertexSolid.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_WESCorrector.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_WESCorrector.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_WESScaler.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_WESScaler.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_WireEdgeSet.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_WireEdgeSet.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_WireSolid.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_WireSolid.hxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_WireSplitter.cxx delete mode 100644 src/GEOMAlgo_NEW/GEOMAlgo_WireSplitter.hxx delete mode 100644 src/GEOMAlgo_NEW/Handle_BlockFix_BlockFixAPI.hxx delete mode 100644 src/GEOMAlgo_NEW/Handle_BlockFix_PeriodicSurfaceModifier.hxx delete mode 100644 src/GEOMAlgo_NEW/Handle_BlockFix_SphereSpaceModifier.hxx delete mode 100644 src/GEOMAlgo_NEW/Makefile.am rename src/{NMTDS_NEW => NMTDS}/FILES (100%) delete mode 100644 src/NMTDS/Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_ListNodeOfListOfPair.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_ListNodeOfListOfPairBoolean.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_ListNodeOfListOfPassKey.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPairBoolean.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx delete mode 100644 src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx delete mode 100644 src/NMTDS/NMTDS.pro delete mode 100644 src/NMTDS/NMTDS_BndSphere.cdl delete mode 100644 src/NMTDS/NMTDS_BndSphere.ixx delete mode 100644 src/NMTDS/NMTDS_BndSphere.jxx rename src/{NMTDS_NEW => NMTDS}/NMTDS_CArray1OfIndexRange.cxx (100%) delete mode 100644 src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx delete mode 100644 src/NMTDS/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_0.cxx delete mode 100644 src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx delete mode 100644 src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_0.cxx delete mode 100644 src/NMTDS/NMTDS_DataMapOfIntegerMapOfInteger_0.cxx delete mode 100644 src/NMTDS/NMTDS_IndexRange.cdl delete mode 100644 src/NMTDS/NMTDS_IndexRange.ixx delete mode 100644 src/NMTDS/NMTDS_IndexRange.jxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_0.cxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapOfIntegerShape_0.cxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapOfShapeBndSphere_0.cxx delete mode 100644 src/NMTDS/NMTDS_IndexedDataMapOfShapeBox_0.cxx delete mode 100644 src/NMTDS/NMTDS_InterfPool.cdl delete mode 100644 src/NMTDS/NMTDS_InterfPool.ixx delete mode 100644 src/NMTDS/NMTDS_InterfPool.jxx delete mode 100755 src/NMTDS/NMTDS_Iterator.cdl delete mode 100644 src/NMTDS/NMTDS_Iterator.ixx delete mode 100644 src/NMTDS/NMTDS_Iterator.jxx delete mode 100644 src/NMTDS/NMTDS_IteratorCheckerSI.cdl delete mode 100644 src/NMTDS/NMTDS_IteratorCheckerSI.ixx delete mode 100644 src/NMTDS/NMTDS_IteratorCheckerSI.jxx delete mode 100644 src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListIteratorOfListOfPairBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListIteratorOfListOfPair_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListIteratorOfListOfPassKeyBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListIteratorOfListOfPassKey_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx delete mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfPair.hxx delete mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfPairBoolean.hxx delete mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfPairBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfPair_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfPassKey.hxx delete mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean.hxx delete mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfPassKey_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListOfPairBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListOfPair_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListOfPassKeyBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_ListOfPassKey_0.cxx delete mode 100644 src/NMTDS/NMTDS_MapIteratorOfMapOfPairBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_MapIteratorOfMapOfPassKeyBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_MapIteratorOfMapOfPassKey_0.cxx delete mode 100644 src/NMTDS/NMTDS_MapOfPairBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_MapOfPassKeyBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_MapOfPassKey_0.cxx delete mode 100644 src/NMTDS/NMTDS_Pair.cdl delete mode 100644 src/NMTDS/NMTDS_Pair.ixx delete mode 100644 src/NMTDS/NMTDS_Pair.jxx delete mode 100644 src/NMTDS/NMTDS_PairBoolean.cdl delete mode 100644 src/NMTDS/NMTDS_PairBoolean.ixx delete mode 100644 src/NMTDS/NMTDS_PairBoolean.jxx delete mode 100644 src/NMTDS/NMTDS_PairMapHasher.cdl delete mode 100644 src/NMTDS/NMTDS_PairMapHasher.ixx delete mode 100644 src/NMTDS/NMTDS_PairMapHasher.jxx delete mode 100755 src/NMTDS/NMTDS_PassKey.cdl delete mode 100644 src/NMTDS/NMTDS_PassKey.ixx delete mode 100644 src/NMTDS/NMTDS_PassKey.jxx delete mode 100755 src/NMTDS/NMTDS_PassKeyBoolean.cdl delete mode 100644 src/NMTDS/NMTDS_PassKeyBoolean.ixx delete mode 100644 src/NMTDS/NMTDS_PassKeyBoolean.jxx delete mode 100755 src/NMTDS/NMTDS_PassKeyMapHasher.cdl delete mode 100644 src/NMTDS/NMTDS_PassKeyMapHasher.ixx delete mode 100644 src/NMTDS/NMTDS_PassKeyMapHasher.jxx delete mode 100644 src/NMTDS/NMTDS_PassKeyShape.cdl delete mode 100644 src/NMTDS/NMTDS_PassKeyShape.ixx delete mode 100644 src/NMTDS/NMTDS_PassKeyShape.jxx delete mode 100644 src/NMTDS/NMTDS_PassKeyShapeMapHasher.cdl delete mode 100644 src/NMTDS/NMTDS_PassKeyShapeMapHasher.ixx delete mode 100644 src/NMTDS/NMTDS_PassKeyShapeMapHasher.jxx delete mode 100644 src/NMTDS/NMTDS_ShapesDataStructure.cdl delete mode 100644 src/NMTDS/NMTDS_ShapesDataStructure.ixx delete mode 100644 src/NMTDS/NMTDS_ShapesDataStructure.jxx delete mode 100644 src/NMTDS/NMTDS_StdMapNodeOfMapOfPairBoolean.hxx delete mode 100644 src/NMTDS/NMTDS_StdMapNodeOfMapOfPairBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey.hxx delete mode 100644 src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx delete mode 100644 src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx delete mode 100644 src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey_0.cxx delete mode 100644 src/NMTDS/NMTDS_Tools.cdl delete mode 100644 src/NMTDS/NMTDS_Tools.ixx delete mode 100644 src/NMTDS/NMTDS_Tools.jxx delete mode 100644 src/NMTDS_NEW/Makefile.am delete mode 100644 src/NMTDS_NEW/NMTDS.cdl delete mode 100644 src/NMTDS_NEW/NMTDS_BndSphere.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_BndSphere.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_BndSphere.lxx delete mode 100644 src/NMTDS_NEW/NMTDS_BndSphereTree.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_BndSphereTree.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_BoxBndTree.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_BoxBndTree.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_CArray1OfIndexRange.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_DataMapOfIntegerMapOfInteger.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_IndexRange.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_IndexRange.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_IndexedDataMapOfIntegerShape.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_IndexedDataMapOfShapeBndSphere.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_IndexedDataMapOfShapeBox.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_InterfPool.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_InterfPool.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_InterfType.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_Iterator.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_Iterator.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_IteratorCheckerSI.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_IteratorCheckerSI.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPair.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPairBoolean.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPassKey.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_ListOfPair.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_ListOfPairBoolean.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_ListOfPassKey.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_ListOfPassKeyBoolean.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPairBoolean.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPassKey.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_MapOfPairBoolean.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_MapOfPassKey.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_MapOfPassKeyBoolean.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_PInterfPool.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_PIterator.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_PShapesDataStructure.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_Pair.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_Pair.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_PairBoolean.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_PairBoolean.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_PairMapHasher.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_PairMapHasher.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_PassKey.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_PassKey.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_PassKeyBoolean.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_PassKeyBoolean.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_PassKeyMapHasher.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_PassKeyMapHasher.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_PassKeyShape.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_PassKeyShape.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_PassKeyShapeMapHasher.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_PassKeyShapeMapHasher.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_ShapesDataStructure.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_ShapesDataStructure.hxx delete mode 100644 src/NMTDS_NEW/NMTDS_Tools.cxx delete mode 100644 src/NMTDS_NEW/NMTDS_Tools.hxx rename src/{NMTTools_NEW => NMTTools}/FILES (100%) delete mode 100644 src/NMTTools/Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx delete mode 100644 src/NMTTools/Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx delete mode 100644 src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx delete mode 100644 src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx delete mode 100644 src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx delete mode 100644 src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx delete mode 100644 src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx delete mode 100644 src/NMTTools/Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx delete mode 100644 src/NMTTools/NMTTools.pro delete mode 100644 src/NMTTools/NMTTools_CheckerSI.cdl delete mode 100644 src/NMTTools/NMTTools_CheckerSI.ixx delete mode 100644 src/NMTTools/NMTTools_CheckerSI.jxx delete mode 100644 src/NMTTools/NMTTools_CommonBlock.cdl delete mode 100644 src/NMTTools/NMTTools_CommonBlock.ixx delete mode 100644 src/NMTTools/NMTTools_CommonBlock.jxx delete mode 100644 src/NMTTools/NMTTools_CommonBlockAPI.cdl delete mode 100644 src/NMTTools/NMTTools_CommonBlockAPI.ixx delete mode 100644 src/NMTTools/NMTTools_CommonBlockAPI.jxx rename src/{NMTTools_NEW => NMTTools}/NMTTools_CommonBlockPool.cxx (100%) delete mode 100644 src/NMTTools/NMTTools_CommonBlockPool_0.cxx delete mode 100644 src/NMTTools/NMTTools_CoupleOfShape.cdl delete mode 100644 src/NMTTools/NMTTools_CoupleOfShape.ixx delete mode 100644 src/NMTTools/NMTTools_CoupleOfShape.jxx delete mode 100644 src/NMTTools/NMTTools_DEProcessor.cdl delete mode 100644 src/NMTTools/NMTTools_DEProcessor.ixx delete mode 100644 src/NMTTools/NMTTools_DEProcessor.jxx delete mode 100644 src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_0.cxx delete mode 100644 src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx delete mode 100644 src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx delete mode 100644 src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_0.cxx delete mode 100644 src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx delete mode 100644 src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx delete mode 100644 src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo_0.cxx delete mode 100644 src/NMTTools/NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx delete mode 100644 src/NMTTools/NMTTools_FaceInfo.cdl delete mode 100644 src/NMTTools/NMTTools_FaceInfo.ixx delete mode 100644 src/NMTTools/NMTTools_FaceInfo.jxx delete mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx delete mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx delete mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx delete mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx delete mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx delete mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx delete mode 100644 src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx delete mode 100644 src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx delete mode 100644 src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx delete mode 100644 src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx delete mode 100644 src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx delete mode 100644 src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx delete mode 100644 src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx delete mode 100644 src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx delete mode 100644 src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx delete mode 100644 src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx delete mode 100644 src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx delete mode 100644 src/NMTTools/NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx delete mode 100644 src/NMTTools/NMTTools_MapOfPaveBlock_0.cxx delete mode 100644 src/NMTTools/NMTTools_PaveFiller.cdl delete mode 100644 src/NMTTools/NMTTools_PaveFiller.ixx delete mode 100644 src/NMTTools/NMTTools_PaveFiller.jxx delete mode 100644 src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock.hxx delete mode 100644 src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx delete mode 100644 src/NMTTools/NMTTools_Tools.cdl delete mode 100644 src/NMTTools/NMTTools_Tools.ixx delete mode 100644 src/NMTTools/NMTTools_Tools.jxx delete mode 100644 src/NMTTools_NEW/Makefile.am delete mode 100644 src/NMTTools_NEW/NMTTools.cdl delete mode 100644 src/NMTTools_NEW/NMTTools_CheckerSI.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_CheckerSI.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_CheckerSI_1.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_CommonBlock.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_CommonBlock.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_CommonBlockAPI.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_CommonBlockAPI.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_CommonBlockPool.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_CoupleOfShape.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_CoupleOfShape.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_DEProcessor.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_DEProcessor.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_DataMapOfIntegerFaceInfo.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_DataMapOfIntegerListOfPaveBlock.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_FaceInfo.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_FaceInfo.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_FaceInfo.lxx delete mode 100644 src/NMTTools_NEW/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_IndexedDataMapOfShapePaveBlock.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_ListIteratorOfListOfCommonBlock.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_ListOfCommonBlock.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_ListOfCoupleOfShape.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_MapIteratorOfMapOfPaveBlock.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_MapOfPaveBlock.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_PPaveFiller.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller.hxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller_0.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller_1.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller_2.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller_3.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller_4.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller_5.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller_6.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller_7.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller_8.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_PaveFiller_9.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_Tools.cxx delete mode 100644 src/NMTTools_NEW/NMTTools_Tools.hxx diff --git a/configure.ac b/configure.ac index fdffccdb5..622794357 100644 --- a/configure.ac +++ b/configure.ac @@ -318,19 +318,6 @@ echo CHECK_CAS -echo "OCC_VERSION_DEVELOPMENT = ${OCC_VERSION_DEVELOPMENT}" -NMTDS_VAR=NMTDS_NEW -NMTTools_VAR=NMTTools_NEW -GEOMAlgo_VAR=GEOMAlgo_NEW -#if test "${OCC_VERSION_FULL}" == "6.5.3"; then -# NMTDS_VAR=NMTDS_NEW -# NMTTools_VAR=NMTTools_NEW -# GEOMAlgo_VAR=GEOMAlgo_NEW -#fi -AC_SUBST(NMTDS_VAR) -AC_SUBST(NMTTools_VAR) -AC_SUBST(GEOMAlgo_VAR) - echo echo --------------------------------------------- echo Testing html generators @@ -460,7 +447,6 @@ AC_OUTPUT([ \ src/EntityGUI/Makefile \ src/GEOM/Makefile \ src/GEOMAlgo/Makefile \ - src/GEOMAlgo_NEW/Makefile \ src/GEOMBase/Makefile \ src/GEOMClient/Makefile \ src/GEOMFiltersSelection/Makefile \ @@ -480,9 +466,7 @@ AC_OUTPUT([ \ src/IGESImport/Makefile \ src/MeasureGUI/Makefile \ src/NMTDS/Makefile \ - src/NMTDS_NEW/Makefile \ src/NMTTools/Makefile \ - src/NMTTools_NEW/Makefile \ src/OBJECT/Makefile \ src/OCC2VTK/Makefile \ src/OperationGUI/Makefile \ diff --git a/src/GEOMAlgo/BlockFix.cdl b/src/GEOMAlgo/BlockFix.cdl index f37324564..961af6625 100644 --- a/src/GEOMAlgo/BlockFix.cdl +++ b/src/GEOMAlgo/BlockFix.cdl @@ -42,19 +42,19 @@ uses is class SphereSpaceModifier; - + class UnionFaces; - + class UnionEdges; - + class BlockFixAPI; ---Purpose: API class to perform the fixing of the -- block - + class PeriodicSurfaceModifier; class CheckTool; - + RotateSphereSpace (S: Shape from TopoDS; Tol: Real) returns Shape from TopoDS; diff --git a/src/GEOMAlgo/BlockFix.cxx b/src/GEOMAlgo/BlockFix.cxx index 961ec9ecf..0e4f9bb21 100644 --- a/src/GEOMAlgo/BlockFix.cxx +++ b/src/GEOMAlgo/BlockFix.cxx @@ -18,52 +18,71 @@ // 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: BlockFix.cxx // Created: Tue Dec 7 11:59:05 2004 // Author: Pavel DURANDIN -// + #include -#include -#include -#include -#include -#include -#include + +#include +#include + +#include #include -#include + #include -#include -#include -#include -#include + +#include +#include +#include #include -#include -#include -#include +#include +#include +#include + +#include +#include +#include +#include +#include + #include -#include -#include #include -#include -#include + +#include + +#include +#include +#include + +#include + #include +#include #include -#include -#include +#include +#include #include -#include +#include + +#include + #include +#include -#include -#include -#include -#include +#include -#include +#include +#include +#include +#include +#include + +#include +#include //======================================================================= //function : FixResult @@ -79,26 +98,26 @@ static void FixResult(const TopoDS_Shape& result, TopoDS_Face aFace = TopoDS::Face(aShape); TopLoc_Location L; Handle(Geom_Surface) Surf = BRep_Tool::Surface(aFace,L); - + if( Surf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || Surf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ) { - + Standard_Integer nbWires = 0; for (TopExp_Explorer ex_w(aFace,TopAbs_WIRE); ex_w.More(); ex_w.Next()) { nbWires++; - Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(TopoDS::Wire(ex_w.Current()), - aFace, + Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(TopoDS::Wire(ex_w.Current()), + aFace, Precision::Confusion()); sfw->FixReorder(); if(sfw->StatusReorder ( ShapeExtend_FAIL )) continue; - + sfw->SetPrecision(2.*Tol); sfw->FixShifted(); - + Standard_Boolean isDone = sfw->LastFixStatus ( ShapeExtend_DONE ); isDone |= sfw->FixDegenerated(); - + // remove degenerated edges from not degenerated points ShapeAnalysis_Edge sae; Handle(ShapeExtend_WireData) sewd = sfw->WireData(); @@ -111,10 +130,10 @@ static void FixResult(const TopoDS_Shape& result, i--; } } - + //isDone |= sfw->FixLacking(); // commented by skl 22.03.2005 (PAL8395) - - // remove neighbour seam edges + + // remove neighbour seam edges if(isDone) { for( i = 1; iNbEdges();i++) { if(sewd->IsSeam(i) && sewd->IsSeam(i+1)) { @@ -129,8 +148,7 @@ static void FixResult(const TopoDS_Shape& result, sewd->Remove(sewd->NbEdges()); } } - - + if(isDone) { TopoDS_Wire ResWire = sfw->Wire(); Context->Replace(ex_w.Current(), ResWire); @@ -143,24 +161,17 @@ static void FixResult(const TopoDS_Shape& result, if(sff->FixOrientation()) Context->Replace(aFixedFace,sff->Face()); } - } } } - - - - //======================================================================= -//function : ConvertToAnalytical -//purpose : +//function : RotateSphereSpace +//purpose : //======================================================================= - TopoDS_Shape BlockFix::RotateSphereSpace (const TopoDS_Shape& S, - const Standard_Real Tol) + const Standard_Real Tol) { - // Create a modification description Handle(BlockFix_SphereSpaceModifier) SR = new BlockFix_SphereSpaceModifier; SR->SetTolerance(Tol); @@ -168,29 +179,146 @@ TopoDS_Shape BlockFix::RotateSphereSpace (const TopoDS_Shape& S, TopTools_DataMapOfShapeShape context; BRepTools_Modifier MD; TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD ); - + Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape; FixResult(result,RS,Tol); result = RS->Apply(result); - + ShapeFix_Edge sfe; for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) { TopoDS_Edge E = TopoDS::Edge(exp.Current()); sfe.FixVertexTolerance (E); } - + ShapeFix::SameParameter(result,Standard_False); return result; } +//======================================================================= +//function : RefillProblemFaces +//purpose : +//======================================================================= +TopoDS_Shape BlockFix::RefillProblemFaces (const TopoDS_Shape& aShape) +{ + Standard_Integer NbSamples = 10; + + TopTools_ListOfShape theFaces; + + TopExp_Explorer Explo(aShape, TopAbs_FACE); + for (; Explo.More(); Explo.Next()) + { + TopoDS_Face aFace = TopoDS::Face(Explo.Current()); + BRepAdaptor_Surface BAsurf(aFace); + GeomAbs_SurfaceType SurfType = BAsurf.GetType(); + if (SurfType >= GeomAbs_BezierSurface) + { + TopExp_Explorer fexp(aFace, TopAbs_EDGE); + for (; fexp.More(); fexp.Next()) + { + const TopoDS_Edge& anEdge = TopoDS::Edge(fexp.Current()); + if (BRep_Tool::Degenerated(anEdge)) + { + TopoDS_Vertex V1, V2; + TopExp::Vertices(anEdge, V1, V2); + if (V1.IsSame(V2)) + { + gp_Pnt aPnt = BRep_Tool::Pnt(V1); + Standard_Real TolV = BRep_Tool::Tolerance(V1); + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); + Handle(ShapeAnalysis_Surface) Analyser = new ShapeAnalysis_Surface(aSurf); + if (Analyser->IsDegenerated(aPnt, TolV)) + { + theFaces.Append(aFace); + break; + } + } + } + } + } + } + + //Now all problem faces are collected in the list "theFaces" + BRepTools_Substitution aSubst; + TopTools_ListIteratorOfListOfShape itl(theFaces); + for (; itl.More(); itl.Next()) + { + const TopoDS_Face& aFace = TopoDS::Face(itl.Value()); + BRepOffsetAPI_MakeFilling Filler; + for (Explo.Init(aFace, TopAbs_EDGE); Explo.More(); Explo.Next()) + { + const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current()); + if (!BRep_Tool::Degenerated(anEdge)) + Filler.Add(anEdge, GeomAbs_C0); + } + Standard_Real Umin, Umax, Vmin, Vmax; + BRepTools::UVBounds(aFace, Umin, Umax, Vmin, Vmax); + //Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); + Standard_Integer i, j; + for (i = 1; i < NbSamples; i++) + for (j = 1; j < NbSamples; j++) { + /* + gp_Pnt aPoint = aSurf->Value(Umin + i*(Umax-Umin)/NbSamples, + Vmin + j*(Vmax-Vmin)/NbSamples); + Filler.Add(aPoint); + */ + Filler.Add(Umin + i*(Umax-Umin)/NbSamples, + Vmin + j*(Vmax-Vmin)/NbSamples, + aFace, GeomAbs_G1); + } + + Filler.Build(); + if (Filler.IsDone()) + { + for (Explo.Init(aFace, TopAbs_EDGE); Explo.More(); Explo.Next()) + { + const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current()); + TopTools_ListOfShape Ledge; + if (!BRep_Tool::Degenerated(anEdge)) + { + const TopTools_ListOfShape& Ledges = Filler.Generated(anEdge); + if (!Ledges.IsEmpty()) { + TopoDS_Shape NewEdge = Ledges.First(); + Ledge.Append(NewEdge.Oriented(TopAbs_FORWARD)); + } + } + aSubst.Substitute(anEdge, Ledge); + } + TopTools_ListOfShape Lface; + TopoDS_Face NewFace = TopoDS::Face(Filler.Shape()); + NewFace.Orientation(TopAbs_FORWARD); + BRepAdaptor_Surface NewBAsurf(NewFace); + gp_Pnt MidPnt; + gp_Vec D1U, D1V, Normal, NewNormal; + Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); + aSurf->D1((Umin+Umax)*0.5, (Vmin+Vmax)*0.5, MidPnt, D1U, D1V); + Normal = D1U ^ D1V; + NewBAsurf.D1((NewBAsurf.FirstUParameter() + NewBAsurf.LastUParameter())*0.5, + (NewBAsurf.FirstVParameter() + NewBAsurf.LastVParameter())*0.5, + MidPnt, D1U, D1V); + NewNormal = D1U ^ D1V; + if (Normal * NewNormal < 0.) + NewFace.Reverse(); + Lface.Append(NewFace); + aSubst.Substitute(aFace, Lface); + } + } + aSubst.Build(aShape); + + TopoDS_Shape Result = aShape; + if (aSubst.IsCopied(aShape)) + Result = aSubst.Copy(aShape).First(); + + BRepTools::RemoveUnusedPCurves(Result); + + return Result; +} //======================================================================= //function : FixRanges -//purpose : +//purpose : //======================================================================= - TopoDS_Shape BlockFix::FixRanges (const TopoDS_Shape& S, - const Standard_Real Tol) + const Standard_Real Tol) { // Create a modification description Handle(BlockFix_PeriodicSurfaceModifier) SR = new BlockFix_PeriodicSurfaceModifier; @@ -199,17 +327,17 @@ TopoDS_Shape BlockFix::FixRanges (const TopoDS_Shape& S, TopTools_DataMapOfShapeShape context; BRepTools_Modifier MD; TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD ); - + Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape; FixResult(result,RS,Tol); result = RS->Apply(result); - + ShapeFix_Edge sfe; for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) { TopoDS_Edge E = TopoDS::Edge(exp.Current()); sfe.FixVertexTolerance (E); } - + ShapeFix::SameParameter(result,Standard_False); return result; diff --git a/src/GEOMAlgo/BlockFix.hxx b/src/GEOMAlgo/BlockFix.hxx index 3d38d4de2..34007be5c 100644 --- a/src/GEOMAlgo/BlockFix.hxx +++ b/src/GEOMAlgo/BlockFix.hxx @@ -26,6 +26,7 @@ #ifndef _Standard_Real_HeaderFile #include #endif + class TopoDS_Shape; class BlockFix_SphereSpaceModifier; class BlockFix_UnionFaces; @@ -34,7 +35,6 @@ class BlockFix_BlockFixAPI; class BlockFix_PeriodicSurfaceModifier; class BlockFix_CheckTool; - #ifndef _Standard_HeaderFile #include #endif @@ -46,45 +46,26 @@ class BlockFix { 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 - // -Standard_EXPORT static TopoDS_Shape RotateSphereSpace(const TopoDS_Shape& S,const Standard_Real Tol) ; -Standard_EXPORT static TopoDS_Shape FixRanges(const TopoDS_Shape& S,const Standard_Real Tol) ; - - - - + 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); + } + + Standard_EXPORT static TopoDS_Shape RotateSphereSpace(const TopoDS_Shape& S,const Standard_Real Tol); + Standard_EXPORT static TopoDS_Shape RefillProblemFaces(const TopoDS_Shape& S); + Standard_EXPORT static TopoDS_Shape FixRanges(const TopoDS_Shape& S,const Standard_Real Tol); protected: - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // +private: friend class BlockFix_SphereSpaceModifier; friend class BlockFix_UnionFaces; @@ -95,12 +76,6 @@ friend class BlockFix_CheckTool; }; - - - - // other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/GEOMAlgo/BlockFix.ixx b/src/GEOMAlgo/BlockFix.ixx index b1764fbb2..2ea228ff7 100644 --- a/src/GEOMAlgo/BlockFix.ixx +++ b/src/GEOMAlgo/BlockFix.ixx @@ -22,6 +22,6 @@ #include - + diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.cdl b/src/GEOMAlgo/BlockFix_BlockFixAPI.cdl index 0403538dc..8cb4c49ce 100644 --- a/src/GEOMAlgo/BlockFix_BlockFixAPI.cdl +++ b/src/GEOMAlgo/BlockFix_BlockFixAPI.cdl @@ -26,43 +26,43 @@ -- class BlockFixAPI from BlockFix inherits TShared from MMgt - ---Purpose: + ---Purpose: uses Shape from TopoDS, - ReShape from ShapeBuild + ReShape from ShapeBuild is Create returns BlockFixAPI from BlockFix; ---Purpose: Empty constructor - + SetShape(me: mutable; Shape: Shape from TopoDS); ---Purpose: Sets the shape to be operated on ---C++: inline Perform(me: mutable); - ---Purpose: - + ---Purpose: + Shape(me) returns Shape from TopoDS; ---Purpose: Returns resulting shape. ---C++: inline - + Context(me:mutable) returns ReShape from ShapeBuild; - ---Purpose: Returns modifiable context for storing the + ---Purpose: Returns modifiable context for storing the -- mofifications ---C++: inline ---C++: return & - + Tolerance (me:mutable) returns Real; ---Purpose: Returns modifiable tolerance of recognition ---C++: inline ---C++: return & fields - + myContext : ReShape from ShapeBuild; myShape : Shape from TopoDS; myTolerance : Real from Standard; - + end BlockFixAPI from BlockFix; diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.cxx b/src/GEOMAlgo/BlockFix_BlockFixAPI.cxx index 2aefa654e..3c82e4a84 100644 --- a/src/GEOMAlgo/BlockFix_BlockFixAPI.cxx +++ b/src/GEOMAlgo/BlockFix_BlockFixAPI.cxx @@ -18,16 +18,21 @@ // 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: BlockFix_BlockFixAPI.cxx // Created: Tue Dec 7 11:59:05 2004 // Author: Pavel DURANDIN -// + #include + #include #include #include + +#include + +#include + #include //======================================================================= @@ -52,12 +57,23 @@ void BlockFix_BlockFixAPI::Perform() TopoDS_Shape aShape = Shape(); myShape = BlockFix::RotateSphereSpace(aShape,myTolerance); + // try to approximate non-canonic surfaces + // with singularities on boundaries by filling + myShape = BlockFix::RefillProblemFaces(myShape); + // faces unification BlockFix_UnionFaces aFaceUnifier; aFaceUnifier.GetTolerance() = myTolerance; aFaceUnifier.GetOptimumNbFaces() = myOptimumNbFaces; TopoDS_Shape aResult = aFaceUnifier.Perform(myShape); + // avoid problem with degenerated edges appearance + // due to shape quality regress + ShapeUpgrade_RemoveLocations RemLoc; + RemLoc.Remove(aResult); + aResult = RemLoc.GetResult(); + + // edges unification BlockFix_UnionEdges anEdgeUnifier; myShape = anEdgeUnifier.Perform(aResult,myTolerance); diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.hxx b/src/GEOMAlgo/BlockFix_BlockFixAPI.hxx index e29a48c98..7be25cc57 100644 --- a/src/GEOMAlgo/BlockFix_BlockFixAPI.hxx +++ b/src/GEOMAlgo/BlockFix_BlockFixAPI.hxx @@ -50,21 +50,21 @@ class TopoDS_Shape; class BlockFix_BlockFixAPI : public MMgt_TShared { public: - void* operator new(size_t,void* anAddress) + void* operator new(size_t,void* anAddress) { return anAddress; } - void* operator new(size_t size) - { - return Standard::Allocate(size); + void* operator new(size_t size) + { + return Standard::Allocate(size); } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); } // Methods PUBLIC - // + // Standard_EXPORT BlockFix_BlockFixAPI(); void SetShape(const TopoDS_Shape& Shape); Standard_EXPORT void Perform(); @@ -80,7 +80,7 @@ public: Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; -private: +private: // Fields PRIVATE // Handle_ShapeBuild_ReShape myContext; diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.ixx b/src/GEOMAlgo/BlockFix_BlockFixAPI.ixx index 92d411ad5..4d06a875e 100644 --- a/src/GEOMAlgo/BlockFix_BlockFixAPI.ixx +++ b/src/GEOMAlgo/BlockFix_BlockFixAPI.ixx @@ -27,7 +27,7 @@ #endif BlockFix_BlockFixAPI::~BlockFix_BlockFixAPI() {} - + Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_() @@ -37,7 +37,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_() 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("BlockFix_BlockFixAPI", @@ -53,7 +53,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_() // DownCast method // allow safe downcasting // -const Handle(BlockFix_BlockFixAPI) Handle(BlockFix_BlockFixAPI)::DownCast(const Handle(Standard_Transient)& AnObject) +const Handle(BlockFix_BlockFixAPI) Handle(BlockFix_BlockFixAPI)::DownCast(const Handle(Standard_Transient)& AnObject) { Handle(BlockFix_BlockFixAPI) _anOtherObject; @@ -65,13 +65,13 @@ const Handle(BlockFix_BlockFixAPI) Handle(BlockFix_BlockFixAPI)::DownCast(const return _anOtherObject ; } -const Handle(Standard_Type)& BlockFix_BlockFixAPI::DynamicType() const -{ - return STANDARD_TYPE(BlockFix_BlockFixAPI) ; +const Handle(Standard_Type)& BlockFix_BlockFixAPI::DynamicType() const +{ + return STANDARD_TYPE(BlockFix_BlockFixAPI) ; } -Standard_Boolean BlockFix_BlockFixAPI::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(BlockFix_BlockFixAPI) == AType || MMgt_TShared::IsKind(AType)); +Standard_Boolean BlockFix_BlockFixAPI::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(BlockFix_BlockFixAPI) == AType || MMgt_TShared::IsKind(AType)); } Handle_BlockFix_BlockFixAPI::~Handle_BlockFix_BlockFixAPI() {} diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.lxx b/src/GEOMAlgo/BlockFix_BlockFixAPI.lxx index 1cbe8b2b4..5992e1794 100644 --- a/src/GEOMAlgo/BlockFix_BlockFixAPI.lxx +++ b/src/GEOMAlgo/BlockFix_BlockFixAPI.lxx @@ -24,7 +24,7 @@ //======================================================================= //function : SetShape -//purpose : +//purpose : //======================================================================= inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape) @@ -34,7 +34,7 @@ inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape) //======================================================================= //function : Shape -//purpose : +//purpose : //======================================================================= inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const @@ -44,7 +44,7 @@ inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const //======================================================================= //function : Context -//purpose : +//purpose : //======================================================================= inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context() @@ -54,7 +54,7 @@ inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context() //======================================================================= //function : Tolerance -//purpose : +//purpose : //======================================================================= inline Standard_Real& BlockFix_BlockFixAPI::Tolerance() @@ -64,7 +64,7 @@ inline Standard_Real& BlockFix_BlockFixAPI::Tolerance() //======================================================================= //function : OptimumNbFaces -//purpose : +//purpose : //======================================================================= inline Standard_Integer& BlockFix_BlockFixAPI::OptimumNbFaces() diff --git a/src/GEOMAlgo/BlockFix_CheckTool.cdl b/src/GEOMAlgo/BlockFix_CheckTool.cdl index dd6671e1f..c5423377f 100644 --- a/src/GEOMAlgo/BlockFix_CheckTool.cdl +++ b/src/GEOMAlgo/BlockFix_CheckTool.cdl @@ -27,7 +27,7 @@ class CheckTool from BlockFix ---Purpose: - + uses Shape from TopoDS, @@ -37,18 +37,18 @@ is Create returns CheckTool from BlockFix; ---Purpose: Empty constructor - + SetShape(me: in out; aShape: Shape from TopoDS); Perform(me: in out); - ---Purpose: - + ---Purpose: + NbPossibleBlocks(me) returns Integer; - + PossibleBlock(me; num: Integer) returns Shape from TopoDS; DumpCheckResult(me; S : in out OStream); - ---Purpose: Dumps results of checking + ---Purpose: Dumps results of checking fields @@ -63,5 +63,5 @@ fields myNbUE : Integer; myNbUFUE : Integer; myBadRanges : Integer; - + end CheckTool; diff --git a/src/GEOMAlgo/BlockFix_CheckTool.cxx b/src/GEOMAlgo/BlockFix_CheckTool.cxx index fb9b45c6a..674ef69dd 100644 --- a/src/GEOMAlgo/BlockFix_CheckTool.cxx +++ b/src/GEOMAlgo/BlockFix_CheckTool.cxx @@ -57,7 +57,7 @@ BlockFix_CheckTool::BlockFix_CheckTool( ) //======================================================================= //function : SetShape -//purpose : +//purpose : //======================================================================= void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape) @@ -70,10 +70,10 @@ void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape) //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= -void BlockFix_CheckTool::Perform() +void BlockFix_CheckTool::Perform() { myNbSolids=0; myNbBlocks=0; @@ -209,7 +209,7 @@ void BlockFix_CheckTool::Perform() } } - if (IsBlock) + if (IsBlock) myNbBlocks++; else { if (MayBeUF) { @@ -232,7 +232,7 @@ void BlockFix_CheckTool::Perform() //======================================================================= //function : NbPossibleBlocks -//purpose : +//purpose : //======================================================================= Standard_Integer BlockFix_CheckTool::NbPossibleBlocks() const @@ -243,13 +243,13 @@ Standard_Integer BlockFix_CheckTool::NbPossibleBlocks() const //======================================================================= //function : PossibleBlock -//purpose : +//purpose : //======================================================================= TopoDS_Shape BlockFix_CheckTool::PossibleBlock(const Standard_Integer num) const { TopoDS_Shape res; - if( num>0 && num<=myPossibleBlocks.Length() ) + if( num>0 && num<=myPossibleBlocks.Length() ) res = myPossibleBlocks.Value(num); return res; } @@ -257,7 +257,7 @@ TopoDS_Shape BlockFix_CheckTool::PossibleBlock(const Standard_Integer num) const //======================================================================= //function : DumpCheckResult -//purpose : +//purpose : //======================================================================= void BlockFix_CheckTool::DumpCheckResult(Standard_OStream& S) const diff --git a/src/GEOMAlgo/BlockFix_CheckTool.hxx b/src/GEOMAlgo/BlockFix_CheckTool.hxx index b72150690..652319e42 100644 --- a/src/GEOMAlgo/BlockFix_CheckTool.hxx +++ b/src/GEOMAlgo/BlockFix_CheckTool.hxx @@ -52,20 +52,20 @@ class BlockFix_CheckTool { public: - void* operator new(size_t,void* anAddress) + void* operator new(size_t,void* anAddress) { return anAddress; } - void* operator new(size_t size) - { - return Standard::Allocate(size); + void* operator new(size_t size) + { + return Standard::Allocate(size); } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); } // Methods PUBLIC - // + // Standard_EXPORT BlockFix_CheckTool(); Standard_EXPORT void SetShape(const TopoDS_Shape& aShape) ; Standard_EXPORT void Perform() ; @@ -80,17 +80,17 @@ Standard_EXPORT void DumpCheckResult(Standard_OStream& S) const; protected: // Methods PROTECTED - // + // // Fields PROTECTED // -private: +private: // Methods PRIVATE - // + // // Fields PRIVATE diff --git a/src/GEOMAlgo/BlockFix_CheckTool.ixx b/src/GEOMAlgo/BlockFix_CheckTool.ixx index 7a65aa831..d44f98056 100644 --- a/src/GEOMAlgo/BlockFix_CheckTool.ixx +++ b/src/GEOMAlgo/BlockFix_CheckTool.ixx @@ -22,6 +22,6 @@ #include - + diff --git a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cdl b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cdl index 998b04d10..374af919c 100644 --- a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cdl +++ b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cdl @@ -24,12 +24,12 @@ -- Created: Wed Dec 15 10:03:50 2004 -- Author: Sergey KUUL -- -class PeriodicSurfaceModifier from BlockFix inherits Modification from BRepTools +class PeriodicSurfaceModifier from BlockFix inherits Modification from BRepTools - ---Purpose: + ---Purpose: uses - Vertex from TopoDS, + Vertex from TopoDS, Edge from TopoDS, Face from TopoDS, Location from TopLoc, @@ -42,9 +42,9 @@ uses DataMapOfShapeInteger from TopTools is - + Create returns mutable PeriodicSurfaceModifier from BlockFix; - + SetTolerance(me: mutable; Toler: Real); ---Purpose: Sets the tolerance for recognition of geometry @@ -61,7 +61,7 @@ is -- the new tolerance. Otherwise, returns -- Standard_False, and , , are not -- significant. - + NewCurve(me: mutable; E : Edge from TopoDS; C : out Curve from Geom; L : out Location from TopLoc; @@ -95,10 +95,10 @@ is -- curve on surface on the face .In this case, -- is the new geometric support of the edge, the -- new location, the new tolerance. - -- + -- -- Otherwise, returns Standard_False, and , , -- are not significant. - -- + -- -- is the new edge created from . -- is the new face created from . They may be usefull. @@ -120,14 +120,14 @@ is returns Shape from GeomAbs; ---Purpose: Returns the continuity of between -- and . - -- + -- -- is the new edge created from . -- (resp. ) is the new face created from -- (resp. ). - -fields - + +fields + myTolerance : Real; myMapOfFaces : DataMapOfShapeInteger from TopTools; myMapOfSurfaces: IndexedMapOfTransient from TColStd; diff --git a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cxx b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cxx index fa599739c..1e9f33ca0 100644 --- a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cxx +++ b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cxx @@ -49,7 +49,7 @@ BlockFix_PeriodicSurfaceModifier::BlockFix_PeriodicSurfaceModifier ( ) //======================================================================= //function : SetTolerance -//purpose : +//purpose : //======================================================================= void BlockFix_PeriodicSurfaceModifier::SetTolerance(const Standard_Real Tol) @@ -70,7 +70,7 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace, Handle(Geom_Surface) S = aSurface; if(S->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) { - Handle(Geom_CylindricalSurface) aCyl = + Handle(Geom_CylindricalSurface) aCyl = Handle(Geom_CylindricalSurface)::DownCast(S); Standard_Real Umin, Umax, Vmin, Vmax; BRepTools::UVBounds(aFace, Umin, Umax, Vmin, Vmax); @@ -84,7 +84,7 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace, return Standard_True; } } - + if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) { Handle(Geom_SphericalSurface) aSphere = Handle(Geom_SphericalSurface)::DownCast(S); Standard_Real Umin, Umax, Vmin, Vmax; @@ -101,30 +101,30 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace, return Standard_False; } - + //======================================================================= //function : NewSurface -//purpose : +//purpose : //======================================================================= Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewSurface(const TopoDS_Face& F, Handle(Geom_Surface)& S, TopLoc_Location& L,Standard_Real& Tol, Standard_Boolean& RevWires, - Standard_Boolean& RevFace) + Standard_Boolean& RevFace) { TopLoc_Location LS; Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS); - + if(ModifySurface(F, SIni, S)) { - + RevWires = Standard_False; RevFace = Standard_False; - + L = LS; Tol = BRep_Tool::Tolerance(F); - + Standard_Integer anIndex = myMapOfSurfaces.Add(S); myMapOfFaces.Bind(F,anIndex); return Standard_True; @@ -136,13 +136,13 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewSurface(const TopoDS_Face& //======================================================================= //function : NewCurve -//purpose : +//purpose : //======================================================================= Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve(const TopoDS_Edge& /*E*/, Handle(Geom_Curve)& /*C*/, TopLoc_Location& /*L*/, - Standard_Real& /*Tol*/) + Standard_Real& /*Tol*/) { return Standard_False; } @@ -150,12 +150,12 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve(const TopoDS_Edge& / //======================================================================= //function : NewPoint -//purpose : +//purpose : //======================================================================= Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewPoint(const TopoDS_Vertex& /*V*/, gp_Pnt& /*P*/, - Standard_Real& /*Tol*/) + Standard_Real& /*Tol*/) { return Standard_False; } @@ -163,7 +163,7 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewPoint(const TopoDS_Vertex& //======================================================================= //function : NewCurve2d -//purpose : +//purpose : //======================================================================= Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge& E, @@ -171,47 +171,47 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge& const TopoDS_Edge& /*NewE*/, const TopoDS_Face& /*NewF*/, Handle(Geom2d_Curve)& C, - Standard_Real& Tol) + Standard_Real& Tol) { //check if undelying surface of the face was modified if(myMapOfFaces.IsBound(F)) { Standard_Integer anIndex = myMapOfFaces.Find(F); - + Handle(Geom_Surface) aNewSurf = Handle(Geom_Surface)::DownCast(myMapOfSurfaces.FindKey(anIndex)); - + Standard_Real f,l; TopLoc_Location LC, LS; Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l ); Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS); - + //taking into accound the orientation of the seam C = BRep_Tool::CurveOnSurface(E,F,f,l); Tol = BRep_Tool::Tolerance(E); - + BRep_Builder B; TopoDS_Edge TempE; B.MakeEdge(TempE); B.Add(TempE, TopExp::FirstVertex(E)); B.Add(TempE, TopExp::LastVertex(E)); - if(!C3d.IsNull()) + if(!C3d.IsNull()) B.UpdateEdge(TempE, Handle(Geom_Curve)::DownCast(C3d->Transformed(LC.Transformation())), Precision::Confusion()); B.Range(TempE, f, l); - + Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge; Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSurf->Transformed(LS.Transformation())); TopLoc_Location LTemp; LTemp.Identity(); - + Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F); Standard_Real aWorkTol = 2*myTolerance+Tol; sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol)); sfe->FixSameParameter(TempE); - + //keep the orientation of original edge TempE.Orientation(E.Orientation()); C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l); - + //surface was modified return Standard_True; } @@ -222,13 +222,13 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge& //======================================================================= //function : NewParameter -//purpose : +//purpose : //======================================================================= Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewParameter(const TopoDS_Vertex& /*V*/, const TopoDS_Edge& /*E*/, Standard_Real& /*P*/, - Standard_Real& /*Tol*/) + Standard_Real& /*Tol*/) { return Standard_False; } @@ -236,7 +236,7 @@ Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewParameter(const TopoDS_Ver //======================================================================= //function : Continuity -//purpose : +//purpose : //======================================================================= GeomAbs_Shape BlockFix_PeriodicSurfaceModifier::Continuity(const TopoDS_Edge& E, @@ -244,7 +244,7 @@ GeomAbs_Shape BlockFix_PeriodicSurfaceModifier::Continuity(const TopoDS_Edge& E, const TopoDS_Face& F2, const TopoDS_Edge& /*NewE*/, const TopoDS_Face& /*NewF1*/, - const TopoDS_Face& /*NewF2*/) + const TopoDS_Face& /*NewF2*/) { return BRep_Tool::Continuity(E,F1,F2); } diff --git a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx index 0185514f4..39d2062ea 100644 --- a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx +++ b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx @@ -71,20 +71,20 @@ class BlockFix_PeriodicSurfaceModifier : public BRepTools_Modification { public: - void* operator new(size_t,void* anAddress) + void* operator new(size_t,void* anAddress) { return anAddress; } - void* operator new(size_t size) - { - return Standard::Allocate(size); + void* operator new(size_t size) + { + return Standard::Allocate(size); } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); } // Methods PUBLIC - // + // Standard_EXPORT BlockFix_PeriodicSurfaceModifier(); Standard_EXPORT void SetTolerance(const Standard_Real Toler) ; Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ; @@ -107,17 +107,17 @@ Standard_EXPORT ~BlockFix_PeriodicSurfaceModifier(); protected: // Methods PROTECTED - // + // // Fields PROTECTED // -private: +private: // Methods PRIVATE - // + // // Fields PRIVATE diff --git a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx index 84ec7526b..da3bdc95e 100644 --- a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx +++ b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx @@ -27,7 +27,7 @@ #endif BlockFix_PeriodicSurfaceModifier::~BlockFix_PeriodicSurfaceModifier() {} - + Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_() @@ -39,7 +39,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_() 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("BlockFix_PeriodicSurfaceModifier", @@ -55,7 +55,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_() // DownCast method // allow safe downcasting // -const Handle(BlockFix_PeriodicSurfaceModifier) Handle(BlockFix_PeriodicSurfaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject) +const Handle(BlockFix_PeriodicSurfaceModifier) Handle(BlockFix_PeriodicSurfaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject) { Handle(BlockFix_PeriodicSurfaceModifier) _anOtherObject; @@ -67,13 +67,13 @@ const Handle(BlockFix_PeriodicSurfaceModifier) Handle(BlockFix_PeriodicSurfaceMo return _anOtherObject ; } -const Handle(Standard_Type)& BlockFix_PeriodicSurfaceModifier::DynamicType() const -{ - return STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) ; +const Handle(Standard_Type)& BlockFix_PeriodicSurfaceModifier::DynamicType() const +{ + return STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) ; } -Standard_Boolean BlockFix_PeriodicSurfaceModifier::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) == AType || BRepTools_Modification::IsKind(AType)); +Standard_Boolean BlockFix_PeriodicSurfaceModifier::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) == AType || BRepTools_Modification::IsKind(AType)); } Handle_BlockFix_PeriodicSurfaceModifier::~Handle_BlockFix_PeriodicSurfaceModifier() {} diff --git a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cdl b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cdl index d6cf9b7cc..da614611b 100644 --- a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cdl +++ b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cdl @@ -24,13 +24,13 @@ -- Created: Tue Dec 7 12:01:49 2004 -- Author: Pavel Durandin -- -class SphereSpaceModifier from BlockFix inherits Modification from BRepTools +class SphereSpaceModifier from BlockFix inherits Modification from BRepTools ---Purpose: Rotation of the parametric space of the sphere in order -- to avoid the seam and degenerared edge within it uses - Vertex from TopoDS, + Vertex from TopoDS, Edge from TopoDS, Face from TopoDS, Location from TopLoc, @@ -43,9 +43,9 @@ uses DataMapOfShapeInteger from TopTools is - + Create returns mutable SphereSpaceModifier from BlockFix; - + SetTolerance(me: mutable; Toler: Real); ---Purpose: Sets the tolerance for recognition of geometry @@ -62,7 +62,7 @@ is -- the new tolerance. Otherwise, returns -- Standard_False, and , , are not -- significant. - + NewCurve(me: mutable; E : Edge from TopoDS; C : out Curve from Geom; L : out Location from TopLoc; @@ -96,10 +96,10 @@ is -- curve on surface on the face .In this case, -- is the new geometric support of the edge, the -- new location, the new tolerance. - -- + -- -- Otherwise, returns Standard_False, and , , -- are not significant. - -- + -- -- is the new edge created from . -- is the new face created from . They may be usefull. @@ -121,15 +121,15 @@ is returns Shape from GeomAbs; ---Purpose: Returns the continuity of between -- and . - -- + -- -- is the new edge created from . -- (resp. ) is the new face created from -- (resp. ). - + ForRotation(me: mutable; F: Face from TopoDS) returns Boolean; - -fields - + +fields + myTolerance : Real; myMapOfFaces : DataMapOfShapeInteger from TopTools; myMapOfSpheres: IndexedMapOfTransient from TColStd; diff --git a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx index fd4c14986..9e2db755a 100644 --- a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx +++ b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx @@ -44,7 +44,7 @@ //======================================================================= //function : BlockFix_SphereSpaceModifier -//purpose : +//purpose : //======================================================================= BlockFix_SphereSpaceModifier::BlockFix_SphereSpaceModifier() @@ -55,7 +55,7 @@ BlockFix_SphereSpaceModifier::BlockFix_SphereSpaceModifier() //======================================================================= //function : SetTolerance -//purpose : +//purpose : //======================================================================= void BlockFix_SphereSpaceModifier::SetTolerance(const Standard_Real Tol) @@ -66,7 +66,7 @@ void BlockFix_SphereSpaceModifier::SetTolerance(const Standard_Real Tol) //======================================================================= //function : NewSurface -//purpose : +//purpose : //======================================================================= @@ -76,11 +76,11 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace, { Handle(Geom_Surface) S = aSurface; if(S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { - Handle(Geom_RectangularTrimmedSurface) RTS = + Handle(Geom_RectangularTrimmedSurface) RTS = Handle(Geom_RectangularTrimmedSurface)::DownCast(S); S = RTS->BasisSurface(); } - + if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) { Standard_Real Umin, Umax, Vmin, Vmax; ShapeAnalysis::GetFaceUVBounds(aFace,Umin, Umax, Vmin, Vmax); @@ -119,109 +119,109 @@ static Standard_Boolean ModifySurface(const TopoDS_Face& aFace, } return Standard_False; } - + Standard_Boolean BlockFix_SphereSpaceModifier::NewSurface(const TopoDS_Face& F, Handle(Geom_Surface)& S, TopLoc_Location& L,Standard_Real& Tol, Standard_Boolean& RevWires, - Standard_Boolean& RevFace) + Standard_Boolean& RevFace) { TopLoc_Location LS; Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS); - + //check if pole of the sphere in the parametric space if(ModifySurface(F, SIni, S)) { - + RevWires = Standard_False; RevFace = Standard_False; - + L = LS; Tol = BRep_Tool::Tolerance(F); - + Standard_Integer anIndex = myMapOfSpheres.Add(S); myMapOfFaces.Bind(F,anIndex); return Standard_True; } - + return Standard_False; } //======================================================================= //function : NewCurve -//purpose : +//purpose : //======================================================================= Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve(const TopoDS_Edge& /*E*/,Handle(Geom_Curve)& /*C*/, - TopLoc_Location& /*L*/,Standard_Real& /*Tol*/) + TopLoc_Location& /*L*/,Standard_Real& /*Tol*/) { return Standard_False; } //======================================================================= //function : NewPoint -//purpose : +//purpose : //======================================================================= Standard_Boolean BlockFix_SphereSpaceModifier::NewPoint(const TopoDS_Vertex& /*V*/, gp_Pnt& /*P*/, - Standard_Real& /*Tol*/) + Standard_Real& /*Tol*/) { return Standard_False; } //======================================================================= //function : NewCurve2d -//purpose : +//purpose : //======================================================================= Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F, const TopoDS_Edge& /*NewE*/,const TopoDS_Face& /*NewF*/, - Handle(Geom2d_Curve)& C,Standard_Real& Tol) + Handle(Geom2d_Curve)& C,Standard_Real& Tol) { //check if undelying surface of the face was modified if(myMapOfFaces.IsBound(F)) { Standard_Integer anIndex = myMapOfFaces.Find(F); - + Handle(Geom_Surface) aNewSphere = Handle(Geom_Surface)::DownCast(myMapOfSpheres.FindKey(anIndex)); - + Standard_Real f,l; TopLoc_Location LC, LS; Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l ); Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS); - + //taking into accound the orientation of the seam C = BRep_Tool::CurveOnSurface(E,F,f,l); Tol = BRep_Tool::Tolerance(E); - + BRep_Builder B; TopoDS_Edge TempE; B.MakeEdge(TempE); B.Add(TempE, TopExp::FirstVertex(E)); B.Add(TempE, TopExp::LastVertex(E)); - if(!C3d.IsNull()) + if(!C3d.IsNull()) B.UpdateEdge(TempE, Handle(Geom_Curve)::DownCast(C3d->Transformed(LC.Transformation())), Precision::Confusion()); B.Range(TempE, f, l); - + Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge; Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSphere->Transformed(LS.Transformation())); TopLoc_Location LTemp; LTemp.Identity(); - + Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F); Standard_Real aWorkTol = 2*myTolerance+Tol; sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol)); sfe->FixSameParameter(TempE); - + //keep the orientation of original edge TempE.Orientation(E.Orientation()); C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l); - + // shifting seam of sphere if(isClosed && !C.IsNull()) { Standard_Real f2,l2; - Handle(Geom2d_Curve) c22 = + Handle(Geom2d_Curve) c22 = BRep_Tool::CurveOnSurface(TopoDS::Edge(TempE.Reversed()),STemp, LTemp,f2,l2); Standard_Real dPreci = Precision::PConfusion()*Precision::PConfusion(); if((C->Value(f).SquareDistance(c22->Value(f2)) < dPreci) @@ -240,11 +240,11 @@ Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve2d(const TopoDS_Edge& E,c //======================================================================= //function : NewParameter -//purpose : +//purpose : //======================================================================= Standard_Boolean BlockFix_SphereSpaceModifier::NewParameter(const TopoDS_Vertex& /*V*/,const TopoDS_Edge& /*E*/, - Standard_Real& /*P*/,Standard_Real& /*Tol*/) + Standard_Real& /*P*/,Standard_Real& /*Tol*/) { return Standard_False; } @@ -252,12 +252,12 @@ Standard_Boolean BlockFix_SphereSpaceModifier::NewParameter(const TopoDS_Vertex& //======================================================================= //function : Continuity -//purpose : +//purpose : //======================================================================= GeomAbs_Shape BlockFix_SphereSpaceModifier::Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1, const TopoDS_Face& F2,const TopoDS_Edge& /*NewE*/, - const TopoDS_Face& /*NewF1*/,const TopoDS_Face& /*NewF2*/) + const TopoDS_Face& /*NewF1*/,const TopoDS_Face& /*NewF2*/) { return BRep_Tool::Continuity(E,F1,F2); } diff --git a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.hxx b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.hxx index b4c5f64a7..fb11fdbae 100644 --- a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.hxx +++ b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.hxx @@ -71,20 +71,20 @@ class BlockFix_SphereSpaceModifier : public BRepTools_Modification { public: - void* operator new(size_t,void* anAddress) + void* operator new(size_t,void* anAddress) { return anAddress; } - void* operator new(size_t size) - { - return Standard::Allocate(size); + void* operator new(size_t size) + { + return Standard::Allocate(size); } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); } // Methods PUBLIC - // + // Standard_EXPORT BlockFix_SphereSpaceModifier(); Standard_EXPORT void SetTolerance(const Standard_Real Toler) ; Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ; @@ -108,17 +108,17 @@ Standard_EXPORT ~BlockFix_SphereSpaceModifier(); protected: // Methods PROTECTED - // + // // Fields PROTECTED // -private: +private: // Methods PRIVATE - // + // // Fields PRIVATE diff --git a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.ixx b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.ixx index 78813f922..482241f6d 100644 --- a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.ixx +++ b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.ixx @@ -27,7 +27,7 @@ #endif BlockFix_SphereSpaceModifier::~BlockFix_SphereSpaceModifier() {} - + Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_() @@ -39,7 +39,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_() 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("BlockFix_SphereSpaceModifier", @@ -55,7 +55,7 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_() // DownCast method // allow safe downcasting // -const Handle(BlockFix_SphereSpaceModifier) Handle(BlockFix_SphereSpaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject) +const Handle(BlockFix_SphereSpaceModifier) Handle(BlockFix_SphereSpaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject) { Handle(BlockFix_SphereSpaceModifier) _anOtherObject; @@ -67,13 +67,13 @@ const Handle(BlockFix_SphereSpaceModifier) Handle(BlockFix_SphereSpaceModifier): return _anOtherObject ; } -const Handle(Standard_Type)& BlockFix_SphereSpaceModifier::DynamicType() const -{ - return STANDARD_TYPE(BlockFix_SphereSpaceModifier) ; +const Handle(Standard_Type)& BlockFix_SphereSpaceModifier::DynamicType() const +{ + return STANDARD_TYPE(BlockFix_SphereSpaceModifier) ; } -Standard_Boolean BlockFix_SphereSpaceModifier::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(BlockFix_SphereSpaceModifier) == AType || BRepTools_Modification::IsKind(AType)); +Standard_Boolean BlockFix_SphereSpaceModifier::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(BlockFix_SphereSpaceModifier) == AType || BRepTools_Modification::IsKind(AType)); } Handle_BlockFix_SphereSpaceModifier::~Handle_BlockFix_SphereSpaceModifier() {} diff --git a/src/GEOMAlgo/BlockFix_UnionEdges.cdl b/src/GEOMAlgo/BlockFix_UnionEdges.cdl index 60ba8fef0..05a9f3870 100644 --- a/src/GEOMAlgo/BlockFix_UnionEdges.cdl +++ b/src/GEOMAlgo/BlockFix_UnionEdges.cdl @@ -26,24 +26,24 @@ -- class UnionEdges from BlockFix - ---Purpose: - + ---Purpose: + uses - + Shape from TopoDS, ReShape from ShapeBuild is Create returns UnionEdges from BlockFix; - + Perform(me: in out; Shape: Shape from TopoDS; Tol : Real) - returns Shape from TopoDS; - + returns Shape from TopoDS; + fields myTolerance : Real; myContext : ReShape from ShapeBuild; - + end UnionEdges; diff --git a/src/GEOMAlgo/BlockFix_UnionEdges.cxx b/src/GEOMAlgo/BlockFix_UnionEdges.cxx index f5be58454..95a1a713e 100644 --- a/src/GEOMAlgo/BlockFix_UnionEdges.cxx +++ b/src/GEOMAlgo/BlockFix_UnionEdges.cxx @@ -18,7 +18,6 @@ // 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: BlockFix_UnionEdges.cxx // Created: 07.12.04 15:27:30 @@ -26,30 +25,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 #include + #include #include #include #include #include #include + #include #include #include @@ -58,17 +58,206 @@ #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 "utilities.h" //======================================================================= //function : BlockFix_UnionEdges() //purpose : Constructor //======================================================================= - BlockFix_UnionEdges::BlockFix_UnionEdges ( ) { } +//======================================================================= +//function : GlueEdgesWithPCurves +//purpose : Glues the pcurves of the sequence of edges +// and glues their 3d curves +//======================================================================= +static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain, + const TopoDS_Vertex& FirstVertex, + const TopoDS_Vertex& LastVertex) +{ + Standard_Integer i, j; + + TopoDS_Edge FirstEdge = TopoDS::Edge(aChain(1)); + //TColGeom2d_SequenceOfCurve PCurveSeq; + TColGeom_SequenceOfSurface SurfSeq; + //TopTools_SequenceOfShape LocSeq; + + BRep_ListIteratorOfListOfCurveRepresentation itr( (Handle(BRep_TEdge)::DownCast(FirstEdge.TShape()))->Curves() ); + for (; itr.More(); itr.Next()) + { + Handle(BRep_CurveRepresentation) CurveRep = itr.Value(); + if (CurveRep->IsCurveOnSurface()) + { + //PCurveSeq.Append(CurveRep->PCurve()); + SurfSeq.Append(CurveRep->Surface()); + /* + TopoDS_Shape aLocShape; + aLocShape.Location(CurveRep->Location()); + LocSeq.Append(aLocShape); + */ + } + } + + Standard_Real fpar, lpar; + BRep_Tool::Range(FirstEdge, fpar, lpar); + TopoDS_Edge PrevEdge = FirstEdge; + TopoDS_Vertex CV; + Standard_Real MaxTol = 0.; + + TopoDS_Edge ResEdge; + BRep_Builder BB; + + Standard_Integer nb_curve = aChain.Length(); //number of curves + TColGeom_Array1OfBSplineCurve tab_c3d(0,nb_curve-1); //array of the curves + TColStd_Array1OfReal tabtolvertex(0,nb_curve-1); //(0,nb_curve-2); //array of the tolerances + + TopoDS_Vertex PrevVertex = FirstVertex; + for (i = 1; i <= nb_curve; i++) + { + TopoDS_Edge anEdge = TopoDS::Edge(aChain(i)); + TopoDS_Vertex VF, VL; + TopExp::Vertices(anEdge, VF, VL); + Standard_Boolean ToReverse = (!VF.IsSame(PrevVertex)); + + Standard_Real Tol1 = BRep_Tool::Tolerance(VF); + Standard_Real Tol2 = BRep_Tool::Tolerance(VL); + if (Tol1 > MaxTol) + MaxTol = Tol1; + if (Tol2 > MaxTol) + MaxTol = Tol2; + + if (i > 1) + { + TopExp::CommonVertex(PrevEdge, anEdge, CV); + Standard_Real Tol = BRep_Tool::Tolerance(CV); + tabtolvertex(i-2) = Tol; + } + + Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar); + Handle(Geom_TrimmedCurve) aTrCurve = new Geom_TrimmedCurve(aCurve, fpar, lpar); + tab_c3d(i-1) = GeomConvert::CurveToBSplineCurve(aTrCurve); + GeomConvert::C0BSplineToC1BSplineCurve(tab_c3d(i-1), Precision::Confusion()); + if (ToReverse) + tab_c3d(i-1)->Reverse(); + PrevVertex = (ToReverse)? VF : VL; + PrevEdge = anEdge; + } + Handle(TColGeom_HArray1OfBSplineCurve) concatcurve; //array of the concatenated curves + Handle(TColStd_HArray1OfInteger) ArrayOfIndices; //array of the remining Vertex + GeomConvert::ConcatC1(tab_c3d, + tabtolvertex, + ArrayOfIndices, + concatcurve, + Standard_False, + Precision::Confusion()); //C1 concatenation + + if (concatcurve->Length() > 1) + { + GeomConvert_CompCurveToBSplineCurve Concat(concatcurve->Value(concatcurve->Lower())); + + for (i = concatcurve->Lower()+1; i <= concatcurve->Upper(); i++) + Concat.Add( concatcurve->Value(i), MaxTol, Standard_True ); + + concatcurve->SetValue(concatcurve->Lower(), Concat.BSplineCurve()); + } + Handle(Geom_BSplineCurve) ResCurve = concatcurve->Value(concatcurve->Lower()); + + TColGeom2d_SequenceOfBoundedCurve ResPCurves; + TopLoc_Location aLoc; + for (j = 1; j <= SurfSeq.Length(); j++) + { + TColGeom2d_Array1OfBSplineCurve tab_c2d(0,nb_curve-1); //array of the pcurves + + PrevVertex = FirstVertex; + PrevEdge = FirstEdge; + //TopLoc_Location theLoc = LocSeq(j).Location(); + for (i = 1; i <= nb_curve; i++) + { + TopoDS_Edge anEdge = TopoDS::Edge(aChain(i)); + TopoDS_Vertex VF, VL; + TopExp::Vertices(anEdge, VF, VL); + Standard_Boolean ToReverse = (!VF.IsSame(PrevVertex)); + + /* + Handle(Geom2d_Curve) aPCurve = + BRep_Tool::CurveOnSurface(anEdge, SurfSeq(j), anEdge.Location()*theLoc, fpar, lpar); + */ + Handle(Geom2d_Curve) aPCurve = + BRep_Tool::CurveOnSurface(anEdge, SurfSeq(j), aLoc, fpar, lpar); + Handle(Geom2d_TrimmedCurve) aTrPCurve = new Geom2d_TrimmedCurve(aPCurve, fpar, lpar); + tab_c2d(i-1) = Geom2dConvert::CurveToBSplineCurve(aTrPCurve); + Geom2dConvert::C0BSplineToC1BSplineCurve(tab_c2d(i-1), Precision::Confusion()); + if (ToReverse) + tab_c2d(i-1)->Reverse(); + PrevVertex = (ToReverse)? VF : VL; + PrevEdge = anEdge; + } + Handle(TColGeom2d_HArray1OfBSplineCurve) concatc2d; //array of the concatenated curves + Handle(TColStd_HArray1OfInteger) ArrayOfInd2d; //array of the remining Vertex + Geom2dConvert::ConcatC1(tab_c2d, + tabtolvertex, + ArrayOfInd2d, + concatc2d, + Standard_False, + Precision::Confusion()); //C1 concatenation + + if (concatc2d->Length() > 1) + { + Geom2dConvert_CompCurveToBSplineCurve Concat2d(concatc2d->Value(concatc2d->Lower())); + + for (i = concatc2d->Lower()+1; i <= concatc2d->Upper(); i++) + Concat2d.Add( concatc2d->Value(i), MaxTol, Standard_True ); + + concatc2d->SetValue(concatc2d->Lower(), Concat2d.BSplineCurve()); + } + Handle(Geom2d_BSplineCurve) aResPCurve = concatc2d->Value(concatc2d->Lower()); + ResPCurves.Append(aResPCurve); + } + + ResEdge = BRepLib_MakeEdge(ResCurve, + FirstVertex, LastVertex, + ResCurve->FirstParameter(), ResCurve->LastParameter()); + BB.SameRange(ResEdge, Standard_False); + BB.SameParameter(ResEdge, Standard_False); + for (j = 1; j <= ResPCurves.Length(); j++) + { + BB.UpdateEdge(ResEdge, ResPCurves(j), SurfSeq(j), aLoc, MaxTol); + BB.Range(ResEdge, SurfSeq(j), aLoc, ResPCurves(j)->FirstParameter(), ResPCurves(j)->LastParameter()); + } + + BRepLib::SameParameter(ResEdge, MaxTol, Standard_True); + + return ResEdge; +} //======================================================================= //function : MergeEdges @@ -142,9 +331,9 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges, Handle(Geom_Line) L2 = Handle(Geom_Line)::DownCast(c3d2); gp_Dir Dir1 = L1->Position().Direction(); gp_Dir Dir2 = L2->Position().Direction(); - //if(!Dir1.IsEqual(Dir2,Precision::Angular())) { - //if(!Dir1.IsParallel(Dir2,Precision::Angular())) { - if(!Dir1.IsParallel(Dir2,Tol)) { + //if(!Dir1.IsEqual(Dir2,Precision::Angular())) { + //if(!Dir1.IsParallel(Dir2,Precision::Angular())) { + if(!Dir1.IsParallel(Dir2,Tol)) { continue; } // can union lines => create new edge @@ -252,6 +441,8 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges, } if(NeedUnion) { MESSAGE ("can not make analitical union => make approximation"); + TopoDS_Edge E = GlueEdgesWithPCurves(aChain, VF, VL); + /* TopoDS_Wire W; B.MakeWire(W); for(j=1; j<=aChain.Length(); j++) { @@ -265,6 +456,7 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges, B.MakeEdge (E,bc,Precision::Confusion()); B.Add (E,VF); B.Add (E,VL); + */ aChain.SetValue(1,E); } else { @@ -277,12 +469,10 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges, return Standard_True; } - //======================================================================= //function : Perform //purpose : //======================================================================= - TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape, const Standard_Real Tol) { diff --git a/src/GEOMAlgo/BlockFix_UnionEdges.hxx b/src/GEOMAlgo/BlockFix_UnionEdges.hxx index eb1a4c8e5..b38e941fb 100644 --- a/src/GEOMAlgo/BlockFix_UnionEdges.hxx +++ b/src/GEOMAlgo/BlockFix_UnionEdges.hxx @@ -44,20 +44,20 @@ class BlockFix_UnionEdges { public: - void* operator new(size_t,void* anAddress) + void* operator new(size_t,void* anAddress) { return anAddress; } - void* operator new(size_t size) - { - return Standard::Allocate(size); + void* operator new(size_t size) + { + return Standard::Allocate(size); } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); } // Methods PUBLIC - // + // Standard_EXPORT BlockFix_UnionEdges(); Standard_EXPORT TopoDS_Shape Perform(const TopoDS_Shape& Shape,const Standard_Real Tol) ; @@ -68,17 +68,17 @@ Standard_EXPORT TopoDS_Shape Perform(const TopoDS_Shape& Shape,const Standard_ protected: // Methods PROTECTED - // + // // Fields PROTECTED // -private: +private: // Methods PRIVATE - // + // // Fields PRIVATE diff --git a/src/GEOMAlgo/BlockFix_UnionEdges.ixx b/src/GEOMAlgo/BlockFix_UnionEdges.ixx index 0c2b1edd5..27e87ac6c 100644 --- a/src/GEOMAlgo/BlockFix_UnionEdges.ixx +++ b/src/GEOMAlgo/BlockFix_UnionEdges.ixx @@ -22,6 +22,6 @@ #include - + diff --git a/src/GEOMAlgo/BlockFix_UnionFaces.cdl b/src/GEOMAlgo/BlockFix_UnionFaces.cdl index 0656115fd..371cb25ea 100644 --- a/src/GEOMAlgo/BlockFix_UnionFaces.cdl +++ b/src/GEOMAlgo/BlockFix_UnionFaces.cdl @@ -35,31 +35,31 @@ is Create returns UnionFaces from BlockFix; ---Purpose: Empty constructor - + GetTolerance(me: in out) returns Real; ---Purpose: Returns modifiable tolerance - ---C++: return& - + ---C++: return& + Perform (me: in out; Shape: Shape from TopoDS) returns Shape from TopoDS; ---Purpose: Performs the unification of the fsces -- whith the same geometry - + IsSameDomain(me; aFace : Face from TopoDS; aChekedFace: Face from TopoDS) returns Boolean is virtual; ---Purpose: Returns true is surfaces have same geometrically domain -- with given tolerance - + MovePCurves(me; aTarget: in out Face from TopoDS; aSource: Face from TopoDS) is virtual; - ---Purpose: Creates pcurves on aTarget face for each edge from + ---Purpose: Creates pcurves on aTarget face for each edge from -- aSource one. fields myTolerance: Real; - + end; - + diff --git a/src/GEOMAlgo/BlockFix_UnionFaces.hxx b/src/GEOMAlgo/BlockFix_UnionFaces.hxx index efdc67bbd..f676d5bcf 100644 --- a/src/GEOMAlgo/BlockFix_UnionFaces.hxx +++ b/src/GEOMAlgo/BlockFix_UnionFaces.hxx @@ -42,21 +42,21 @@ class TopoDS_Face; class BlockFix_UnionFaces { public: - void* operator new(size_t,void* anAddress) + void* operator new(size_t,void* anAddress) { return anAddress; } - void* operator new(size_t size) - { - return Standard::Allocate(size); + void* operator new(size_t size) + { + return Standard::Allocate(size); } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); } // Methods PUBLIC - // + // Standard_EXPORT BlockFix_UnionFaces(); Standard_EXPORT Standard_Real& GetTolerance(); @@ -80,7 +80,7 @@ public: Standard_EXPORT virtual void MovePCurves(TopoDS_Face& aTarget, const TopoDS_Face& aSource) const; -private: +private: // Fields PRIVATE // Standard_Real myTolerance; diff --git a/src/GEOMAlgo/BlockFix_UnionFaces.ixx b/src/GEOMAlgo/BlockFix_UnionFaces.ixx index 6f376af7b..c5299ca40 100644 --- a/src/GEOMAlgo/BlockFix_UnionFaces.ixx +++ b/src/GEOMAlgo/BlockFix_UnionFaces.ixx @@ -22,6 +22,6 @@ #include - + diff --git a/src/GEOMAlgo_NEW/FILES b/src/GEOMAlgo/FILES similarity index 100% rename from src/GEOMAlgo_NEW/FILES rename to src/GEOMAlgo/FILES diff --git a/src/GEOMAlgo/GEOMAlgo.cdl b/src/GEOMAlgo/GEOMAlgo.cdl index 28f2a1d09..d2fbf9770 100755 --- a/src/GEOMAlgo/GEOMAlgo.cdl +++ b/src/GEOMAlgo/GEOMAlgo.cdl @@ -23,241 +23,320 @@ -- Created: Sat Dec 04 12:36:22 2004 -- Author: Peter KURNEV -package GEOMAlgo +package GEOMAlgo - ---Purpose: + ---Purpose: -uses - TCollection, - - TColgp, - Geom, - Bnd, - gp, +uses + TCollection, + + TColgp, + Geom, + Bnd, + gp, GeomAdaptor, TopAbs, - TopoDS, - TopTools, - IntTools, - BOPTools, - BOP, - - TColStd, - BOPTColStd, - BRepAlgo, - NMTDS, - NMTTools - -is + TopoDS, + TopTools, + IntTools, + BOPTools, + BOP, + + TColStd, + BOPTColStd, + BRepAlgo, + NMTDS, + NMTTools + +is + -- Enumerations + imported State from GEOMAlgo; + imported KindOfShape from GEOMAlgo; + imported KindOfName from GEOMAlgo; + imported KindOfBounds from GEOMAlgo; + imported KindOfClosed from GEOMAlgo; + -- + -- Gluer / GetInPlace + imported Gluer2 from GEOMAlgo; + imported GlueDetector from GEOMAlgo; + imported GluerAlgo from GEOMAlgo; + imported GetInPlace from GEOMAlgo; + -- Algos + imported WireSplitter from GEOMAlgo; + imported WESScaler from GEOMAlgo; + imported WESCorrector from GEOMAlgo; + imported WireEdgeSet from GEOMAlgo; + imported GlueAnalyser from GEOMAlgo; + imported Gluer from GEOMAlgo; + imported FinderShapeOn2 from GEOMAlgo; + imported FinderShapeOn1 from GEOMAlgo; + imported FinderShapeOn from GEOMAlgo; + imported ShapeAlgo from GEOMAlgo; + imported SolidSolid from GEOMAlgo; + imported ShellSolid from GEOMAlgo; + imported VertexSolid from GEOMAlgo; + imported WireSolid from GEOMAlgo; + imported ShapeSolid from GEOMAlgo; + imported Splitter from GEOMAlgo; + imported Builder from GEOMAlgo; + imported BuilderShape from GEOMAlgo; + imported BuilderSolid from GEOMAlgo; + imported BuilderFace from GEOMAlgo; + imported BuilderArea from GEOMAlgo; + imported ShapeInfoFiller from GEOMAlgo; + imported Algo from GEOMAlgo; + -- Data / Tools + imported ShapeSet from GEOMAlgo; + imported SurfaceTools from GEOMAlgo; + imported ShapeInfo from GEOMAlgo; + imported CoupleOfShapes from GEOMAlgo; + imported BuilderTools from GEOMAlgo; + imported Tools3D from GEOMAlgo; + imported Tools from GEOMAlgo; + imported PWireEdgeSet from GEOMAlgo; + imported StateCollector from GEOMAlgo; + imported PassKey from GEOMAlgo; + imported PassKeyMapHasher from GEOMAlgo; + imported PassKeyShape from GEOMAlgo; + imported PassKeyShapeMapHasher from GEOMAlgo; + imported ClsfBox from GEOMAlgo; + imported ClsfSurf from GEOMAlgo; + imported ClsfSolid from GEOMAlgo; + imported Clsf from GEOMAlgo; + imported HAlgo from GEOMAlgo; + + imported ListOfCoupleOfShapes from GEOMAlgo; + imported ListIteratorOfListOfCoupleOfShapes from GEOMAlgo; + imported ListOfPnt from GEOMAlgo; + imported ListIteratorOfListOfPnt from GEOMAlgo; + imported DataMapOfShapeShapeSet from GEOMAlgo; + imported DataMapIteratorOfDataMapOfShapeShapeSet from GEOMAlgo; + imported DataMapOfShapeReal from GEOMAlgo; + imported DataMapIteratorOfDataMapOfShapeReal from GEOMAlgo; + imported DataMapOfRealListOfShape from GEOMAlgo; + imported DataMapIteratorOfDataMapOfRealListOfShape from GEOMAlgo; + imported DataMapOfPassKeyInteger from GEOMAlgo; + imported DataMapIteratorOfDataMapOfPassKeyInteger from GEOMAlgo; + imported DataMapOfPassKeyShapeShape from GEOMAlgo; + imported DataMapIteratorOfDataMapOfPassKeyShapeShape from GEOMAlgo; + imported DataMapOfOrientedShapeShape from GEOMAlgo; + imported DataMapIteratorOfDataMapOfOrientedShapeShape from GEOMAlgo; + imported DataMapOfShapeMapOfShape from GEOMAlgo; + imported DataMapIteratorOfDataMapOfShapeMapOfShape from GEOMAlgo; + imported DataMapOfShapePnt from GEOMAlgo; + imported DataMapIteratorOfDataMapOfShapePnt from GEOMAlgo; + imported IndexedDataMapOfShapeBox from GEOMAlgo; + imported IndexedDataMapOfShapeShapeInfo from GEOMAlgo; + imported IndexedDataMapOfShapeState from GEOMAlgo; + imported IndexedDataMapOfIntegerShape from GEOMAlgo; + imported IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo; + + + -- Instantiations + + --class ListOfCoupleOfShapes + -- instantiates List from TCollection (CoupleOfShapes from GEOMAlgo); + + --class ListOfPnt + -- instantiates List from TCollection (Pnt from gp); + -- + + --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); + + + --class DataMapOfPassKeyInteger + -- instantiates DataMap from TCollection (PassKey from GEOMAlgo, + -- Integer from Standard, + -- PassKeyMapHasher from GEOMAlgo); + + --class DataMapOfPassKeyShapeShape + -- instantiates DataMap from TCollection (PassKeyShape from GEOMAlgo, + -- Shape from TopoDS, + -- PassKeyShapeMapHasher from GEOMAlgo); + + --class DataMapOfOrientedShapeShape instantiates + -- DataMap from TCollection (Shape from TopoDS, + -- Shape from TopoDS, + -- OrientedShapeMapHasher from TopTools); + + + --class DataMapOfShapeMapOfShape instantiates + -- DataMap from TCollection (Shape from TopoDS, + -- MapOfShape from TopTools, + -- ShapeMapHasher from TopTools); + + --class DataMapOfShapePnt instantiates + -- DataMap from TCollection (Shape from TopoDS, + -- Pnt from gp, + -- ShapeMapHasher from TopTools); + + -- + --class IndexedDataMapOfShapeBox + -- instantiates IndexedDataMap from TCollection (Shape from TopoDS, +-- Box from Bnd, +-- ShapeMapHasher from TopTools); + +-- class IndexedDataMapOfShapeShapeInfo +-- instantiates IndexedDataMap from TCollection (Shape from TopoDS, +-- ShapeInfo from GEOMAlgo, +-- ShapeMapHasher from TopTools); +-- class IndexedDataMapOfShapeState +-- instantiates IndexedDataMap from TCollection (Shape from TopoDS, +-- State from TopAbs, +-- ShapeMapHasher from TopTools); + + +-- +-- class IndexedDataMapOfIntegerShape +-- instantiates IndexedDataMap from TCollection (Integer from Standard, +-- Shape from TopoDS, +-- MapIntegerHasher from TColStd); + + +-- class IndexedDataMapOfPassKeyShapeListOfShape +-- instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo, +-- ListOfShape from TopTools, +-- PassKeyShapeMapHasher from GEOMAlgo); + + + + + + +end GEOMAlgo; + -- + -- enumerations -- - -- enumerations + --enumeration State is + -- ST_UNKNOWN, +-- ST_IN, +-- ST_OUT, +-- ST_ON, +-- ST_ONIN, +-- ST_ONOUT, +-- ST_INOUT +-- end State; -- - enumeration State is - ST_UNKNOWN, - ST_IN, - ST_OUT, - ST_ON, - ST_ONIN, - ST_ONOUT, - ST_INOUT - end State; +-- enumeration KindOfShape is +-- KS_UNKNOWN, +-- KS_SPHERE, +-- KS_CYLINDER, +-- KS_BOX, +-- KS_TORUS, +-- KS_CONE, +-- KS_ELLIPSE, +-- KS_PLANE, +-- KS_CIRCLE, +-- KS_LINE, +-- KS_DEGENERATED +-- end KindOfShape; -- - enumeration KindOfShape is - KS_UNKNOWN, - KS_SPHERE, - KS_CYLINDER, - KS_BOX, - KS_TORUS, - KS_CONE, - KS_ELLIPSE, - KS_PLANE, - KS_CIRCLE, - KS_LINE, - KS_DEGENERATED - end KindOfShape; - -- - enumeration KindOfName is - KN_UNKNOWN, - KN_SPHERE, - KN_CYLINDER, - KN_TORUS, - KN_CONE, - KN_ELLIPSE, - KN_CIRCLE, - KN_PLANE, - KN_LINE, - KN_BOX, - KN_SEGMENT, - KN_ARCCIRCLE, - KN_POLYGON, - KN_POLYHEDRON, - KN_DISKCIRCLE, - KN_DISKELLIPSE, - KN_RECTANGLE, - KN_TRIANGLE, - KN_QUADRANGLE, - KN_ARCELLIPSE - end KindOfName; +-- enumeration KindOfName is +-- KN_UNKNOWN, +-- KN_SPHERE, +-- KN_CYLINDER, +-- KN_TORUS, +-- KN_CONE, +-- KN_ELLIPSE, +-- KN_CIRCLE, +-- KN_PLANE, +-- KN_LINE, +-- KN_BOX, +-- KN_SEGMENT, +-- KN_ARCCIRCLE, +-- KN_POLYGON, +-- KN_POLYHEDRON, +-- KN_DISKCIRCLE, +-- KN_DISKELLIPSE, +-- KN_RECTANGLE, +-- KN_TRIANGLE, +-- KN_QUADRANGLE, +-- KN_ARCELLIPSE +-- end KindOfName; -- - enumeration KindOfBounds is - KB_UNKNOWN, - KB_TRIMMED, - KB_INFINITE - end KindOfBounds; + -- enumeration KindOfBounds is + -- KB_UNKNOWN, +-- KB_TRIMMED, + -- KB_INFINITE +-- end KindOfBounds; -- - enumeration KindOfClosed is - KC_UNKNOWN, - KC_CLOSED, - KC_NOTCLOSED - end KindOfClosed; +-- enumeration KindOfClosed is +-- KC_UNKNOWN, +-- KC_CLOSED, +-- KC_NOTCLOSED +-- end KindOfClosed; -- - deferred class HAlgo; - deferred class Clsf; - class ClsfSurf; - class ClsfBox; - --class FinderShapeOn2; - class PassKeyShapeMapHasher; - -- - -- classes - -- - deferred class Algo; - deferred class ShapeAlgo; - -- - class ShapeInfo; - class ShapeInfoFiller; - -- - -- Gluer / GetInPlace ---modified by NIZNHY-PKV Mon Feb 21 10:07:22 2011f --- class Gluer1; - class Gluer; - - imported Gluer2 from GEOMAlgo; - imported GlueDetector from GEOMAlgo; - imported GluerAlgo from GEOMAlgo; - imported GetInPlace from GEOMAlgo; ---modified by NIZNHY-PKV Mon Feb 21 10:07:27 2011t - - class GlueAnalyser; - - class CoupleOfShapes; - class PassKey; - class PassKeyMapHasher; - class PassKeyShape; - class SurfaceTools; - class Tools; - -- - -- finder on - deferred class ShapeSolid; - class WireSolid; - class ShellSolid; - class VertexSolid; - class SolidSolid; - --class FinderShapeOn; - -- + + --deferred class HAlgo; + --deferred class Clsf; + --class ClsfSurf; + --class ClsfBox; + --class ClsfSolid; + + -- + -- classes + -- + --deferred class Algo; + --deferred class ShapeAlgo; + -- + --class ShapeInfo; + --class ShapeInfoFiller; + --class CoupleOfShapes; + --class SurfaceTools; + --class Tools; + --class PassKey; + --class PassKeyMapHasher; + --class PassKeyShape; + --class PassKeyShapeMapHasher; + -- + -- finder on + --deferred class ShapeSolid; + --class WireSolid; + --class ShellSolid; + --class VertexSolid; + --class SolidSolid; + --class StateCollector; + + -- + --class Gluer; + --class GlueAnalyser; + --class FinderShapeOn; --class FinderShapeOn1; - class StateCollector; + --class FinderShapeOn2; + -- + -- Builder/Splitter + --deferred class BuilderShape; + --class Builder; + --class Splitter; + --class Tools3D; + --class BuilderTools; + --class ShapeSet; + + --deferred class BuilderArea; + --class BuilderFace; + --class BuilderSolid; - class ClsfSolid; - -- class FinderShapeOn2; - -- class PassKeyShapeMapHasher; + --class WireSplitter; + --class WireEdgeSet; + --class WESCorrector; + --class WESScaler; -- - -- 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; - class WESScaler; - -- -- 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 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); - - class ListOfCoupleOfShapes - instantiates List from TCollection (CoupleOfShapes from GEOMAlgo); - - - class IndexedDataMapOfShapeState - instantiates IndexedDataMap from TCollection (Shape from TopoDS, - State from TopAbs, - ShapeMapHasher from TopTools); - class ListOfPnt - instantiates List from TCollection (Pnt from gp); - - class DataMapOfPassKeyInteger - instantiates DataMap from TCollection (PassKey from GEOMAlgo, - Integer from Standard, - PassKeyMapHasher from GEOMAlgo); - - class IndexedDataMapOfPassKeyShapeListOfShape - instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo, - ListOfShape from TopTools, - PassKeyShapeMapHasher from GEOMAlgo); - - class IndexedDataMapOfShapeShapeInfo - instantiates IndexedDataMap from TCollection (Shape from TopoDS, - ShapeInfo from GEOMAlgo, - ShapeMapHasher from TopTools); - - class DataMapOfPassKeyShapeShape - instantiates DataMap from TCollection (PassKeyShape from GEOMAlgo, - Shape from TopoDS, - PassKeyShapeMapHasher from GEOMAlgo); - - class DataMapOfOrientedShapeShape instantiates - DataMap from TCollection (Shape from TopoDS, - Shape from TopoDS, - OrientedShapeMapHasher from TopTools); - - --modified by NIZNHY-PKV Thu Apr 28 08:25:36 2011f - class DataMapOfShapeMapOfShape instantiates - DataMap from TCollection (Shape from TopoDS, - MapOfShape from TopTools, - ShapeMapHasher from TopTools); - class DataMapOfShapePnt instantiates - DataMap from TCollection (Shape from TopoDS, - Pnt from gp, - ShapeMapHasher from TopTools); - --modified by NIZNHY-PKV Thu Apr 28 08:25:39 2011t - -end GEOMAlgo; + --pointer PWireEdgeSet to WireEdgeSet from GEOMAlgo; + -- + -- diff --git a/src/GEOMAlgo/GEOMAlgo.pro b/src/GEOMAlgo/GEOMAlgo.pro deleted file mode 100644 index 887ab8bf0..000000000 --- a/src/GEOMAlgo/GEOMAlgo.pro +++ /dev/null @@ -1,247 +0,0 @@ -# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it 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 -# - -TEMPLATE = lib -TARGET = GEOMAlgo -DESTDIR = ../../lib -MOC_DIR = ../../moc -OBJECTS_DIR = ../../obj/$$TARGET - -CASROOT = $$(CASROOT) -CAS_CPPFLAGS = $${CASROOT}/inc - -KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome - -STDLIB = -lstdc++ - -CAS_LDPATH = -L$$(CASROOT)/Linux/lib - -INCLUDEPATH += $${CAS_CPPFLAGS} $${KERNEL_CXXFLAGS} ../NMTDS ../NMTTools - -LIBS += -L$$(GEOM_ROOT_DIR)/lib -lNMTTools $${STDLIB} $${CAS_LDPATH} -lTKBO -lTKShHealing -lTKBool -lTKMesh - -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - -win32:DEFINES += WIN32 -DEFINES += OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS - -HEADERS = BlockFix_BlockFixAPI.hxx -HEADERS += BlockFix_BlockFixAPI.lxx -HEADERS += BlockFix_CheckTool.hxx -HEADERS += Handle_BlockFix_BlockFixAPI.hxx -HEADERS += GEOMAlgo_Algo.hxx -HEADERS += GEOMAlgo_BuilderArea.hxx -HEADERS += GEOMAlgo_BuilderFace.hxx -HEADERS += GEOMAlgo_Builder.hxx -HEADERS += GEOMAlgo_BuilderShape.hxx -HEADERS += GEOMAlgo_BuilderSolid.hxx -HEADERS += GEOMAlgo_BuilderTools.hxx -HEADERS += GEOMAlgo_ClsfBox.hxx -HEADERS += GEOMAlgo_Clsf.hxx -HEADERS += GEOMAlgo_ClsfSurf.hxx -HEADERS += GEOMAlgo_CoupleOfShapes.hxx -HEADERS += GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx -HEADERS += GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx -HEADERS += GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx -HEADERS += GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx -HEADERS += GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx -HEADERS += GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx -HEADERS += GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx -HEADERS += GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx -HEADERS += GEOMAlgo_DataMapOfPassKeyInteger.hxx -HEADERS += GEOMAlgo_DataMapOfRealListOfShape.hxx -HEADERS += GEOMAlgo_DataMapOfShapeReal.hxx -HEADERS += GEOMAlgo_DataMapOfShapeShapeSet.hxx -HEADERS += GEOMAlgo_FinderShapeOn1.hxx -HEADERS += GEOMAlgo_FinderShapeOn2.hxx -HEADERS += GEOMAlgo_FinderShapeOn.hxx -HEADERS += GEOMAlgo_FinderShapeOnQuad.hxx -HEADERS += GEOMAlgo_GlueAnalyser.hxx -HEADERS += GEOMAlgo_Gluer.hxx -HEADERS += GEOMAlgo_HAlgo.hxx -HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx -HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx -HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx -HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx -HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx -HEADERS += GEOMAlgo_IndexedDataMapOfIntegerShape.hxx -HEADERS += GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx -HEADERS += GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx -HEADERS += GEOMAlgo_IndexedDataMapOfShapeBox.hxx -HEADERS += GEOMAlgo_IndexedDataMapOfShapeState.hxx -HEADERS += GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx -HEADERS += GEOMAlgo_ListIteratorOfListOfPnt.hxx -HEADERS += GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx -HEADERS += GEOMAlgo_ListNodeOfListOfPnt.hxx -HEADERS += GEOMAlgo_ListOfCoupleOfShapes.hxx -HEADERS += GEOMAlgo_ListOfPnt.hxx -HEADERS += GEOMAlgo_PassKey.hxx -HEADERS += GEOMAlgo_PassKeyMapHasher.hxx -HEADERS += GEOMAlgo_PassKeyShape.hxx -HEADERS += GEOMAlgo_PassKeyShapeMapHasher.hxx -HEADERS += GEOMAlgo_PWireEdgeSet.hxx -HEADERS += GEOMAlgo_ShapeAlgo.hxx -HEADERS += GEOMAlgo_ShapeSet.hxx -HEADERS += GEOMAlgo_ShapeSolid.hxx -HEADERS += GEOMAlgo_ShellSolid.hxx -HEADERS += GEOMAlgo_SolidSolid.hxx -HEADERS += GEOMAlgo_Splitter.hxx -HEADERS += GEOMAlgo_StateCollector.hxx -HEADERS += GEOMAlgo_State.hxx -HEADERS += GEOMAlgo_SurfaceTools.hxx -HEADERS += GEOMAlgo_Tools3D.hxx -HEADERS += GEOMAlgo_Tools.hxx -HEADERS += GEOMAlgo_VertexSolid.hxx -HEADERS += GEOMAlgo_WESCorrector.hxx -HEADERS += GEOMAlgo_WireEdgeSet.hxx -HEADERS += GEOMAlgo_WireSolid.hxx -HEADERS += GEOMAlgo_WireSplitter.hxx -HEADERS += Handle_GEOMAlgo_ClsfBox.hxx -HEADERS += Handle_GEOMAlgo_Clsf.hxx -HEADERS += Handle_GEOMAlgo_ClsfSurf.hxx -HEADERS += Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx -HEADERS += Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx -HEADERS += Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx -HEADERS += Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx -HEADERS += Handle_GEOMAlgo_HAlgo.hxx -HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx -HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx -HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx -HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx -HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx -HEADERS += Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx -HEADERS += Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx -HEADERS += GEOMAlgo_ClsfSolid.hxx -HEADERS += GEOMAlgo_ClsfSolid.ixx -HEADERS += GEOMAlgo_ClsfSolid.jxx -HEADERS += GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx -HEADERS += GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx -HEADERS += GEOMAlgo_DataMapOfPassKeyShapeShape.hxx -HEADERS += GEOMAlgo_Gluer1.cxx -HEADERS += GEOMAlgo_Gluer1.hxx -HEADERS += GEOMAlgo_Gluer1.ixx -HEADERS += GEOMAlgo_Gluer1.jxx -HEADERS += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx -HEADERS += GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx -HEADERS += GEOMAlgo_KindOfBounds.hxx -HEADERS += GEOMAlgo_KindOfClosed.hxx -HEADERS += GEOMAlgo_KindOfName.hxx -HEADERS += GEOMAlgo_KindOfShape.hxx -HEADERS += GEOMAlgo_ShapeInfo.hxx -HEADERS += GEOMAlgo_ShapeInfo.ixx -HEADERS += GEOMAlgo_ShapeInfo.jxx -HEADERS += GEOMAlgo_ShapeInfoFiller.hxx -HEADERS += GEOMAlgo_ShapeInfoFiller.ixx -HEADERS += GEOMAlgo_ShapeInfoFiller.jxx -HEADERS += Handle_GEOMAlgo_ClsfSolid.hxx -HEADERS += Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx -HEADERS += Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx - -SOURCES = BlockFix.cxx -SOURCES += BlockFix_BlockFixAPI.cxx -SOURCES += BlockFix_CheckTool.cxx -SOURCES += BlockFix_PeriodicSurfaceModifier.cxx -SOURCES += BlockFix_SphereSpaceModifier.cxx -SOURCES += BlockFix_UnionEdges.cxx -SOURCES += BlockFix_UnionFaces.cxx -SOURCES += GEOMAlgo_Algo.cxx -SOURCES += GEOMAlgo_Builder_0.cxx -SOURCES += GEOMAlgo_Builder_1.cxx -SOURCES += GEOMAlgo_Builder_2.cxx -SOURCES += GEOMAlgo_Builder_3.cxx -SOURCES += GEOMAlgo_Builder_4.cxx -SOURCES += GEOMAlgo_BuilderArea.cxx -SOURCES += GEOMAlgo_Builder.cxx -SOURCES += GEOMAlgo_BuilderFace.cxx -SOURCES += GEOMAlgo_BuilderShape.cxx -SOURCES += GEOMAlgo_BuilderSolid.cxx -SOURCES += GEOMAlgo_BuilderTools.cxx -SOURCES += GEOMAlgo_ClsfBox.cxx -SOURCES += GEOMAlgo_Clsf.cxx -SOURCES += GEOMAlgo_ClsfSurf.cxx -SOURCES += GEOMAlgo_CoupleOfShapes.cxx -SOURCES += GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx -SOURCES += GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_0.cxx -SOURCES += GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_0.cxx -SOURCES += GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_0.cxx -SOURCES += GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx -SOURCES += GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx -SOURCES += GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx -SOURCES += GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx -SOURCES += GEOMAlgo_DataMapOfPassKeyInteger_0.cxx -SOURCES += GEOMAlgo_DataMapOfRealListOfShape_0.cxx -SOURCES += GEOMAlgo_DataMapOfShapeReal_0.cxx -SOURCES += GEOMAlgo_DataMapOfShapeShapeSet_0.cxx -SOURCES += GEOMAlgo_FinderShapeOn1.cxx -SOURCES += GEOMAlgo_FinderShapeOn2.cxx -SOURCES += GEOMAlgo_FinderShapeOn.cxx -SOURCES += GEOMAlgo_FinderShapeOnQuad.cxx -SOURCES += GEOMAlgo_GlueAnalyser.cxx -SOURCES += GEOMAlgo_Gluer.cxx -SOURCES += GEOMAlgo_HAlgo.cxx -SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx -SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx -SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx -SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx -SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx -SOURCES += GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx -SOURCES += GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx -SOURCES += GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx -SOURCES += GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx -SOURCES += GEOMAlgo_IndexedDataMapOfShapeState_0.cxx -SOURCES += GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx -SOURCES += GEOMAlgo_ListIteratorOfListOfPnt_0.cxx -SOURCES += GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx -SOURCES += GEOMAlgo_ListNodeOfListOfPnt_0.cxx -SOURCES += GEOMAlgo_ListOfCoupleOfShapes_0.cxx -SOURCES += GEOMAlgo_ListOfPnt_0.cxx -SOURCES += GEOMAlgo_PassKey.cxx -SOURCES += GEOMAlgo_PassKeyMapHasher.cxx -SOURCES += GEOMAlgo_PassKeyShape.cxx -SOURCES += GEOMAlgo_PassKeyShapeMapHasher.cxx -SOURCES += GEOMAlgo_ShapeAlgo.cxx -SOURCES += GEOMAlgo_ShapeSet.cxx -SOURCES += GEOMAlgo_ShapeSolid.cxx -SOURCES += GEOMAlgo_ShellSolid.cxx -SOURCES += GEOMAlgo_SolidSolid.cxx -SOURCES += GEOMAlgo_Splitter.cxx -SOURCES += GEOMAlgo_StateCollector.cxx -SOURCES += GEOMAlgo_SurfaceTools.cxx -SOURCES += GEOMAlgo_Tools3D.cxx -SOURCES += GEOMAlgo_Tools.cxx -SOURCES += GEOMAlgo_VertexSolid.cxx -SOURCES += GEOMAlgo_WESCorrector.cxx -SOURCES += GEOMAlgo_WireEdgeSet.cxx -SOURCES += GEOMAlgo_WireSolid.cxx -SOURCES += GEOMAlgo_WireSplitter.cxx -SOURCES += GEOMAlgo_ClsfSolid.cxx -SOURCES += GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx -SOURCES += GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_0.cxx -SOURCES += GEOMAlgo_DataMapOfPassKeyShapeShape_0.cxx -SOURCES += GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx -SOURCES += GEOMAlgo_ShapeInfoFiller_1.cxx -SOURCES += GEOMAlgo_IndexedDataMapOfShapeShapeInfo_0.cxx -SOURCES += GEOMAlgo_ShapeInfo.cxx -SOURCES += GEOMAlgo_ShapeInfoFiller.cxx - -includes.files = $$HEADERS -includes.path = ../../include - -INSTALLS += includes diff --git a/src/GEOMAlgo/GEOMAlgo_Algo.cdl b/src/GEOMAlgo/GEOMAlgo_Algo.cdl deleted file mode 100755 index 596f5b99f..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Algo.cdl +++ /dev/null @@ -1,64 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_Algo.cdl --- Created: Sat Dec 04 12:37:56 2004 --- Author: Peter KURNEV --- --- -deferred class Algo from GEOMAlgo - - ---Purpose: - ---uses ---raises - -is - Initialize - returns Algo from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Algo();" - - Perform(me:out) - is deferred; - - CheckData(me:out) - is virtual protected; - - CheckResult(me:out) - is virtual protected; - - ErrorStatus (me) - returns Integer from Standard; - - WarningStatus (me) - returns Integer from Standard; - - ComputeInternalShapes(me : in out; theFlag : Boolean from Standard); - ---Purpose: Allows to omit of creation of internal shapes (manifold topology). - -- Needed for the SALOME/TRIPOLI module. - -fields - myErrorStatus : Integer from Standard is protected; - myWarningStatus : Integer from Standard is protected; - myComputeInternalShapes : Boolean from Standard is protected; - -end Algo; diff --git a/src/GEOMAlgo/GEOMAlgo_Algo.cxx b/src/GEOMAlgo/GEOMAlgo_Algo.cxx index f47097929..f159c1a57 100755 --- a/src/GEOMAlgo/GEOMAlgo_Algo.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Algo.cxx @@ -25,11 +25,11 @@ // Author: Peter KURNEV // // -#include +#include //======================================================================= -// function: -// purpose: +// function: +// purpose: //======================================================================= GEOMAlgo_Algo::GEOMAlgo_Algo() : @@ -39,14 +39,14 @@ {} //======================================================================= // function: ~ -// purpose: +// purpose: //======================================================================= GEOMAlgo_Algo::~GEOMAlgo_Algo() { } //======================================================================= // function: CheckData -// purpose: +// purpose: //======================================================================= void GEOMAlgo_Algo::CheckData() { @@ -54,7 +54,7 @@ } //======================================================================= // function: CheckResult -// purpose: +// purpose: //======================================================================= void GEOMAlgo_Algo::CheckResult() { @@ -62,7 +62,7 @@ } //======================================================================= // function: ErrorStatus -// purpose: +// purpose: //======================================================================= Standard_Integer GEOMAlgo_Algo::ErrorStatus()const { @@ -70,7 +70,7 @@ } //======================================================================= // function: WarningStatus -// purpose: +// purpose: //======================================================================= Standard_Integer GEOMAlgo_Algo::WarningStatus()const { @@ -82,7 +82,7 @@ //======================================================================= //function : ComputeInternalShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Algo::ComputeInternalShapes(const Standard_Boolean theFlag) { diff --git a/src/GEOMAlgo/GEOMAlgo_Algo.hxx b/src/GEOMAlgo/GEOMAlgo_Algo.hxx index efcf42709..b82398fe1 100644 --- a/src/GEOMAlgo/GEOMAlgo_Algo.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Algo.hxx @@ -20,96 +20,56 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_Algo.hxx +// Created: Sat Dec 04 12:39:47 2004 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_Algo_HeaderFile #define _GEOMAlgo_Algo_HeaderFile -#ifndef _Standard_Integer_HeaderFile -#include -#endif - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - - -class GEOMAlgo_Algo { - -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 - // - - -Standard_EXPORT virtual void Perform() = 0; - - -Standard_EXPORT Standard_Integer ErrorStatus() const; - - -Standard_EXPORT Standard_Integer WarningStatus() const; +#include +#include -Standard_EXPORT void ComputeInternalShapes(const Standard_Boolean theFlag); +//======================================================================= +//class : GEOMAlgo_Algo +//purpose : +//======================================================================= +class GEOMAlgo_Algo +{ + public: + Standard_EXPORT + virtual void Perform() = 0; + Standard_EXPORT + Standard_Integer ErrorStatus() const; + Standard_EXPORT + Standard_Integer WarningStatus() const; + //! Allows to omit of creation of internal shapes (manifold topology).
+ //! Needed for the SALOME/TRIPOLI module.
+ Standard_EXPORT + void ComputeInternalShapes(const Standard_Boolean theFlag) ; protected: + Standard_EXPORT + GEOMAlgo_Algo(); - // Methods PROTECTED - // - + Standard_EXPORT + virtual ~GEOMAlgo_Algo(); -Standard_EXPORT GEOMAlgo_Algo(); -Standard_EXPORT virtual ~GEOMAlgo_Algo(); + Standard_EXPORT + virtual void CheckData() ; - -Standard_EXPORT virtual void CheckData() ; - - -Standard_EXPORT virtual void CheckResult() ; - - - // Fields PROTECTED - // -Standard_Integer myErrorStatus; -Standard_Integer myWarningStatus; -Standard_Boolean myComputeInternalShapes; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT + virtual void CheckResult() ; + Standard_Integer myErrorStatus; + Standard_Integer myWarningStatus; + Standard_Boolean myComputeInternalShapes; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Algo.ixx b/src/GEOMAlgo/GEOMAlgo_Algo.ixx deleted file mode 100644 index 0cf36f467..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Algo.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_Algo.jxx b/src/GEOMAlgo/GEOMAlgo_Algo.jxx deleted file mode 100644 index 217927e2c..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Algo.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_Algo_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_Builder.cdl b/src/GEOMAlgo/GEOMAlgo_Builder.cdl deleted file mode 100755 index 8e2ce65e3..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Builder.cdl +++ /dev/null @@ -1,255 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_Builder.cdl --- Created: --- Author: Peter KURNEV --- -class Builder from GEOMAlgo - inherits BuilderShape from GEOMAlgo - - ---Purpose: - -uses - ShapeEnum from TopAbs, - Shape from TopoDS, - - ListOfShape from TopTools, - IndexedDataMapOfShapeListOfShape from TopTools, - IndexedDataMapOfShapeShape from TopTools, - MapOfShape from TopTools, - Image from BRepAlgo, - - PaveFiller from NMTTools, - PPaveFiller from NMTTools - ---raises - -is - - Create - ---Purpose: Empty constructor - returns Builder from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Builder();" - - Perform(me:out) - ---Purpose: Performs calculations - is redefined; - - PerformWithFiller(me:out; - theDSF: PaveFiller from NMTTools) - ---Purpose: Performs calculations using prepared PaveFiller - -- object theDSF - is virtual; - - AddShape (me:out; - theShape: Shape from TopoDS) - ---Purpose: Adds argument theShape of the operation - is virtual; - - Clear(me:out) - ---Purpose: Clears internal fields and arguments - is virtual; - - Shapes(me) - ---Purpose: Returns the arguments of the operation - returns ListOfShape from TopTools; - ---C++: return const & - -- - -- History support - -- - Generated (me:out; - theS : Shape from TopoDS) - ---Purpose: Returns the list of shapes generated from the - -- shape theS. - returns ListOfShape from TopTools - is redefined; - ---C++: return const & - - Modified (me:out; - theS : Shape from TopoDS) - ---Purpose: Returns the list of shapes modified from the shape - -- theS. - returns ListOfShape from TopTools - is redefined; - ---C++: return const & - - IsDeleted (me:out; - theS : Shape from TopoDS) - ---Purpose: Returns true if the shape theS has been deleted. - returns Boolean from Standard - is redefined; - -- - -- protected methods - -- - PerformInternal(me:out; - theDSF: PaveFiller from NMTTools) - ---Purpose: Performs calculations using prepared DSFiller - -- object theDSF - is virtual protected; - - PrepareHistory (me:out) - ---Purpose: Prepare information for history support - is redefined protected; - - ClearInternals(me:out) - ---Purpose: Clears internal fields - is virtual protected; - - Prepare(me:out) - ---Purpose: Provides preparing actions - is virtual protected; - - PostTreat(me:out) - ---Purpose: Provides post-tratment actions - is virtual protected; - - AddShape1 (me:out; - theShape: Shape from TopoDS) - ---Purpose: Append the argument theShape to - -- typified lists of arguments myShapes1 - is protected; - - BuildResult(me:out; - theType: ShapeEnum from TopAbs) - ---Purpose: Build the resulting shapes of type theType - is virtual protected; - - -- Vertices - FillImagesVertices(me:out) - ---Purpose: Fill Images for vertices - is protected; - - -- Edges - FillImagesEdges(me:out) - ---Purpose: Fill Images for edges - is protected; - -- - -- Faces - FillImagesFaces(me:out) - ---Purpose: Fill Images for faces - is protected; - - FillIn2DParts(me:out) - ---Purpose: For each interferred face find split edges - -- that are in 2-D domain of the face - is protected; - - BuildSplitFaces(me:out) - ---Purpose: Build draft faces - is protected; - - FillSameDomainFaces(me:out) - ---Purpose: Among draft faces find same domain faces - is protected; - - FillImagesFaces1(me:out) - ---Purpose: Fill Images for faces - -- taking into account same domain faces - is protected; - - FillInternalVertices(me:out) - ---Purpose: Update Images for faces by - -- internal vertices - is protected; - -- - -- Wires, Shells, Compsolids, Compounds - FillImagesContainers(me:out; - theType:ShapeEnum from TopAbs) - ---Purpose: Fill Images for Wires, Shells, Compsolids, Compounds - is protected; - -- - -- Solids - FillImagesSolids(me:out) - ---Purpose: Fill Images for solids - is protected; - - FillIn3DParts(me:out) - ---Purpose: For each interferred solid find split faces - -- that are in 3-D domain of the solid - is protected; - - BuildSplitSolids(me:out) - ---Purpose: Build draft solids - is protected; - - FillInternalShapes(me:out) - ---Purpose: Update draft solids by - -- internal shells, edges, vertices - is protected; - - BuildDraftSolid(me:out; - theSolid: Shape from TopoDS; - theDraftSolid: out Shape from TopoDS; - theInternalFaces: out ListOfShape from TopTools) - ---Purpose: Build solid theDraftSolid that consists of - -- non-internal split faces of the solid - -- theSolid. - -- All splits of internal faces of - -- theSolid are in the list: theInternalFaces - is protected; - -- - -- debug methods - -- - AddCompound (me:out; - theShape: Shape from TopoDS); - ---Purpose: Adds arguments of the operation as - -- shapes of upper level of container shape theShape - Shapes1(me; - theType: Integer from Standard) - ---Purpose: Returns list of arguments of type theType - returns ListOfShape from TopTools; - ---C++: return const & - - Images(me) - ---Purpose: Returns image shapes - returns Image from BRepAlgo; - ---C++: return const & - - InParts(me; - theShape:Shape from TopoDS) - ---Purpose: Returns split-parts of shapes that have - -- state IN for the domain of shape theShape - returns ListOfShape from TopTools; - ---C++: return const & - - -- ===================================================== - -fields - myPaveFiller : PPaveFiller from NMTTools is protected; - myShapes : ListOfShape from TopTools is protected; - -- Common usage - myNbTypes : Integer from Standard is protected; - myMapFence : MapOfShape from TopTools is protected; - myShapes1 : ListOfShape from TopTools[9] is protected; - myImages : Image from BRepAlgo is protected; - myInParts : IndexedDataMapOfShapeListOfShape from TopTools is protected; - - -- Faces - mySplitFaces : Image from BRepAlgo is protected; - mySameDomainShapes: IndexedDataMapOfShapeShape from TopTools is protected; - -- solids - myDraftSolids : IndexedDataMapOfShapeShape from TopTools is protected; - myEntryPoint : Integer from Standard is protected; - -- -end Builder; - diff --git a/src/GEOMAlgo/GEOMAlgo_Builder.cxx b/src/GEOMAlgo/GEOMAlgo_Builder.cxx index 920f4a77a..669274cfa 100755 --- a/src/GEOMAlgo/GEOMAlgo_Builder.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder.cxx @@ -20,10 +20,10 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File: GEOMAlgo_Builder.cxx -// Created: -// Author: Peter KURNEV +// Created: +// Author: Peter KURNEV // -#include +#include #include @@ -44,8 +44,8 @@ #include //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_Builder::GEOMAlgo_Builder() : @@ -57,7 +57,7 @@ } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_Builder::~GEOMAlgo_Builder() { @@ -70,7 +70,7 @@ } //======================================================================= //function : AddCompound -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::AddCompound(const TopoDS_Shape& theShape) { @@ -84,7 +84,7 @@ } //======================================================================= //function : AddShape -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::AddShape(const TopoDS_Shape& theShape) { @@ -94,7 +94,7 @@ } //======================================================================= //function : Shapes -//purpose : +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes()const { @@ -102,7 +102,7 @@ } //======================================================================= //function : Clear -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::Clear() { @@ -111,7 +111,7 @@ } //======================================================================= //function : ClearInternals -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::ClearInternals() { @@ -130,7 +130,7 @@ } //======================================================================= //function : Prepare -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::Prepare() { @@ -161,7 +161,7 @@ //======================================================================= //function : AddShape1 -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::AddShape1(const TopoDS_Shape& theShape) { @@ -186,7 +186,7 @@ } //======================================================================= //function : BuildResult -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::BuildResult(const TopAbs_ShapeEnum theType) { @@ -222,7 +222,7 @@ } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::Perform() { @@ -250,7 +250,7 @@ } //======================================================================= //function : PerformWithFiller -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::PerformWithFiller(const NMTTools_PaveFiller& theDSF) { @@ -260,7 +260,7 @@ } //======================================================================= //function : PerformInternal -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::PerformInternal(const NMTTools_PaveFiller& pPF) { @@ -303,7 +303,7 @@ if (myErrorStatus) { return; } - + BuildResult(TopAbs_EDGE); if (myErrorStatus) { return; @@ -313,29 +313,29 @@ if (myErrorStatus) { return; } - + BuildResult(TopAbs_WIRE); if (myErrorStatus) { return; } - + // 3.4 Faces FillImagesFaces(); if (myErrorStatus) { return; } - + BuildResult(TopAbs_FACE); if (myErrorStatus) { return; } // 3.5 Shells - + FillImagesContainers(TopAbs_SHELL); if (myErrorStatus) { return; } - + BuildResult(TopAbs_SHELL); if (myErrorStatus) { return; @@ -345,7 +345,7 @@ if (myErrorStatus) { return; } - + BuildResult(TopAbs_SOLID); if (myErrorStatus) { return; @@ -355,7 +355,7 @@ if (myErrorStatus) { return; } - + BuildResult(TopAbs_COMPSOLID); if (myErrorStatus) { return; @@ -365,7 +365,7 @@ if (myErrorStatus) { return; } - + BuildResult(TopAbs_COMPOUND); if (myErrorStatus) { return; @@ -374,16 +374,16 @@ // 4.History PrepareHistory(); // - // 5 Post-treatment + // 5 Post-treatment PostTreat(); } // -// static +// static // void CorrectWires(const TopoDS_Shape& aS); // //======================================================================= //function : PostTreat -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::PostTreat() { @@ -400,14 +400,14 @@ if (aNbS==1) { myShape=aLS.First(); } - + BRepLib::SameParameter(myShape, 1.e-7, Standard_True); // GEOMAlgo_Tools::CorrectWires(myShape); } // // myErrorStatus -// +// // 0 - Ok // 1 - The object is just initialized // 2 - PaveFiller is failed diff --git a/src/GEOMAlgo/GEOMAlgo_Builder.hxx b/src/GEOMAlgo/GEOMAlgo_Builder.hxx index be753b225..47d175564 100644 --- a/src/GEOMAlgo/GEOMAlgo_Builder.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder.hxx @@ -19,235 +19,206 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - +// File: GEOMAlgo_Builder.cxx +// Created: +// Author: Peter KURNEV +// #ifndef _GEOMAlgo_Builder_HeaderFile #define _GEOMAlgo_Builder_HeaderFile -#ifndef _NMTTools_PPaveFiller_HeaderFile +#include +#include #include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _TopTools_MapOfShape_HeaderFile #include -#endif -#ifndef _BRepAlgo_Image_HeaderFile #include -#endif -#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile #include -#endif -#ifndef _TopTools_IndexedDataMapOfShapeShape_HeaderFile #include -#endif -#ifndef _GEOMAlgo_BuilderShape_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile +#include #include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile #include -#endif -class NMTTools_PaveFiller; -class TopoDS_Shape; -class TopTools_ListOfShape; -class BRepAlgo_Image; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_Builder : public GEOMAlgo_BuilderShape { - -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 - // - -//! Empty constructor
-Standard_EXPORT GEOMAlgo_Builder(); -Standard_EXPORT virtual ~GEOMAlgo_Builder(); - -//! Performs calculations
-Standard_EXPORT virtual void Perform() ; - -//! Performs calculations using prepared PaveFiller
-//! object theDSF
-Standard_EXPORT virtual void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ; - -//! Adds argument theShape of the operation
-Standard_EXPORT virtual void AddShape(const TopoDS_Shape& theShape) ; - -//! Clears internal fields and arguments
-Standard_EXPORT virtual void Clear() ; - -//! Returns the arguments of the operation
-Standard_EXPORT const TopTools_ListOfShape& Shapes() const; - -//! Returns the list of shapes generated from the
-//! shape theS.
-Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ; - -//! Returns the list of shapes modified from the shape
-//! theS.
-Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ; - -//! Returns true if the shape theS has been deleted.
-Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ; - -//! Adds arguments of the operation as
-//! shapes of upper level of container shape theShape
-Standard_EXPORT void AddCompound(const TopoDS_Shape& theShape) ; - -//! Returns list of arguments of type theType
-Standard_EXPORT const TopTools_ListOfShape& Shapes1(const Standard_Integer theType) const; - -//! Returns image shapes
-Standard_EXPORT const BRepAlgo_Image& Images() const; - -//! Returns split-parts of shapes that have
-//! state IN for the domain of shape theShape
-Standard_EXPORT const TopTools_ListOfShape& InParts(const TopoDS_Shape& theShape) const; - - - +#include +#include +//======================================================================= +//function : GEOMAlgo_Builder +//purpose : +//======================================================================= +class GEOMAlgo_Builder : public GEOMAlgo_BuilderShape +{ + public: + //! Empty constructor
+ Standard_EXPORT + GEOMAlgo_Builder(); + + Standard_EXPORT + virtual ~GEOMAlgo_Builder(); + + //! Performs calculations
+ Standard_EXPORT + virtual void Perform() ; + + //! Performs calculations using prepared PaveFiller
+ //! object theDSF
+ Standard_EXPORT + virtual void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ; + + //! Adds argument theShape of the operation
+ Standard_EXPORT + virtual void AddShape(const TopoDS_Shape& theShape) ; + + //! Clears internal fields and arguments
+ Standard_EXPORT + virtual void Clear() ; + + //! Returns the arguments of the operation
+ Standard_EXPORT + const TopTools_ListOfShape& Shapes() const; + + //! Returns the list of shapes generated from the
+ //! shape theS.
+ Standard_EXPORT + virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ; + + //! Returns the list of shapes modified from the shape
+ //! theS.
+ Standard_EXPORT + virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ; + + //! Returns true if the shape theS has been deleted.
+ Standard_EXPORT + virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ; + + //! Adds arguments of the operation as
+ //! shapes of upper level of container shape theShape
+ Standard_EXPORT + void AddCompound(const TopoDS_Shape& theShape) ; + + //! Returns list of arguments of type theType
+ Standard_EXPORT + const TopTools_ListOfShape& Shapes1(const Standard_Integer theType) const; + + //! Returns image shapes
+ Standard_EXPORT + const BRepAlgo_Image& Images() const; + + //! Returns split-parts of shapes that have
+ //! state IN for the domain of shape theShape
+ Standard_EXPORT + const TopTools_ListOfShape& InParts(const TopoDS_Shape& theShape) const; protected: - - // Methods PROTECTED - // - -//! Performs calculations using prepared DSFiller
-//! object theDSF
-Standard_EXPORT virtual void PerformInternal(const NMTTools_PaveFiller& theDSF) ; - -//! Prepare information for history support
-Standard_EXPORT virtual void PrepareHistory() ; - -//! Clears internal fields
-Standard_EXPORT virtual void ClearInternals() ; - -//! Provides preparing actions
-Standard_EXPORT virtual void Prepare() ; - -//! Provides post-tratment actions
-Standard_EXPORT virtual void PostTreat() ; - -//! Append the argument theShape to
-//! typified lists of arguments myShapes1
-Standard_EXPORT void AddShape1(const TopoDS_Shape& theShape) ; - -//! Build the resulting shapes of type theType
-Standard_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType) ; - -//! Fill Images for vertices
-Standard_EXPORT void FillImagesVertices() ; - -//! Fill Images for edges
-Standard_EXPORT void FillImagesEdges() ; - -//! Fill Images for faces
-Standard_EXPORT void FillImagesFaces() ; - -//! For each interferred face find split edges
-//! that are in 2-D domain of the face
-Standard_EXPORT void FillIn2DParts() ; - -//! Build draft faces
-Standard_EXPORT void BuildSplitFaces() ; - -//! Among draft faces find same domain faces
-Standard_EXPORT void FillSameDomainFaces() ; - -//! Fill Images for faces
-//! taking into account same domain faces
-Standard_EXPORT void FillImagesFaces1() ; - -//! Update Images for faces by
-//! internal vertices
-Standard_EXPORT void FillInternalVertices() ; - -//! Fill Images for Wires, Shells, Compsolids, Compounds
-Standard_EXPORT void FillImagesContainers(const TopAbs_ShapeEnum theType) ; - -//! Fill Images for solids
-Standard_EXPORT void FillImagesSolids() ; - -//! For each interferred solid find split faces
-//! that are in 3-D domain of the solid
-Standard_EXPORT void FillIn3DParts() ; - -//! Build draft solids
-Standard_EXPORT void BuildSplitSolids() ; - -//! Update draft solids by
-//! internal shells, edges, vertices
-Standard_EXPORT void FillInternalShapes() ; - -//! Build solid theDraftSolid that consists of
-//! non-internal split faces of the solid
-//! theSolid.
-//! All splits of internal faces of
-//! theSolid are in the list: theInternalFaces
-Standard_EXPORT void BuildDraftSolid(const TopoDS_Shape& theSolid,TopoDS_Shape& theDraftSolid,TopTools_ListOfShape& theInternalFaces) ; - - - // Fields PROTECTED - // -NMTTools_PPaveFiller myPaveFiller; -TopTools_ListOfShape myShapes; -Standard_Integer myNbTypes; -TopTools_MapOfShape myMapFence; -TopTools_ListOfShape myShapes1[9]; -BRepAlgo_Image myImages; -TopTools_IndexedDataMapOfShapeListOfShape myInParts; -BRepAlgo_Image mySplitFaces; -TopTools_IndexedDataMapOfShapeShape mySameDomainShapes; -TopTools_IndexedDataMapOfShapeShape myDraftSolids; -Standard_Integer myEntryPoint; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - + //! Performs calculations using prepared DSFiller
+ //! object theDSF
+ Standard_EXPORT + virtual void PerformInternal(const NMTTools_PaveFiller& theDSF) ; + + //! Prepare information for history support
+ Standard_EXPORT + virtual void PrepareHistory() ; + + //! Clears internal fields
+ Standard_EXPORT + virtual void ClearInternals() ; + + //! Provides preparing actions
+ Standard_EXPORT + virtual void Prepare() ; + + //! Provides post-tratment actions
+ Standard_EXPORT + virtual void PostTreat() ; + + //! Append the argument theShape to
+ //! typified lists of arguments myShapes1
+ Standard_EXPORT + void AddShape1(const TopoDS_Shape& theShape) ; + + //! Build the resulting shapes of type theType
+ Standard_EXPORT + virtual void BuildResult(const TopAbs_ShapeEnum theType) ; + + //! Fill Images for vertices
+ Standard_EXPORT + void FillImagesVertices() ; + + //! Fill Images for edges
+ Standard_EXPORT + void FillImagesEdges() ; + + //! Fill Images for faces
+ Standard_EXPORT + void FillImagesFaces() ; + + //! For each interferred face find split edges
+ //! that are in 2-D domain of the face
+ Standard_EXPORT + void FillIn2DParts() ; + + //! Build draft faces
+ Standard_EXPORT + void BuildSplitFaces() ; + + //! Among draft faces find same domain faces
+ Standard_EXPORT + void FillSameDomainFaces() ; + + //! Fill Images for faces
+ //! taking into account same domain faces
+ Standard_EXPORT + void FillImagesFaces1() ; + + //! Update Images for faces by
+ //! internal vertices
+ Standard_EXPORT + void FillInternalVertices() ; + + //! Fill Images for Wires, Shells, Compsolids, Compounds
+ Standard_EXPORT + void FillImagesContainers(const TopAbs_ShapeEnum theType) ; + + //! Fill Images for solids
+ Standard_EXPORT + void FillImagesSolids() ; + + //! For each interferred solid find split faces
+ //! that are in 3-D domain of the solid
+ Standard_EXPORT + void FillIn3DParts() ; + + //! Build draft solids
+ Standard_EXPORT + void BuildSplitSolids() ; + + //! Update draft solids by
+ //! internal shells, edges, vertices
+ Standard_EXPORT + void FillInternalShapes() ; + + //! Build solid theDraftSolid that consists of
+ //! non-internal split faces of the solid
+ //! theSolid.
+ //! All splits of internal faces of
+ //! theSolid are in the list: theInternalFaces
+ Standard_EXPORT + void BuildDraftSolid(const TopoDS_Shape& theSolid, + TopoDS_Shape& theDraftSolid, + TopTools_ListOfShape& theInternalFaces) ; + + + NMTTools_PPaveFiller myPaveFiller; + TopTools_ListOfShape myShapes; + Standard_Integer myNbTypes; + TopTools_MapOfShape myMapFence; + TopTools_ListOfShape myShapes1[9]; + BRepAlgo_Image myImages; + TopTools_IndexedDataMapOfShapeListOfShape myInParts; + BRepAlgo_Image mySplitFaces; + TopTools_IndexedDataMapOfShapeShape mySameDomainShapes; + TopTools_IndexedDataMapOfShapeShape myDraftSolids; + Standard_Integer myEntryPoint; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Builder.ixx b/src/GEOMAlgo/GEOMAlgo_Builder.ixx deleted file mode 100644 index 62611a069..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Builder.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_Builder.jxx b/src/GEOMAlgo/GEOMAlgo_Builder.jxx deleted file mode 100644 index 18fd81cac..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Builder.jxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_PaveFiller_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _BRepAlgo_Image_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_Builder_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderArea.cdl b/src/GEOMAlgo/GEOMAlgo_BuilderArea.cdl deleted file mode 100755 index f9c7b2d6e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderArea.cdl +++ /dev/null @@ -1,108 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: ModGlue_BuilderArea.cdl --- Author: Peter KURNEV - -deferred class BuilderArea from GEOMAlgo - inherits Algo from GEOMAlgo - - ---Purpose: The root class for algorithms to build - -- faces/solids from set of edges/faces - -uses - Shape from TopoDS, - ListOfShape from TopTools, - MapOfOrientedShape from TopTools, - Context from IntTools - ---raises - -is - Initialize - ---Purpose: Empty constructor - returns BuilderArea from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_BuilderArea();" - - SetContext(me:out; - theContext:Context from IntTools); - ---Purpose: Sets cashed geometrical tools - - Context(me) - returns Context from IntTools; - ---Purpose: Returns cashed geometrical tools - ---C++: return const & - - SetShapes(me:out; - theLS:ListOfShape from TopTools); - ---Purpose: Sets edges/faces to process - - Shapes(me) - ---Purpose: Returns edges/faces to process - returns ListOfShape from TopTools; - ---C++: return const & - - Loops(me) - ---Purpose: Returns wires/shells that have been built - returns ListOfShape from TopTools; - ---C++: return const & - - Areas(me) - ---Purpose: Returns faces/solids that have been built - returns ListOfShape from TopTools; - ---C++: return const & - - Perform(me:out) - is redefined; - - PerformShapesToAvoid(me:out) - ---Purpose: Collect the edges/faces that - -- a) are internal - -- b) are the same and have different orientation - is virtual protected; - - PerformLoops(me:out) - ---Purpose: Build draft faces/shells - -- a)myLoops - draft faces/shells that consist of - -- boundary edges/faces - -- b)myLoopsInternal - draft faces/shells that contains - -- inner edges/faces - is virtual protected; - - PerformAreas(me:out) - ---Purpose: Build draft faces/solids that contains boundary faces - is virtual protected; - - PerformInternalShapes(me:out) - ---Purpose: Build finalized faces/solids with internal wires/shells - is virtual protected; - -fields - myShapes : ListOfShape from TopTools is protected; - myLoops : ListOfShape from TopTools is protected; - myLoopsInternal : ListOfShape from TopTools is protected; - myShapesToAvoid : MapOfOrientedShape from TopTools is protected; - myAreas : ListOfShape from TopTools is protected; - -- - myContext : Context from IntTools is protected; - -end BuilderArea; diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx b/src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx index 7edd9df9e..d2dbd991b 100755 --- a/src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx @@ -21,16 +21,13 @@ // // File: GEOMAlgo_BuilderArea.cxx +// Created: // Author: Peter KURNEV - -#include - -#include +// +#include #include - #include - #include //======================================================================= @@ -38,11 +35,9 @@ //purpose : //======================================================================= GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea() - : GEOMAlgo_Algo() +: + GEOMAlgo_Algo() { -#if OCC_VERSION_LARGE <= 0x06050200 - myContext=NULL; -#endif } //======================================================================= //function : ~ @@ -55,20 +50,10 @@ GEOMAlgo_BuilderArea::~GEOMAlgo_BuilderArea() //function : SetContext //purpose : //======================================================================= -#if OCC_VERSION_LARGE > 0x06050200 void GEOMAlgo_BuilderArea::SetContext(const Handle(IntTools_Context)& theContext) -#else -void GEOMAlgo_BuilderArea::SetContext(const IntTools_Context& theContext) -#endif { -#if OCC_VERSION_LARGE > 0x06050200 myContext=theContext; -#else - myContext=(IntTools_Context*)&theContext; -#endif } - -#if OCC_VERSION_LARGE > 0x06050200 //======================================================================= //function : Context //purpose : @@ -87,8 +72,6 @@ void GEOMAlgo_BuilderArea::Perform() myContext=new IntTools_Context; } } -#endif - //======================================================================= //function : SetShapes //purpose : @@ -156,3 +139,4 @@ void GEOMAlgo_BuilderArea::PerformAreas() void GEOMAlgo_BuilderArea::PerformInternalShapes() { } + diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderArea.hxx b/src/GEOMAlgo/GEOMAlgo_BuilderArea.hxx index 4dddcd6a1..670517f32 100644 --- a/src/GEOMAlgo/GEOMAlgo_BuilderArea.hxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderArea.hxx @@ -20,127 +20,93 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_BuilderArea.hxx +// Created: +// Author: Peter KURNEV +// + #ifndef _GEOMAlgo_BuilderArea_HeaderFile #define _GEOMAlgo_BuilderArea_HeaderFile -#include - -#ifndef _TopTools_ListOfShape_HeaderFile +#include +#include #include -#endif -#ifndef _TopTools_MapOfOrientedShape_HeaderFile #include -#endif - -#if OCC_VERSION_LARGE > 0x06050200 #include -#else -#include -#endif - -#ifndef _GEOMAlgo_Algo_HeaderFile #include -#endif -class IntTools_Context; -class TopTools_ListOfShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif +#include //! The root class for algorithms to build
//! faces/solids from set of edges/faces
-class GEOMAlgo_BuilderArea : public GEOMAlgo_Algo { - -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); - } - -//! Sets cashed geometrical tools
-#if OCC_VERSION_LARGE > 0x06050200 - Standard_EXPORT void SetContext(const Handle(IntTools_Context)& theContext) ; -#else -Standard_EXPORT void SetContext(const IntTools_Context& theContext) ; -#endif +//======================================================================= +//class : GEOMAlgo_BuilderArea +//purpose : +//======================================================================= +class GEOMAlgo_BuilderArea : public GEOMAlgo_Algo +{ + public: + //! Sets cashed geometrical tools
+ Standard_EXPORT + void SetContext(const Handle(IntTools_Context)& theContext) ; -#if OCC_VERSION_LARGE > 0x06050200 //! Returns cashed geometrical tools
- Standard_EXPORT const Handle_IntTools_Context& Context() const; -#endif - -//! Sets edges/faces to process
-Standard_EXPORT void SetShapes(const TopTools_ListOfShape& theLS) ; + Standard_EXPORT + const Handle_IntTools_Context& Context() const; -//! Returns edges/faces to process
-Standard_EXPORT const TopTools_ListOfShape& Shapes() const; + //! Sets edges/faces to process
+ Standard_EXPORT + void SetShapes(const TopTools_ListOfShape& theLS) ; -//! Returns wires/shells that have been built
-Standard_EXPORT const TopTools_ListOfShape& Loops() const; + //! Returns edges/faces to process
+ Standard_EXPORT + const TopTools_ListOfShape& Shapes() const; -//! Returns faces/solids that have been built
-Standard_EXPORT const TopTools_ListOfShape& Areas() const; + //! Returns wires/shells that have been built
+ Standard_EXPORT + const TopTools_ListOfShape& Loops() const; -#if OCC_VERSION_LARGE > 0x06050200 - Standard_EXPORT virtual void Perform() ; -#endif + //! Returns faces/solids that have been built
+ Standard_EXPORT + const TopTools_ListOfShape& Areas() const; -protected: + Standard_EXPORT + virtual void Perform() ; + protected: //! Empty constructor
- Standard_EXPORT GEOMAlgo_BuilderArea(); -Standard_EXPORT virtual ~GEOMAlgo_BuilderArea(); + Standard_EXPORT + GEOMAlgo_BuilderArea(); + + Standard_EXPORT + virtual ~GEOMAlgo_BuilderArea(); //! Collect the edges/faces that
-//! a) are internal
-//! b) are the same and have different orientation
- Standard_EXPORT virtual void PerformShapesToAvoid() ; + //! a) are internal
+ //! b) are the same and have different orientation
+ + Standard_EXPORT + virtual void PerformShapesToAvoid() ; + //! Build draft faces/shells
-//! a)myLoops - draft faces/shells that consist of
-//! boundary edges/faces
-//! b)myLoopsInternal - draft faces/shells that contains
-//! inner edges/faces
- Standard_EXPORT virtual void PerformLoops() ; + //! a)myLoops - draft faces/shells that consist of
+ //! boundary edges/faces
+ //! b)myLoopsInternal - draft faces/shells that contains
+ //! inner edges/faces
+ Standard_EXPORT + virtual void PerformLoops() ; //! Build draft faces/solids that contains boundary faces
- Standard_EXPORT virtual void PerformAreas() ; - //! Build finalized faces/solids with internal wires/shells
- Standard_EXPORT virtual void PerformInternalShapes() ; - - -TopTools_ListOfShape myShapes; -TopTools_ListOfShape myLoops; -TopTools_ListOfShape myLoopsInternal; -TopTools_MapOfOrientedShape myShapesToAvoid; -TopTools_ListOfShape myAreas; -#if OCC_VERSION_LARGE > 0x06050200 -Handle_IntTools_Context myContext; -#else -IntTools_PContext myContext; -#endif - -private: + Standard_EXPORT + virtual void PerformAreas() ; + //! Build finalized faces/solids with internal wires/shells
+ Standard_EXPORT + virtual void PerformInternalShapes() ; + + TopTools_ListOfShape myShapes; + TopTools_ListOfShape myLoops; + TopTools_ListOfShape myLoopsInternal; + TopTools_MapOfOrientedShape myShapesToAvoid; + TopTools_ListOfShape myAreas; + Handle_IntTools_Context myContext; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderArea.ixx b/src/GEOMAlgo/GEOMAlgo_BuilderArea.ixx deleted file mode 100644 index afcfbd77b..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderArea.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderArea.jxx b/src/GEOMAlgo/GEOMAlgo_BuilderArea.jxx deleted file mode 100644 index eb98413c6..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderArea.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _IntTools_Context_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_BuilderArea_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderFace.cdl b/src/GEOMAlgo/GEOMAlgo_BuilderFace.cdl deleted file mode 100755 index 5ac144a96..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderFace.cdl +++ /dev/null @@ -1,83 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_BuilderFace.cdl --- Created: --- Author: Peter KURNEV --- -class BuilderFace from GEOMAlgo - inherits BuilderArea from GEOMAlgo - - ---Purpose: The algorithm to build faces from set of edges - -uses - Face from TopoDS - ---raises - -is - Create - ---Purpose: Empty constructor - returns BuilderFace from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_BuilderFace();" - - SetFace(me:out; - theFace:Face from TopoDS); - ---Purpose: Sets the face generatix - - Face(me) - ---Purpose: Returns the face generatix - returns Face from TopoDS; - ---C++: return const & - - Perform(me:out) - ---Purpose: Performs the algorithm - is redefined; - - PerformShapesToAvoid(me:out) - ---Purpose: Collect the edges that - -- a) are internal - -- b) are the same and have different orientation - is redefined protected; - - PerformLoops(me:out) - ---Purpose: Build draft wires - -- a)myLoops - draft wires that consist of - -- boundary edges - -- b)myLoopsInternal - draft wires that contains - -- inner edges - is redefined protected; - - PerformAreas(me:out) - ---Purpose: Build draft faces that contains boundary edges - is redefined protected; - - PerformInternalShapes(me:out) - ---Purpose: Build finalized faces with internals - is redefined protected; - - -fields - myFace : Face from TopoDS is protected; - -end BuilderFace; - diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx b/src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx index cbdfd2199..afae9cee4 100755 --- a/src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx @@ -21,20 +21,10 @@ // // File: GEOMAlgo_BuilderFace.cxx +// Created: // Author: Peter KURNEV - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include +// +#include #include #include @@ -81,28 +71,32 @@ #include #include +#include +#include +#include + +#include +#include +#include +#include + // static Standard_Boolean IsGrowthWire(const TopoDS_Shape& , const TopTools_IndexedMapOfShape& ); -static +static Standard_Boolean IsInside(const TopoDS_Shape& , const TopoDS_Shape& , -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& ); -#else - IntTools_PContext& ); -#endif - static void MakeInternalWires(const TopTools_MapOfShape& , TopTools_ListOfShape& ); //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_BuilderFace::GEOMAlgo_BuilderFace() : @@ -111,14 +105,14 @@ static } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_BuilderFace::~GEOMAlgo_BuilderFace() { } //======================================================================= //function : SetFace -//purpose : +//purpose : //======================================================================= void GEOMAlgo_BuilderFace::SetFace(const TopoDS_Face& theFace) { @@ -126,7 +120,7 @@ static } //======================================================================= //function : Face -//purpose : +//purpose : //======================================================================= const TopoDS_Face& GEOMAlgo_BuilderFace::Face()const { @@ -134,28 +128,18 @@ static } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_BuilderFace::Perform() { myErrorStatus=0; // -#if OCC_VERSION_LARGE <= 0x06050200 - if (myContext==NULL) { - myErrorStatus=11;// Null Context - return; - } -#endif - // if (myFace.IsNull()) { myErrorStatus=12;// Null face generix return; } - // -#if OCC_VERSION_LARGE > 0x06050200 // Initialize the context GEOMAlgo_BuilderArea::Perform(); -#endif // PerformShapesToAvoid(); if (myErrorStatus) { @@ -179,7 +163,7 @@ static } //======================================================================= //function :PerformShapesToAvoid -//purpose : +//purpose : //======================================================================= void GEOMAlgo_BuilderFace::PerformShapesToAvoid() { @@ -250,12 +234,12 @@ static break; } // - }//while (1) + }//while (1) //printf(" EdgesToAvoid=%d, iCnt=%d\n", EdgesToAvoid.Extent(), iCnt); -} +} //======================================================================= //function : PerformLoops -//purpose : +//purpose : //======================================================================= void GEOMAlgo_BuilderFace::PerformLoops() { @@ -268,11 +252,11 @@ static TopTools_IndexedDataMapOfShapeListOfShape aVEMap; TopTools_MapOfOrientedShape aMAdded; TopoDS_Iterator aItW; - BRep_Builder aBB; + BRep_Builder aBB; GEOMAlgo_WireEdgeSet aWES; GEOMAlgo_WESCorrector aWESCor; // - // 1. Usual Wires + // 1. Usual Wires myLoops.Clear(); aWES.SetFace(myFace); // @@ -298,7 +282,7 @@ static //modified by NIZNHY-PKV Tue Aug 5 15:09:29 2008f // Post Treatment TopTools_MapOfOrientedShape aMEP; - // + // // a. collect all edges that are in loops aIt.Initialize (myLoops); for (; aIt.More(); aIt.Next()) { @@ -309,7 +293,7 @@ static aMEP.Add(aE); } } - // + // // b. collect all edges that are to avoid aItM.Initialize(myShapesToAvoid); for (; aItM.More(); aItM.Next()) { @@ -359,7 +343,7 @@ static const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value()); const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV); aIt.Initialize(aLE); - for (; aIt.More()&&bFlag; aIt.Next()) { + for (; aIt.More()&&bFlag; aIt.Next()) { const TopoDS_Shape& aEx=aIt.Value(); if (aMAdded.Add(aEx)) { aBB.Add(aW, aEx); @@ -367,7 +351,7 @@ static bFlag=!bFlag; } } - }//for (; aIt.More(); aIt.Next()) { + }//for (; aIt.More(); aIt.Next()) { }//for (; aItE.More(); aItE.Next()) { }//for (; aItW.More(); aItW.Next()) { myLoopsInternal.Append(aW); @@ -375,7 +359,7 @@ static } //======================================================================= //function : PerformAreas -//purpose : +//purpose : //======================================================================= void GEOMAlgo_BuilderFace::PerformAreas() { @@ -383,7 +367,7 @@ static // Standard_Boolean bIsGrowth, bIsHole; Standard_Real aTol; - TopTools_ListOfShape aNewFaces, aHoleWires; + TopTools_ListOfShape aNewFaces, aHoleWires; TopoDS_Shape anInfinitePointShape; TopTools_DataMapOfShapeShape aInOutMap; TopTools_DataMapOfShapeListOfShape aMSH; @@ -414,7 +398,7 @@ static aNewFaces.Append (aFace); } else{ - // check if a wire is a hole + // check if a wire is a hole //XX //bIsHole=IsHole(aWire, myFace, myContext); bIsHole=GEOMAlgo_BuilderTools::IsHole(aWire, myFace); @@ -486,20 +470,20 @@ static aBB.Add (aF, aHole); } // - // update classifier + // update classifier aTol=BRep_Tool::Tolerance(aF); IntTools_FClass2d& aClsf=myContext->FClass2d(aF); aClsf.Init(aF, aTol); } // - // These aNewFaces are draft faces that + // These aNewFaces are draft faces that // do not contain any internal shapes // myAreas.Append(aNewFaces); } //======================================================================= //function : PerformInternalShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_BuilderFace::PerformInternalShapes() { @@ -509,11 +493,11 @@ static if (!aNbWI) {// nothing to do return; } - // + // //Standard_Real aTol; BRep_Builder aBB; TopTools_ListIteratorOfListOfShape aIt1, aIt2; - TopoDS_Iterator aIt; + TopoDS_Iterator aIt; TopTools_MapOfShape aME, aMEP; TopTools_MapIteratorOfMapOfShape aItME; TopTools_IndexedDataMapOfShapeListOfShape aMVE; @@ -575,7 +559,7 @@ static } //======================================================================= //function : MakeInternalWires -//purpose : +//purpose : //======================================================================= void MakeInternalWires(const TopTools_MapOfShape& theME, TopTools_ListOfShape& theWires) @@ -601,7 +585,7 @@ void MakeInternalWires(const TopTools_MapOfShape& theME, // // make a new shell TopoDS_Wire aW; - aBB.MakeWire(aW); + aBB.MakeWire(aW); aEE.Orientation(TopAbs_INTERNAL); aBB.Add(aW, aEE); // @@ -614,7 +598,7 @@ void MakeInternalWires(const TopTools_MapOfShape& theME, const TopoDS_Shape& aV =aExp.Current(); const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV); aItE.Initialize(aLE); - for (; aItE.More(); aItE.Next()) { + for (; aItE.More(); aItE.Next()) { TopoDS_Shape aEL=aItE.Value(); if (aAddedMap.Add(aEL)){ aEL.Orientation(TopAbs_INTERNAL); @@ -628,19 +612,15 @@ void MakeInternalWires(const TopTools_MapOfShape& theME, } //======================================================================= //function : IsInside -//purpose : +//purpose : //======================================================================= Standard_Boolean IsInside(const TopoDS_Shape& theHole, const TopoDS_Shape& theF2, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theContext) -#else - IntTools_PContext& theContext) -#endif { Standard_Boolean bRet; Standard_Real aT, aU, aV; - + TopAbs_State aState; TopExp_Explorer aExp; TopTools_IndexedMapOfShape aME2; @@ -673,14 +653,14 @@ Standard_Boolean IsInside(const TopoDS_Shape& theHole, //======================================================================= //function : IsGrowthWire -//purpose : +//purpose : //======================================================================= Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire, const TopTools_IndexedMapOfShape& theMHE) { Standard_Boolean bRet; TopoDS_Iterator aIt; - // + // bRet=Standard_False; if (theMHE.Extent()) { aIt.Initialize(theWire); @@ -703,7 +683,7 @@ Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire, /* //======================================================================= //function : IsInside -//purpose : +//purpose : //======================================================================= Standard_Boolean IsInside(const TopoDS_Shape& theHole, const TopoDS_Shape& theF2, diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderFace.hxx b/src/GEOMAlgo/GEOMAlgo_BuilderFace.hxx index 8e46ce349..595436cda 100644 --- a/src/GEOMAlgo/GEOMAlgo_BuilderFace.hxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderFace.hxx @@ -1,3 +1,4 @@ + // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, @@ -20,109 +21,71 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_BuilderFace.hxx +// Created: +// Author: Peter KURNEV +// #ifndef _GEOMAlgo_BuilderFace_HeaderFile #define _GEOMAlgo_BuilderFace_HeaderFile -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_BuilderArea_HeaderFile -#include -#endif -class TopoDS_Face; - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif +#include +#include //! The algorithm to build faces from set of edges
-class GEOMAlgo_BuilderFace : public GEOMAlgo_BuilderArea { - -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 - // - -//! Empty constructor
-Standard_EXPORT GEOMAlgo_BuilderFace(); -Standard_EXPORT virtual ~GEOMAlgo_BuilderFace(); - -//! Sets the face generatix
-Standard_EXPORT void SetFace(const TopoDS_Face& theFace) ; - -//! Returns the face generatix
-Standard_EXPORT const TopoDS_Face& Face() const; - -//! Performs the algorithm
-Standard_EXPORT virtual void Perform() ; - - - - - -protected: - - // Methods PROTECTED - // - -//! Collect the edges that
-//! a) are internal
-//! b) are the same and have different orientation
-Standard_EXPORT virtual void PerformShapesToAvoid() ; - -//! Build draft wires
-//! a)myLoops - draft wires that consist of
-//! boundary edges
-//! b)myLoopsInternal - draft wires that contains
-//! inner edges
-Standard_EXPORT virtual void PerformLoops() ; - -//! Build draft faces that contains boundary edges
-Standard_EXPORT virtual void PerformAreas() ; - -//! Build finalized faces with internals
-Standard_EXPORT virtual void PerformInternalShapes() ; - - - // Fields PROTECTED - // -TopoDS_Face myFace; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - +//======================================================================= +//class : GEOMAlgo_BuilderFace +//purpose : +//======================================================================= +class GEOMAlgo_BuilderFace : public GEOMAlgo_BuilderArea +{ + public: + + //! Empty constructor
+ Standard_EXPORT + GEOMAlgo_BuilderFace(); + + Standard_EXPORT + virtual ~GEOMAlgo_BuilderFace(); + + //! Sets the face generatix
+ Standard_EXPORT + void SetFace(const TopoDS_Face& theFace) ; + + //! Returns the face generatix
+ Standard_EXPORT + const TopoDS_Face& Face() const; + + //! Performs the algorithm
+ Standard_EXPORT + virtual void Perform() ; + + protected: + //! Collect the edges that
+ //! a) are internal
+ //! b) are the same and have different orientation
+ Standard_EXPORT + virtual void PerformShapesToAvoid() ; + + //! Build draft wires
+ //! a)myLoops - draft wires that consist of
+ //! boundary edges
+ //! b)myLoopsInternal - draft wires that contains
+ //! inner edges
+ Standard_EXPORT + virtual void PerformLoops() ; + + //! Build draft faces that contains boundary edges
+ Standard_EXPORT + virtual void PerformAreas() ; + + //! Build finalized faces with internals
+ Standard_EXPORT + virtual void PerformInternalShapes() ; + + + TopoDS_Face myFace; }; - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderFace.ixx b/src/GEOMAlgo/GEOMAlgo_BuilderFace.ixx deleted file mode 100644 index 2d98f4ca4..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderFace.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderFace.jxx b/src/GEOMAlgo/GEOMAlgo_BuilderFace.jxx deleted file mode 100644 index afff2598e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderFace.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_BuilderFace_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderShape.cdl b/src/GEOMAlgo/GEOMAlgo_BuilderShape.cdl deleted file mode 100755 index 208d5c411..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderShape.cdl +++ /dev/null @@ -1,115 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_BuilderShape.cdl --- Created: --- Author: Peter KURNEV --- -deferred class BuilderShape from GEOMAlgo - inherits Algo from GEOMAlgo - - ---Purpose: Root class for algorithms that has shape as result - -uses - Shape from TopoDS, - ListOfShape from TopTools, - MapOfShape from TopTools, - IndexedDataMapOfShapeListOfShape from TopTools - ---raises - -is - Initialize - ---Purpose: Empty constructor - returns BuilderShape from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_BuilderShape();" - - Shape(me) - ---Purpose: Returns the result of algorithm - returns Shape from TopoDS; - ---C++: return const & - - - ------------------------------------------------------------------ - --- The following methods are not implemented at this level. - -- An empty list is returned. - --- They are optional and can be redefined. - ------------------------------------------------------------------ - Generated (me:out; - theS : Shape from TopoDS) - ---Purpose: Returns the list of shapes generated from the - -- shape theS. - returns ListOfShape from TopTools - is virtual; - ---C++: return const & - - Modified (me:out; - theS : Shape from TopoDS) - ---Purpose: Returns the list of shapes modified from the - -- shape theS. - returns ListOfShape from TopTools - is virtual; - ---C++: return const & - - IsDeleted (me:out; - theS : Shape from TopoDS) - ---Purpose: Returns true if the shape theS has been deleted. - returns Boolean from Standard - is virtual; - - HasDeleted (me) - ---Purpose: Returns true if the at least one shape(or sub-shape) - -- of arguments has been deleted. - returns Boolean from Standard; - - HasGenerated (me) - ---Purpose: Returns true if the at least one shape(or sub-shape) - -- of arguments has generated shapes. - returns Boolean from Standard; - - HasModified (me) - ---Purpose: Returns true if the at least one shape(or sub-shape) - -- of arguments has modified shapes. - returns Boolean from Standard; - - PrepareHistory (me:out) - ---Purpose: Prepare information for history support - is virtual protected; - ---modified by NIZNHY-PKV Thu Dec 7 11:13:17 2006f - ImagesResult(me) - returns IndexedDataMapOfShapeListOfShape from TopTools; - ---C++: return const & ---modified by NIZNHY-PKV Thu Dec 7 11:13:20 2006t -fields - myShape : Shape from TopoDS is protected; - -- - myHistShapes : ListOfShape from TopTools is protected; - myMapShape : MapOfShape from TopTools is protected; - myHasDeleted : Boolean from Standard is protected; - myHasGenerated : Boolean from Standard is protected; - myHasModified : Boolean from Standard is protected; ---modified by NIZNHY-PKV Thu Dec 7 11:13:10 2006f - myImagesResult : IndexedDataMapOfShapeListOfShape from TopTools is protected; ---modified by NIZNHY-PKV Thu Dec 7 11:13:13 2006t -end BuilderShape; - diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx b/src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx index 0f6978c6c..5abac4efc 100755 --- a/src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx @@ -21,13 +21,13 @@ // // File: GEOMAlgo_BuilderShape.cxx -// Created: -// Author: Peter KURNEV +// Created: +// Author: Peter KURNEV // -#include +#include //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_BuilderShape::GEOMAlgo_BuilderShape() : @@ -39,14 +39,14 @@ } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_BuilderShape::~GEOMAlgo_BuilderShape() { } //======================================================================= //function : Shape -//purpose : +//purpose : //======================================================================= const TopoDS_Shape& GEOMAlgo_BuilderShape::Shape() const { @@ -55,7 +55,7 @@ // //======================================================================= //function : Generated -//purpose : +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Generated(const TopoDS_Shape& ) { @@ -64,7 +64,7 @@ } //======================================================================= //function : Modified -//purpose : +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Modified(const TopoDS_Shape& ) { @@ -73,18 +73,18 @@ } //======================================================================= //function : IsDeleted -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS) { Standard_Boolean bRet; // bRet=!myMapShape.Contains(theS); - return bRet; + return bRet; } //======================================================================= //function : HasDeleted -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_BuilderShape::HasDeleted()const { @@ -92,7 +92,7 @@ } //======================================================================= //function : HasGenerated -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_BuilderShape::HasGenerated()const { @@ -100,7 +100,7 @@ } //======================================================================= //function : HasModified -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_BuilderShape::HasModified()const { @@ -108,7 +108,7 @@ } //======================================================================= //function : PrepareHistory -//purpose : +//purpose : //======================================================================= void GEOMAlgo_BuilderShape::PrepareHistory() { @@ -124,7 +124,7 @@ //modified by NIZNHY-PKV Thu Dec 7 11:57:00 2006f //======================================================================= //function : ImagesResult -//purpose : +//purpose : //======================================================================= const TopTools_IndexedDataMapOfShapeListOfShape& GEOMAlgo_BuilderShape::ImagesResult()const { diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderShape.hxx b/src/GEOMAlgo/GEOMAlgo_BuilderShape.hxx index d9b04049e..2ae67470c 100644 --- a/src/GEOMAlgo/GEOMAlgo_BuilderShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderShape.hxx @@ -20,134 +20,86 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_BuilderShape.hxx +// Created: +// Author: Peter KURNEV +// #ifndef _GEOMAlgo_BuilderShape_HeaderFile #define _GEOMAlgo_BuilderShape_HeaderFile -#ifndef _TopoDS_Shape_HeaderFile +#include +#include #include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile #include -#endif -#ifndef _TopTools_MapOfShape_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile #include -#endif -#ifndef _GEOMAlgo_Algo_HeaderFile #include -#endif -class TopoDS_Shape; -class TopTools_ListOfShape; -class TopTools_IndexedDataMapOfShapeListOfShape; -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - //! Root class for algorithms that has shape as result
-class GEOMAlgo_BuilderShape : public GEOMAlgo_Algo { - -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 - // - -//! Returns the result of algorithm
-Standard_EXPORT const TopoDS_Shape& Shape() const; - -//! Returns the list of shapes generated from the
-//! shape theS.
-Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ; - -//! Returns the list of shapes modified from the
-//! shape theS.
-Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ; - -//! Returns true if the shape theS has been deleted.
-Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ; - -//! Returns true if the at least one shape(or sub-shape)
-//! of arguments has been deleted.
-Standard_EXPORT Standard_Boolean HasDeleted() const; - -//! Returns true if the at least one shape(or sub-shape)
-//! of arguments has generated shapes.
-Standard_EXPORT Standard_Boolean HasGenerated() const; - -//! Returns true if the at least one shape(or sub-shape)
-//! of arguments has modified shapes.
-Standard_EXPORT Standard_Boolean HasModified() const; - - -Standard_EXPORT const TopTools_IndexedDataMapOfShapeListOfShape& ImagesResult() const; - - - - +//======================================================================= +//class : GEOMAlgo_BuilderShape +//purpose : +//======================================================================= +class GEOMAlgo_BuilderShape : public GEOMAlgo_Algo +{ + public: + //! Returns the result of algorithm
+ Standard_EXPORT + const TopoDS_Shape& Shape() const; + + //! Returns the list of shapes generated from the
+ //! shape theS.
+ Standard_EXPORT + virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ; + + //! Returns the list of shapes modified from the
+ //! shape theS.
+ Standard_EXPORT + virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ; + + //! Returns true if the shape theS has been deleted.
+ Standard_EXPORT + virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ; + + //! Returns true if the at least one shape(or sub-shape)
+ //! of arguments has been deleted.
+ Standard_EXPORT + Standard_Boolean HasDeleted() const; + + //! Returns true if the at least one shape(or sub-shape)
+ //! of arguments has generated shapes.
+ Standard_EXPORT + Standard_Boolean HasGenerated() const; + + //! Returns true if the at least one shape(or sub-shape)
+ //! of arguments has modified shapes.
+ Standard_EXPORT + Standard_Boolean HasModified() const; + + Standard_EXPORT + const TopTools_IndexedDataMapOfShapeListOfShape& ImagesResult() const; protected: + //! Empty constructor
+ Standard_EXPORT + GEOMAlgo_BuilderShape(); - // Methods PROTECTED - // - -//! Empty constructor
-Standard_EXPORT GEOMAlgo_BuilderShape(); -Standard_EXPORT virtual ~GEOMAlgo_BuilderShape(); - -//! Prepare information for history support
-Standard_EXPORT virtual void PrepareHistory() ; - - - // Fields PROTECTED - // -TopoDS_Shape myShape; -TopTools_ListOfShape myHistShapes; -TopTools_MapOfShape myMapShape; -Standard_Boolean myHasDeleted; -Standard_Boolean myHasGenerated; -Standard_Boolean myHasModified; -TopTools_IndexedDataMapOfShapeListOfShape myImagesResult; - + Standard_EXPORT + virtual ~GEOMAlgo_BuilderShape(); -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + //! Prepare information for history support
+ Standard_EXPORT + virtual void PrepareHistory() ; + TopoDS_Shape myShape; + TopTools_ListOfShape myHistShapes; + TopTools_MapOfShape myMapShape; + Standard_Boolean myHasDeleted; + Standard_Boolean myHasGenerated; + Standard_Boolean myHasModified; + TopTools_IndexedDataMapOfShapeListOfShape myImagesResult; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderShape.ixx b/src/GEOMAlgo/GEOMAlgo_BuilderShape.ixx deleted file mode 100644 index 43cb290c4..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderShape.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderShape.jxx b/src/GEOMAlgo/GEOMAlgo_BuilderShape.jxx deleted file mode 100644 index 80eda2d3e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderShape.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_BuilderShape_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.cdl b/src/GEOMAlgo/GEOMAlgo_BuilderSolid.cdl deleted file mode 100755 index aa8e1df8b..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.cdl +++ /dev/null @@ -1,70 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_BuilderSolid.cdl --- Created: --- Author: Peter KURNEV --- -class BuilderSolid from GEOMAlgo - inherits BuilderArea from GEOMAlgo - - ---Purpose: The algorithm to build solids from set of faces - ---uses ---raises - -is - Create - ---Purpose: Empty constructor - returns BuilderSolid from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_BuilderSolid();" - - - Perform(me:out) - ---Purpose: Performs the algorithm - is redefined; - - PerformShapesToAvoid(me:out) - ---Purpose: Collect the faces that - -- a) are internal - -- b) are the same and have different orientation - is redefined protected; - - PerformLoops(me:out) - ---Purpose: Build draft shells - -- a)myLoops - draft shells that consist of - -- boundary faces - -- b)myLoopsInternal - draft shells that contains - -- inner faces - is redefined protected; - - PerformAreas(me:out) - ---Purpose: Build draft solids that contains boundary faces - is redefined protected; - - PerformInternalShapes(me:out) - ---Purpose: Build finalized solids with internal shells - is redefined protected; - ---fields - -end BuilderSolid; diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx b/src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx index d2b71e5d0..cd8c54625 100755 --- a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx @@ -21,18 +21,10 @@ // // File: GEOMAlgo_BuilderSolid.cxx +// Created: // Author: Peter KURNEV - -#include - -#include -#include - -#include -#include -#include - -#include +// +#include #include #include @@ -81,27 +73,24 @@ #include #include +#include +#include +#include + +#include +#include + // static Standard_Boolean IsGrowthShell(const TopoDS_Shape& , const TopTools_IndexedMapOfShape& ); static Standard_Boolean IsHole(const TopoDS_Shape& , -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& ); -#else - IntTools_PContext& ); -#endif - static Standard_Boolean IsInside(const TopoDS_Shape& , const TopoDS_Shape& , -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& ); -#else - IntTools_PContext& ); -#endif - static void MakeInternalShells(const TopTools_MapOfShape& , TopTools_ListOfShape& ); @@ -111,7 +100,7 @@ static static Standard_Boolean RefineShell(const TopoDS_Shell& , - TopoDS_Shell& ); + TopoDS_Shell& ); //======================================================================= //function : @@ -137,10 +126,8 @@ void GEOMAlgo_BuilderSolid::Perform() { myErrorStatus=0; // -#if OCC_VERSION_LARGE > 0x06050200 // Initialize the context GEOMAlgo_BuilderArea::Perform(); -#endif // TopoDS_Compound aC; BRep_Builder aBB; @@ -153,13 +140,6 @@ void GEOMAlgo_BuilderSolid::Perform() aBB.Add(aC, aF); } // -#if OCC_VERSION_LARGE <= 0x06050200 - if (myContext==NULL) { - myErrorStatus=11;// Null Context - return; - } -#endif - // PerformShapesToAvoid(); if (myErrorStatus) { return; @@ -209,7 +189,7 @@ void GEOMAlgo_BuilderSolid::PerformShapesToAvoid() } /* else { - int a=0; + int a=0; } */ } @@ -410,17 +390,15 @@ void GEOMAlgo_BuilderSolid::PerformLoops() if (IsClosedShell(aShell)) { myLoops.Append(aShell); } - //modified by NIZNHY-PKV Wed Oct 27 07:10:41 2010f else { Standard_Boolean bRefine; TopoDS_Shell aShx; // bRefine=RefineShell(aShell, aShx); if (bRefine) { - myLoops.Append(aShx); + myLoops.Append(aShx); } } - //modified by NIZNHY-PKV Wed Oct 27 07:10:44 2010t } // for (; aItF.More(); aItF.Next()) { // // Post Treatment @@ -631,10 +609,11 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes() return; } // + Standard_Integer bFlag; BRep_Builder aBB; TopTools_ListIteratorOfListOfShape aShellIt, aSolidIt; TopoDS_Iterator aIt; - TopTools_MapOfShape aMF, aMFP; + TopTools_MapOfShape aMF, aMFP, aMFS; TopTools_MapIteratorOfMapOfShape aItMF; TopTools_IndexedDataMapOfShapeListOfShape aMEF; TopTools_ListOfShape aLSI; @@ -656,6 +635,16 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes() for ( ; aSolidIt.More(); aSolidIt.Next()) { TopoDS_Solid& aSolid=*((TopoDS_Solid*)(&aSolidIt.Value())); // + //modified by NIZNHY-PKV Wed Mar 07 08:52:18 2012f + aMFS.Clear(); + { + TopExp_Explorer aExp(aSolid, TopAbs_FACE); + while (aExp.More()) { + aMFS.Add(aExp.Current()); + aExp.Next(); + } + } + //modified by NIZNHY-PKV Wed Mar 07 08:52:20 2012t aMEF.Clear(); TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMEF); // @@ -664,13 +653,17 @@ void GEOMAlgo_BuilderSolid::PerformInternalShapes() aItMF.Initialize(aMF); for (; aItMF.More(); aItMF.Next()) { const TopoDS_Face& aF=*((TopoDS_Face*)(&aItMF.Key())); -#if OCC_VERSION_LARGE > 0x06050200 - if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) { -#else - if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, *myContext)) { -#endif - aMFP.Add(aF); + //modified by NIZNHY-PKV Wed Mar 07 08:54:56 2012f + if (!aMFS.Contains(aF)) { + bFlag=GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext); + if (bFlag) { + aMFP.Add(aF); + } } + //if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) { + // aMFP.Add(aF); + //} + //modified by NIZNHY-PKV Wed Mar 07 08:56:07 2012t } // // 2.2 Make Internal Shells @@ -756,11 +749,7 @@ void MakeInternalShells(const TopTools_MapOfShape& theMF, //purpose : //======================================================================= Standard_Boolean IsHole(const TopoDS_Shape& theS2, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theContext) -#else - IntTools_PContext& theContext) -#endif { TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2; BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2); @@ -775,11 +764,7 @@ Standard_Boolean IsHole(const TopoDS_Shape& theS2, //======================================================================= Standard_Boolean IsInside(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theContext) -#else - IntTools_PContext& theContext) -#endif { TopExp_Explorer aExp; TopAbs_State aState; @@ -795,11 +780,7 @@ Standard_Boolean IsInside(const TopoDS_Shape& theS1, else { TopTools_IndexedMapOfShape aBounds; const TopoDS_Face& aF = TopoDS::Face(aExp.Current()); -#if OCC_VERSION_LARGE > 0x06050200 aState=GEOMAlgo_Tools3D::ComputeState(aF, *pS2, 1.e-14, aBounds, theContext); -#else - aState=GEOMAlgo_Tools3D::ComputeState(aF, *pS2, 1.e-14, aBounds, *theContext); -#endif } return (aState==TopAbs_IN); } @@ -864,13 +845,13 @@ Standard_Boolean IsClosedShell(const TopoDS_Shell& theShell) } return bRet; } - //======================================================================= //function : RefineShell //purpose : //======================================================================= -Standard_Boolean RefineShell (const TopoDS_Shell& aShell, - TopoDS_Shell& aShx) +Standard_Boolean RefineShell(const TopoDS_Shell& aShell, + TopoDS_Shell& aShx) + { Standard_Boolean bRet; Standard_Integer i, aNbE, aNbF; @@ -900,7 +881,7 @@ Standard_Boolean RefineShell (const TopoDS_Shell& aShell, const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First())); if (aNbF==1) { if (aOrE==TopAbs_INTERNAL) { - continue; + continue; } aMFx.Add(aF1); } @@ -908,14 +889,14 @@ Standard_Boolean RefineShell (const TopoDS_Shell& aShell, else if (aNbF==2) { const TopoDS_Face& aF2=*((TopoDS_Face*)(&aLF.Last())); if (aF2.IsSame(aF1)) { - if (BRep_Tool::IsClosed(aE, aF1)) { - continue; - } - if (aOrE==TopAbs_INTERNAL) { - continue; - } - aMFx.Add(aF1); - aMFx.Add(aF2); + if (BRep_Tool::IsClosed(aE, aF1)) { + continue; + } + if (aOrE==TopAbs_INTERNAL) { + continue; + } + aMFx.Add(aF1); + aMFx.Add(aF2); } } } @@ -945,6 +926,6 @@ Standard_Boolean RefineShell (const TopoDS_Shell& aShell, // return bRet; } - +// // ErrorStatus : // 11 - Null Context diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.hxx b/src/GEOMAlgo/GEOMAlgo_BuilderSolid.hxx index 3ffdcc4ee..650528fa7 100644 --- a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderSolid.hxx @@ -20,98 +20,58 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_BuilderSolid.hxx +// Created: +// Author: Peter KURNEV +// #ifndef _GEOMAlgo_BuilderSolid_HeaderFile #define _GEOMAlgo_BuilderSolid_HeaderFile -#ifndef _GEOMAlgo_BuilderArea_HeaderFile -#include -#endif - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif +#include //! The algorithm to build solids from set of faces
-class GEOMAlgo_BuilderSolid : public GEOMAlgo_BuilderArea { - -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 - // - -//! Empty constructor
-Standard_EXPORT GEOMAlgo_BuilderSolid(); -Standard_EXPORT virtual ~GEOMAlgo_BuilderSolid(); - -//! Performs the algorithm
-Standard_EXPORT virtual void Perform() ; - - - - - -protected: - - // Methods PROTECTED - // - -//! Collect the faces that
-//! a) are internal
-//! b) are the same and have different orientation
-Standard_EXPORT virtual void PerformShapesToAvoid() ; - -//! Build draft shells
-//! a)myLoops - draft shells that consist of
-//! boundary faces
-//! b)myLoopsInternal - draft shells that contains
-//! inner faces
-Standard_EXPORT virtual void PerformLoops() ; - -//! Build draft solids that contains boundary faces
-Standard_EXPORT virtual void PerformAreas() ; - -//! Build finalized solids with internal shells
-Standard_EXPORT virtual void PerformInternalShapes() ; - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - +//======================================================================= +//function : GEOMAlgo_BuilderSolid +//purpose : +//======================================================================= +class GEOMAlgo_BuilderSolid : public GEOMAlgo_BuilderArea +{ + public: + //! Empty constructor
+ Standard_EXPORT + GEOMAlgo_BuilderSolid(); + + Standard_EXPORT + virtual ~GEOMAlgo_BuilderSolid(); + + //! Performs the algorithm
+ Standard_EXPORT + virtual void Perform() ; + + protected: + //! Collect the faces that
+ //! a) are internal
+ //! b) are the same and have different orientation
+ Standard_EXPORT + virtual void PerformShapesToAvoid() ; + + //! Build draft shells
+ //! a)myLoops - draft shells that consist of
+ //! boundary faces
+ //! b)myLoopsInternal - draft shells that contains
+ //! inner faces
+ Standard_EXPORT + virtual void PerformLoops() ; + + //! Build draft solids that contains boundary faces
+ Standard_EXPORT + virtual void PerformAreas() ; + + //! Build finalized solids with internal shells
+ Standard_EXPORT + virtual void PerformInternalShapes() ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.ixx b/src/GEOMAlgo/GEOMAlgo_BuilderSolid.ixx deleted file mode 100644 index e2c65b651..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.jxx b/src/GEOMAlgo/GEOMAlgo_BuilderSolid.jxx deleted file mode 100644 index 64d41a417..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_BuilderSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderTools.cdl b/src/GEOMAlgo/GEOMAlgo_BuilderTools.cdl deleted file mode 100755 index 6a203adeb..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderTools.cdl +++ /dev/null @@ -1,49 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_BuilderTools.cdl --- Created: --- Author: Peter KURNEV --- --- -class BuilderTools from GEOMAlgo - - ---Purpose: - -uses - Shape from TopoDS - ---raises - -is - IsHole(myclass; - aW: Shape from TopoDS; - aF: Shape from TopoDS) - returns Boolean from Standard; - - IsHole(myclass; - aShell: Shape from TopoDS) - returns Boolean from Standard; - ---fields - -end BuilderTools; diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx b/src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx index 9bab7d5b3..a40c07a37 100755 --- a/src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx @@ -23,7 +23,7 @@ // File: GEOMAlgo_BuilderTools.cxx // Author: Peter KURNEV -#include +#include #include @@ -64,7 +64,7 @@ #include #include -static +static Standard_Integer ComputeProps(const TopoDS_Face& aF, Standard_Real& aA, Standard_Real& aV); @@ -73,7 +73,7 @@ static //======================================================================= //function : IsHole -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aW, const TopoDS_Shape& aFace) @@ -84,7 +84,7 @@ static Standard_Real aU1, aU2, aU, dU; Standard_Real aX1, aY1, aX0, aY0; TopAbs_Orientation aOr; - + gp_Pnt2d aP2D0, aP2D1; Handle(Geom2d_Curve) aC2D; TopoDS_Face aF, aFF; @@ -98,10 +98,10 @@ static // aS=0.; aItW.Initialize(aW); - for (; aItW.More(); aItW.Next()) { + for (; aItW.More(); aItW.Next()) { const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value()); aOr=aE.Orientation(); - if (!(aOr==TopAbs_FORWARD || + if (!(aOr==TopAbs_FORWARD || aOr==TopAbs_REVERSED)) { continue; } @@ -135,17 +135,17 @@ static aP2D0.Coord(aX0, aY0); aP2D1.Coord(aX1, aY1); // - aS=aS+(aY0+aY1)*(aX1-aX0); + aS=aS+(aY0+aY1)*(aX1-aX0); // aP2D0=aP2D1; } - }//for (; aItW.More(); aItW.Next()) { + }//for (; aItW.More(); aItW.Next()) { bIsHole=(aS>0.); return bIsHole; } //======================================================================= //function : IsHole -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aShell) { @@ -171,7 +171,7 @@ static } //======================================================================= //function : ComputeProps -//purpose : +//purpose : //======================================================================= Standard_Integer ComputeProps(const TopoDS_Face& aF, Standard_Real& aA, @@ -244,7 +244,7 @@ Standard_Integer ComputeProps(const TopoDS_Face& aF, } //======================================================================= //function : BuildTriangulation -//purpose : +//purpose : //======================================================================= void BuildTriangulation(const TopoDS_Face& aF) { diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderTools.hxx b/src/GEOMAlgo/GEOMAlgo_BuilderTools.hxx index 90e3b75f1..b0d13c9fe 100644 --- a/src/GEOMAlgo/GEOMAlgo_BuilderTools.hxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderTools.hxx @@ -20,80 +20,29 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_BuilderTools.hxx +// Author: Peter KURNEV + #ifndef _GEOMAlgo_BuilderTools_HeaderFile #define _GEOMAlgo_BuilderTools_HeaderFile -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class TopoDS_Shape; - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - - -class GEOMAlgo_BuilderTools { - -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 - // - - -Standard_EXPORT static Standard_Boolean IsHole(const TopoDS_Shape& aW,const TopoDS_Shape& aF) ; - - -Standard_EXPORT static Standard_Boolean IsHole(const TopoDS_Shape& aShell) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - +#include +#include + +//======================================================================= +//class : GEOMAlgo_BuilderTools +//purpose : +//======================================================================= +class GEOMAlgo_BuilderTools +{ + public: + Standard_EXPORT + static Standard_Boolean IsHole(const TopoDS_Shape& aW, + const TopoDS_Shape& aF) ; + + Standard_EXPORT + static Standard_Boolean IsHole(const TopoDS_Shape& aShell) ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderTools.ixx b/src/GEOMAlgo/GEOMAlgo_BuilderTools.ixx deleted file mode 100644 index 493034342..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderTools.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderTools.jxx b/src/GEOMAlgo/GEOMAlgo_BuilderTools.jxx deleted file mode 100644 index d4ee6821d..000000000 --- a/src/GEOMAlgo/GEOMAlgo_BuilderTools.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_BuilderTools_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_0.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_0.cxx index ec1063deb..b0fe28966 100644 --- a/src/GEOMAlgo/GEOMAlgo_Builder_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder_0.cxx @@ -35,7 +35,7 @@ //======================================================================= //function : Shapes1 -//purpose : +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes1(const Standard_Integer theType)const { @@ -43,7 +43,7 @@ } //======================================================================= //function : Images -//purpose : +//purpose : //======================================================================= const BRepAlgo_Image& GEOMAlgo_Builder::Images()const { @@ -51,7 +51,7 @@ } //======================================================================= //function : InParts -//purpose : +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_Builder::InParts(const TopoDS_Shape& theS)const { diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx index 394809471..aa4f7ef53 100755 --- a/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx @@ -21,26 +21,12 @@ // // File: GEOMAlgo_Builder_1.cxx -// Author: Peter KURNEV - +// Created: +// Author: Peter KURNEV +// #include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - +// #include -#include #include #include @@ -48,20 +34,33 @@ #include #include #include - +// #include #include #include #include - +// #include #include - +// #include - #include #include #include +// +#include +// +#include +#include +#include +#include +#include +#include +#include +// +#include +#include + static @@ -75,7 +74,7 @@ static //======================================================================= //function : FillImagesVertices -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Builder::FillImagesVertices() { @@ -104,7 +103,7 @@ static } //======================================================================= // function: FillImagesEdges -// purpose: +// purpose: //======================================================================= void GEOMAlgo_Builder::FillImagesEdges() { @@ -113,11 +112,7 @@ static const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); NMTTools_PaveFiller* pPF=myPaveFiller; const BOPTools_SplitShapesPool& aSSP=pPF->SplitShapesPool(); -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx=pPF->Context(); -#else - IntTools_Context& aCtx=pPF->ChangeContext(); -#endif // Standard_Boolean bToReverse; Standard_Integer i, aNb, aNbSp, nSp, nSpR, nSpx, aIsCB, aNbLB; @@ -209,12 +204,12 @@ static } // myImages.Bind(aE, aLSp); - + }//for (i=1; i<=aNb; ++i) } //======================================================================= // function: FillImagesContainers -// purpose: +// purpose: //======================================================================= void GEOMAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType) { @@ -225,17 +220,13 @@ static TopAbs_ShapeEnum aType; BRep_Builder aBB; TopoDS_Iterator aIt; - TopTools_ListIteratorOfListOfShape aItIm; + TopTools_ListIteratorOfListOfShape aItIm; TopTools_MapOfShape aMS; TopTools_MapIteratorOfMapOfShape aItS; // const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); NMTTools_PaveFiller* pPF=myPaveFiller; -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx= pPF->Context(); -#else - IntTools_Context& aCtx= pPF->ChangeContext(); -#endif // aNbS=aDS.NumberOfShapesOfTheObject(); for (i=1; i<=aNbS; ++i) { @@ -291,12 +282,12 @@ static aBB.Add(aCIm, aF); } } - myImages.Bind(aC, aCIm); + myImages.Bind(aC, aCIm); }// for (; aItS.More(); aItS.Next()) { } //======================================================================= // function: FillImagesCompounds -// purpose: +// purpose: //======================================================================= void FillImagesCompounds(const TopTools_MapOfShape& theMS, BRepAlgo_Image& theImages) @@ -312,18 +303,18 @@ void FillImagesCompounds(const TopTools_MapOfShape& theMS, } //======================================================================= //function : FillImagesCompound -//purpose : +//purpose : //======================================================================= void FillImagesCompound(const TopoDS_Shape& theS, BRepAlgo_Image& theImages, TopTools_MapOfShape& theMFP) -{ +{ Standard_Boolean bInterferred; TopAbs_ShapeEnum aTypeX; TopAbs_Orientation aOrX; TopoDS_Iterator aIt; BRep_Builder aBB; - TopTools_ListIteratorOfListOfShape aItIm; + TopTools_ListIteratorOfListOfShape aItIm; // if (!theMFP.Add(theS)) { return; @@ -365,5 +356,5 @@ void FillImagesCompound(const TopoDS_Shape& theS, aBB.Add(aCIm, aSX); } } - theImages.Bind(theS, aCIm); + theImages.Bind(theS, aCIm); } diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx index bb65514c4..888ee3ec9 100755 --- a/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx @@ -24,27 +24,8 @@ #include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include +#include +#include #include @@ -58,8 +39,6 @@ #include #include #include -#include -#include #include #include @@ -72,13 +51,8 @@ #include #include -#include -#include - #include - #include - #include #include #include @@ -93,11 +67,34 @@ #include #include -#include +#include +#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// +#include +#include +#include + +#include +// +#include +#include +#include +#include +#include #include #include +#include static void UpdateCandidates(const Standard_Integer , @@ -106,8 +103,8 @@ static //modified by NIZNHY-PKV Thu Feb 16 12:24:52 2012f static - Standard_Boolean IsClosed(const TopoDS_Edge& aE, - const TopoDS_Face& aF); + Standard_Boolean IsClosed(const TopoDS_Edge& , + const TopoDS_Face& ); //modified by NIZNHY-PKV Thu Feb 16 12:24:56 2012t //======================================================================= @@ -216,11 +213,7 @@ void GEOMAlgo_Builder::BuildSplitFaces() NMTTools_PaveFiller* pPF=myPaveFiller; NMTDS_InterfPool* pIP=pPF->IP(); BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences(); -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx= pPF->Context(); -#else - IntTools_Context& aCtx= pPF->ChangeContext(); -#endif // Standard_Boolean bToReverse, bIsClosed, bIsDegenerated; Standard_Integer i, aNb, aNbF, nF; @@ -319,10 +312,10 @@ void GEOMAlgo_Builder::BuildSplitFaces() } // bIsDegenerated=BRep_Tool::Degenerated(aE); - //modified by NIZNHY-PKV Thu Feb 16 12:25:04 2012f + //modified by NIZNHY-PKV Wed Mar 07 07:46:09 2012f bIsClosed=IsClosed(aE, aF); //bIsClosed=BRep_Tool::IsClosed(aE, aF); - //modified by NIZNHY-PKV Thu Feb 16 12:25:09 2012t + //modified by NIZNHY-PKV Wed Mar 07 07:46:13 2012t // const TopTools_ListOfShape& aLIE=myImages.Image(aE); aIt.Initialize(aLIE); @@ -435,11 +428,7 @@ void GEOMAlgo_Builder::FillSameDomainFaces() NMTTools_PaveFiller* pPF=myPaveFiller; NMTDS_InterfPool* pIP=pPF->IP(); BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences(); -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx=pPF->Context(); -#else - IntTools_Context& aCtx=pPF->ChangeContext(); -#endif + const Handle(IntTools_Context)& aCtx= pPF->Context(); // // //mySameDomainShapes.Clear(); @@ -600,7 +589,7 @@ void GEOMAlgo_Builder::FillSameDomainFaces() // 2. Find Chains NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC; // - NMTTools_Tools::FindChains(aLCS, aMC); + NMTTools_Tools::FindChains(aLCS, aMC); // Standard_Boolean bIsImage; Standard_Integer aIx, aIxMin, aNbMSDF, k, aNbMFj; @@ -726,11 +715,7 @@ void GEOMAlgo_Builder::FillInternalVertices() const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); NMTTools_PaveFiller* pPF=myPaveFiller; NMTDS_InterfPool* pIP=pPF->IP(); -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx= pPF->Context(); -#else - IntTools_Context& aCtx= pPF->ChangeContext(); -#endif // BOPTools_CArray1OfVSInterference& aVFs=pIP->VSInterferences(); BOPTools_CArray1OfESInterference& aEFs=pIP->ESInterferences(); @@ -903,18 +888,10 @@ void GEOMAlgo_Builder::FillInternalVertices() for (; aIt.More(); aIt.Next()) { TopoDS_Face aFx=TopoDS::Face(aIt.Value()); // update classifier -#if OCC_VERSION_LARGE > 0x06050200 IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx); -#else - IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx); -#endif aClsf.Init(aFx, aTol); // -#if OCC_VERSION_LARGE > 0x06050200 iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2); -#else - iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2); -#endif if (!iFlag) { aBB.Add(aFx, aV); break; @@ -924,18 +901,10 @@ void GEOMAlgo_Builder::FillInternalVertices() else { const TopoDS_Face& aFx=TopoDS::Face(aF); // update classifier -#if OCC_VERSION_LARGE > 0x06050200 IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx); -#else - IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx); -#endif aClsf.Init(aFx, aTol); // -#if OCC_VERSION_LARGE > 0x06050200 iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2); -#else - iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2); -#endif if (!iFlag) { TopoDS_Face aFz; // @@ -971,7 +940,7 @@ void UpdateCandidates(const Standard_Integer theNF, //modified by NIZNHY-PKV Thu Feb 16 12:25:16 2012f //======================================================================= //function : IsClosed -//purpose : +//purpose : //======================================================================= Standard_Boolean IsClosed(const TopoDS_Edge& aE, const TopoDS_Face& aF) @@ -986,12 +955,12 @@ Standard_Boolean IsClosed(const TopoDS_Edge& aE, const TopoDS_Shape& aEx=aExp.Current(); // if (aM.Add(aEx)) { - if (aEx.IsSame(aE)) { + bRet=aEx.IsSame(aE); + if (bRet) { break; } } } - bRet=!bRet; } return bRet; } diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx index aca45b207..066cc9c7d 100755 --- a/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx @@ -19,24 +19,12 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - // File : GEOMAlgo_Builder_3.cxx +// Created : // Author : Peter KURNEV #include -#include - -#include -#include -#include -#include -#include - -#include - -#include - #include #include @@ -69,6 +57,16 @@ #include +#include +#include + +#include +#include +#include +#include +#include + + static void OwnInternalShapes(const TopoDS_Shape& , @@ -97,11 +95,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid, myErrorStatus=0; // NMTTools_PaveFiller* pPF=myPaveFiller; -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx=pPF->Context(); -#else - IntTools_Context& aCtx=pPF->ChangeContext(); -#endif + const Handle(IntTools_Context)& aCtx= pPF->Context(); // Standard_Boolean bToReverse; Standard_Integer iFlag; @@ -194,11 +188,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid, // const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); NMTTools_PaveFiller* pPF=myPaveFiller; -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx=pPF->Context(); -#else - IntTools_Context& aCtx=pPF->ChangeContext(); -#endif + const Handle(IntTools_Context)& aCtx= pPF->Context(); // Standard_Boolean bIsIN, bHasImage; Standard_Integer aNbS, aNbSolids, i, j, aNbFaces, aNbFP, aNbFPx, aNbFIN, aNbLIF; @@ -431,11 +421,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid, // const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); NMTTools_PaveFiller* pPF=myPaveFiller; -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx=pPF->Context(); -#else - IntTools_Context& aCtx=pPF->ChangeContext(); -#endif + const Handle(IntTools_Context)& aCtx= pPF->Context(); // Standard_Integer i, aNbS, iErr; TopExp_Explorer aExp; @@ -534,9 +520,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid, //modified by NIZNHY-PKV Wed Oct 27 09:53:18 2010t // // 1.3 Build new solids -#if OCC_VERSION_LARGE > 0x06050200 aSB.SetContext(aCtx); -#endif aSB.SetShapes(aSFS1); aSB.Perform(); iErr=aSB.ErrorStatus(); @@ -580,11 +564,7 @@ void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid, // const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); NMTTools_PaveFiller* pPF=myPaveFiller; -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx= pPF->Context(); -#else - IntTools_Context& aCtx= pPF->ChangeContext(); -#endif // //Standard_Boolean bHasImage; Standard_Integer i, j, jT, aNbS, aNbSI, aNbSx, aNbSd; diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx index a091a65ee..5672fe1fd 100755 --- a/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx @@ -21,18 +21,11 @@ // // File: GEOMAlgo_Builder_4.cxx +// Created: // Author: Peter KURNEV - +// #include -#include - -#include - -#include - -#include - #include #include @@ -42,6 +35,12 @@ #include +#include + +#include + +#include + static void MapShapes(const TopoDS_Shape& aS, TopTools_MapOfShape& aM); @@ -53,11 +52,7 @@ static const TopTools_ListOfShape& GEOMAlgo_Builder::Generated(const TopoDS_Shape& theS) { NMTTools_PaveFiller* pPF=myPaveFiller; -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx=pPF->Context(); -#else - IntTools_Context& aCtx=pPF->ChangeContext(); -#endif // Standard_Boolean bHasImage, bToReverse; TopAbs_ShapeEnum aType; @@ -111,11 +106,7 @@ static const TopTools_ListOfShape& GEOMAlgo_Builder::Modified(const TopoDS_Shape& theS) { NMTTools_PaveFiller* pPF=myPaveFiller; -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx=pPF->Context(); -#else - IntTools_Context& aCtx=pPF->ChangeContext(); -#endif // Standard_Boolean bHasImage, bToReverse; TopAbs_ShapeEnum aType; @@ -306,6 +297,7 @@ static } } } + } //======================================================================= //function : MapShapes diff --git a/src/GEOMAlgo/GEOMAlgo_Clsf.cdl b/src/GEOMAlgo/GEOMAlgo_Clsf.cdl deleted file mode 100644 index 43f8e8e33..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Clsf.cdl +++ /dev/null @@ -1,77 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_Clsf.cdl --- Created: Wed Nov 22 10:19:29 2006 --- Author: Peter KURNEV --- --- -deferred class Clsf from GEOMAlgo - inherits HAlgo from GEOMAlgo - - ---Purpose: - -uses - State from TopAbs, - Pnt from gp, - Curve from Geom, - Surface from Geom - ---raises - -is - Initialize - returns mutable Clsf from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Clsf();" - - SetPnt(me:mutable; - aP:Pnt from gp); - - Pnt(me) - returns Pnt from gp; - ---C++:return const& - - SetTolerance(me:mutable; - aT:Real from Standard); - - Tolerance(me) - returns Real from Standard; - - State(me) - returns State from TopAbs; - - CanBeON(me; - aCT:Curve from Geom) - returns Boolean from Standard - is virtual; - - CanBeON(me; - aST:Surface from Geom) - returns Boolean from Standard - is virtual; - -fields - myState :State from TopAbs is protected; - myPnt :Pnt from gp is protected; - myTolerance:Real from Standard is protected; - -end Clsf; diff --git a/src/GEOMAlgo/GEOMAlgo_Clsf.cxx b/src/GEOMAlgo/GEOMAlgo_Clsf.cxx index be752d18f..9f3fe0acb 100644 --- a/src/GEOMAlgo/GEOMAlgo_Clsf.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Clsf.cxx @@ -20,16 +20,19 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Classifier.cxx +// File: GEOMAlgo_Clsf.cxx // Created: Wed Nov 22 10:23:04 2006 // Author: Peter KURNEV // // -#include +#include + +IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_Clsf, GEOMAlgo_HAlgo); +IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_Clsf, GEOMAlgo_HAlgo); //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_Clsf::GEOMAlgo_Clsf() : @@ -41,14 +44,14 @@ } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_Clsf::~GEOMAlgo_Clsf() { } //======================================================================= //function : SetTolerance -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Clsf::SetTolerance(const Standard_Real aT) { @@ -56,7 +59,7 @@ } //======================================================================= //function : Tolerance -//purpose : +//purpose : //======================================================================= Standard_Real GEOMAlgo_Clsf::Tolerance()const { @@ -64,7 +67,7 @@ } //======================================================================= //function : SetPnt -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Clsf::SetPnt(const gp_Pnt& aP) { @@ -72,7 +75,7 @@ } //======================================================================= //function : Pnt -//purpose : +//purpose : //======================================================================= const gp_Pnt& GEOMAlgo_Clsf::Pnt()const { @@ -80,7 +83,7 @@ } //======================================================================= //function : State -//purpose : +//purpose : //======================================================================= TopAbs_State GEOMAlgo_Clsf::State() const { @@ -88,7 +91,7 @@ } //======================================================================= //function : CanBeON -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Curve)& ) const { @@ -96,7 +99,7 @@ } //======================================================================= //function : CanBeON -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Surface)& ) const { diff --git a/src/GEOMAlgo/GEOMAlgo_Clsf.hxx b/src/GEOMAlgo/GEOMAlgo_Clsf.hxx index 01e2b4182..017578386 100644 --- a/src/GEOMAlgo/GEOMAlgo_Clsf.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Clsf.hxx @@ -20,114 +20,68 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_Clsf.hxx +// Created: Wed Nov 22 10:23:04 2006 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_Clsf_HeaderFile #define _GEOMAlgo_Clsf_HeaderFile -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile -#include -#endif - -#ifndef _TopAbs_State_HeaderFile +#include +//#include #include -#endif -#ifndef _gp_Pnt_HeaderFile #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif -#ifndef _GEOMAlgo_HAlgo_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _Handle_Geom_Curve_HeaderFile #include -#endif -#ifndef _Handle_Geom_Surface_HeaderFile #include -#endif -class gp_Pnt; -class Geom_Curve; -class Geom_Surface; - - - -class GEOMAlgo_Clsf : public GEOMAlgo_HAlgo { - -public: - // Methods PUBLIC - // - - -Standard_EXPORT void SetPnt(const gp_Pnt& aP) ; - - -Standard_EXPORT const gp_Pnt& Pnt() const; - - -Standard_EXPORT void SetTolerance(const Standard_Real aT) ; +#include +#include +DEFINE_STANDARD_HANDLE(GEOMAlgo_Clsf, GEOMAlgo_HAlgo); -Standard_EXPORT Standard_Real Tolerance() const; +//======================================================================= +//class : GEOMAlgo_Clsf +//purpose : +//======================================================================= +class GEOMAlgo_Clsf : public GEOMAlgo_HAlgo +{ + public: + Standard_EXPORT + void SetPnt(const gp_Pnt& aP) ; + Standard_EXPORT + const gp_Pnt& Pnt() const; -Standard_EXPORT TopAbs_State State() const; + Standard_EXPORT + void SetTolerance(const Standard_Real aT) ; + Standard_EXPORT + Standard_Real Tolerance() const; -Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aCT) const; + Standard_EXPORT + TopAbs_State State() const; + Standard_EXPORT + virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aCT) const; -Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; -//Standard_EXPORT ~GEOMAlgo_Clsf(); + Standard_EXPORT + virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; + DEFINE_STANDARD_RTTI(GEOMAlgo_Clsf); + protected: + Standard_EXPORT + GEOMAlgo_Clsf(); + Standard_EXPORT + virtual ~GEOMAlgo_Clsf(); - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - -Standard_EXPORT GEOMAlgo_Clsf(); -Standard_EXPORT virtual ~GEOMAlgo_Clsf(); - - - // Fields PROTECTED - // -TopAbs_State myState; -gp_Pnt myPnt; -Standard_Real myTolerance; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + TopAbs_State myState; + gp_Pnt myPnt; + Standard_Real myTolerance; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Clsf.ixx b/src/GEOMAlgo/GEOMAlgo_Clsf.ixx deleted file mode 100644 index 0245f7f95..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Clsf.ixx +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -//GEOMAlgo_Clsf::~GEOMAlgo_Clsf() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_Clsf_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(GEOMAlgo_HAlgo); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_Clsf", - sizeof(GEOMAlgo_Clsf), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_Clsf) Handle(GEOMAlgo_Clsf)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_Clsf) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_Clsf))) { - _anOtherObject = Handle(GEOMAlgo_Clsf)((Handle(GEOMAlgo_Clsf)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_Clsf::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_Clsf) ; -} -//Standard_Boolean GEOMAlgo_Clsf::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(GEOMAlgo_Clsf) == AType || GEOMAlgo_HAlgo::IsKind(AType)); -//} -//Handle_GEOMAlgo_Clsf::~Handle_GEOMAlgo_Clsf() {} - diff --git a/src/GEOMAlgo/GEOMAlgo_Clsf.jxx b/src/GEOMAlgo/GEOMAlgo_Clsf.jxx deleted file mode 100644 index c0c221468..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Clsf.jxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _Geom_Curve_HeaderFile -#include -#endif -#ifndef _Geom_Surface_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_Clsf_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfBox.cdl b/src/GEOMAlgo/GEOMAlgo_ClsfBox.cdl deleted file mode 100644 index 9c9009f29..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ClsfBox.cdl +++ /dev/null @@ -1,72 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_ClsfBox.cdl --- Created: Wed Nov 22 10:19:29 2006 --- Author: Peter KURNEV --- --- -class ClsfBox from GEOMAlgo - inherits Clsf from GEOMAlgo - - ---Purpose: - -uses - Shape from TopoDS, - Curve from Geom, - Surface from Geom, - Surface from GeomAdaptor - ---raises - -is - Create - returns mutable ClsfBox from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ClsfBox();" - - SetBox(me:mutable; - aS:Shape from TopoDS); - - Box(me) - returns Shape from TopoDS; - ---C++: return const & - - Perform(me:mutable) - is redefined; - - CheckData(me:mutable) - is redefined; - - CanBeON(me; - aC:Curve from Geom) - returns Boolean from Standard - is redefined; - - CanBeON(me; - aST:Surface from Geom) - returns Boolean from Standard - is redefined; - -fields - myBox : Shape from TopoDS is protected; - myGAS : Surface from GeomAdaptor [6] is protected; -end ClsfBox; diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx b/src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx index df7814bb1..dbc3eec1c 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx @@ -20,12 +20,13 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_ClsfSurf.cxx +// File: GEOMAlgo_ClsfBox.cxx // Created: Wed Nov 22 10:41:47 2006 // Author: Peter KURNEV // // -#include +#include + #include #include #include @@ -42,9 +43,12 @@ #include #include +IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf) +IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf) + //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_ClsfBox::GEOMAlgo_ClsfBox() : @@ -53,14 +57,14 @@ } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_ClsfBox::~GEOMAlgo_ClsfBox() { } //======================================================================= //function : SetBox -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ClsfBox::SetBox(const TopoDS_Shape& aBox) { @@ -68,7 +72,7 @@ } //======================================================================= //function : Box -//purpose : +//purpose : //======================================================================= const TopoDS_Shape& GEOMAlgo_ClsfBox::Box() const { @@ -76,10 +80,10 @@ } //======================================================================= //function : CheckData -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ClsfBox::CheckData() -{ +{ Standard_Integer i, aNbF; TopAbs_ShapeEnum aTypeShape; TopAbs_Orientation aOr; @@ -118,7 +122,7 @@ aS=BRep_Tool::Surface(aF); myGAS[i-1].Load(aS); aType=myGAS[i-1].GetType(); - if (!aType==GeomAbs_Plane) { + if (!aType==GeomAbs_Plane) { myErrorStatus=13; // unallowed surface type return; } @@ -142,7 +146,7 @@ } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ClsfBox::Perform() { @@ -158,7 +162,7 @@ } */ iNext=1; - aNbON=0; + aNbON=0; aNbIN=0; for(i=0; i +// #ifndef _GEOMAlgo_ClsfBox_HeaderFile #define _GEOMAlgo_ClsfBox_HeaderFile -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Handle_GEOMAlgo_ClsfBox_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile +#include +//#include #include -#endif -#ifndef _GeomAdaptor_Surface_HeaderFile #include -#endif -#ifndef _GEOMAlgo_Clsf_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _Handle_Geom_Curve_HeaderFile #include -#endif -#ifndef _Handle_Geom_Surface_HeaderFile #include -#endif -class TopoDS_Shape; -class Geom_Curve; -class Geom_Surface; - - - -class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf { - -public: - // Methods PUBLIC - // +#include +#include +DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf) -Standard_EXPORT GEOMAlgo_ClsfBox(); -Standard_EXPORT virtual ~GEOMAlgo_ClsfBox(); +//======================================================================= +//function : GEOMAlgo_ClsfBox +//purpose : +//======================================================================= +class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf +{ + public: + Standard_EXPORT + GEOMAlgo_ClsfBox(); + Standard_EXPORT + virtual ~GEOMAlgo_ClsfBox(); -Standard_EXPORT void SetBox(const TopoDS_Shape& aS) ; + Standard_EXPORT + void SetBox(const TopoDS_Shape& aS) ; + Standard_EXPORT + const TopoDS_Shape& Box() const; -Standard_EXPORT const TopoDS_Shape& Box() const; + Standard_EXPORT + virtual void Perform() ; + Standard_EXPORT + virtual void CheckData() ; -Standard_EXPORT virtual void Perform() ; + Standard_EXPORT + virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const; + Standard_EXPORT + virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; -Standard_EXPORT virtual void CheckData() ; + DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfBox) + protected: + TopoDS_Shape myBox; + GeomAdaptor_Surface myGAS[6]; -Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const; +private: -Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; -//Standard_EXPORT ~GEOMAlgo_ClsfBox(); - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -TopoDS_Shape myBox; -GeomAdaptor_Surface myGAS[6]; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - }; @@ -120,7 +92,6 @@ private: // other Inline functions and methods (like "C++: function call" methods) -// #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfBox.ixx b/src/GEOMAlgo/GEOMAlgo_ClsfBox.ixx deleted file mode 100644 index c1c4bcc26..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ClsfBox.ixx +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -//GEOMAlgo_ClsfBox::~GEOMAlgo_ClsfBox() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfBox_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(GEOMAlgo_Clsf); - static Handle_Standard_Type aType2 = STANDARD_TYPE(GEOMAlgo_HAlgo); - static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfBox", - sizeof(GEOMAlgo_ClsfBox), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_ClsfBox) Handle(GEOMAlgo_ClsfBox)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_ClsfBox) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_ClsfBox))) { - _anOtherObject = Handle(GEOMAlgo_ClsfBox)((Handle(GEOMAlgo_ClsfBox)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_ClsfBox::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_ClsfBox) ; -} -//Standard_Boolean GEOMAlgo_ClsfBox::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(GEOMAlgo_ClsfBox) == AType || GEOMAlgo_Clsf::IsKind(AType)); -//} -//Handle_GEOMAlgo_ClsfBox::~Handle_GEOMAlgo_ClsfBox() {} - diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfBox.jxx b/src/GEOMAlgo/GEOMAlgo_ClsfBox.jxx deleted file mode 100644 index d7d956d75..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ClsfBox.jxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Geom_Curve_HeaderFile -#include -#endif -#ifndef _Geom_Surface_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ClsfBox_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.cdl b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.cdl deleted file mode 100755 index b61256a12..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.cdl +++ /dev/null @@ -1,58 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- This library is free software; you can redistribute it and/or --- modify it 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_ClsfSolid.cdl --- Created: Mon Jan 29 10:28:07 2007 --- Author: Peter KURNEV --- --- -class ClsfSolid from GEOMAlgo - inherits Clsf from GEOMAlgo - - ---Purpose: - -uses - Shape from TopoDS - ---raises - -is - Create - returns mutable ClsfSolid from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ClsfSolid();" - - SetShape(me:mutable; - aS:Shape from TopoDS); - - Shape(me) - returns Shape from TopoDS; - ---C++: return const & - - Perform(me:mutable) - is redefined; - - CheckData(me:mutable) - is redefined; - - -fields - myShape: Shape from TopoDS is protected; - myPClsf: Address from Standard is protected; - -end ClsfSolid; diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx index 5d16464c4..35bb725ef 100755 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx @@ -22,7 +22,7 @@ // Author: Peter KURNEV // // -#include +#include #include #include @@ -30,9 +30,12 @@ #include #include +IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf) +IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf) + //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_ClsfSolid::GEOMAlgo_ClsfSolid() : @@ -42,7 +45,7 @@ } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_ClsfSolid::~GEOMAlgo_ClsfSolid() { @@ -55,7 +58,7 @@ } //======================================================================= //function : SetShape -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ClsfSolid::SetShape(const TopoDS_Shape& aS) { @@ -63,7 +66,7 @@ } //======================================================================= //function : Shape -//purpose : +//purpose : //======================================================================= const TopoDS_Shape& GEOMAlgo_ClsfSolid::Shape()const { @@ -71,7 +74,7 @@ } //======================================================================= //function : CheckData -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ClsfSolid::CheckData() { @@ -89,7 +92,7 @@ // aType=myShape.ShapeType(); if (!(aType==TopAbs_SOLID || aType==TopAbs_SHELL)) { - myErrorStatus=12; + myErrorStatus=12; return; } // @@ -112,7 +115,7 @@ } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ClsfSolid::Perform() { diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx index 61132917a..1715d88db 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx @@ -17,90 +17,53 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_ClsfSolid.hxx +// Created: Mon Jan 29 10:35:46 2007 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_ClsfSolid_HeaderFile #define _GEOMAlgo_ClsfSolid_HeaderFile -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Handle_GEOMAlgo_ClsfSolid_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile +#include +//#include #include -#endif -#ifndef _Standard_Address_HeaderFile #include -#endif -#ifndef _GEOMAlgo_Clsf_HeaderFile #include -#endif -class TopoDS_Shape; - - - -class GEOMAlgo_ClsfSolid : public GEOMAlgo_Clsf { - -public: - // Methods PUBLIC - // - - -Standard_EXPORT GEOMAlgo_ClsfSolid(); -Standard_EXPORT virtual ~GEOMAlgo_ClsfSolid(); - - -Standard_EXPORT void SetShape(const TopoDS_Shape& aS) ; - - -Standard_EXPORT const TopoDS_Shape& Shape() const; +DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf) -Standard_EXPORT virtual void Perform() ; +//======================================================================= +//class : GEOMAlgo_ClsfSolid +//purpose : +//======================================================================= +class GEOMAlgo_ClsfSolid : public GEOMAlgo_Clsf +{ + public: + Standard_EXPORT + GEOMAlgo_ClsfSolid(); + Standard_EXPORT + virtual ~GEOMAlgo_ClsfSolid(); -Standard_EXPORT virtual void CheckData() ; -//Standard_EXPORT ~GEOMAlgo_ClsfSolid(); + Standard_EXPORT + void SetShape(const TopoDS_Shape& aS) ; + Standard_EXPORT + const TopoDS_Shape& Shape() const; + Standard_EXPORT + virtual void Perform() ; + Standard_EXPORT + virtual void CheckData() ; - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -TopoDS_Shape myShape; -Standard_Address myPClsf; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfSolid) + protected: + TopoDS_Shape myShape; + Standard_Address myPClsf; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.ixx b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.ixx deleted file mode 100644 index 81d9bcf1e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.ixx +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -//GEOMAlgo_ClsfSolid::~GEOMAlgo_ClsfSolid() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfSolid_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(GEOMAlgo_Clsf); - static Handle_Standard_Type aType2 = STANDARD_TYPE(GEOMAlgo_HAlgo); - static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfSolid", - sizeof(GEOMAlgo_ClsfSolid), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_ClsfSolid) Handle(GEOMAlgo_ClsfSolid)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_ClsfSolid) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_ClsfSolid))) { - _anOtherObject = Handle(GEOMAlgo_ClsfSolid)((Handle(GEOMAlgo_ClsfSolid)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_ClsfSolid::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_ClsfSolid) ; -} -//Standard_Boolean GEOMAlgo_ClsfSolid::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(GEOMAlgo_ClsfSolid) == AType || GEOMAlgo_Clsf::IsKind(AType)); -//} -//Handle_GEOMAlgo_ClsfSolid::~Handle_GEOMAlgo_ClsfSolid() {} - diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.jxx b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.jxx deleted file mode 100644 index 55526d625..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ClsfSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.cdl b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.cdl deleted file mode 100644 index b0cc20ac1..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.cdl +++ /dev/null @@ -1,72 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_ClsfSurf.cdl --- Created: Wed Nov 22 10:19:29 2006 --- Author: Peter KURNEV --- --- -class ClsfSurf from GEOMAlgo - inherits Clsf from GEOMAlgo - - ---Purpose: - -uses - Curve from Geom, - Surface from Geom, - Surface from GeomAdaptor - ---raises - -is - Create - returns mutable ClsfSurf from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ClsfSurf();" - - SetSurface(me:mutable; - aS:Surface from Geom); - - Surface(me) - returns Surface from Geom; - ---C++: return const & - - Perform(me:mutable) - is redefined; - - CheckData(me:mutable) - is redefined; - - CanBeON(me; - aC:Curve from Geom) - returns Boolean from Standard - is redefined; - - CanBeON(me; - aST:Surface from Geom) - returns Boolean from Standard - is redefined; - -fields - myS : Surface from Geom is protected; - myGAS : Surface from GeomAdaptor is protected; - -end ClsfSurf; diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx index f69969074..cdc66dd14 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx @@ -25,14 +25,17 @@ // Author: Peter KURNEV // // -#include +#include #include #include #include +IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf); +IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf); + //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_ClsfSurf::GEOMAlgo_ClsfSurf() : @@ -41,14 +44,14 @@ } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_ClsfSurf::~GEOMAlgo_ClsfSurf() { } //======================================================================= //function : SetSurface -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ClsfSurf::SetSurface(const Handle(Geom_Surface)& aS) { @@ -56,7 +59,7 @@ } //======================================================================= //function : Surface -//purpose : +//purpose : //======================================================================= const Handle(Geom_Surface)& GEOMAlgo_ClsfSurf::Surface() const { @@ -64,7 +67,7 @@ } //======================================================================= //function : CheckData -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ClsfSurf::CheckData() { @@ -79,7 +82,7 @@ // myGAS.Load(myS); aType=myGAS.GetType(); - if (!(aType==GeomAbs_Plane || + if (!(aType==GeomAbs_Plane || aType==GeomAbs_Cylinder || aType==GeomAbs_Sphere)) { myErrorStatus=11; // unallowed surface type @@ -87,7 +90,7 @@ } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ClsfSurf::Perform() { @@ -102,7 +105,7 @@ } //======================================================================= //function : CanBeON -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Curve)& aC) const { @@ -121,7 +124,7 @@ } //======================================================================= //function : CanBeON -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Surface)& aS1) const { diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx index 95ab4d10e..e0dd97395 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx @@ -20,103 +20,62 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_ClsfSurf.hxx +// Created: Wed Nov 22 10:41:47 2006 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_ClsfSurf_HeaderFile #define _GEOMAlgo_ClsfSurf_HeaderFile -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Handle_GEOMAlgo_ClsfSurf_HeaderFile -#include -#endif - -#ifndef _Handle_Geom_Surface_HeaderFile +#include +//#include #include -#endif -#ifndef _GeomAdaptor_Surface_HeaderFile #include -#endif -#ifndef _GEOMAlgo_Clsf_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _Handle_Geom_Curve_HeaderFile #include -#endif -class Geom_Surface; -class Geom_Curve; - - - -class GEOMAlgo_ClsfSurf : public GEOMAlgo_Clsf { - -public: - // Methods PUBLIC - // - - -Standard_EXPORT GEOMAlgo_ClsfSurf(); -Standard_EXPORT virtual ~GEOMAlgo_ClsfSurf(); - - -Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ; - - -Standard_EXPORT const Handle_Geom_Surface& Surface() const; - +#include +#include -Standard_EXPORT virtual void Perform() ; +DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf) +//======================================================================= +// class : GEOMAlgo_ClsfSurf +//purpose : +//======================================================================= +class GEOMAlgo_ClsfSurf : public GEOMAlgo_Clsf +{ + public: + Standard_EXPORT + GEOMAlgo_ClsfSurf(); -Standard_EXPORT virtual void CheckData() ; + Standard_EXPORT + virtual ~GEOMAlgo_ClsfSurf(); + Standard_EXPORT + void SetSurface(const Handle(Geom_Surface)& aS) ; -Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const; + Standard_EXPORT + const Handle_Geom_Surface& Surface() const; + Standard_EXPORT + virtual void Perform() ; -Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; -//Standard_EXPORT ~GEOMAlgo_ClsfSurf(); + Standard_EXPORT + virtual void CheckData() ; + Standard_EXPORT + virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const; + Standard_EXPORT + virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; + DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfSurf); - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -Handle_Geom_Surface myS; -GeomAdaptor_Surface myGAS; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + protected: + Handle_Geom_Surface myS; + GeomAdaptor_Surface myGAS; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.ixx b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.ixx deleted file mode 100644 index 1ad284a14..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.ixx +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -//GEOMAlgo_ClsfSurf::~GEOMAlgo_ClsfSurf() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfSurf_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(GEOMAlgo_Clsf); - static Handle_Standard_Type aType2 = STANDARD_TYPE(GEOMAlgo_HAlgo); - static Handle_Standard_Type aType3 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfSurf", - sizeof(GEOMAlgo_ClsfSurf), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_ClsfSurf) Handle(GEOMAlgo_ClsfSurf)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_ClsfSurf) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_ClsfSurf))) { - _anOtherObject = Handle(GEOMAlgo_ClsfSurf)((Handle(GEOMAlgo_ClsfSurf)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_ClsfSurf::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_ClsfSurf) ; -} -//Standard_Boolean GEOMAlgo_ClsfSurf::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(GEOMAlgo_ClsfSurf) == AType || GEOMAlgo_Clsf::IsKind(AType)); -//} -//Handle_GEOMAlgo_ClsfSurf::~Handle_GEOMAlgo_ClsfSurf() {} - diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.jxx b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.jxx deleted file mode 100644 index d4f97423d..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Geom_Surface_HeaderFile -#include -#endif -#ifndef _Geom_Curve_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ClsfSurf_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cdl b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cdl deleted file mode 100644 index fb40299cd..000000000 --- a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cdl +++ /dev/null @@ -1,67 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_CoupleOfShapes.cdl --- Created: Wed Dec 15 13:00:10 2004 --- Author: Peter KURNEV --- -class CoupleOfShapes from GEOMAlgo - - ---Purpose: - -uses - Shape from TopoDS - ---raises - -is - Create - returns CoupleOfShapes from GEOMAlgo; - - SetShapes(me:out; - aS1: Shape from TopoDS; - aS2: Shape from TopoDS); - - SetShape1(me:out; - aS1: Shape from TopoDS); - - SetShape2(me:out; - aS2: Shape from TopoDS); - - Shapes(me; - aS1:out Shape from TopoDS; - aS2:out Shape from TopoDS); - - Shape1(me) - returns Shape from TopoDS; - ---C++:return const & - - Shape2(me) - returns Shape from TopoDS; - ---C++:return const & - -fields - - myShape1: Shape from TopoDS is protected; - myShape2: Shape from TopoDS is protected; - -end CoupleOfShapes; diff --git a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx index f233a65c9..0055a8228 100644 --- a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx +++ b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx @@ -19,22 +19,21 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - // File: GEOMAlgo_CoupleOfShapes.cxx // Created: Wed Dec 15 13:03:52 2004 // Author: Peter KURNEV // // -#include +#include //======================================================================= //function : GEOMAlgo_CoupleOfShapes -//purpose : +//purpose : //======================================================================= GEOMAlgo_CoupleOfShapes::GEOMAlgo_CoupleOfShapes() {} //======================================================================= //function : SetShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1, const TopoDS_Shape& aS2) @@ -44,7 +43,7 @@ void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1, } //======================================================================= //function : Shapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1, TopoDS_Shape& aS2)const @@ -54,7 +53,7 @@ void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1, } //======================================================================= //function : SetShape1 -//purpose : +//purpose : //======================================================================= void GEOMAlgo_CoupleOfShapes::SetShape1(const TopoDS_Shape& aS1) { @@ -62,7 +61,7 @@ void GEOMAlgo_CoupleOfShapes::SetShape1(const TopoDS_Shape& aS1) } //======================================================================= //function : SetShape2 -//purpose : +//purpose : //======================================================================= void GEOMAlgo_CoupleOfShapes::SetShape2(const TopoDS_Shape& aS2) { @@ -70,7 +69,7 @@ void GEOMAlgo_CoupleOfShapes::SetShape2(const TopoDS_Shape& aS2) } //======================================================================= //function : Shape1 -//purpose : +//purpose : //======================================================================= const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape1()const { @@ -78,7 +77,7 @@ const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape1()const } //======================================================================= //function : Shape2 -//purpose : +//purpose : //======================================================================= const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape2()const { diff --git a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx index 557df22c8..7e346aa8d 100644 --- a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx +++ b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,98 +16,49 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_CoupleOfShapes.hxx +// Created: Wed Dec 15 13:03:52 2004 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile #define _GEOMAlgo_CoupleOfShapes_HeaderFile -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -class TopoDS_Shape; - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - - -class GEOMAlgo_CoupleOfShapes { - -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 - // - - -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; - +#include -Standard_EXPORT const TopoDS_Shape& Shape1() const; +//======================================================================= +//class : GEOMAlgo_CoupleOfShapes +//purpose : +//======================================================================= +class GEOMAlgo_CoupleOfShapes +{ + public: + Standard_EXPORT + GEOMAlgo_CoupleOfShapes(); + Standard_EXPORT + void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ; -Standard_EXPORT const TopoDS_Shape& Shape2() const; + 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; protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -TopoDS_Shape myShape1; -TopoDS_Shape myShape2; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + TopoDS_Shape myShape1; + TopoDS_Shape myShape2; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.ixx b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.ixx deleted file mode 100644 index 03022d5e4..000000000 --- a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.jxx b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.jxx deleted file mode 100644 index 726dd803f..000000000 --- a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx index deb44cbcc..ed169e1c5 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx @@ -16,97 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx +// Created: Wed Feb 22 11:05:01 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile -#define _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class TopoDS_Shape; -class TopTools_OrientedShapeMapHasher; -class GEOMAlgo_DataMapOfOrientedShapeShape; -class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape; +#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile +#define GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile -#ifndef _Standard_HeaderFile -#include +#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile +#include #endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape : public TCollection_BasicMapIterator { - -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 - // - - -Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape(); - - -Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape(const GEOMAlgo_DataMapOfOrientedShapeShape& aMap); - - -Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfOrientedShapeShape& aMap) ; - - -Standard_EXPORT const TopoDS_Shape& Key() const; - - -Standard_EXPORT const TopoDS_Shape& Value() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_0.cxx deleted file mode 100644 index 37cd70f3a..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_0.cxx +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_OrientedShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher TopTools_OrientedShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx index 513b57034..2ea6a30ad 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,100 +16,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx +// Created: Wed Feb 22 10:58:14 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile -#define _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class GEOMAlgo_PassKey; -class GEOMAlgo_PassKeyMapHasher; -class GEOMAlgo_DataMapOfPassKeyInteger; -class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger; +#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile +#define GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include +#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile +#include #endif - - -class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger : public TCollection_BasicMapIterator { - -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 - // - - -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; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx deleted file mode 100644 index 97b5c8316..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile -#include -#endif - - -#define TheKey GEOMAlgo_PassKey -#define TheKey_hxx -#define TheItem Standard_Integer -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx index 5fdc3f2e4..bda2348e2 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx @@ -16,98 +16,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx +// Created: Wed Feb 22 11:01:34 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile -#define _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class GEOMAlgo_PassKeyShape; -class TopoDS_Shape; -class GEOMAlgo_PassKeyShapeMapHasher; -class GEOMAlgo_DataMapOfPassKeyShapeShape; -class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape; +#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile +#define GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile -#ifndef _Standard_HeaderFile -#include +#ifndef GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile +#include #endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape : public TCollection_BasicMapIterator { - -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 - // - - -Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape(); - - -Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape(const GEOMAlgo_DataMapOfPassKeyShapeShape& aMap); - - -Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfPassKeyShapeShape& aMap) ; - - -Standard_EXPORT const GEOMAlgo_PassKeyShape& Key() const; - - -Standard_EXPORT const TopoDS_Shape& Value() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_0.cxx deleted file mode 100644 index 1f4129c5b..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_0.cxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile -#include -#endif - - -#define TheKey GEOMAlgo_PassKeyShape -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyShapeShape -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx index a539700e7..9bce78862 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,100 +16,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx +// Created: Wed Feb 22 10:53:47 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile -#define _GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class TopTools_ListOfShape; -class TColStd_MapRealHasher; -class GEOMAlgo_DataMapOfRealListOfShape; -class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape; +#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile +#define GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include +#ifndef GEOMAlgo_DataMapOfRealListOfShape_HeaderFile +#include #endif - - -class GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape : public TCollection_BasicMapIterator { - -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 - // - - -Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape(); - - -Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape(const GEOMAlgo_DataMapOfRealListOfShape& aMap); - - -Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfRealListOfShape& aMap) ; - - -Standard_EXPORT const Standard_Real& Key() const; - - -Standard_EXPORT const TopTools_ListOfShape& Value() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_0.cxx deleted file mode 100644 index d645bd9f9..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_0.cxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TColStd_MapRealHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfRealListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile -#include -#endif - - -#define TheKey Standard_Real -#define TheKey_hxx -#define TheItem TopTools_ListOfShape -#define TheItem_hxx -#define Hasher TColStd_MapRealHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfRealListOfShape -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx index 80db864ed..5b19a5aeb 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,82 +16,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile -#define _GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class TopoDS_Shape; -class TopTools_MapOfShape; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapOfShapeMapOfShape; -class GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape; - - - -class GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape : public TCollection_BasicMapIterator { -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); - } - - - Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape(); - - Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape(const GEOMAlgo_DataMapOfShapeMapOfShape& aMap); - - Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfShapeMapOfShape& aMap) ; - - Standard_EXPORT const TopoDS_Shape& Key() const; - - Standard_EXPORT const TopTools_MapOfShape& Value() const; - - - - - -protected: - - - - - -private: - - - - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif +// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx +// Created: Wed Feb 22 11:08:26 2012 +// Author: +// + + +#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile +#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile + +#ifndef GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile +#include +#endif +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_0.cxx deleted file mode 100644 index f8030d2ed..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_0.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_MapOfShape_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopTools_MapOfShape -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeMapOfShape -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx index ea0e865b3..0eed7b26d 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,82 +16,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile -#define _GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class TopoDS_Shape; -class gp_Pnt; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapOfShapePnt; -class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt; - - - -class GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt : public TCollection_BasicMapIterator { -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); - } - - - Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt(); - - Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt(const GEOMAlgo_DataMapOfShapePnt& aMap); - - Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfShapePnt& aMap) ; - - Standard_EXPORT const TopoDS_Shape& Key() const; - - Standard_EXPORT const gp_Pnt& Value() const; - - - - - -protected: - - - - - -private: - - - - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif +// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx +// Created: Wed Feb 22 11:11:09 2012 +// Author: +// + + +#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile +#define GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile + +#ifndef GEOMAlgo_DataMapOfShapePnt_HeaderFile +#include +#endif +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_0.cxx deleted file mode 100644 index afcf4e205..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_0.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfShapePnt_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem gp_Pnt -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapePnt -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapePnt -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx index 1632b8b2c..4fa86a84f 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,100 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx +// Created: Wed Feb 22 10:49:11 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile -#define _GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class TopoDS_Shape; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapOfShapeReal; -class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal; +#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile +#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include +#ifndef GEOMAlgo_DataMapOfShapeReal_HeaderFile +#include #endif - -class GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal : public TCollection_BasicMapIterator { - -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 - // - - -Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal(); - - -Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal(const GEOMAlgo_DataMapOfShapeReal& aMap); - - -Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfShapeReal& aMap) ; - - -Standard_EXPORT const TopoDS_Shape& Key() const; - - -Standard_EXPORT const Standard_Real& Value() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_0.cxx deleted file mode 100644 index a8a0d2da0..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_0.cxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfShapeReal_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem Standard_Real -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeReal -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeReal -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx index bc54b432c..fad39a60b 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,57 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx +// Created: Wed Feb 22 08:39:02 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile -#define _GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class TopoDS_Shape; -class GEOMAlgo_ShapeSet; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapOfShapeShapeSet; -class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet; +#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile +#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include +#ifndef GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile +#include #endif -class GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet : public TCollection_BasicMapIterator -{ -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); - } - - Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet(); - - Standard_EXPORT GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet - (const GEOMAlgo_DataMapOfShapeShapeSet& aMap); - - Standard_EXPORT void Initialize(const GEOMAlgo_DataMapOfShapeShapeSet& aMap); - - Standard_EXPORT const TopoDS_Shape& Key() const; - - Standard_EXPORT const GEOMAlgo_ShapeSet& Value() const; -}; - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_0.cxx deleted file mode 100644 index ac21bb25a..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_0.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeSet_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem GEOMAlgo_ShapeSet -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeShapeSet -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx deleted file mode 100644 index 88e037400..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile -#define _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif - -class TopoDS_Shape; -class TopTools_OrientedShapeMapHasher; -class GEOMAlgo_DataMapOfOrientedShapeShape; -class GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape; - -class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape : public TCollection_MapNode { - -public: - GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape - (const TopoDS_Shape& K, const TopoDS_Shape& I, const TCollection_MapNodePtr& n); - - TopoDS_Shape& Key() const; - TopoDS_Shape& Value() const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) - -private: - TopoDS_Shape myKey; - TopoDS_Shape myValue; -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher TopTools_OrientedShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_0.cxx deleted file mode 100644 index aced2ed90..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_0.cxx +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_OrientedShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile -#include -#endif - -#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 - -IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(TCollection_MapNode), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() -IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) - -IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape,Standard_Transient) -IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) - -#else - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_() -{ - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape))) { - _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape)&)AnObject); - } - } - - return _anOtherObject; -} - -const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape); -} - -#endif - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher TopTools_OrientedShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape -#define TCollection_DataMap_hxx -#include diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx deleted file mode 100644 index 7b4b7b2c7..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile -#define _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile -#include -#endif - -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif - -class GEOMAlgo_PassKey; -class GEOMAlgo_PassKeyMapHasher; -class GEOMAlgo_DataMapOfPassKeyInteger; -class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger; - -class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger : public TCollection_MapNode { - -public: - GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger - (const GEOMAlgo_PassKey& K, const Standard_Integer& I, const TCollection_MapNodePtr& n); - - GEOMAlgo_PassKey& Key() const; - Standard_Integer& Value() const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) - -private: - GEOMAlgo_PassKey myKey; - Standard_Integer myValue; -}; - -#define TheKey GEOMAlgo_PassKey -#define TheKey_hxx -#define TheItem Standard_Integer -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx deleted file mode 100644 index 86198cf55..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile -#include -#endif - -#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 - -IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(TCollection_MapNode), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() -IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) - -IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger,Standard_Transient) -IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) - -#else - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger))) { - _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger) ; -} - -#endif - -#define TheKey GEOMAlgo_PassKey -#define TheKey_hxx -#define TheItem Standard_Integer -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger -#define TCollection_DataMap_hxx -#include diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx deleted file mode 100644 index 00d2d4696..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile -#define _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile -#include -#endif - -#ifndef _GEOMAlgo_PassKeyShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif - -class GEOMAlgo_PassKeyShape; -class TopoDS_Shape; -class GEOMAlgo_PassKeyShapeMapHasher; -class GEOMAlgo_DataMapOfPassKeyShapeShape; -class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape; - -class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape : public TCollection_MapNode { - -public: - GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape - (const GEOMAlgo_PassKeyShape& K, const TopoDS_Shape& I, const TCollection_MapNodePtr& n); - - GEOMAlgo_PassKeyShape& Key() const; - TopoDS_Shape& Value() const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) - -private: - GEOMAlgo_PassKeyShape myKey; - TopoDS_Shape myValue; -}; - -#define TheKey GEOMAlgo_PassKeyShape -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyShapeShape -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx deleted file mode 100644 index 2a279fc7b..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _GEOMAlgo_PassKeyShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile -#include -#endif - -#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 - -IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(TCollection_MapNode), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() -IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) - -IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape,Standard_Transient) -IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) - -#else - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_Type_() -{ - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape))) { - _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape)&)AnObject); - } - } - - return _anOtherObject; -} - -const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape); -} - -#endif - -#define TheKey GEOMAlgo_PassKeyShape -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyShapeShape -#define TCollection_DataMap_hxx -#include diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx deleted file mode 100644 index 381ea0430..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile -#define _GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile -#include -#endif - -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif - -class TopTools_ListOfShape; -class TColStd_MapRealHasher; -class GEOMAlgo_DataMapOfRealListOfShape; -class GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape; - -class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape : public TCollection_MapNode -{ -public: - GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape - (const Standard_Real& K,const TopTools_ListOfShape& I,const TCollection_MapNodePtr& n); - - Standard_Real& Key() const; - TopTools_ListOfShape& Value() const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) - -private: - Standard_Real myKey; - TopTools_ListOfShape myValue; -}; - -#define TheKey Standard_Real -#define TheKey_hxx -#define TheItem TopTools_ListOfShape -#define TheItem_hxx -#define Hasher TColStd_MapRealHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfRealListOfShape -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx deleted file mode 100644 index 5ab8c1789..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TColStd_MapRealHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfRealListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile -#include -#endif - -#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 - -IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(TCollection_MapNode), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() -IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) - -IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape,Standard_Transient) -IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) - -#else - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_Type_() -{ - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape))) { - _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape)&)AnObject); - } - } - - return _anOtherObject; -} - -const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape); -} - -#endif - -#define TheKey Standard_Real -#define TheKey_hxx -#define TheItem TopTools_ListOfShape -#define TheItem_hxx -#define Hasher TColStd_MapRealHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfRealListOfShape -#define TCollection_DataMap_hxx -#include diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx deleted file mode 100644 index d2e50893a..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile -#define _GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_MapOfShape_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif - -class TopoDS_Shape; -class TopTools_MapOfShape; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapOfShapeMapOfShape; -class GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape; - -class GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape : public TCollection_MapNode { - -public: - GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape - (const TopoDS_Shape& K, const TopTools_MapOfShape& I, const TCollection_MapNodePtr& n); - - TopoDS_Shape& Key() const; - TopTools_MapOfShape& Value() const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape) - -private: - TopoDS_Shape myKey; - TopTools_MapOfShape myValue; -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopTools_MapOfShape -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeMapOfShape -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_0.cxx deleted file mode 100644 index c19e3bc3c..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_0.cxx +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_MapOfShape_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile -#include -#endif - - -#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 - -IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape) -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(TCollection_MapNode), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() -IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape) - -IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape,Standard_Transient) -IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape) - -#else - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_Type_() -{ - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape) Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape))) { - _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape)&)AnObject); - } - } - - return _anOtherObject; -} - -const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape); -} - -#endif - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopTools_MapOfShape -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeMapOfShape -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx deleted file mode 100644 index c470093e3..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile -#define _GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif - -class TopoDS_Shape; -class gp_Pnt; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapOfShapePnt; -class GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt; - -class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt : public TCollection_MapNode -{ -public: - GEOMAlgo_DataMapNodeOfDataMapOfShapePnt - (const TopoDS_Shape& K, const gp_Pnt& I, const TCollection_MapNodePtr& n); - - TopoDS_Shape& Key() const; - gp_Pnt& Value() const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt) - -private: - TopoDS_Shape myKey; - gp_Pnt myValue; -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem gp_Pnt -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapePnt -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapePnt -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_0.cxx deleted file mode 100644 index eb1ce0950..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_0.cxx +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfShapePnt_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile -#include -#endif - - -#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 - -IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt) -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(TCollection_MapNode), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() -IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt) - -IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt,Standard_Transient) -IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt) - -#else - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_Type_() -{ - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapePnt", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt) Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt))) { - _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt)&)AnObject); - } - } - - return _anOtherObject; -} - -const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapePnt::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt); -} - -#endif - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem gp_Pnt -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapePnt -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapePnt -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx deleted file mode 100644 index d6ca24d11..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile -#define _GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif - -class TopoDS_Shape; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapOfShapeReal; -class GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal; - -class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal : public TCollection_MapNode -{ -public: - GEOMAlgo_DataMapNodeOfDataMapOfShapeReal - (const TopoDS_Shape& K, const Standard_Real& I, const TCollection_MapNodePtr& n); - - TopoDS_Shape& Key() const; - Standard_Real& Value() const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) - -private: - TopoDS_Shape myKey; - Standard_Real myValue; -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem Standard_Real -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeReal -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeReal -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx deleted file mode 100644 index b5eadeb54..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfShapeReal_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile -#include -#endif - -#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 - -IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(TCollection_MapNode), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() -IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) - -IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal,Standard_Transient) -IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) - -#else - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_Type_() -{ - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeReal", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal))) { - _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal)&)AnObject); - } - } - - return _anOtherObject ; -} - -const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapeReal::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal) ; -} - -#endif - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem Standard_Real -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeReal -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeReal -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx deleted file mode 100644 index a07f4c488..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile -#define _GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeSet_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif - -class TopoDS_Shape; -class GEOMAlgo_ShapeSet; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapOfShapeShapeSet; -class GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet; - -class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet : public TCollection_MapNode -{ -public: - GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet - (const TopoDS_Shape& K, const GEOMAlgo_ShapeSet& I, const TCollection_MapNodePtr& n); - - TopoDS_Shape& Key() const; - GEOMAlgo_ShapeSet& Value() const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) - -private: - TopoDS_Shape myKey; - GEOMAlgo_ShapeSet myValue; -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem GEOMAlgo_ShapeSet -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeShapeSet -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx deleted file mode 100644 index fbe632546..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeSet_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile -#include -#endif - -#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 - -IMPLEMENT_STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(TCollection_MapNode), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() -IMPLEMENT_STANDARD_TYPE_END(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) - -IMPLEMENT_DOWNCAST(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet,Standard_Transient) -IMPLEMENT_STANDARD_RTTI(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) - -#else - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_Type_() -{ - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet))) { - _anOtherObject = Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)((Handle(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet)&)AnObject); - } - } - - return _anOtherObject; -} - -const Handle(Standard_Type)& GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet); -} - -#endif - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem GEOMAlgo_ShapeSet -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeShapeSet -#define TCollection_DataMap_hxx -#include diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfOrientedShapeShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfOrientedShapeShape.hxx index 81313ba98..3126d0e4a 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfOrientedShapeShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfOrientedShapeShape.hxx @@ -16,105 +16,27 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapOfOrientedShapeShape.hxx +// Created: Wed Feb 22 11:03:36 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile -#define _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_NoSuchObject; -class TopoDS_Shape; -class TopTools_OrientedShapeMapHasher; -class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape; -class GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class GEOMAlgo_DataMapOfOrientedShapeShape : public TCollection_BasicMap -{ -public: +#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile +#define GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile - 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); - } +#include +#include - // Methods PUBLIC - // +#define _NCollection_MapHasher +#include - Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape(const Standard_Integer NbBuckets = 1); - Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape& Assign(const GEOMAlgo_DataMapOfOrientedShapeShape& Other) ; - GEOMAlgo_DataMapOfOrientedShapeShape& operator =(const GEOMAlgo_DataMapOfOrientedShapeShape& Other) - { - return Assign(Other); - } +typedef NCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape; +typedef GEOMAlgo_DataMapOfOrientedShapeShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape; - Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; +#undef _NCollection_MapHasher - Standard_EXPORT void Clear() ; - ~GEOMAlgo_DataMapOfOrientedShapeShape() - { - Clear(); - } - Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const TopoDS_Shape& I) ; - Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ; - - Standard_EXPORT const TopoDS_Shape& Find(const TopoDS_Shape& K) const; - const TopoDS_Shape& operator()(const TopoDS_Shape& K) const - { - return Find(K); - } - - Standard_EXPORT TopoDS_Shape& ChangeFind(const TopoDS_Shape& K) ; - TopoDS_Shape& operator()(const TopoDS_Shape& K) - { - return ChangeFind(K); - } - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K); -#endif - -private: - - // Methods PRIVATE - // -Standard_EXPORT GEOMAlgo_DataMapOfOrientedShapeShape(const GEOMAlgo_DataMapOfOrientedShapeShape& Other); - -}; - -// other Inline functions and methods (like "C++: function call" methods) -// #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfOrientedShapeShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfOrientedShapeShape_0.cxx deleted file mode 100644 index 25bfd175c..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfOrientedShapeShape_0.cxx +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_OrientedShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher TopTools_OrientedShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape -#define TCollection_DataMap_hxx -#include diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx index bc5e47173..6ba58447b 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,105 +16,26 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapOfPassKeyInteger.hxx +// Created: Wed Feb 22 10:55:55 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile -#define _GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_NoSuchObject; -class GEOMAlgo_PassKey; -class GEOMAlgo_PassKeyMapHasher; -class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger; -class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class GEOMAlgo_DataMapOfPassKeyInteger : public TCollection_BasicMap { -public: +#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile +#define GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile - 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 - // - -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) -{ - return ChangeFind(K); -} - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address Find1 (const GEOMAlgo_PassKey& K) const; - Standard_EXPORT Standard_Address ChangeFind1 (const GEOMAlgo_PassKey& K); -#endif +#include +#include +#include -private: +#define _NCollection_MapHasher +#include - // Methods PRIVATE - // -Standard_EXPORT GEOMAlgo_DataMapOfPassKeyInteger(const GEOMAlgo_DataMapOfPassKeyInteger& Other); +typedef NCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger; +typedef GEOMAlgo_DataMapOfPassKeyInteger::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger; -}; +#undef _NCollection_MapHasher -// other Inline functions and methods (like "C++: function call" methods) -// #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx deleted file mode 100644 index 198f0679a..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger_0.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile -#include -#endif - - -#define TheKey GEOMAlgo_PassKey -#define TheKey_hxx -#define TheItem Standard_Integer -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyShapeShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyShapeShape.hxx index f35bdbf85..c9a030daa 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyShapeShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyShapeShape.hxx @@ -16,106 +16,25 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapOfPassKeyShapeShape.hxx +// Created: Wed Feb 22 11:00:16 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile -#define _GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_NoSuchObject; -class GEOMAlgo_PassKeyShape; -class TopoDS_Shape; -class GEOMAlgo_PassKeyShapeMapHasher; -class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape; -class GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class GEOMAlgo_DataMapOfPassKeyShapeShape : public TCollection_BasicMap { - -public: +#ifndef GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile +#define GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile - 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); - } +#include +#include +#include - // Methods PUBLIC - // +#define _NCollection_MapHasher +#include -Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape(const Standard_Integer NbBuckets = 1); -Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape& Assign(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other) ; - GEOMAlgo_DataMapOfPassKeyShapeShape& operator =(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other) -{ - return Assign(Other); -} +typedef NCollection_DataMap GEOMAlgo_DataMapOfPassKeyShapeShape; +typedef GEOMAlgo_DataMapOfPassKeyShapeShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape; -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - -Standard_EXPORT void Clear() ; -~GEOMAlgo_DataMapOfPassKeyShapeShape() -{ - Clear(); -} - -Standard_EXPORT Standard_Boolean Bind(const GEOMAlgo_PassKeyShape& K,const TopoDS_Shape& I) ; -Standard_EXPORT Standard_Boolean IsBound(const GEOMAlgo_PassKeyShape& K) const; -Standard_EXPORT Standard_Boolean UnBind(const GEOMAlgo_PassKeyShape& K) ; - -Standard_EXPORT const TopoDS_Shape& Find(const GEOMAlgo_PassKeyShape& K) const; - const TopoDS_Shape& operator()(const GEOMAlgo_PassKeyShape& K) const -{ - return Find(K); -} - -Standard_EXPORT TopoDS_Shape& ChangeFind(const GEOMAlgo_PassKeyShape& K) ; - TopoDS_Shape& operator()(const GEOMAlgo_PassKeyShape& K) -{ - return ChangeFind(K); -} - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address Find1 (const GEOMAlgo_PassKeyShape& K) const; - Standard_EXPORT Standard_Address ChangeFind1 (const GEOMAlgo_PassKeyShape& K); -#endif - -private: - - // Methods PRIVATE - // -Standard_EXPORT GEOMAlgo_DataMapOfPassKeyShapeShape(const GEOMAlgo_DataMapOfPassKeyShapeShape& Other); - -}; - -// other Inline functions and methods (like "C++: function call" methods) -// #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyShapeShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyShapeShape_0.cxx deleted file mode 100644 index 7ed3b8dbe..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyShapeShape_0.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile -#include -#endif - - -#define TheKey GEOMAlgo_PassKeyShape -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfPassKeyShapeShape -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfRealListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfRealListOfShape.hxx index 45a038bbf..179402f9e 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfRealListOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfRealListOfShape.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,110 +16,28 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapOfRealListOfShape.hxx +// Created: Wed Feb 22 10:51:48 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapOfRealListOfShape_HeaderFile -#define _GEOMAlgo_DataMapOfRealListOfShape_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_NoSuchObject; -class TopTools_ListOfShape; -class TColStd_MapRealHasher; -class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape; -class GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include -class GEOMAlgo_DataMapOfRealListOfShape : public TCollection_BasicMap { +#ifndef GEOMAlgo_DataMapOfRealListOfShape_HeaderFile +#define GEOMAlgo_DataMapOfRealListOfShape_HeaderFile -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 - // - - -Standard_EXPORT GEOMAlgo_DataMapOfRealListOfShape(const Standard_Integer NbBuckets = 1); - - -Standard_EXPORT GEOMAlgo_DataMapOfRealListOfShape& Assign(const GEOMAlgo_DataMapOfRealListOfShape& Other) ; - GEOMAlgo_DataMapOfRealListOfShape& operator =(const GEOMAlgo_DataMapOfRealListOfShape& Other) -{ - return Assign(Other); -} - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - -Standard_EXPORT void Clear() ; -~GEOMAlgo_DataMapOfRealListOfShape() -{ - Clear(); -} - -Standard_EXPORT Standard_Boolean Bind(const Standard_Real& K,const TopTools_ListOfShape& I) ; -Standard_EXPORT Standard_Boolean IsBound(const Standard_Real& K) const; -Standard_EXPORT Standard_Boolean UnBind(const Standard_Real& K) ; - -Standard_EXPORT const TopTools_ListOfShape& Find(const Standard_Real& K) const; - const TopTools_ListOfShape& operator()(const Standard_Real& K) const -{ - return Find(K); -} +#include +#include +#include -Standard_EXPORT TopTools_ListOfShape& ChangeFind(const Standard_Real& K) ; - TopTools_ListOfShape& operator()(const Standard_Real& K) -{ - return ChangeFind(K); -} -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address Find1 (const Standard_Real& K) const; - Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Real& K); -#endif +#define _NCollection_MapHasher +#include -private: +typedef NCollection_DataMap GEOMAlgo_DataMapOfRealListOfShape; +typedef GEOMAlgo_DataMapOfRealListOfShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape; - // Methods PRIVATE - // -Standard_EXPORT GEOMAlgo_DataMapOfRealListOfShape(const GEOMAlgo_DataMapOfRealListOfShape& Other); +#undef _NCollection_MapHasher -}; -// other Inline functions and methods (like "C++: function call" methods) -// #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfRealListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfRealListOfShape_0.cxx deleted file mode 100644 index 8794f0809..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfRealListOfShape_0.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TColStd_MapRealHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile -#include -#endif - - -#define TheKey Standard_Real -#define TheKey_hxx -#define TheItem TopTools_ListOfShape -#define TheItem_hxx -#define Hasher TColStd_MapRealHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfRealListOfShape -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeMapOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeMapOfShape.hxx index dd67f9fff..510f4373c 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeMapOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeMapOfShape.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,102 +16,29 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile -#define _GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_NoSuchObject; -class TopoDS_Shape; -class TopTools_MapOfShape; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape; -class GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape; - -#include - -class GEOMAlgo_DataMapOfShapeMapOfShape : public TCollection_BasicMap { -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); - } - - - Standard_EXPORT GEOMAlgo_DataMapOfShapeMapOfShape(const Standard_Integer NbBuckets = 1); - - Standard_EXPORT GEOMAlgo_DataMapOfShapeMapOfShape& Assign(const GEOMAlgo_DataMapOfShapeMapOfShape& Other) ; - GEOMAlgo_DataMapOfShapeMapOfShape& operator =(const GEOMAlgo_DataMapOfShapeMapOfShape& Other) -{ - return Assign(Other); -} - - Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - Standard_EXPORT void Clear() ; -~GEOMAlgo_DataMapOfShapeMapOfShape() -{ - Clear(); -} - - Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const TopTools_MapOfShape& I) ; - - Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const; - - Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ; - - Standard_EXPORT const TopTools_MapOfShape& Find(const TopoDS_Shape& K) const; - const TopTools_MapOfShape& operator()(const TopoDS_Shape& K) const -{ - return Find(K); -} - - Standard_EXPORT TopTools_MapOfShape& ChangeFind(const TopoDS_Shape& K) ; - TopTools_MapOfShape& operator()(const TopoDS_Shape& K) -{ - return ChangeFind(K); -} - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K); -#endif - -private: - - Standard_EXPORT GEOMAlgo_DataMapOfShapeMapOfShape(const GEOMAlgo_DataMapOfShapeMapOfShape& Other); - -}; - -// other Inline functions and methods (like "C++: function call" methods) - -#endif +// File: GEOMAlgo_DataMapOfShapeMapOfShape.hxx +// Created: Wed Feb 22 11:07:16 2012 +// Author: +// + + +#ifndef GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile +#define GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile + + +#include +#include +#include + +#define _NCollection_MapHasher +#include + + +typedef NCollection_DataMap GEOMAlgo_DataMapOfShapeMapOfShape; +typedef GEOMAlgo_DataMapOfShapeMapOfShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape; + +#undef _NCollection_MapHasher + + + +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeMapOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeMapOfShape_0.cxx deleted file mode 100644 index 25d966ad3..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeMapOfShape_0.cxx +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_MapOfShape_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopTools_MapOfShape -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeMapOfShape -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt.hxx index 85bb78cb3..c552d1c81 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,102 +16,29 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _GEOMAlgo_DataMapOfShapePnt_HeaderFile -#define _GEOMAlgo_DataMapOfShapePnt_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_NoSuchObject; -class TopoDS_Shape; -class gp_Pnt; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt; -class GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt; - -#include - -class GEOMAlgo_DataMapOfShapePnt : public TCollection_BasicMap { -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); - } - - - Standard_EXPORT GEOMAlgo_DataMapOfShapePnt(const Standard_Integer NbBuckets = 1); - - Standard_EXPORT GEOMAlgo_DataMapOfShapePnt& Assign(const GEOMAlgo_DataMapOfShapePnt& Other) ; - GEOMAlgo_DataMapOfShapePnt& operator =(const GEOMAlgo_DataMapOfShapePnt& Other) -{ - return Assign(Other); -} - - Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - Standard_EXPORT void Clear() ; -~GEOMAlgo_DataMapOfShapePnt() -{ - Clear(); -} - - Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const gp_Pnt& I) ; - - Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const; - - Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ; - - Standard_EXPORT const gp_Pnt& Find(const TopoDS_Shape& K) const; - const gp_Pnt& operator()(const TopoDS_Shape& K) const -{ - return Find(K); -} - - Standard_EXPORT gp_Pnt& ChangeFind(const TopoDS_Shape& K) ; - gp_Pnt& operator()(const TopoDS_Shape& K) -{ - return ChangeFind(K); -} - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K); -#endif - -private: - - Standard_EXPORT GEOMAlgo_DataMapOfShapePnt(const GEOMAlgo_DataMapOfShapePnt& Other); - -}; - -// other Inline functions and methods (like "C++: function call" methods) - -#endif +// File: GEOMAlgo_DataMapOfShapePnt.hxx +// Created: Wed Feb 22 11:10:15 2012 +// Author: +// + + +#ifndef GEOMAlgo_DataMapOfShapePnt_HeaderFile +#define GEOMAlgo_DataMapOfShapePnt_HeaderFile + + +#include +#include +#include + +#define _NCollection_MapHasher +#include +#include + +typedef NCollection_DataMap GEOMAlgo_DataMapOfShapePnt; +typedef GEOMAlgo_DataMapOfShapePnt::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt; + +#undef _NCollection_MapHasher + + + +#endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt_0.cxx deleted file mode 100644 index 97e73fcfe..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt_0.cxx +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem gp_Pnt -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapePnt -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapePnt -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeReal.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeReal.hxx index d61212df5..cc20d7e16 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeReal.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeReal.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,129 +16,26 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapOfShapeReal.hxx +// Created: Wed Feb 22 10:47:23 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapOfShapeReal_HeaderFile -#define _GEOMAlgo_DataMapOfShapeReal_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_NoSuchObject; -class TopoDS_Shape; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal; -class GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class GEOMAlgo_DataMapOfShapeReal : public TCollection_BasicMap { - -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 - // - - -Standard_EXPORT GEOMAlgo_DataMapOfShapeReal(const Standard_Integer NbBuckets = 1); - - -Standard_EXPORT GEOMAlgo_DataMapOfShapeReal& Assign(const GEOMAlgo_DataMapOfShapeReal& Other) ; - GEOMAlgo_DataMapOfShapeReal& operator =(const GEOMAlgo_DataMapOfShapeReal& Other) -{ - return Assign(Other); -} - - - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; +#ifndef GEOMAlgo_DataMapOfShapeReal_HeaderFile +#define GEOMAlgo_DataMapOfShapeReal_HeaderFile -Standard_EXPORT void Clear() ; -~GEOMAlgo_DataMapOfShapeReal() -{ - Clear(); -} - - - -Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const Standard_Real& I) ; - - -Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const; - - -Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ; - - -Standard_EXPORT const Standard_Real& Find(const TopoDS_Shape& K) const; - const Standard_Real& operator()(const TopoDS_Shape& K) const -{ - return Find(K); -} - - - -Standard_EXPORT Standard_Real& ChangeFind(const TopoDS_Shape& K) ; - Standard_Real& operator()(const TopoDS_Shape& K) -{ - return ChangeFind(K); -} - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K); -#endif - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT GEOMAlgo_DataMapOfShapeReal(const GEOMAlgo_DataMapOfShapeReal& Other); - - - // Fields PRIVATE - // +#include +#include +#include +#define _NCollection_MapHasher +#include -}; +typedef NCollection_DataMap GEOMAlgo_DataMapOfShapeReal; +typedef GEOMAlgo_DataMapOfShapeReal::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal; -// other Inline functions and methods (like "C++: function call" methods) -// +#undef _NCollection_MapHasher #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeReal_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeReal_0.cxx deleted file mode 100644 index 571a0d045..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeReal_0.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem Standard_Real -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeReal -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeReal -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeShapeSet.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeShapeSet.hxx index 72ce0250f..4430717c3 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeShapeSet.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeShapeSet.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,99 +16,27 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_DataMapOfShapeShapeSet.hxx +// Created: Wed Feb 22 08:36:15 2012 +// Author: +// -#ifndef _GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile -#define _GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_NoSuchObject; -class TopoDS_Shape; -class GEOMAlgo_ShapeSet; -class TopTools_ShapeMapHasher; -class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet; -class GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class GEOMAlgo_DataMapOfShapeShapeSet : public TCollection_BasicMap { - -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); - } - - Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet(const Standard_Integer NbBuckets = 1); +#ifndef GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile +#define GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile - Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet& Assign(const GEOMAlgo_DataMapOfShapeShapeSet& Other) ; - GEOMAlgo_DataMapOfShapeShapeSet& operator =(const GEOMAlgo_DataMapOfShapeShapeSet& Other) - { - return Assign(Other); - } +#include +#include +#include - Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; +#define _NCollection_MapHasher +#include - Standard_EXPORT void Clear() ; - ~GEOMAlgo_DataMapOfShapeShapeSet() - { - Clear(); - } - Standard_EXPORT Standard_Boolean Bind(const TopoDS_Shape& K,const GEOMAlgo_ShapeSet& I) ; +typedef NCollection_DataMap GEOMAlgo_DataMapOfShapeShapeSet; +typedef GEOMAlgo_DataMapOfShapeShapeSet::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet; - Standard_EXPORT Standard_Boolean IsBound(const TopoDS_Shape& K) const; - - Standard_EXPORT Standard_Boolean UnBind(const TopoDS_Shape& K) ; - - Standard_EXPORT const GEOMAlgo_ShapeSet& Find(const TopoDS_Shape& K) const; - const GEOMAlgo_ShapeSet& operator()(const TopoDS_Shape& K) const - { - return Find(K); - } - - Standard_EXPORT GEOMAlgo_ShapeSet& ChangeFind(const TopoDS_Shape& K) ; - GEOMAlgo_ShapeSet& operator()(const TopoDS_Shape& K) - { - return ChangeFind(K); - } - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address Find1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFind1 (const TopoDS_Shape& K); -#endif +#undef _NCollection_MapHasher -private: - Standard_EXPORT GEOMAlgo_DataMapOfShapeShapeSet(const GEOMAlgo_DataMapOfShapeShapeSet& Other); -}; #endif diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeShapeSet_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeShapeSet_0.cxx deleted file mode 100644 index e8c897125..000000000 --- a/src/GEOMAlgo/GEOMAlgo_DataMapOfShapeShapeSet_0.cxx +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeSet_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem GEOMAlgo_ShapeSet -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet -#define TCollection_DataMapNode_Type_() GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_Type_() -#define TCollection_DataMap GEOMAlgo_DataMapOfShapeShapeSet -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl deleted file mode 100644 index 4a559e3dc..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cdl +++ /dev/null @@ -1,118 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_FinderShapeOn.cdl --- Created: Tue Jan 11 14:35:52 2005 --- Author: Peter KURNEV - -class FinderShapeOn from GEOMAlgo - inherits ShapeAlgo from GEOMAlgo - - ---Purpose: - -uses - Surface from Geom, - ShapeEnum from TopAbs, - ListOfShape from TopTools, - DataMapOfShapeShape from TopTools, - Shape from TopoDS, - State from GEOMAlgo, - IndexedDataMapOfShapeState from GEOMAlgo - ---raises - -is - Create - returns FinderShapeOn from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn();" - - Perform(me:out) - is redefined; - - SetSurface(me:out; - aS:Surface from Geom); - - SetShapeType(me:out; - aST:ShapeEnum from TopAbs); - - SetState(me:out; - aSF:State from GEOMAlgo); - - Surface(me) - returns Surface from Geom; - ---C++: return const & - - ShapeType(me) - returns ShapeEnum from TopAbs; - - State(me) - returns State from GEOMAlgo; - - Shapes(me) - returns ListOfShape from TopTools; - ---C++: return const & - - -- - -- protected methods - -- - CheckData(me:out) - is redefined protected; - - MakeArgument1(me:out) - is protected; - - MakeArgument2(me:out) - is protected; - - Find(me:out) - is protected; - - Find(me:out; - aS:Shape from TopoDS) - is protected; - - FindVertices(me:out) - is protected; - - CopySource(myclass; - aS :Shape from TopoDS; - aImages : out DataMapOfShapeShape from TopTools; - aOriginals: out DataMapOfShapeShape from TopTools; - aSC : out Shape from TopoDS); - - BuildTriangulation(myclass; - aS :Shape from TopoDS) - returns Boolean from Standard; - - -fields - mySurface : Surface from Geom is protected; - myShapeType : ShapeEnum from TopAbs is protected; - myState : State from GEOMAlgo is protected; - myArg1 : Shape from TopoDS is protected; - myArg2 : Shape from TopoDS is protected; - myLS : ListOfShape from TopTools is protected; - myImages : DataMapOfShapeShape from TopTools is protected; - myMSS : IndexedDataMapOfShapeState from GEOMAlgo is protected; - myIsAnalytic : Boolean from Standard is protected; - -end FinderShapeOn; diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx index 111369dce..4708ce554 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx @@ -24,7 +24,7 @@ // Created: Tue Jan 11 14:44:31 2005 // Author: Peter KURNEV -#include +#include #include @@ -76,7 +76,7 @@ //======================================================================= //function : GEOMAlgo_FinderShapeOn -//purpose : +//purpose : //======================================================================= GEOMAlgo_FinderShapeOn::GEOMAlgo_FinderShapeOn() : @@ -89,14 +89,14 @@ GEOMAlgo_FinderShapeOn::GEOMAlgo_FinderShapeOn() } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_FinderShapeOn::~GEOMAlgo_FinderShapeOn() { } //======================================================================= //function : SetSurface -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::SetSurface(const Handle(Geom_Surface)& aS) { @@ -104,7 +104,7 @@ void GEOMAlgo_FinderShapeOn::SetSurface(const Handle(Geom_Surface)& aS) } //======================================================================= //function : Surface -//purpose : +//purpose : //======================================================================= const Handle(Geom_Surface)& GEOMAlgo_FinderShapeOn::Surface() const { @@ -112,7 +112,7 @@ const Handle(Geom_Surface)& GEOMAlgo_FinderShapeOn::Surface() const } //======================================================================= //function : SetShapeType -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::SetShapeType(const TopAbs_ShapeEnum aType) { @@ -120,7 +120,7 @@ void GEOMAlgo_FinderShapeOn::SetShapeType(const TopAbs_ShapeEnum aType) } //======================================================================= //function : ShapeType -//purpose : +//purpose : //======================================================================= TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn::ShapeType()const { @@ -128,7 +128,7 @@ TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn::ShapeType()const } //======================================================================= //function : SetState -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::SetState(const GEOMAlgo_State aState) { @@ -136,7 +136,7 @@ void GEOMAlgo_FinderShapeOn::SetState(const GEOMAlgo_State aState) } //======================================================================= //function : State -//purpose : +//purpose : //======================================================================= GEOMAlgo_State GEOMAlgo_FinderShapeOn::State() const { @@ -144,7 +144,7 @@ GEOMAlgo_State GEOMAlgo_FinderShapeOn::State() const } //======================================================================= // function: Shapes -// purpose: +// purpose: //======================================================================= const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn::Shapes() const { @@ -170,7 +170,7 @@ const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn::Shapes() const } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::Perform() { @@ -188,10 +188,8 @@ void GEOMAlgo_FinderShapeOn::Perform() return; } // -#if OCC_VERSION_LARGE > 0x06050200 // Initialize the context GEOMAlgo_ShapeAlgo::Perform(); -#endif // myIsAnalytic=GEOMAlgo_SurfaceTools::IsAnalytic(mySurface); // @@ -218,10 +216,10 @@ void GEOMAlgo_FinderShapeOn::Perform() } //======================================================================= //function : FindVertices -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::FindVertices() -{ +{ Standard_Integer i, aNb, iErr; TopAbs_State aSt; TopAbs_Orientation aOr; @@ -253,7 +251,7 @@ void GEOMAlgo_FinderShapeOn::FindVertices() } //======================================================================= //function : Find -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::Find() { @@ -295,7 +293,7 @@ void GEOMAlgo_FinderShapeOn::Find() } //======================================================================= //function : Find -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS) { @@ -320,7 +318,7 @@ void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS) myErrorStatus=31; // DSFiller failed return; } - // + // // 2. Find shapes GEOMAlgo_ShapeSolid* pSS; GEOMAlgo_VertexSolid aVXS; @@ -361,21 +359,21 @@ void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS) const TopTools_ListOfShape& aLS=pSS->Shapes(aSts[i]); aIt.Initialize(aLS); for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSImage=aIt.Value(); - if (myImages.IsBound(aSImage)) { - const TopoDS_Shape& aSx=myImages.Find(aSImage); + const TopoDS_Shape& aSImage=aIt.Value(); + if (myImages.IsBound(aSImage)) { + const TopoDS_Shape& aSx=myImages.Find(aSImage); myMSS.Add(aSx, aSts[i]); } else { myErrorStatus=33;// can not find original shape - return; + return; } } } } //======================================================================= //function : MakeArgument1 -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::MakeArgument1() { @@ -435,7 +433,7 @@ void GEOMAlgo_FinderShapeOn::MakeArgument1() break; } } - } // + } // else { aBB.MakeFace(aFace, mySurface, myTolerance); } @@ -449,7 +447,7 @@ void GEOMAlgo_FinderShapeOn::MakeArgument1() } //======================================================================= //function : MakeArgument2 -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::MakeArgument2() { @@ -466,7 +464,7 @@ void GEOMAlgo_FinderShapeOn::MakeArgument2() } //======================================================================= //function : CheckData -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::CheckData() { @@ -490,7 +488,7 @@ void GEOMAlgo_FinderShapeOn::CheckData() return; } // - if (myState==GEOMAlgo_ST_UNKNOWN || + if (myState==GEOMAlgo_ST_UNKNOWN || myState==GEOMAlgo_ST_INOUT) { myErrorStatus=13; // unallowed state type return; @@ -499,7 +497,7 @@ void GEOMAlgo_FinderShapeOn::CheckData() // //======================================================================= //function : CopySource -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE, TopTools_DataMapOfShapeShape& aImages, @@ -539,7 +537,7 @@ void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE, const TopoDS_Shape& aV=aIt.Value(); TopoDS_Shape aVx; // - CopySource (aV, aImages, aOriginals, aVx); + CopySource (aV, aImages, aOriginals, aVx); // aVx.Orientation(aV.Orientation()); BB.Add(aEx, aVx); @@ -552,7 +550,8 @@ void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE, //function : BuildTriangulation //purpose : //======================================================================= -Standard_Boolean GEOMAlgo_FinderShapeOn::BuildTriangulation (const TopoDS_Shape& theShape) +Standard_Boolean + GEOMAlgo_FinderShapeOn::BuildTriangulation (const TopoDS_Shape& theShape) { // calculate deflection Standard_Real aDeviationCoefficient = 0.001; @@ -605,8 +604,8 @@ Standard_Boolean GEOMAlgo_FinderShapeOn::BuildTriangulation (const TopoDS_Shape& // // 10 -mySurface=NULL // 11 -myShape=NULL -// 12 -unallowed type of sub-shapes -// 13 -unallowed state +// 12 -unallowed type of sub-shapes +// 13 -unallowed state // 20 -can not build the face // 30 -wrong args are used for DSFiller // 31 -DSFiller failed diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx index d3682f3a4..a05b902b9 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx @@ -1,3 +1,4 @@ + // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, @@ -20,127 +21,101 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_FinderShapeOn.hxx +// Created: Tue Jan 11 14:44:31 2005 +// Author: Peter KURNEV + #ifndef _GEOMAlgo_FinderShapeOn_HeaderFile #define _GEOMAlgo_FinderShapeOn_HeaderFile -#ifndef _Handle_Geom_Surface_HeaderFile +#include +#include #include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile #include -#endif -#ifndef _GEOMAlgo_State_HeaderFile #include -#endif -#ifndef _TopoDS_Shape_HeaderFile #include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile #include -#endif -#ifndef _TopTools_DataMapOfShapeShape_HeaderFile #include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile #include -#endif -class Geom_Surface; -class TopTools_ListOfShape; -class TopoDS_Shape; -class TopTools_DataMapOfShapeShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_FinderShapeOn : public GEOMAlgo_ShapeAlgo { - -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); - } - +#include +#include - Standard_EXPORT GEOMAlgo_FinderShapeOn(); - Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn(); +//======================================================================= +//function : GEOMAlgo_FinderShapeOn +//purpose : +//======================================================================= +class GEOMAlgo_FinderShapeOn : public GEOMAlgo_ShapeAlgo +{ + public: + Standard_EXPORT + GEOMAlgo_FinderShapeOn(); - Standard_EXPORT virtual void Perform(); + Standard_EXPORT + virtual ~GEOMAlgo_FinderShapeOn(); - Standard_EXPORT void SetSurface(const Handle(Geom_Surface)& aS) ; + Standard_EXPORT + virtual void Perform() ; - Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ; + Standard_EXPORT + void SetSurface(const Handle(Geom_Surface)& aS) ; - Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ; + Standard_EXPORT + void SetShapeType(const TopAbs_ShapeEnum aST) ; - Standard_EXPORT const Handle_Geom_Surface& Surface() const; + Standard_EXPORT + void SetState(const GEOMAlgo_State aSF) ; - Standard_EXPORT TopAbs_ShapeEnum ShapeType() const; + Standard_EXPORT + const Handle_Geom_Surface& Surface() const; - Standard_EXPORT GEOMAlgo_State State() const; + Standard_EXPORT + TopAbs_ShapeEnum ShapeType() const; - Standard_EXPORT const TopTools_ListOfShape& Shapes() const; + Standard_EXPORT + GEOMAlgo_State State() const; - Standard_EXPORT static void CopySource (const TopoDS_Shape& aS, - TopTools_DataMapOfShapeShape& aImages, - TopTools_DataMapOfShapeShape& aOriginals, - TopoDS_Shape& aSC) ; + Standard_EXPORT + const TopTools_ListOfShape& Shapes() const; - Standard_EXPORT static Standard_Boolean BuildTriangulation (const TopoDS_Shape& theShape); + Standard_EXPORT + static void CopySource(const TopoDS_Shape& aS, + TopTools_DataMapOfShapeShape& aImages, + TopTools_DataMapOfShapeShape& aOriginals, + TopoDS_Shape& aSC) ; + Standard_EXPORT + static Standard_Boolean BuildTriangulation(const TopoDS_Shape& aS) ; protected: + Standard_EXPORT + virtual void CheckData() ; + Standard_EXPORT + void MakeArgument1() ; - Standard_EXPORT virtual void CheckData() ; + Standard_EXPORT + void MakeArgument2() ; - Standard_EXPORT void MakeArgument1() ; + Standard_EXPORT + void Find() ; - Standard_EXPORT void MakeArgument2() ; + Standard_EXPORT + void Find(const TopoDS_Shape& aS) ; - Standard_EXPORT void Find() ; - - Standard_EXPORT void Find(const TopoDS_Shape& aS) ; - - Standard_EXPORT void FindVertices() ; - - -Handle_Geom_Surface mySurface; -TopAbs_ShapeEnum myShapeType; -GEOMAlgo_State myState; -TopoDS_Shape myArg1; -TopoDS_Shape myArg2; -TopTools_ListOfShape myLS; -TopTools_DataMapOfShapeShape myImages; -GEOMAlgo_IndexedDataMapOfShapeState myMSS; -Standard_Boolean myIsAnalytic; - - -private: + Standard_EXPORT + void FindVertices() ; + Handle_Geom_Surface mySurface; + TopAbs_ShapeEnum myShapeType; + GEOMAlgo_State myState; + TopoDS_Shape myArg1; + TopoDS_Shape myArg2; + TopTools_ListOfShape myLS; + TopTools_DataMapOfShapeShape myImages; + GEOMAlgo_IndexedDataMapOfShapeState myMSS; + Standard_Boolean myIsAnalytic; }; - -// other Inline functions and methods (like "C++: function call" methods) - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx deleted file mode 100644 index c228b3245..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx deleted file mode 100644 index 8f68697ef..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.jxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Geom_Surface_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_DataMapOfShapeShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_FinderShapeOn_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl deleted file mode 100644 index 89d2b84ac..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cdl +++ /dev/null @@ -1,144 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_FinderShapeOn1.cdl --- Created: Fri Mar 4 10:26:54 2005 --- Author: Peter KURNEV --- -class FinderShapeOn1 from GEOMAlgo - inherits ShapeAlgo from GEOMAlgo - - ---Purpose: - -uses - Pnt from gp,-- - Surface from Geom, - Surface from GeomAdaptor, - - ShapeEnum from TopAbs, - State from TopAbs, - Face from TopoDS, - Edge from TopoDS, - ListOfShape from TopTools, - - State from GEOMAlgo, - ListOfPnt from GEOMAlgo, - IndexedDataMapOfShapeState from GEOMAlgo - ---raises - -is - Create - returns FinderShapeOn1 from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn1();" - - SetSurface(me:out; - aS:Surface from Geom); - - SetShapeType(me:out; - aST:ShapeEnum from TopAbs); - - SetState(me:out; - aSF:State from GEOMAlgo); - - SetNbPntsMin(me:out; - aNb:Integer from Standard); - - NbPntsMin(me) - returns Integer from Standard; - - SetNbPntsMax(me:out; - aNb:Integer from Standard); - - NbPntsMax(me) - returns Integer from Standard; - - Surface(me) - returns Surface from Geom; - ---C++: return const & - - ShapeType(me) - returns ShapeEnum from TopAbs; - - State(me) - returns State from GEOMAlgo; - - Perform(me:out) - is redefined; - - Shapes(me) - returns ListOfShape from TopTools; - ---C++: return const & - -- - -- protected methods - -- - CheckData(me:out) - is redefined protected; - - ProcessVertices(me:out) - is protected; - - ProcessEdges(me:out) - is protected; - - ProcessFaces(me:out) - is protected; - - ProcessSolids(me:out) - is protected; - - InnerPoints(me:out; - aF :Face from TopoDS; - aLP:out ListOfPnt from GEOMAlgo) - is protected; - - InnerPoints(me:out; - aE :Edge from TopoDS; - aLP:out ListOfPnt from GEOMAlgo) - is protected; - - InnerPoints(me:out; - aE :Edge from TopoDS; - aNbPnts: Integer from Standard; - aLP:out ListOfPnt from GEOMAlgo) - is protected; - - MSS (me) - returns IndexedDataMapOfShapeState from GEOMAlgo; - ---C++:return const & - - GetPointState(me:out; aP: Pnt from gp) - returns State from TopAbs is virtual protected; - -fields - mySurface : Surface from Geom is protected; - myShapeType : ShapeEnum from TopAbs is protected; - myState : State from GEOMAlgo is protected; - myNbPntsMin : Integer from Standard is protected; - myNbPntsMax : Integer from Standard is protected; - -- - myGAS : Surface from GeomAdaptor is protected; - myLS : ListOfShape from TopTools is protected; - -- - myMSS : IndexedDataMapOfShapeState from GEOMAlgo is protected; - -end FinderShapeOn1; diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx index 5eee17905..9c943ac43 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx @@ -24,19 +24,7 @@ // Created: Fri Mar 4 10:31:06 2005 // Author: Peter KURNEV -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include +#include #include @@ -80,6 +68,16 @@ #include #include +#include + +#include +#include +#include + +#include +#include +#include + //======================================================================= //function : GEOMAlgo_FinderShapeOn1 //purpose : @@ -226,10 +224,8 @@ void GEOMAlgo_FinderShapeOn1::Perform() return; } // -#if OCC_VERSION_LARGE > 0x06050200 // Initialize the context GEOMAlgo_ShapeAlgo::Perform(); -#endif // // 1 ProcessVertices(); diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx index b221b87c0..90995d9a2 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx @@ -20,182 +20,127 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_FinderShapeOn1.hxx +// Created: Fri Mar 4 10:31:06 2005 +// Author: Peter KURNEV + #ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile #define _GEOMAlgo_FinderShapeOn1_HeaderFile -#ifndef _Handle_Geom_Surface_HeaderFile -#include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_State_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _GeomAdaptor_Surface_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile #include -#endif -#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile #include -#endif -#ifndef _TopAbs_State_HeaderFile +#include + #include -#endif -class Geom_Surface; -class TopTools_ListOfShape; -class TopoDS_Face; -class GEOMAlgo_ListOfPnt; -class TopoDS_Edge; -class GEOMAlgo_IndexedDataMapOfShapeState; -class gp_Pnt; +#include +#include +#include +#include +#include +#include +#include + +#include -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - - -class GEOMAlgo_FinderShapeOn1 : public GEOMAlgo_ShapeAlgo { - -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 - // - - -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; - - - - - -protected: - - // Methods PROTECTED - // - +#include -Standard_EXPORT virtual void CheckData() ; +//======================================================================= +//function : GEOMAlgo_FinderShapeOn1 +//purpose : +//======================================================================= +class GEOMAlgo_FinderShapeOn1 : public GEOMAlgo_ShapeAlgo +{ + public: + Standard_EXPORT + GEOMAlgo_FinderShapeOn1(); + Standard_EXPORT + virtual ~GEOMAlgo_FinderShapeOn1(); -Standard_EXPORT void ProcessVertices() ; + Standard_EXPORT + void SetSurface(const Handle(Geom_Surface)& aS) ; + Standard_EXPORT + void SetShapeType(const TopAbs_ShapeEnum aST) ; -Standard_EXPORT void ProcessEdges() ; + Standard_EXPORT + void SetState(const GEOMAlgo_State aSF) ; + Standard_EXPORT + void SetNbPntsMin(const Standard_Integer aNb) ; -Standard_EXPORT void ProcessFaces() ; + Standard_EXPORT + Standard_Integer NbPntsMin() const; + Standard_EXPORT + void SetNbPntsMax(const Standard_Integer aNb) ; -Standard_EXPORT void ProcessSolids() ; + Standard_EXPORT + Standard_Integer NbPntsMax() const; + Standard_EXPORT + const Handle_Geom_Surface& Surface() const; -Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ; + Standard_EXPORT + TopAbs_ShapeEnum ShapeType() const; + Standard_EXPORT + GEOMAlgo_State State() const; -Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,GEOMAlgo_ListOfPnt& aLP) ; + Standard_EXPORT + virtual void Perform() ; + Standard_EXPORT + const TopTools_ListOfShape& Shapes() const; -Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ; + Standard_EXPORT + const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const; + protected: + Standard_EXPORT + virtual void CheckData() ; -Standard_EXPORT virtual TopAbs_State GetPointState(const gp_Pnt& aP) ; + Standard_EXPORT + void ProcessVertices() ; + Standard_EXPORT + void ProcessEdges() ; - // Fields PROTECTED - // -Handle_Geom_Surface mySurface; -TopAbs_ShapeEnum myShapeType; -GEOMAlgo_State myState; -Standard_Integer myNbPntsMin; -Standard_Integer myNbPntsMax; -GeomAdaptor_Surface myGAS; -TopTools_ListOfShape myLS; -GEOMAlgo_IndexedDataMapOfShapeState myMSS; + Standard_EXPORT + void ProcessFaces() ; + Standard_EXPORT + void ProcessSolids() ; -private: + Standard_EXPORT + void InnerPoints(const TopoDS_Face& aF, + GEOMAlgo_ListOfPnt& aLP) ; - // Methods PRIVATE - // + 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) ; - // Fields PRIVATE - // + Standard_EXPORT + virtual TopAbs_State GetPointState(const gp_Pnt& aP) ; + Handle_Geom_Surface mySurface; + TopAbs_ShapeEnum myShapeType; + GEOMAlgo_State myState; + Standard_Integer myNbPntsMin; + Standard_Integer myNbPntsMax; + GeomAdaptor_Surface myGAS; + TopTools_ListOfShape myLS; + GEOMAlgo_IndexedDataMapOfShapeState myMSS; }; - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx deleted file mode 100644 index cc4fc5121..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx deleted file mode 100644 index f035b6151..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.jxx +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Geom_Surface_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListOfPnt_HeaderFile -#include -#endif -#ifndef _TopoDS_Edge_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_FinderShapeOn1_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cdl b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cdl deleted file mode 100644 index 9067bf4a9..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cdl +++ /dev/null @@ -1,140 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_FinderShapeOn1.cdl --- Created: Fri Mar 4 10:26:54 2005 --- Author: Peter KURNEV --- --- -class FinderShapeOn2 from GEOMAlgo - inherits ShapeAlgo from GEOMAlgo - - ---Purpose: - -uses - Pnt from gp, - ShapeEnum from TopAbs, - State from TopAbs, - Face from TopoDS, - Edge from TopoDS, - ListOfShape from TopTools, - - State from GEOMAlgo, - ListOfPnt from GEOMAlgo, - IndexedDataMapOfShapeState from GEOMAlgo, - Clsf from GEOMAlgo - ---raises - -is - Create - returns FinderShapeOn2 from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn2();" - - SetClsf(me:out; - aClsf:Clsf from GEOMAlgo); - - Clsf(me) - returns Clsf from GEOMAlgo; - ---C++: return const & - - SetShapeType(me:out; - aST:ShapeEnum from TopAbs); - - ShapeType(me) - returns ShapeEnum from TopAbs; - - SetState(me:out; - aSF:State from GEOMAlgo); - - State(me) - returns State from GEOMAlgo; - - SetNbPntsMin(me:out; - aNb:Integer from Standard); - - NbPntsMin(me) - returns Integer from Standard; - - SetNbPntsMax(me:out; - aNb:Integer from Standard); - - NbPntsMax(me) - returns Integer from Standard; - - Perform(me:out) - is redefined; - - Shapes(me) - returns ListOfShape from TopTools; - ---C++: return const & - -- - -- protected methods - -- - CheckData(me:out) - is redefined protected; - - ProcessVertices(me:out) - is protected; - - ProcessEdges(me:out) - is protected; - - ProcessFaces(me:out) - is protected; - - ProcessSolids(me:out) - is protected; - - InnerPoints(me:out; - aF :Face from TopoDS; - aLP:out ListOfPnt from GEOMAlgo) - is protected; - - InnerPoints(me:out; - aE :Edge from TopoDS; - aLP:out ListOfPnt from GEOMAlgo) - is protected; - - InnerPoints(me:out; - aE :Edge from TopoDS; - aNbPnts: Integer from Standard; - aLP:out ListOfPnt from GEOMAlgo) - is protected; - - MSS (me) - returns IndexedDataMapOfShapeState from GEOMAlgo; - ---C++:return const & - - -fields - myShapeType : ShapeEnum from TopAbs is protected; - myState : State from GEOMAlgo is protected; - myNbPntsMin : Integer from Standard is protected; - myNbPntsMax : Integer from Standard is protected; - myClsf : Clsf from GEOMAlgo is protected; - -- - myLS : ListOfShape from TopTools is protected; - -- - myMSS : IndexedDataMapOfShapeState from GEOMAlgo is protected; - -end FinderShapeOn2; diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx index 2910f6a40..020703409 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx @@ -20,26 +20,15 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_FinderShapeOn1.cxx +// File: GEOMAlgo_FinderShapeOn2.cxx // Created: Fri Mar 4 10:31:06 2005 // Author: Peter KURNEV - -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include - +// +// +#include #include + #include #include #include @@ -80,9 +69,19 @@ #include #include +#include + +#include +#include +#include + +#include +#include +#include + //======================================================================= //function : GEOMAlgo_FinderShapeOn1 -//purpose : +//purpose : //======================================================================= GEOMAlgo_FinderShapeOn2::GEOMAlgo_FinderShapeOn2() : @@ -96,14 +95,14 @@ } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_FinderShapeOn2::~GEOMAlgo_FinderShapeOn2() { } //======================================================================= //function : SetClsf -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf) { @@ -111,7 +110,7 @@ } //======================================================================= //function : Clsf -//purpose : +//purpose : //======================================================================= const Handle(GEOMAlgo_Clsf)& GEOMAlgo_FinderShapeOn2::Clsf() const { @@ -119,7 +118,7 @@ } //======================================================================= //function : SetShapeType -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::SetShapeType(const TopAbs_ShapeEnum aType) { @@ -127,7 +126,7 @@ } //======================================================================= //function : ShapeType -//purpose : +//purpose : //======================================================================= TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn2::ShapeType()const { @@ -135,7 +134,7 @@ } //======================================================================= //function : SetState -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::SetState(const GEOMAlgo_State aState) { @@ -143,7 +142,7 @@ } //======================================================================= //function : State -//purpose : +//purpose : //======================================================================= GEOMAlgo_State GEOMAlgo_FinderShapeOn2::State() const { @@ -151,7 +150,7 @@ } //======================================================================= //function : SetNbPntsMin -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::SetNbPntsMin(const Standard_Integer aNb) { @@ -159,7 +158,7 @@ } //======================================================================= //function : NbPntsMin -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_FinderShapeOn2::NbPntsMin()const { @@ -167,7 +166,7 @@ } //======================================================================= //function : SetNbPntsMax -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::SetNbPntsMax(const Standard_Integer aNb) { @@ -175,7 +174,7 @@ } //======================================================================= //function : NbPntsMax -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_FinderShapeOn2::NbPntsMax()const { @@ -183,7 +182,7 @@ } //======================================================================= // function: MSS -// purpose: +// purpose: //======================================================================= const GEOMAlgo_IndexedDataMapOfShapeState& GEOMAlgo_FinderShapeOn2::MSS() const { @@ -191,7 +190,7 @@ } //======================================================================= // function: Shapes -// purpose: +// purpose: //======================================================================= const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn2::Shapes() const { @@ -212,7 +211,7 @@ } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::Perform() { @@ -226,10 +225,8 @@ return; } // -#if OCC_VERSION_LARGE > 0x06050200 // Initialize the context GEOMAlgo_ShapeAlgo::Perform(); -#endif // myClsf->SetTolerance(myTolerance); // @@ -261,12 +258,12 @@ } // // 4 - ProcessSolids(); + ProcessSolids(); // } //======================================================================= //function : CheckData -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::CheckData() { @@ -299,7 +296,7 @@ return; } // - if (myState==GEOMAlgo_ST_UNKNOWN || + if (myState==GEOMAlgo_ST_UNKNOWN || myState==GEOMAlgo_ST_INOUT) { myErrorStatus=13; // unallowed state type return; @@ -307,7 +304,7 @@ } //======================================================================= //function : ProcessVertices -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::ProcessVertices() { @@ -348,7 +345,7 @@ } //======================================================================= //function : ProcessEdges -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::ProcessEdges() { @@ -388,14 +385,14 @@ } // if (BRep_Tool::Degenerated(aE)) { - myMSS.Add(aE, aSt); + myMSS.Add(aE, aSt); continue; } // if (myState==GEOMAlgo_ST_ON) { Standard_Boolean bCanBeON; Standard_Real aT1, aT2; - Handle(Geom_Curve) aC; + Handle(Geom_Curve) aC; // aC=BRep_Tool::Curve(aE, aT1, aT2); bCanBeON=myClsf->CanBeON(aC); @@ -406,7 +403,7 @@ // InnerPoints(aE, aLP); if (myErrorStatus) { - return; + return; } // bIsConformState=Standard_True; @@ -436,7 +433,7 @@ } } // - aSt=aSC.State(); + aSt=aSC.State(); // bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); if (myShapeType==TopAbs_EDGE) { @@ -447,11 +444,11 @@ else if (bIsConformState || aSt==TopAbs_ON) { myMSS.Add(aE, aSt); } - } // for (i=1; i<=aNb; ++i) next edge + } // for (i=1; i<=aNb; ++i) next edge } //======================================================================= //function : ProcessFaces -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::ProcessFaces() { @@ -531,7 +528,7 @@ } } // - aSt=aSC.State(); + aSt=aSC.State(); // bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); if (myShapeType==TopAbs_FACE) { @@ -542,11 +539,11 @@ else if (bIsConformState || aSt==TopAbs_ON) { myMSS.Add(aF, aSt); } - }// for (i=1; i<=aNb; ++i) next face + }// for (i=1; i<=aNb; ++i) next face } //======================================================================= //function : ProcessSolids -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::ProcessSolids() { @@ -582,7 +579,7 @@ continue; // face has non-conformed state,skip solid } // - aSt=aSC.State(); + aSt=aSC.State(); // bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); if (bIsConformState) { @@ -593,7 +590,7 @@ // //======================================================================= //function : InnerPoints -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF, GEOMAlgo_ListOfPnt& aLP) @@ -668,7 +665,7 @@ } } // - // inner nodes=all_nodes - boundary_nodes + // inner nodes=all_nodes - boundary_nodes j1=aNodes.Lower(); j2=aNodes.Upper(); for (j=j1; j<=j2; ++j) { @@ -680,7 +677,7 @@ // aNb=aLP.Extent(); // - if (!aNb && myNbPntsMin) { + if (!aNb && myNbPntsMin) { // try to fill it yourself Standard_Boolean bIsDone; Standard_Integer aN1, aN2; @@ -740,12 +737,12 @@ break; }// if (iCnt>1) }// for (; aIt.More(); aIt.Next()) - }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) - }// if (!aNb && myNbPntsMin) { + }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) + }// if (!aNb && myNbPntsMin) { } //======================================================================= //function : InnerPoints -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE, GEOMAlgo_ListOfPnt& aLP) @@ -793,7 +790,7 @@ } // aNb=aLP.Extent(); - if (!aNb && myNbPntsMin) { + if (!aNb && myNbPntsMin) { // try to fill it yourself InnerPoints(aE, myNbPntsMin, aLP); aNb=aLP.Extent(); @@ -801,7 +798,7 @@ } //======================================================================= //function : InnerPoints -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE, const Standard_Integer aNbPntsMin, @@ -839,8 +836,8 @@ // // 10 -myClsf=NULL // 11 -myShape=NULL -// 12 -unallowed type of sub-shapes -// 13 -unallowed state +// 12 -unallowed type of sub-shapes +// 13 -unallowed state // 15 -unallowed surface type // 20- no triangulation found // 30- can not obtain the line from the link diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.hxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.hxx index 6a66c841a..a70d04e2c 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.hxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.hxx @@ -19,172 +19,118 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - +// File: GEOMAlgo_FinderShapeOn2.hxx +// Created: Fri Mar 4 10:31:06 2005 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_FinderShapeOn2_HeaderFile #define _GEOMAlgo_FinderShapeOn2_HeaderFile -#ifndef _TopAbs_ShapeEnum_HeaderFile +#include +#include #include -#endif -#ifndef _GEOMAlgo_State_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile +//#include +#include #include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile #include -#endif -#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile #include -#endif -class GEOMAlgo_Clsf; -class TopTools_ListOfShape; -class TopoDS_Face; -class GEOMAlgo_ListOfPnt; -class TopoDS_Edge; -class GEOMAlgo_IndexedDataMapOfShapeState; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_FinderShapeOn2 : public GEOMAlgo_ShapeAlgo { - -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 - // - - -Standard_EXPORT GEOMAlgo_FinderShapeOn2(); -Standard_EXPORT virtual ~GEOMAlgo_FinderShapeOn2(); - - -Standard_EXPORT void SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf) ; - - -Standard_EXPORT const Handle_GEOMAlgo_Clsf& Clsf() const; - - -Standard_EXPORT void SetShapeType(const TopAbs_ShapeEnum aST) ; - - -Standard_EXPORT TopAbs_ShapeEnum ShapeType() const; +#include +#include +#include +#include +//======================================================================= +//function : GEOMAlgo_FinderShapeOn2 +//purpose : +//======================================================================= +class GEOMAlgo_FinderShapeOn2 : public GEOMAlgo_ShapeAlgo +{ + public: + Standard_EXPORT + GEOMAlgo_FinderShapeOn2(); -Standard_EXPORT void SetState(const GEOMAlgo_State aSF) ; + Standard_EXPORT + virtual ~GEOMAlgo_FinderShapeOn2(); + Standard_EXPORT + void SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf) ; -Standard_EXPORT GEOMAlgo_State State() const; + Standard_EXPORT + const Handle_GEOMAlgo_Clsf& Clsf() const; + Standard_EXPORT + void SetShapeType(const TopAbs_ShapeEnum aST) ; -Standard_EXPORT void SetNbPntsMin(const Standard_Integer aNb) ; + Standard_EXPORT + TopAbs_ShapeEnum ShapeType() const; + Standard_EXPORT + void SetState(const GEOMAlgo_State aSF) ; -Standard_EXPORT Standard_Integer NbPntsMin() const; + Standard_EXPORT + GEOMAlgo_State State() const; + Standard_EXPORT + void SetNbPntsMin(const Standard_Integer aNb) ; -Standard_EXPORT void SetNbPntsMax(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 virtual void Perform() ; - - -Standard_EXPORT const TopTools_ListOfShape& Shapes() const; - - -Standard_EXPORT const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const; - + Standard_EXPORT + Standard_Integer NbPntsMax() const; + Standard_EXPORT + virtual void Perform() ; + Standard_EXPORT + const TopTools_ListOfShape& Shapes() const; + Standard_EXPORT + const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const; protected: + Standard_EXPORT + virtual void CheckData() ; - // Methods PROTECTED - // - - -Standard_EXPORT virtual void CheckData() ; - - -Standard_EXPORT void ProcessVertices() ; - - -Standard_EXPORT void ProcessEdges() ; - - -Standard_EXPORT void ProcessFaces() ; - + Standard_EXPORT + void ProcessVertices() ; -Standard_EXPORT void ProcessSolids() ; + Standard_EXPORT + void ProcessEdges() ; + Standard_EXPORT + void ProcessFaces() ; -Standard_EXPORT void InnerPoints(const TopoDS_Face& aF,GEOMAlgo_ListOfPnt& aLP) ; + 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, + GEOMAlgo_ListOfPnt& aLP) ; - -Standard_EXPORT void InnerPoints(const TopoDS_Edge& aE,const Standard_Integer aNbPnts,GEOMAlgo_ListOfPnt& aLP) ; - - - // Fields PROTECTED - // -TopAbs_ShapeEnum myShapeType; -GEOMAlgo_State myState; -Standard_Integer myNbPntsMin; -Standard_Integer myNbPntsMax; -Handle_GEOMAlgo_Clsf myClsf; -TopTools_ListOfShape myLS; -GEOMAlgo_IndexedDataMapOfShapeState myMSS; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT + void InnerPoints(const TopoDS_Edge& aE, + const Standard_Integer aNbPnts, + GEOMAlgo_ListOfPnt& aLP) ; + TopAbs_ShapeEnum myShapeType; + GEOMAlgo_State myState; + Standard_Integer myNbPntsMin; + Standard_Integer myNbPntsMax; + Handle_GEOMAlgo_Clsf myClsf; + TopTools_ListOfShape myLS; + GEOMAlgo_IndexedDataMapOfShapeState myMSS; }; - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.ixx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.ixx deleted file mode 100644 index 57d8bdad8..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.jxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.jxx deleted file mode 100644 index de1dd509c..000000000 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.jxx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_Clsf_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListOfPnt_HeaderFile -#include -#endif -#ifndef _TopoDS_Edge_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_FinderShapeOn2_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.cxx index b608e8d44..2c4d0afea 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.cxx @@ -89,7 +89,7 @@ GEOMAlgo_FinderShapeOnQuad::GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeft //======================================================================= //function : CheckData -//purpose : +//purpose : //======================================================================= void GEOMAlgo_FinderShapeOnQuad::CheckData() @@ -101,10 +101,10 @@ void GEOMAlgo_FinderShapeOnQuad::CheckData() //======================================================================= //function : GetPointState -//purpose : +//purpose : //======================================================================= -TopAbs_State GEOMAlgo_FinderShapeOnQuad::GetPointState(const gp_Pnt& aP) +TopAbs_State GEOMAlgo_FinderShapeOnQuad::GetPointState(const gp_Pnt& aP) { // Return IN if aP has TopAbs_IN with all sides. // In the case of concave quadrangle, return IN if diff --git a/src/GEOMAlgo/GEOMAlgo_GetInPlace.cxx b/src/GEOMAlgo/GEOMAlgo_GetInPlace.cxx index d97c943b2..852f600e5 100644 --- a/src/GEOMAlgo/GEOMAlgo_GetInPlace.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GetInPlace.cxx @@ -19,20 +19,13 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - // File: GEOMAlgo_GetInPlace.cxx +// Created: // Author: Peter KURNEV #include -#include - -#include - #include - -#include - #include #include @@ -66,6 +59,10 @@ #include +#include +#include + + static void MapBRepShapes(const TopoDS_Shape& aS, TopTools_IndexedMapOfShape& aM); @@ -200,10 +197,8 @@ void GEOMAlgo_GetInPlace::Perform() return; } // -#if OCC_VERSION_LARGE > 0x06050200 // Initialize the context GEOMAlgo_GluerAlgo::Perform(); -#endif // Intersect(); if (myErrorStatus) { diff --git a/src/GEOMAlgo/GEOMAlgo_GetInPlace.hxx b/src/GEOMAlgo/GEOMAlgo_GetInPlace.hxx index a49e4b247..a8ff2a558 100644 --- a/src/GEOMAlgo/GEOMAlgo_GetInPlace.hxx +++ b/src/GEOMAlgo/GEOMAlgo_GetInPlace.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File: GEOMAlgo_GetInPlace.hxx -// Created: +// Created: // Author: Peter KURNEV #ifndef _GEOMAlgo_GetInPlace_HeaderFile @@ -47,13 +47,13 @@ //======================================================================= /** - * The implementation of iterator of intersected shapes + * The implementation of iterator of intersected shapes * for Get In Place Algorithm. * The intersection is in terms of 3D bounding boxes. */ //======================================================================= //class : GEOMAlgo_GetInPlaceIterator -//purpose : +//purpose : //======================================================================= class GEOMAlgo_GetInPlaceIterator { public: @@ -62,19 +62,19 @@ class GEOMAlgo_GetInPlaceIterator { */ //Standard_EXPORT GEOMAlgo_GetInPlaceIterator(); - + /** * Destructor. */ //Standard_EXPORT virtual ~GEOMAlgo_GetInPlaceIterator(); - + /** * Clear the internal content. */ //Standard_EXPORT void Clear() ; - + /** * Append the pair of intersected shapes. * @param theCS @@ -82,7 +82,7 @@ class GEOMAlgo_GetInPlaceIterator { */ //Standard_EXPORT void AppendPair(const NMTTools_CoupleOfShape& theCS) ; - + /** * Initialize the iterator. * @param theT1 @@ -90,7 +90,7 @@ class GEOMAlgo_GetInPlaceIterator { * @param theT2 * The type of (sub)shape Where. */ - //Standard_EXPORT + //Standard_EXPORT void Initialize(const TopAbs_ShapeEnum theT1, const TopAbs_ShapeEnum theT2) ; /** @@ -98,18 +98,18 @@ class GEOMAlgo_GetInPlaceIterator { * @return * Standard_True if there are pairs to iterare. */ - //Standard_EXPORT + //Standard_EXPORT Standard_Boolean More() const; - + /** * Shift to the next pair. */ //Standard_EXPORT void Next() ; - + /** * Returns the pair of intersected shapes. - * @return + * @return * The pair of intersected shapes. */ //Standard_EXPORT @@ -120,7 +120,7 @@ protected: NMTTools_ListOfCoupleOfShape myLists[10]; NMTTools_ListOfCoupleOfShape myEmptyList; NMTTools_ListIteratorOfListOfCoupleOfShape myIterator; - + private: }; @@ -128,12 +128,12 @@ private: //======================================================================= /** * The implementation of Get In Place Algorithm. - * The algorithm provides the search the argument [What] - * in the shape [Where]. + * The algorithm provides the search the argument [What] + * in the shape [Where]. */ //======================================================================= //class : GEOMAlgo_GetInPlace -//purpose : +//purpose : //======================================================================= class GEOMAlgo_GetInPlace : public GEOMAlgo_GluerAlgo, public GEOMAlgo_Algo @@ -151,81 +151,81 @@ class GEOMAlgo_GetInPlace : public GEOMAlgo_GluerAlgo, virtual ~GEOMAlgo_GetInPlace(); /** * Modifier. Sets the shape where the search is intended. - * @param theShape + * @param theShape * The shape where the search is intended. */ Standard_EXPORT virtual void SetShapeWhere(const TopoDS_Shape& theShape) ; - + /** * Selector. Returns the shape where the search is intended. - * @return + * @return * The shape where the search is intended. */ Standard_EXPORT const TopoDS_Shape& ShapeWhere() const; - + /** * Modifier. Sets the tolerance of mass. - * @param theTol + * @param theTol * The value tolerance of mass. */ Standard_EXPORT void SetTolMass(const Standard_Real theTol) ; - + /** * Selector. Returns the value tolerance of mass. - * @return + * @return * The value tolerance of mass. */ Standard_EXPORT Standard_Real TolMass() const; - + /** * Modifier. Sets the tolerance of center of gravily. - * @param theTol + * @param theTol * The value tolerance of center of gravily. */ Standard_EXPORT void SetTolCG(const Standard_Real theTol) ; - + /** * Selector. Returns the tolerance of center of gravily. - * @return + * @return * The value tolerance of center of gravily. */ Standard_EXPORT Standard_Real TolCG() const; - + /** * Perform the algorithm. */ Standard_EXPORT virtual void Perform() ; - + /** * Returns state of the search. - * @return + * @return * Standard_True if the argument is found. */ Standard_EXPORT Standard_Boolean IsFound() const; - + /** * Checks data */ - Standard_EXPORT + Standard_EXPORT virtual void CheckData() ; - + /** * Clear the internal content. */ Standard_EXPORT virtual void Clear() ; - + /** * Returns the map of shapes IN. - * @return + * @return ** Returns the map of shapes IN. * The Key - the (sub)shape of the argument [What]. * The Item- the (sub)shapes of the shape [Where] that have @@ -233,10 +233,10 @@ class GEOMAlgo_GetInPlace : public GEOMAlgo_GluerAlgo, */ Standard_EXPORT const GEOMAlgo_DataMapOfShapeMapOfShape& ShapesIn() const; - + /** * Returns the map of shapes ON. - * @return + * @return * Returns the map of shapes ON. * The Key - the (sub)shape of the argument [What]. * The Item- the (sub)shapes of the shape [Where] that have @@ -248,61 +248,61 @@ class GEOMAlgo_GetInPlace : public GEOMAlgo_GluerAlgo, protected: Standard_EXPORT void Intersect() ; - - Standard_EXPORT + + Standard_EXPORT void PerformVV() ; - - Standard_EXPORT + + Standard_EXPORT void PerformVE() ; - - Standard_EXPORT + + Standard_EXPORT void PerformEE() ; - - Standard_EXPORT + + Standard_EXPORT void PerformVF() ; - - Standard_EXPORT + + Standard_EXPORT void PerformEF() ; - - Standard_EXPORT + + Standard_EXPORT void PerformFF() ; - - Standard_EXPORT + + Standard_EXPORT void FillEdgesOn() ; - - Standard_EXPORT + + Standard_EXPORT void FillFacesOn() ; - - Standard_EXPORT + + Standard_EXPORT void FillSolidsOn() ; - - Standard_EXPORT + + Standard_EXPORT void PerformZF() ; - - Standard_EXPORT + + Standard_EXPORT void PerformZZ() ; - - Standard_EXPORT + + Standard_EXPORT void FillImages() ; - - Standard_EXPORT + + Standard_EXPORT void FillImagesCompound(const TopoDS_Shape& theS) ; - - Standard_EXPORT + + Standard_EXPORT void CheckGProps() ; - - Standard_EXPORT + + Standard_EXPORT void CheckGProps(const TopoDS_Shape& theS) ; - - Standard_EXPORT + + Standard_EXPORT void FillShapesIn(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2) ; - - Standard_EXPORT + + Standard_EXPORT void FillShapesOn(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2) ; - - Standard_EXPORT + + Standard_EXPORT Standard_Boolean CheckCoincidence(const TopoDS_Shape& theS1, const TopoDS_Shape& theS2); diff --git a/src/GEOMAlgo/GEOMAlgo_GetInPlace_1.cxx b/src/GEOMAlgo/GEOMAlgo_GetInPlace_1.cxx index 45f136755..25f418db4 100644 --- a/src/GEOMAlgo/GEOMAlgo_GetInPlace_1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GetInPlace_1.cxx @@ -20,13 +20,11 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_GetInPlace_1.cxx -// Author: Peter KURNEV +// File: GEOMAlgo_GetInPlace_1.cxx +// Author: Peter KURNEV #include -#include - #include #include @@ -41,9 +39,8 @@ #include #include #include -#include - #include +#include #include #include @@ -54,9 +51,9 @@ #include #include +#include #include -#include #include #include @@ -66,31 +63,33 @@ #include + static Standard_Integer PntInEdge(const TopoDS_Edge& aF, - gp_Pnt& aP); + gp_Pnt& aP); static Standard_Integer PntInEdge(const TopoDS_Edge& aF, - gp_Pnt& aP, - Standard_Real& aT); + gp_Pnt& aP, + Standard_Real& aT); static Standard_Integer PntInFace(const TopoDS_Face& aF, - gp_Pnt& aP); + gp_Pnt& aP); static Standard_Integer PntInFace(const TopoDS_Face& aF, - gp_Pnt& aP, - gp_Pnt2d& theP2D); + gp_Pnt& aP, + gp_Pnt2d& theP2D); static Standard_Integer PntInSolid(const TopoDS_Solid& aZ, - const Standard_Real aTol, - gp_Pnt& aP); + const Standard_Real aTol, + gp_Pnt& aP); + //======================================================================= //function : CheckCoincidence //purpose : //======================================================================= Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) + const TopoDS_Shape& aS2) { Standard_Boolean bOk; Standard_Integer iErr; @@ -151,22 +150,18 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1, // const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aS1); // -#if OCC_VERSION_LARGE > 0x06050200 GeomAPI_ProjectPointOnCurve& aPPC=myContext->ProjPC(aE1); -#else - GeomAPI_ProjectPointOnCurve& aPPC=myContext.ProjPC(aE1); -#endif aPPC.Perform(aP2); aNbPoints=aPPC.NbPoints(); if (aNbPoints) { aDmin=aPPC.LowerDistance(); aT=aPPC.LowerDistanceParameter(); if (aDmin < myTolerance) { - dT=1.e-12; - BRep_Tool::Curve(aE1, aT1, aT2); + dT=1.e-12; + BRep_Tool::Curve(aE1, aT1, aT2); if(aT > (aT1-dT) && aT < (aT2+dT)) { - bOk=Standard_True; - } + bOk=Standard_True; + } } } //else { @@ -177,21 +172,13 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1, else if (aType1==TopAbs_FACE) { const TopoDS_Face& aF1=*((TopoDS_Face*)&aS1); // -#if OCC_VERSION_LARGE > 0x06050200 bOk=myContext->IsValidPointForFace(aP2, aF1, myTolerance); -#else - bOk=myContext.IsValidPointForFace(aP2, aF1, myTolerance); -#endif } // else if (aType1==TopAbs_SOLID) { const TopoDS_Solid& aZ1=*((TopoDS_Solid*)&aS1); // -#if OCC_VERSION_LARGE > 0x06050200 BRepClass3d_SolidClassifier& aSC=myContext->SolidClassifier(aZ1); -#else - BRepClass3d_SolidClassifier& aSC=myContext.SolidClassifier(aZ1); -#endif aSC.Perform(aP2, myTolerance); aState=aSC.State(); bOk=(aState==TopAbs_IN); @@ -210,7 +197,8 @@ Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1, //purpose : //======================================================================= Standard_Integer PntInEdge(const TopoDS_Edge& aE, - gp_Pnt& aP) + gp_Pnt& aP) + { Standard_Integer iErr; Standard_Real aT; @@ -224,8 +212,8 @@ Standard_Integer PntInEdge(const TopoDS_Edge& aE, //purpose : //======================================================================= Standard_Integer PntInEdge(const TopoDS_Edge& aE, - gp_Pnt& aP, - Standard_Real& aT) + gp_Pnt& aP, + Standard_Real& aT) { Standard_Integer iErr; Standard_Real aT1, aT2; @@ -244,8 +232,8 @@ Standard_Integer PntInEdge(const TopoDS_Edge& aE, //purpose : //======================================================================= Standard_Integer PntInSolid(const TopoDS_Solid& aZ, - const Standard_Real aTol, - gp_Pnt& aP) + const Standard_Real aTol, + gp_Pnt& aP) { Standard_Integer iErr; Standard_Real aUx, aVx, aCoef; @@ -283,7 +271,7 @@ Standard_Integer PntInSolid(const TopoDS_Solid& aZ, //purpose : //======================================================================= Standard_Integer PntInFace(const TopoDS_Face& aF, - gp_Pnt& aP) + gp_Pnt& aP) { Standard_Integer iErr; // @@ -298,8 +286,8 @@ Standard_Integer PntInFace(const TopoDS_Face& aF, //purpose : //======================================================================= Standard_Integer PntInFace(const TopoDS_Face& aF, - gp_Pnt& theP, - gp_Pnt2d& theP2D) + gp_Pnt& theP, + gp_Pnt2d& theP2D) { Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint; Standard_Integer iErr, aIx, aNbDomains, i; @@ -324,8 +312,8 @@ Standard_Integer PntInFace(const TopoDS_Face& aF, // Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr); Geom2dHatch_Hatcher aHatcher(aIntr, - aTolHatch2D, aTolHatch3D, - Standard_True, Standard_False); + aTolHatch2D, aTolHatch3D, + Standard_True, Standard_False); // iErr=0; aEpsT=1.e-12; @@ -411,3 +399,4 @@ Standard_Integer PntInFace(const TopoDS_Face& aF, // return iErr; } + diff --git a/src/GEOMAlgo/GEOMAlgo_GetInPlace_2.cxx b/src/GEOMAlgo/GEOMAlgo_GetInPlace_2.cxx index 07d30b1b6..3114f3688 100644 --- a/src/GEOMAlgo/GEOMAlgo_GetInPlace_2.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GetInPlace_2.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File: GEOMAlgo_GetInPlace_2.cxx -// Created: +// Created: // Author: Peter KURNEV #include @@ -50,12 +50,12 @@ static Standard_Integer Dimension(const TopAbs_ShapeEnum aType); static - void PointProperties(const TopoDS_Shape& aS, + void PointProperties(const TopoDS_Shape& aS, GProp_GProps& aGProps); //======================================================================= //function : CheckGProps -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GetInPlace::CheckGProps() { @@ -64,7 +64,7 @@ void GEOMAlgo_GetInPlace::CheckGProps() } //======================================================================= //function : CheckGProps -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GetInPlace::CheckGProps(const TopoDS_Shape& aS1) { @@ -154,7 +154,7 @@ void GEOMAlgo_GetInPlace::CheckGProps(const TopoDS_Shape& aS1) } //======================================================================= //function : Dimension -//purpose : +//purpose : //======================================================================= Standard_Integer Dimension(const TopAbs_ShapeEnum aType) { @@ -184,10 +184,10 @@ Standard_Integer Dimension(const TopAbs_ShapeEnum aType) } //======================================================================= //class : GEOMAlgo_GProps -//purpose : +//purpose : //======================================================================= class GEOMAlgo_GProps : public GProp_GProps { - public: + public: GEOMAlgo_GProps() : GProp_GProps() { }; // @@ -207,10 +207,10 @@ class GEOMAlgo_GProps : public GProp_GProps { }; //======================================================================= //function : PointProperties -//purpose : +//purpose : //======================================================================= void PointProperties(const TopoDS_Shape& aS, GProp_GProps& aGProps) -{ +{ Standard_Integer i, aNbS; Standard_Real aDensity; gp_Pnt aPX; diff --git a/src/GEOMAlgo/GEOMAlgo_GetInPlace_3.cxx b/src/GEOMAlgo/GEOMAlgo_GetInPlace_3.cxx index 0e7119c79..3cc870da4 100644 --- a/src/GEOMAlgo/GEOMAlgo_GetInPlace_3.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GetInPlace_3.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File: GEOMAlgo_GetInPlaceIterator.cxx -// Created: +// Created: // Author: Peter KURNEV #include @@ -32,8 +32,8 @@ static const TopAbs_ShapeEnum aType2); //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_GetInPlaceIterator::GEOMAlgo_GetInPlaceIterator() { @@ -41,14 +41,14 @@ GEOMAlgo_GetInPlaceIterator::GEOMAlgo_GetInPlaceIterator() } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_GetInPlaceIterator::~GEOMAlgo_GetInPlaceIterator() { } //======================================================================= //function : Clear -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GetInPlaceIterator::Clear() { @@ -60,7 +60,7 @@ void GEOMAlgo_GetInPlaceIterator::Clear() } //======================================================================= //function : AppendPair -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GetInPlaceIterator::AppendPair(const NMTTools_CoupleOfShape& theCS) { @@ -79,7 +79,7 @@ void GEOMAlgo_GetInPlaceIterator::AppendPair(const NMTTools_CoupleOfShape& theCS } //======================================================================= //function : ShapeWhere -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GetInPlaceIterator::Initialize(const TopAbs_ShapeEnum aType1, const TopAbs_ShapeEnum aType2) @@ -96,7 +96,7 @@ void GEOMAlgo_GetInPlaceIterator::Initialize(const TopAbs_ShapeEnum aType1, } //======================================================================= // function: More -// purpose: +// purpose: //======================================================================= Standard_Boolean GEOMAlgo_GetInPlaceIterator::More()const { @@ -104,7 +104,7 @@ Standard_Boolean GEOMAlgo_GetInPlaceIterator::More()const } //======================================================================= // function: Next -// purpose: +// purpose: //======================================================================= void GEOMAlgo_GetInPlaceIterator::Next() { @@ -112,7 +112,7 @@ void GEOMAlgo_GetInPlaceIterator::Next() } //======================================================================= // function: Value -// purpose: +// purpose: //======================================================================= const NMTTools_CoupleOfShape& GEOMAlgo_GetInPlaceIterator::Value()const { @@ -120,7 +120,7 @@ const NMTTools_CoupleOfShape& GEOMAlgo_GetInPlaceIterator::Value()const } //======================================================================= //function : TypeToInteger -//purpose : +//purpose : //======================================================================= Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1, const TopAbs_ShapeEnum aType2) @@ -168,5 +168,5 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1, iRet=9; } } - return iRet; + return iRet; } diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cdl b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cdl deleted file mode 100644 index 694d0f850..000000000 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cdl +++ /dev/null @@ -1,83 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_GlueAnalyser.cdl --- Created: Wed Dec 15 11:03:03 2004 --- Author: Peter KURNEV --- --- -class GlueAnalyser from GEOMAlgo - inherits Gluer from GEOMAlgo - ---Purpose: - -uses - ShapeEnum from TopAbs, - ListOfShape from TopTools, - ListOfCoupleOfShapes from GEOMAlgo - ---raises - -is - Create - returns GlueAnalyser from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_GlueAnalyser();" - - Perform(me:out) - is redefined; - - HasSolidsToGlue(me) - returns Boolean from Standard; - - SolidsToGlue(me) - returns ListOfCoupleOfShapes from GEOMAlgo; - ---C++:return const & - - HasSolidsAlone(me) - returns Boolean from Standard; - - SolidsAlone(me) - returns ListOfShape from TopTools; - ---C++:return const & - - DetectVertices(me:out) - is protected; - - DetectEdges(me:out) - is protected; - - DetectFaces(me:out) - is protected; - - DetectShapes(me:out; - aType:ShapeEnum from TopAbs) - is protected; - - DetectSolids (me:out) - is protected; - - - -fields - mySolidsToGlue : ListOfCoupleOfShapes from GEOMAlgo is protected; - mySolidsAlone : ListOfShape from TopTools is protected; - -end GlueAnalyser; diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx index eb2935d54..1d5b99e36 100644 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx @@ -24,77 +24,75 @@ // Created: Wed Dec 15 11:08:09 2004 // Author: Peter KURNEV -#include - -#include -#include -#include -#include -#include -#include -#include - -#include +#include #include #include #include #include #include -#include #include #include -#include #include #include #include #include #include +#include +#include +#include +#include +#include + +#include #include #include +#include +#include +#include #include - -#include - #include +#include #include +#include //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= -GEOMAlgo_GlueAnalyser::GEOMAlgo_GlueAnalyser() - : GEOMAlgo_Gluer() + GEOMAlgo_GlueAnalyser::GEOMAlgo_GlueAnalyser() +: + GEOMAlgo_Gluer() {} //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= -GEOMAlgo_GlueAnalyser::~GEOMAlgo_GlueAnalyser() + GEOMAlgo_GlueAnalyser::~GEOMAlgo_GlueAnalyser() {} //======================================================================= //function : HasSolidsToGlue -//purpose : +//purpose : //======================================================================= -Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsToGlue()const + Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsToGlue()const { return !mySolidsToGlue.IsEmpty(); } //======================================================================= //function : HasSolidsAlone -//purpose : +//purpose : //======================================================================= -Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const + Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const { return !mySolidsAlone.IsEmpty(); } //======================================================================= //function : SolidsToGlue -//purpose : +//purpose : //======================================================================= const GEOMAlgo_ListOfCoupleOfShapes& GEOMAlgo_GlueAnalyser::SolidsToGlue()const { @@ -102,7 +100,7 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const } //======================================================================= //function : SolidsAlone -//purpose : +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_GlueAnalyser::SolidsAlone()const { @@ -110,7 +108,7 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GlueAnalyser::Perform() { @@ -125,10 +123,8 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const return; } // -#if OCC_VERSION_LARGE > 0x06050200 // Initialize the context GEOMAlgo_ShapeAlgo::Perform(); -#endif // InnerTolerance(); if (myErrorStatus) { @@ -157,7 +153,7 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const } //======================================================================= //function : DetectVertices -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GlueAnalyser::DetectVertices() { @@ -188,11 +184,11 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const const TopoDS_Shape& aV=aMV(i); Bnd_Box aBox; // - aBox.SetGap(myTol); + aBox.SetGap(myTol); BRepBndLib::Add(aV, aBox); aHAB->SetValue(i, aBox); aMIS.Add(i, aV); - aMSB.Add(aV, aBox); + aMSB.Add(aV, aBox); } // aBSB.Initialize(aHAB); @@ -208,7 +204,7 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const const TColStd_ListOfInteger& aLI=aBSB.Compare(aBoxV); aNbVSD=aLI.Extent(); if (!aNbVSD) { - myErrorStatus=3; // it must not be + myErrorStatus=3; // it must not be return; } // @@ -244,7 +240,7 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const } //======================================================================= //function : DetectFaces -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GlueAnalyser::DetectFaces() { @@ -252,7 +248,7 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const } //======================================================================= //function : DetectEdges -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GlueAnalyser::DetectEdges() { @@ -260,7 +256,7 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const } //======================================================================= //function : DetectShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GlueAnalyser::DetectShapes(const TopAbs_ShapeEnum aType) { @@ -278,7 +274,7 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const aNbF=aMF.Extent(); for (i=1; i<=aNbF; ++i) { const TopoDS_Shape& aS=aMF(i); - // + // //aPKF.Clear();//qft if (aType==TopAbs_FACE) { const TopoDS_Face& aF=TopoDS::Face(aS); @@ -338,7 +334,7 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const } //======================================================================= //function : DetectSolids -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GlueAnalyser::DetectSolids() { @@ -411,7 +407,7 @@ Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const // mySolidsToGlue.Clear(); mySolidsAlone.Clear(); - + // aNbC=aMPKLS.Extent(); if (!aNbC) { diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx index 7463a72af..359407edb 100644 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx +++ b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx @@ -20,123 +20,68 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_GlueDetector.hxx +// Created: Wed Dec 15 11:08:09 2004 +// Author: Peter KURNEV + #ifndef _GEOMAlgo_GlueAnalyser_HeaderFile #define _GEOMAlgo_GlueAnalyser_HeaderFile -#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile +#include +#include #include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile #include -#endif -#ifndef _GEOMAlgo_Gluer_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile #include -#endif -class GEOMAlgo_ListOfCoupleOfShapes; -class TopTools_ListOfShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_GlueAnalyser : public GEOMAlgo_Gluer { - -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 - // - - -Standard_EXPORT GEOMAlgo_GlueAnalyser(); -Standard_EXPORT virtual ~GEOMAlgo_GlueAnalyser(); - - -Standard_EXPORT virtual void Perform() ; - - -Standard_EXPORT Standard_Boolean HasSolidsToGlue() const; +//======================================================================= +//function : GEOMAlgo_GlueAnalyser +//purpose : +//======================================================================= +class GEOMAlgo_GlueAnalyser : public GEOMAlgo_Gluer +{ + public: + Standard_EXPORT + GEOMAlgo_GlueAnalyser(); -Standard_EXPORT const GEOMAlgo_ListOfCoupleOfShapes& SolidsToGlue() const; + Standard_EXPORT + virtual ~GEOMAlgo_GlueAnalyser(); + Standard_EXPORT + virtual void Perform() ; -Standard_EXPORT Standard_Boolean HasSolidsAlone() const; + Standard_EXPORT + Standard_Boolean HasSolidsToGlue() const; + Standard_EXPORT + const GEOMAlgo_ListOfCoupleOfShapes& SolidsToGlue() const; -Standard_EXPORT const TopTools_ListOfShape& SolidsAlone() const; + Standard_EXPORT + Standard_Boolean HasSolidsAlone() const; + Standard_EXPORT + const TopTools_ListOfShape& SolidsAlone() const; + protected: + Standard_EXPORT + void DetectVertices() ; + Standard_EXPORT + void DetectEdges() ; + Standard_EXPORT + void DetectFaces() ; -protected: + Standard_EXPORT + void DetectShapes(const TopAbs_ShapeEnum aType) ; - // 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() ; - - - // Fields PROTECTED - // -GEOMAlgo_ListOfCoupleOfShapes mySolidsToGlue; -TopTools_ListOfShape mySolidsAlone; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT + void DetectSolids() ; + GEOMAlgo_ListOfCoupleOfShapes mySolidsToGlue; + TopTools_ListOfShape mySolidsAlone; }; - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.ixx b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.ixx deleted file mode 100644 index 172b0ed19..000000000 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.jxx b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.jxx deleted file mode 100644 index c53f0757c..000000000 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_GlueAnalyser_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_GlueDetector.cxx b/src/GEOMAlgo/GEOMAlgo_GlueDetector.cxx index e813ad267..fb8d5dfdc 100644 --- a/src/GEOMAlgo/GEOMAlgo_GlueDetector.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GlueDetector.cxx @@ -25,17 +25,7 @@ #include -#include -#include -#include -#include - -#include -#include -#include - -#include - +#include #include #include @@ -58,51 +48,90 @@ #include #include - #include #include #include -#include +#include +#include +#include + +#include +#include +#include +#include +// +#include +#include +#include +#include + +//modified by NIZNHY-PKV Tue Mar 13 10:25:47 2012f +static + Standard_Integer CheckAncesstors + (const TopoDS_Shape& aVSD, + const TopTools_MapOfShape& aMVSD, + const TopTools_IndexedDataMapOfShapeListOfShape& aMVE, + const TopTools_IndexedDataMapOfShapeListOfShape& aMEV, + TopTools_IndexedDataMapOfShapeListOfShape& aMEVZ); +//modified by NIZNHY-PKV Tue Mar 13 10:25:50 2012t //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_GlueDetector::GEOMAlgo_GlueDetector() - : GEOMAlgo_GluerAlgo(), - GEOMAlgo_Algo() +: + GEOMAlgo_GluerAlgo(), + GEOMAlgo_Algo() {} //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_GlueDetector::~GEOMAlgo_GlueDetector() {} +//modified by NIZNHY-PKV Tue Mar 13 12:26:50 2012f +//======================================================================= +//function : StickedShapes +//purpose : +//======================================================================= +const TopTools_IndexedDataMapOfShapeListOfShape& + GEOMAlgo_GlueDetector::StickedShapes() +{ + return myStickedShapes; +} +//modified by NIZNHY-PKV Tue Mar 13 12:26:54 2012t //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GlueDetector::Perform() { myErrorStatus=0; myWarningStatus=0; + myStickedShapes.Clear(); // CheckData(); if (myErrorStatus) { return; } // -#if OCC_VERSION_LARGE > 0x06050200 // Initialize the context GEOMAlgo_GluerAlgo::Perform(); -#endif // DetectVertices(); if (myErrorStatus) { return; } // + //modified by NIZNHY-PKV Wed Mar 14 08:00:09 2012f + CheckDetected(); + if (myErrorStatus) { + return; + } + //modified by NIZNHY-PKV Wed Mar 14 08:00:12 2012t + // DetectEdges(); if (myErrorStatus) { return; @@ -115,7 +144,7 @@ void GEOMAlgo_GlueDetector::Perform() } //======================================================================= //function : DetectVertices -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GlueDetector::DetectVertices() { @@ -131,7 +160,6 @@ void GEOMAlgo_GlueDetector::DetectVertices() TopTools_DataMapOfShapeListOfShape aMVV; GEOMAlgo_IndexedDataMapOfIntegerShape aMIS; NMTDS_IndexedDataMapOfShapeBndSphere aMSB; - // NMTDS_BndSphereTreeSelector aSelector; NMTDS_BndSphereTree aBBTree; NCollection_UBTreeFiller aTreeFiller(aBBTree); @@ -159,7 +187,7 @@ void GEOMAlgo_GlueDetector::DetectVertices() aTreeFiller.Add(i, aBox); // aMIS.Add(i, aV); - aMSB.Add(aV, aBox); + aMSB.Add(aV, aBox); } // aTreeFiller.Fill(); @@ -183,49 +211,49 @@ void GEOMAlgo_GlueDetector::DetectVertices() aNbIP=aMIP.Extent(); aIt1.Initialize(aMIP); for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - if (aMIPC.Contains(aIP)) { - continue; - } - // - const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); - const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP); - // - aSelector.Clear(); - aSelector.SetBox(aBoxVP); - // - aNbVSD=aBBTree.Select(aSelector); - if (!aNbVSD) { - continue; // it shoild not be so [at least IP itself] - } - // - const TColStd_ListOfInteger& aLI=aSelector.Indices(); - aIt.Initialize(aLI); - for (; aIt.More(); aIt.Next()) { - aIP1=aIt.Value(); - if (aMIP.Contains(aIP1)) { - continue; - } - aMIP1.Add(aIP1); - } //for (; aIt.More(); aIt.Next()) { + aIP=aIt1.Key(); + if (aMIPC.Contains(aIP)) { + continue; + } + // + const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); + const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP); + // + aSelector.Clear(); + aSelector.SetBox(aBoxVP); + // + aNbVSD=aBBTree.Select(aSelector); + if (!aNbVSD) { + continue; // it shoild not be so [at least IP itself] + } + // + const TColStd_ListOfInteger& aLI=aSelector.Indices(); + aIt.Initialize(aLI); + for (; aIt.More(); aIt.Next()) { + aIP1=aIt.Value(); + if (aMIP.Contains(aIP1)) { + continue; + } + aMIP1.Add(aIP1); + } //for (; aIt.More(); aIt.Next()) { }//for(; aIt1.More(); aIt1.Next()) { // aNbIP1=aMIP1.Extent(); if (!aNbIP1) { - break; + break; } // aIt1.Initialize(aMIP); for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - aMIPC.Add(aIP); + aIP=aIt1.Key(); + aMIPC.Add(aIP); } // aMIP.Clear(); aIt1.Initialize(aMIP1); for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - aMIP.Add(aIP); + aIP=aIt1.Key(); + aMIP.Add(aIP); } aMIP1.Clear(); }// while(1) @@ -243,7 +271,7 @@ void GEOMAlgo_GlueDetector::DetectVertices() aIP=aIt1.Key(); const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); if (!j) { - aVF=aVP; + aVF=aVP; } aLVSD.Append(aVP); aMVProcessed.Add(aVP); @@ -261,14 +289,14 @@ void GEOMAlgo_GlueDetector::DetectVertices() for (; aItS.More(); aItS.Next()) { const TopoDS_Shape& aVSD=aItS.Value(); if (!myOrigins.IsBound(aVSD)) { - myOrigins.Bind(aVSD, aV); + myOrigins.Bind(aVSD, aV); } } } } //======================================================================= //function : DetectFaces -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GlueDetector::DetectFaces() { @@ -276,7 +304,7 @@ void GEOMAlgo_GlueDetector::DetectFaces() } //======================================================================= //function : DetectEdges -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GlueDetector::DetectEdges() { @@ -284,7 +312,7 @@ void GEOMAlgo_GlueDetector::DetectEdges() } //======================================================================= //function : DetectShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GlueDetector::DetectShapes(const TopAbs_ShapeEnum aType) { @@ -302,7 +330,7 @@ void GEOMAlgo_GlueDetector::DetectShapes(const TopAbs_ShapeEnum aType) aNbF=aMF.Extent(); for (i=1; i<=aNbF; ++i) { const TopoDS_Shape& aS=aMF(i); - // + // if (aType==TopAbs_FACE) { const TopoDS_Face& aF=*((TopoDS_Face*)&aS); FacePassKey(aF, aPKF); @@ -349,17 +377,18 @@ void GEOMAlgo_GlueDetector::DetectShapes(const TopAbs_ShapeEnum aType) continue; } // - const TopoDS_Shape& aS1=aLSDF.First(); + const TopoDS_Shape& aS1=aLSDF.First(); // if (aType==TopAbs_EDGE) { const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aS1); bDegenerated=BRep_Tool::Degenerated(aE1); if (bDegenerated) { - continue; + continue; } } // myImages.Bind(aS1, aLSDF); + // // origins aItLS.Initialize(aLSDF); for (; aItLS.More(); aItLS.Next()) { @@ -372,10 +401,10 @@ void GEOMAlgo_GlueDetector::DetectShapes(const TopAbs_ShapeEnum aType) } //======================================================================= //function : FacePassKey -//purpose : +//purpose : //======================================================================= -void GEOMAlgo_GlueDetector::FacePassKey(const TopoDS_Face& aF, - GEOMAlgo_PassKeyShape& aPK) +void GEOMAlgo_GlueDetector::FacePassKey(const TopoDS_Face& aF, + GEOMAlgo_PassKeyShape& aPK) { Standard_Integer i, aNbE; TopoDS_Shape aER; @@ -392,7 +421,7 @@ void GEOMAlgo_GlueDetector::FacePassKey(const TopoDS_Face& aF, if (BRep_Tool::Degenerated(aEE)) { continue; } - // + // if (myOrigins.IsBound(aE)) { aER=myOrigins.Find(aE); } @@ -405,10 +434,10 @@ void GEOMAlgo_GlueDetector::FacePassKey(const TopoDS_Face& aF, } //======================================================================= //function : EdgePassKey -//purpose : +//purpose : //======================================================================= -void GEOMAlgo_GlueDetector::EdgePassKey(const TopoDS_Edge& aE, - GEOMAlgo_PassKeyShape& aPK) +void GEOMAlgo_GlueDetector::EdgePassKey(const TopoDS_Edge& aE, + GEOMAlgo_PassKeyShape& aPK) { TopAbs_Orientation aOr; TopoDS_Shape aVR; @@ -421,10 +450,10 @@ void GEOMAlgo_GlueDetector::EdgePassKey(const TopoDS_Edge& aE, aOr=aV.Orientation(); if (aOr==TopAbs_FORWARD || aOr==TopAbs_REVERSED) { if (myOrigins.IsBound(aV)) { - aVR=myOrigins.Find(aV); + aVR=myOrigins.Find(aV); } else { - aVR=aV; + aVR=aV; } aLV.Append(aVR); } @@ -432,3 +461,152 @@ void GEOMAlgo_GlueDetector::EdgePassKey(const TopoDS_Edge& aE, // aPK.SetShapes(aLV); } +//modified by NIZNHY-PKV Tue Mar 13 09:54:18 2012f +//======================================================================= +//function : CheckDetected +//purpose : +//======================================================================= +void GEOMAlgo_GlueDetector::CheckDetected() +{ + TopoDS_Iterator aItA; + TopExp_Explorer aExp; + TopTools_ListOfShape aLV; + TopTools_MapOfShape aMFence; + TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; + TopTools_IndexedDataMapOfShapeListOfShape aMVE, aMEV; + // + // 1. aMVE, aMEV + TopExp::MapShapesAndAncestors(myArgument, TopAbs_VERTEX, TopAbs_EDGE, aMVE); + // + aExp.Init(myArgument, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + const TopoDS_Shape& aE=aExp.Current(); + // + aLV.Clear(); + aMFence.Clear(); + aItA.Initialize(aE); + for (; aItA.More(); aItA.Next()) { + const TopoDS_Shape& aV=aItA.Value(); + if (aMFence.Add(aV)) { + aLV.Append(aV); + } + } + // + aMEV.Add(aE, aLV); + } + // 2. Checking + aItIm.Initialize(myImages); + for (; aItIm.More(); aItIm.Next()) { + //const TopoDS_Shape& aV=aItIm.Key(); + const TopTools_ListOfShape& aLVSD=aItIm.Value(); + CheckDetected(aLVSD, aMVE, aMEV); + } +} +//======================================================================= +//function : CheckDetected +//purpose : +//======================================================================= +void GEOMAlgo_GlueDetector::CheckDetected + (const TopTools_ListOfShape& aLVSD, + const TopTools_IndexedDataMapOfShapeListOfShape& aMVE, + const TopTools_IndexedDataMapOfShapeListOfShape& aMEV) +{ + Standard_Integer i, aNbVSD, aNbA, iRet; + TopAbs_ShapeEnum aTypeS, aTypeA[2]; + TopExp_Explorer aExp, aExpA; + TopTools_MapOfShape aMFence, aMVSD; + TopTools_ListOfShape aLV; + TopTools_ListIteratorOfListOfShape aItLS; + // + myErrorStatus=0; + // + aNbVSD=aLVSD.Extent(); + if (aNbVSD < 2) { + return ; + } + // + aItLS.Initialize(aLVSD); + for (; aItLS.More(); aItLS.Next()) { + const TopoDS_Shape& aVSD=aItLS.Value(); + aMVSD.Add(aVSD); + } + // + aItLS.Initialize(aLVSD); + for (; aItLS.More(); aItLS.Next()) { + const TopoDS_Shape& aVSD=aItLS.Value(); + // + iRet=CheckAncesstors(aVSD, aMVSD, aMVE, aMEV, myStickedShapes); + if (iRet) { + // Sticked shapes detected + myWarningStatus=2; + } + } +} +//======================================================================= +//function : CheckAncesstors +//purpose : +//======================================================================= +Standard_Integer CheckAncesstors + (const TopoDS_Shape& aVSD, + const TopTools_MapOfShape& aMVSD, + const TopTools_IndexedDataMapOfShapeListOfShape& aMVE, + const TopTools_IndexedDataMapOfShapeListOfShape& aMEV, + TopTools_IndexedDataMapOfShapeListOfShape& aMEVZ) +{ + Standard_Address pLE, pLV, pLVZ; + Standard_Integer iRet, aNbVX; + TopTools_ListIteratorOfListOfShape aItLE, aItLV; + TopTools_MapOfShape aMFence; + TopTools_ListOfShape aLVX; + // + iRet=0; + // + pLE=aMVE.FindFromKey1(aVSD); + if (!pLE) { + return iRet; + } + // + const TopTools_ListOfShape& aLE=*((TopTools_ListOfShape*)pLE); + aItLE.Initialize(aLE); + for (; aItLE.More(); aItLE.Next()) { + const TopoDS_Shape& aE=aItLE.Value(); + // + pLV=aMEV.FindFromKey1(aE); + if (!pLV) { + continue; // it should be not so + } + // + aLVX.Clear(); + const TopTools_ListOfShape& aLV=*((TopTools_ListOfShape*)pLV); + aItLV.Initialize(aLV); + for (; aItLV.More(); aItLV.Next()) { + const TopoDS_Shape& aV=aItLV.Value(); + if (!aV.IsSame(aVSD)) { + if (aMVSD.Contains(aV)) { + if (aMFence.Add(aV)) { + aLVX.Append(aV); + } + } + } + } + // + aNbVX=aLVX.Extent(); + if (!aNbVX) { + continue; + } + // + iRet=1; + // + pLVZ=aMEVZ.FindFromKey1(aE); + if (!pLVZ) { + aMEVZ.Add(aE, aLVX); + } + else { + TopTools_ListOfShape& aLVZ=*((TopTools_ListOfShape*)pLVZ); + aLVZ.Append(aLVX); + } + } + // + return iRet; +} +//modified by NIZNHY-PKV Tue Mar 13 09:54:59 2012t diff --git a/src/GEOMAlgo/GEOMAlgo_GlueDetector.hxx b/src/GEOMAlgo/GEOMAlgo_GlueDetector.hxx index 9b6388c74..dc588eacd 100644 --- a/src/GEOMAlgo/GEOMAlgo_GlueDetector.hxx +++ b/src/GEOMAlgo/GEOMAlgo_GlueDetector.hxx @@ -19,49 +19,82 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File: GEOMAlgo_GlueDetector.hxx -// Created: // Author: Peter KURNEV -// -// + #ifndef _GEOMAlgo_GlueDetector_HeaderFile #define _GEOMAlgo_GlueDetector_HeaderFile #include #include -#include + #include -#include + +#include +#include + +#include #include +#include //======================================================================= //function : GEOMAlgo_GlueDetector -//purpose : +//purpose : //======================================================================= -class GEOMAlgo_GlueDetector : public GEOMAlgo_GluerAlgo, - public GEOMAlgo_Algo { +class GEOMAlgo_GlueDetector : public GEOMAlgo_GluerAlgo, + public GEOMAlgo_Algo +{ public: - Standard_EXPORT GEOMAlgo_GlueDetector(); - - Standard_EXPORT virtual ~GEOMAlgo_GlueDetector(); - - Standard_EXPORT virtual void Perform() ; + Standard_EXPORT + GEOMAlgo_GlueDetector(); + + Standard_EXPORT virtual + ~GEOMAlgo_GlueDetector(); + Standard_EXPORT virtual + void Perform() ; + +//modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f + Standard_EXPORT + const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes(); +//modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t +//------------------------------------------------ protected: - Standard_EXPORT void DetectVertices() ; - - Standard_EXPORT void DetectEdges() ; - - Standard_EXPORT void DetectFaces() ; - - Standard_EXPORT void DetectShapes(const TopAbs_ShapeEnum aType) ; - - Standard_EXPORT void EdgePassKey(const TopoDS_Edge& aE, - GEOMAlgo_PassKeyShape& aPK) ; - - Standard_EXPORT void FacePassKey(const TopoDS_Face& aF, - GEOMAlgo_PassKeyShape& aPK) ; - -private: + Standard_EXPORT + void DetectVertices() ; + + Standard_EXPORT + void DetectEdges() ; + + Standard_EXPORT + void DetectFaces() ; + + Standard_EXPORT + void DetectShapes(const TopAbs_ShapeEnum aType) ; + + Standard_EXPORT + void EdgePassKey(const TopoDS_Edge& aE, + GEOMAlgo_PassKeyShape& aPK) ; + + Standard_EXPORT + void FacePassKey(const TopoDS_Face& aF, + GEOMAlgo_PassKeyShape& aPK) ; + + //modified by NIZNHY-PKV Tue Mar 13 09:53:03 2012f + Standard_EXPORT + void CheckDetected(); + // + Standard_EXPORT + void CheckDetected + (const TopTools_ListOfShape& aLVSD, + const TopTools_IndexedDataMapOfShapeListOfShape& aMVE, + const TopTools_IndexedDataMapOfShapeListOfShape& aMEV); + + + protected: + TopTools_IndexedDataMapOfShapeListOfShape myStickedShapes; + //modified by NIZNHY-PKV Tue Mar 13 09:53:08 2012t + }; #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.cdl b/src/GEOMAlgo/GEOMAlgo_Gluer.cdl deleted file mode 100755 index 5d7d5640e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.cdl +++ /dev/null @@ -1,161 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_Gluer.cdl --- Created: Sat Dec 04 12:41:32 2004 --- Author: Peter KURNEV --- --- -class Gluer from GEOMAlgo - inherits ShapeAlgo from GEOMAlgo - - ---Purpose: - -uses - ShapeEnum from TopAbs, - Shape from TopoDS, - Edge from TopoDS, - Face from TopoDS, - Vertex from TopoDS, - ListOfShape from TopTools, - DataMapOfShapeShape from TopTools, - DataMapOfShapeListOfShape from TopTools, - Context from IntTools, - PassKeyShape from GEOMAlgo - ---raises - -is - Create - returns Gluer from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Gluer();" - - SetCheckGeometry (me:out; - aFlag:Boolean from Standard); - - CheckGeometry (me) - returns Boolean from Standard; - - Perform(me:out) - is redefined; - - AloneShapes(me) - returns Integer from Standard; - - --modified by NIZNHY-PKV Fri Jan 21 14:16:58 2005f- - Modified(me:out; - S : Shape from TopoDS) - returns ListOfShape from TopTools; - ---C++: return const & - - Generated(me:out; - S : Shape from TopoDS) - returns ListOfShape from TopTools; - ---C++: return const & - - IsDeleted (me:out; - S : Shape from TopoDS) - returns Boolean from Standard; - --modified by NIZNHY-PKV Fri Jan 21 14:17:04 2005t - - CheckData(me:out) - is redefined protected; - - CheckResult (me:out) - is redefined protected; - - MakeVertices(me:out) - is protected; - - MakeEdges(me:out) - is protected; - - MakeFaces(me:out) - is protected; - - MakeShapes(me:out; - aType:ShapeEnum from TopAbs) - is protected; - - MakeShells(me:out) - is protected; - - MakeSolids(me:out) - is protected; - - InnerTolerance(me:out) - is protected; - - EdgePassKey(me:out; - aE:Edge from TopoDS; - aPK:out PassKeyShape from GEOMAlgo) - is protected; - - FacePassKey(me:out; - aF:Face from TopoDS; - aPK:out PassKeyShape from GEOMAlgo) - is protected; - - MakeVertex(me:out; - aLV : ListOfShape from TopTools; - aNewV: out Vertex from TopoDS) - is protected; - MakeEdge(me:out; - aEdge : Edge from TopoDS; - aNewEdge: out Edge from TopoDS) - is protected; - - MakeFace(me:out; - aFace : Face from TopoDS; - aNewEdge: out Face from TopoDS) - is protected; - - IsToReverse(me:out; - aFR : Face from TopoDS; - aF : Face from TopoDS) - returns Boolean from Standard - is protected; - - HasNewSubShape(me; - aS : Shape from TopoDS) - returns Boolean from Standard - is protected; --- - Images(me) - returns DataMapOfShapeListOfShape from TopTools; - ---C++:return const & - - Origins(me) - returns DataMapOfShapeShape from TopTools; - ---C++:return const & - -fields - myCheckGeometry : Boolean from Standard is protected; - myTol : Real from Standard is protected; - myImages : DataMapOfShapeListOfShape from TopTools is protected; - myOrigins : DataMapOfShapeShape from TopTools is protected; - myNbAlone : Integer from Standard is protected; ----- - myGenerated : ListOfShape from TopTools is protected; ----- - -end Gluer; diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx index 9fc06291a..322d1ba31 100755 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx @@ -23,22 +23,11 @@ // File: GEOMAlgo_Gluer.cxx // Created: Sat Dec 04 12:45:53 2004 // Author: Peter KURNEV - -#include - -#include -#include -#include -#include -#include +// +// +#include #include -#include -#include -#include - -#include - #include #include @@ -93,13 +82,25 @@ #include #include -static +#include +#include +#include +#include +#include +// + +#include +#include +#include + +// +static void GetSubShapes(const TopoDS_Shape& aS, TopTools_IndexedMapOfShape& aMSS); //======================================================================= //function : GEOMAlgo_Gluer -//purpose : +//purpose : //======================================================================= GEOMAlgo_Gluer::GEOMAlgo_Gluer() : @@ -113,14 +114,14 @@ GEOMAlgo_Gluer::GEOMAlgo_Gluer() } //======================================================================= //function : ~GEOMAlgo_Gluer -//purpose : +//purpose : //======================================================================= GEOMAlgo_Gluer::~GEOMAlgo_Gluer() { } //======================================================================= //function : SetCheckGeometry -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::SetCheckGeometry(const Standard_Boolean aFlag) { @@ -128,7 +129,7 @@ void GEOMAlgo_Gluer::SetCheckGeometry(const Standard_Boolean aFlag) } //======================================================================= //function : CheckGeometry -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_Gluer::CheckGeometry() const { @@ -136,7 +137,7 @@ Standard_Boolean GEOMAlgo_Gluer::CheckGeometry() const } //======================================================================= //function : SetKeepNonSolids -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::SetKeepNonSolids(const Standard_Boolean aFlag) { @@ -144,15 +145,15 @@ void GEOMAlgo_Gluer::SetKeepNonSolids(const Standard_Boolean aFlag) } //======================================================================= //function : KeepNonSolids -//purpose : +//purpose : //======================================================================= -//Standard_Boolean GEOMAlgo_Gluer::KeepNonSolids()const -//{ -// return myKeepNonSolids; -//} +Standard_Boolean GEOMAlgo_Gluer::KeepNonSolids()const +{ + return myKeepNonSolids; +} //======================================================================= //function : AloneShapes -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_Gluer::AloneShapes()const { @@ -160,7 +161,7 @@ Standard_Integer GEOMAlgo_Gluer::AloneShapes()const } //======================================================================= //function : Images -//purpose : +//purpose : //======================================================================= const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer::Images()const { @@ -168,7 +169,7 @@ const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer::Images()const } //======================================================================= //function : Origins -//purpose : +//purpose : //======================================================================= const TopTools_DataMapOfShapeShape& GEOMAlgo_Gluer::Origins()const { @@ -176,7 +177,7 @@ const TopTools_DataMapOfShapeShape& GEOMAlgo_Gluer::Origins()const } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::Perform() { @@ -186,10 +187,8 @@ void GEOMAlgo_Gluer::Perform() myErrorStatus=0; myWarningStatus=0; // -#if OCC_VERSION_LARGE > 0x06050200 // Initialize the context GEOMAlgo_ShapeAlgo::Perform(); -#endif // void (GEOMAlgo_Gluer::* pF[aNb])()={ &GEOMAlgo_Gluer::CheckData, &GEOMAlgo_Gluer::InnerTolerance, @@ -208,7 +207,7 @@ void GEOMAlgo_Gluer::Perform() //======================================================================= //function : MakeVertices -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::MakeVertices() { @@ -255,7 +254,7 @@ void GEOMAlgo_Gluer::MakeVertices() aTreeFiller.Add(i, aBox); // aMIS.Add(i, aV); - aMSB.Add(aV, aBox); + aMSB.Add(aV, aBox); } // aTreeFiller.Fill(); @@ -295,7 +294,7 @@ void GEOMAlgo_Gluer::MakeVertices() // aNbVSD=aBBTree.Select(aSelector); if (!aNbVSD) { - continue; // it must not be + continue; // it must not be } // const TColStd_ListOfInteger& aLI=aSelector.Indices(); @@ -399,7 +398,7 @@ void GEOMAlgo_Gluer::MakeVertices() } //======================================================================= //function : MakeSubShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::MakeSubShapes (const TopoDS_Shape& theShape, TopTools_MapOfShape& theMS, @@ -504,7 +503,7 @@ void GEOMAlgo_Gluer::MakeSubShapes (const TopoDS_Shape& theShape, } //======================================================================= //function : MakeSolids -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::MakeSolids() { @@ -528,7 +527,7 @@ void GEOMAlgo_Gluer::MakeSolids() } //======================================================================= //function : MakeShells -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::MakeShells() { @@ -576,7 +575,7 @@ void GEOMAlgo_Gluer::MakeShells() } //======================================================================= //function : MakeFaces -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::MakeFaces() { @@ -584,7 +583,7 @@ void GEOMAlgo_Gluer::MakeFaces() } //======================================================================= //function : MakeEdges -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::MakeEdges() { @@ -592,7 +591,7 @@ void GEOMAlgo_Gluer::MakeEdges() } //======================================================================= //function : MakeShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) { @@ -611,7 +610,7 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) aNbF=aMF.Extent(); for (i=1; i<=aNbF; ++i) { const TopoDS_Shape& aS=aMF(i); - // + // if (aType==TopAbs_FACE) { const TopoDS_Face& aF=TopoDS::Face(aS); FacePassKey(aF, aPKF); @@ -638,7 +637,7 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) } // check geometric coincidence if (myCheckGeometry) { - iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTol, myContext); + iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTol, myContext); if (iErr) { myErrorStatus=200; return; @@ -668,7 +667,7 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) } } // - if (bHasNewSubShape) { + if (bHasNewSubShape) { if (aType==TopAbs_FACE) { TopoDS_Face aNewFace; // @@ -698,7 +697,7 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) } //======================================================================= //function : CheckResult -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::CheckResult() { @@ -706,9 +705,9 @@ void GEOMAlgo_Gluer::CheckResult() // if (myResult.IsNull()) { myErrorStatus=6; - return; + return; } - // + // Standard_Boolean bFound; Standard_Integer i, j, aNbS, aNbFS, aNbSx; TopTools_IndexedMapOfShape aMS, aMFS; @@ -717,7 +716,7 @@ void GEOMAlgo_Gluer::CheckResult() TopExp::MapShapesAndAncestors(myResult, TopAbs_FACE, TopAbs_SOLID, aMFR); TopExp::MapShapes(myResult, TopAbs_SOLID, aMS); // - + myNbAlone=0; aNbS=aMS.Extent(); for (i=1; i<=aNbS; ++i) { @@ -749,7 +748,7 @@ void GEOMAlgo_Gluer::CheckResult() } //======================================================================= //function : CheckData -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::CheckData() { @@ -757,12 +756,12 @@ void GEOMAlgo_Gluer::CheckData() // if (myShape.IsNull()) { myErrorStatus=5; - return; + return; } } //======================================================================= //function : InnerTolerance -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer::InnerTolerance() { @@ -795,9 +794,9 @@ void GEOMAlgo_Gluer::InnerTolerance() } //======================================================================= //function : FacePassKey -//purpose : +//purpose : //======================================================================= -void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, +void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, GEOMAlgo_PassKeyShape& aPK) { Standard_Integer i, aNbE; @@ -820,9 +819,9 @@ void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, } //======================================================================= //function : EdgePassKey -//purpose : +//purpose : //======================================================================= -void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE, +void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE, GEOMAlgo_PassKeyShape& aPK) { TopoDS_Vertex aV1, aV2; @@ -839,9 +838,9 @@ void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE, } //======================================================================= //function : MakeVertex -//purpose : +//purpose : //======================================================================= -void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV, +void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV, TopoDS_Vertex& aNewVertex) { Standard_Integer aNbV; @@ -885,9 +884,9 @@ void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV, } //======================================================================= //function : MakeEdge -//purpose : +//purpose : //======================================================================= -void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE, +void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE, TopoDS_Edge& aNewEdge) { myErrorStatus=0; @@ -934,14 +933,14 @@ void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE, } // else { - BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge); + BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge); } } //======================================================================= //function : MakeFace -//purpose : +//purpose : //======================================================================= -void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF, +void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF, TopoDS_Face& aNewFace) { myErrorStatus=0; @@ -983,8 +982,8 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF, GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax); } BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD); - - // orient image + + // orient image bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext); if (bIsToReverse) { aER.Reverse(); @@ -1009,7 +1008,7 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF, } //======================================================================= //function : IsToReverse -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR, const TopoDS_Face& aF) @@ -1036,11 +1035,7 @@ Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR, aC3D=BRep_Tool::Curve(aE, aT1, aT2); aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2); aC3D->D0(aT, aP); -#if OCC_VERSION_LARGE > 0x06050200 myContext->ProjectPointOnEdge(aP, aER, aTR); -#else - myContext.ProjectPointOnEdge(aP, aER, aTR); -#endif // BOPTools_Tools3D::GetNormalToFaceOnEdge (aE, aF, aT, aDNF); if (aF.Orientation()==TopAbs_REVERSED) { @@ -1059,7 +1054,7 @@ Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR, } //======================================================================= //function : HasNewSubShape -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape(const TopoDS_Shape& aS)const { @@ -1092,7 +1087,7 @@ Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape(const TopoDS_Shape& aS)const } //======================================================================= //function : GetSubShapes -//purpose : +//purpose : //======================================================================= void GetSubShapes(const TopoDS_Shape& aS, TopTools_IndexedMapOfShape& aMSS) @@ -1116,9 +1111,9 @@ void GetSubShapes(const TopoDS_Shape& aS, } //======================================================================= //function : Modified -//purpose : +//purpose : //======================================================================= -const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS) +const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS) { TopAbs_ShapeEnum aType; // @@ -1126,11 +1121,11 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS) // aType=aS.ShapeType(); if (aType==TopAbs_VERTEX || - aType==TopAbs_EDGE || - aType==TopAbs_WIRE || - aType==TopAbs_FACE || - aType==TopAbs_SHELL || - aType==TopAbs_SOLID) { + aType==TopAbs_EDGE || + aType==TopAbs_WIRE || + aType==TopAbs_FACE || + aType==TopAbs_SHELL || + aType==TopAbs_SOLID) { if(myOrigins.IsBound(aS)) { const TopoDS_Shape& aSnew=myOrigins.Find(aS); if (!aSnew.IsSame(aS)) { @@ -1143,7 +1138,7 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS) } //======================================================================= //function : Generated -//purpose : +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_Gluer::Generated(const TopoDS_Shape& ) { @@ -1152,7 +1147,7 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer::Generated(const TopoDS_Shape& ) } //======================================================================= //function : IsDeleted -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_Gluer::IsDeleted (const TopoDS_Shape& aS) { @@ -1167,7 +1162,7 @@ Standard_Boolean GEOMAlgo_Gluer::IsDeleted (const TopoDS_Shape& aS) // // ErrorStatus // -// 1 - the object is just initialized +// 1 - the object is just initialized // 2 - no vertices found in source shape // 3 - nb same domain vertices for the vertex Vi =0 // 4 - nb same domain edges(faces) for the edge Ei(face Fi) =0 diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.hxx b/src/GEOMAlgo/GEOMAlgo_Gluer.hxx index 9b0f6608f..406004e7c 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.hxx @@ -1,3 +1,4 @@ + // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, @@ -20,159 +21,144 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_Gluer.hxx +// Created: Sat Dec 04 12:45:53 2004 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_Gluer_HeaderFile #define _GEOMAlgo_Gluer_HeaderFile -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif -#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile #include -#endif -#ifndef _TopTools_DataMapOfShapeShape_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile #include -#endif -#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile #include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile #include -#endif -class TopTools_ListOfShape; -class TopoDS_Shape; -class TopoDS_Edge; -class GEOMAlgo_PassKeyShape; -class TopoDS_Face; -class TopoDS_Vertex; -class TopTools_DataMapOfShapeListOfShape; -class TopTools_DataMapOfShapeShape; -class TopTools_MapOfShape; -class TopoDS_Compound; +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//class : GEOMAlgo_Gluer +//purpose : +//======================================================================= +class GEOMAlgo_Gluer : public GEOMAlgo_ShapeAlgo { +public: + Standard_EXPORT + GEOMAlgo_Gluer(); + Standard_EXPORT + virtual ~GEOMAlgo_Gluer(); + Standard_EXPORT + void SetCheckGeometry(const Standard_Boolean aFlag) ; -class GEOMAlgo_Gluer : public GEOMAlgo_ShapeAlgo { -public: + Standard_EXPORT + Standard_Boolean CheckGeometry() const; - 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); - } - - - 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; - - Standard_EXPORT void MakeSubShapes(const TopoDS_Shape& aS,TopTools_MapOfShape& aM,TopoDS_Compound& aC) ; - - Standard_EXPORT void SetKeepNonSolids(const Standard_Boolean bFlag) ; - - Standard_EXPORT Standard_Boolean KeepNonSolids() const; - - - - - -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; - - -Standard_Boolean myCheckGeometry; -Standard_Real myTol; -TopTools_DataMapOfShapeListOfShape myImages; -TopTools_DataMapOfShapeShape myOrigins; -Standard_Integer myNbAlone; -TopTools_ListOfShape myGenerated; -Standard_Boolean myKeepNonSolids; - - -private: + Standard_EXPORT + void SetKeepNonSolids(const Standard_Boolean aFlag) ; + Standard_EXPORT + Standard_Boolean KeepNonSolids() 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; + + 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() ; -// other Inline functions and methods (like "C++: function call" methods) + 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; + + Standard_EXPORT + void MakeSubShapes(const TopoDS_Shape& aS, + TopTools_MapOfShape& aM, + TopoDS_Compound& aC) ; + + + Standard_Boolean myCheckGeometry; + Standard_Boolean myKeepNonSolids; + Standard_Real myTol; + TopTools_DataMapOfShapeListOfShape myImages; + TopTools_DataMapOfShapeShape myOrigins; + Standard_Integer myNbAlone; + TopTools_ListOfShape myGenerated; +}; #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.ixx b/src/GEOMAlgo/GEOMAlgo_Gluer.ixx deleted file mode 100644 index c7d370014..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.jxx b/src/GEOMAlgo/GEOMAlgo_Gluer.jxx deleted file mode 100644 index d1a24a5ce..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.jxx +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopoDS_Edge_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _TopoDS_Vertex_HeaderFile -#include -#endif -#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile -#include -#endif -#ifndef _TopTools_DataMapOfShapeShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_Gluer_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer2.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer2.cxx index 1a32a60f7..0a7b969bf 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer2.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer2.cxx @@ -25,11 +25,6 @@ #include -#include -#include - -#include - #include #include @@ -37,9 +32,8 @@ #include #include -#include - #include +#include #include #include @@ -50,9 +44,12 @@ #include #include +#include +#include + //======================================================================= //function : GEOMAlgo_Gluer2 -//purpose : +//purpose : //======================================================================= GEOMAlgo_Gluer2::GEOMAlgo_Gluer2() : @@ -63,14 +60,14 @@ GEOMAlgo_Gluer2::GEOMAlgo_Gluer2() } //======================================================================= //function : ~GEOMAlgo_Gluer2 -//purpose : +//purpose : //======================================================================= GEOMAlgo_Gluer2::~GEOMAlgo_Gluer2() { } //======================================================================= //function : Clear -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::Clear() { @@ -85,10 +82,24 @@ void GEOMAlgo_Gluer2::Clear() myImagesToWork.Clear(); myOriginsToWork.Clear(); myKeepNonSolids=Standard_False; + //modified by NIZNHY-PKV Tue Mar 13 13:38:28 2012f + myDetector.Clear(); + //modified by NIZNHY-PKV Tue Mar 13 13:38:30 2012t +} +//modified by NIZNHY-PKV Tue Mar 13 12:26:50 2012f +//======================================================================= +//function : StickedShapes +//purpose : +//======================================================================= +const TopTools_IndexedDataMapOfShapeListOfShape& + GEOMAlgo_Gluer2::StickedShapes() +{ + return myDetector.StickedShapes(); } +//modified by NIZNHY-PKV Tue Mar 13 12:26:54 2012t //======================================================================= //function : SetShapesToGlue -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) { @@ -96,7 +107,7 @@ void GEOMAlgo_Gluer2::SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& } //======================================================================= //function : ShapesToGlue -//purpose : +//purpose : //======================================================================= const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ShapesToGlue()const { @@ -104,7 +115,7 @@ const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ShapesToGlue()const } //======================================================================= //function : SetKeepNonSolids -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::SetKeepNonSolids(const Standard_Boolean aFlag) { @@ -112,15 +123,15 @@ void GEOMAlgo_Gluer2::SetKeepNonSolids(const Standard_Boolean aFlag) } //======================================================================= //function : KeepNonSolids -//purpose : +//purpose : //======================================================================= -Standard_Boolean GEOMAlgo_Gluer2::KeepNonSolids()const +Standard_Boolean GEOMAlgo_Gluer2::KeepNonSolids()const { return myKeepNonSolids; } //======================================================================= //function : ShapesDetected -//purpose : +//purpose : //======================================================================= const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ShapesDetected()const { @@ -128,7 +139,7 @@ const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ShapesDetected()const } //======================================================================= //function : ImagesToWork -//purpose : +//purpose : //======================================================================= const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ImagesToWork()const { @@ -136,28 +147,27 @@ const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ImagesToWork()const } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::Perform() { myErrorStatus=0; myWarningStatus=0; - // + // CheckData(); if (myErrorStatus) { return; } // -#if OCC_VERSION_LARGE > 0x06050200 // Initialize the context GEOMAlgo_GluerAlgo::Perform(); -#endif // PerformShapesToWork(); if (myErrorStatus) { return; } - if (myWarningStatus==1) {// no shapes to glue + if (myWarningStatus==1) { + // no shapes to glue myShape=myArgument; return; } @@ -216,7 +226,7 @@ void GEOMAlgo_Gluer2::Perform() } //======================================================================= //function : CheckData -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::CheckData() { @@ -241,8 +251,8 @@ void GEOMAlgo_Gluer2::CheckData() aTypeX=aSG.ShapeType(); if (!i) { aType=aTypeX; - if (!(aType==TopAbs_VERTEX || - aType==TopAbs_EDGE || + if (!(aType==TopAbs_VERTEX || + aType==TopAbs_EDGE || aType==TopAbs_FACE)) { myErrorStatus=21;// non-brep shapes return; @@ -259,15 +269,15 @@ void GEOMAlgo_Gluer2::CheckData() } //======================================================================= //function : FillEdges -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::FillEdges() { FillBRepShapes(TopAbs_EDGE); -} +} //======================================================================= //function : FillFaces -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::FillFaces() { @@ -275,7 +285,7 @@ void GEOMAlgo_Gluer2::FillFaces() } //======================================================================= //function : FillWires -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::FillWires() { @@ -283,7 +293,7 @@ void GEOMAlgo_Gluer2::FillWires() } //======================================================================= //function : FillShells -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::FillShells() { @@ -291,23 +301,23 @@ void GEOMAlgo_Gluer2::FillShells() } //======================================================================= //function : FillSolids -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::FillSolids() { FillContainers(TopAbs_SOLID); -} +} //======================================================================= //function : FillCompSolids -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::FillCompSolids() { FillContainers(TopAbs_COMPSOLID); -} +} //======================================================================= //function : FillVertices -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::FillVertices() { @@ -342,10 +352,10 @@ void GEOMAlgo_Gluer2::FillVertices() } //======================================================================= //function : FillBRepShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::FillBRepShapes(const TopAbs_ShapeEnum theType) -{ +{ Standard_Boolean bHasImage, bIsToWork; Standard_Integer i, aNbE; TopoDS_Iterator aItS; @@ -401,7 +411,7 @@ void GEOMAlgo_Gluer2::FillBRepShapes(const TopAbs_ShapeEnum theType) } //======================================================================= //function : FillContainers -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::FillContainers(const TopAbs_ShapeEnum aType) { @@ -432,9 +442,7 @@ void GEOMAlgo_Gluer2::FillContainers(const TopAbs_ShapeEnum aType) } // GEOMAlgo_Tools3D::MakeContainer(aType, aWnew); - //modified by NIZNHY-PKV Tue May 10 13:46:30 2011f aWnew.Orientation(aW.Orientation()); - //modified by NIZNHY-PKV Tue May 10 13:46:32 2011t // aItS.Initialize(aW); for (; aItS.More(); aItS.Next()) { @@ -454,10 +462,6 @@ void GEOMAlgo_Gluer2::FillContainers(const TopAbs_ShapeEnum aType) } } // - //modified by NIZNHY-PKV Tue May 10 13:46:19 2011f - //aWnew.Orientation(aW.Orientation()); - //modified by NIZNHY-PKV Tue May 10 13:46:22 2011t - // //myImages / myOrigins TopTools_ListOfShape aLSD; // @@ -469,7 +473,7 @@ void GEOMAlgo_Gluer2::FillContainers(const TopAbs_ShapeEnum aType) } //======================================================================= //function : FillCompounds -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::FillCompounds() { @@ -490,7 +494,7 @@ void GEOMAlgo_Gluer2::FillCompounds() } //======================================================================= //function : FillCompound -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::FillCompound(const TopoDS_Shape& aC) { @@ -535,7 +539,7 @@ void GEOMAlgo_Gluer2::FillCompound(const TopoDS_Shape& aC) } //======================================================================= //function : HasImage -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_Gluer2::HasImage(const TopoDS_Shape& aC) { @@ -569,7 +573,7 @@ Standard_Boolean GEOMAlgo_Gluer2::HasImage(const TopoDS_Shape& aC) } //======================================================================= //function : BuildResult -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::BuildResult() { @@ -618,7 +622,7 @@ void GEOMAlgo_Gluer2::BuildResult() GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew1); // TopExp::MapShapes(aCnew, TopAbs_SOLID, aM); - + aNb=aM.Extent(); for (i=1; i<=aNb; ++i) { const TopoDS_Shape& aS=aM(i); @@ -629,7 +633,6 @@ void GEOMAlgo_Gluer2::BuildResult() // myShape=aCnew; } - //-------------------------------------------------------- // // ErrorStatus @@ -638,4 +641,10 @@ void GEOMAlgo_Gluer2::BuildResult() // 14 - PerformImagesToWork failed // // WarningStatus -// 1 - no shapes to glue +// 1 - no shapes to glue +// 2 - sticked shapes are detected. +// The value of myTolerance is so large that +// subshapes of a shape becomes intefere +// (e.g. vertices of an edge). +// In the case +// the result is can not be obtained diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer2.hxx b/src/GEOMAlgo/GEOMAlgo_Gluer2.hxx index 552318fdf..f380802b9 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer2.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer2.hxx @@ -19,117 +19,159 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // File: GEOMAlgo_Gluer2.hxx -// Created: // Author: Peter KURNEV -// #ifndef _GEOMAlgo_Gluer2_HeaderFile #define _GEOMAlgo_Gluer2_HeaderFile #include #include +#include + +#include #include #include -#include -#include -#include + #include #include + +#include #include +#include //======================================================================= //class : GEOMAlgo_Gluer2 -//purpose : +//purpose : //======================================================================= -class GEOMAlgo_Gluer2 : public GEOMAlgo_GluerAlgo, +class GEOMAlgo_Gluer2 : public GEOMAlgo_GluerAlgo, public GEOMAlgo_BuilderShape { public: - - Standard_EXPORT GEOMAlgo_Gluer2(); - - Standard_EXPORT virtual ~GEOMAlgo_Gluer2(); - - Standard_EXPORT void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ; - - Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const; - - Standard_EXPORT void SetKeepNonSolids(const Standard_Boolean theFlag) ; - - Standard_EXPORT Standard_Boolean KeepNonSolids() const; - + + Standard_EXPORT + GEOMAlgo_Gluer2(); + + Standard_EXPORT + virtual ~GEOMAlgo_Gluer2(); + + Standard_EXPORT + void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ; + + Standard_EXPORT + const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const; + + Standard_EXPORT + void SetKeepNonSolids(const Standard_Boolean theFlag) ; + + Standard_EXPORT + Standard_Boolean KeepNonSolids() const; + Standard_EXPORT virtual void Clear() ; - - Standard_EXPORT virtual void Perform() ; - - Standard_EXPORT virtual void CheckData() ; - - Standard_EXPORT void Detect() ; - - Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const; - - Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const; - - Standard_EXPORT virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ; - - Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ; - - Standard_EXPORT virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ; - - Standard_EXPORT static void MakeVertex(const TopTools_ListOfShape& theLV, - TopoDS_Vertex& theV) ; - - Standard_EXPORT static void MapBRepShapes(const TopoDS_Shape& theS, - TopTools_MapOfShape& theM) ; - - Standard_EXPORT static void MapShapes(const TopoDS_Shape& theS, - TopTools_MapOfShape& theM) ; + Standard_EXPORT + virtual void Perform() ; + + Standard_EXPORT + virtual void CheckData() ; + + Standard_EXPORT + void Detect() ; + + Standard_EXPORT + const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const; + + Standard_EXPORT + const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const; + + Standard_EXPORT + virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ; + + Standard_EXPORT + virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ; + Standard_EXPORT + virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ; + + Standard_EXPORT + static void MakeVertex(const TopTools_ListOfShape& theLV, + TopoDS_Vertex& theV) ; + + Standard_EXPORT + static void MapBRepShapes(const TopoDS_Shape& theS, + TopTools_MapOfShape& theM) ; + + Standard_EXPORT + static void MapShapes(const TopoDS_Shape& theS, + TopTools_MapOfShape& theM) ; + +//modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f + Standard_EXPORT + const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes(); +//modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t +//------------------------------------------------ protected: - - Standard_EXPORT void PerformShapesToWork() ; - - Standard_EXPORT void FillVertices() ; - - Standard_EXPORT void FillEdges() ; - - Standard_EXPORT void FillWires() ; - - Standard_EXPORT void FillFaces() ; - - Standard_EXPORT void FillShells() ; - - Standard_EXPORT void FillSolids() ; - - Standard_EXPORT void FillCompSolids() ; - - Standard_EXPORT void FillCompounds() ; - - Standard_EXPORT void BuildResult() ; - - Standard_EXPORT void FillBRepShapes(const TopAbs_ShapeEnum theType) ; - - Standard_EXPORT void FillContainers(const TopAbs_ShapeEnum theType) ; - - Standard_EXPORT void FillCompound(const TopoDS_Shape& theC) ; - - Standard_EXPORT virtual void PrepareHistory() ; - - Standard_EXPORT Standard_Boolean HasImage(const TopoDS_Shape& theC) ; - - Standard_EXPORT void MakeBRepShapes(const TopoDS_Shape& theS, - TopoDS_Shape& theSnew) ; - - Standard_EXPORT void MakeEdge(const TopoDS_Edge& theE, - TopoDS_Edge& theEnew) ; - - Standard_EXPORT void MakeFace(const TopoDS_Face& theF, - TopoDS_Face& theFnew) ; - - Standard_EXPORT void TreatPair(const NMTTools_CoupleOfShape& theCS, - NMTTools_ListOfCoupleOfShape& theLCS) ; + Standard_EXPORT + void PerformShapesToWork() ; + + Standard_EXPORT + void FillVertices() ; + + Standard_EXPORT + void FillEdges() ; + + Standard_EXPORT + void FillWires() ; + + Standard_EXPORT + void FillFaces() ; + + Standard_EXPORT + void FillShells() ; + + Standard_EXPORT + void FillSolids() ; + + Standard_EXPORT + void FillCompSolids() ; + + Standard_EXPORT + void FillCompounds() ; + + Standard_EXPORT + void BuildResult() ; + + Standard_EXPORT + void FillBRepShapes(const TopAbs_ShapeEnum theType) ; + + Standard_EXPORT + void FillContainers(const TopAbs_ShapeEnum theType) ; + + Standard_EXPORT + void FillCompound(const TopoDS_Shape& theC) ; + + Standard_EXPORT + virtual void PrepareHistory() ; + + Standard_EXPORT + Standard_Boolean HasImage(const TopoDS_Shape& theC) ; + + Standard_EXPORT + void MakeBRepShapes(const TopoDS_Shape& theS, + TopoDS_Shape& theSnew) ; + + Standard_EXPORT + void MakeEdge(const TopoDS_Edge& theE, + TopoDS_Edge& theEnew) ; + + Standard_EXPORT + void MakeFace(const TopoDS_Face& theF, + TopoDS_Face& theFnew) ; + + Standard_EXPORT + void TreatPair(const NMTTools_CoupleOfShape& theCS, + NMTTools_ListOfCoupleOfShape& theLCS) ; protected: TopTools_DataMapOfShapeListOfShape myShapesToGlue; @@ -138,7 +180,9 @@ protected: TopTools_DataMapOfShapeListOfShape myImagesToWork; TopTools_DataMapOfShapeShape myOriginsToWork; Standard_Boolean myKeepNonSolids; - + //modified by NIZNHY-PKV Tue Mar 13 13:30:40 2012f + GEOMAlgo_GlueDetector myDetector; + //modified by NIZNHY-PKV Tue Mar 13 13:30:43 2012t private: }; #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer2_2.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer2_2.cxx index 74610392b..375036bfc 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer2_2.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer2_2.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File: GEOMAlgo_Gluer2_2.cxx -// Created: +// Created: // Author: Peter KURNEV // // @@ -36,25 +36,25 @@ //======================================================================= //function : PrepareHistory -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::PrepareHistory() { //Standard_Boolean bHasImage, bContainsSD; // - // 1. Clearing + // 1. Clearing GEOMAlgo_BuilderShape::PrepareHistory(); - // + // if(myShape.IsNull()) { return; } // - GEOMAlgo_Gluer2::MapShapes(myShape, myMapShape); + GEOMAlgo_Gluer2::MapShapes(myShape, myMapShape); // } //======================================================================= //function : Generated -//purpose : +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_Gluer2::Generated(const TopoDS_Shape& ) { @@ -63,7 +63,7 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer2::Generated(const TopoDS_Shape& ) } //======================================================================= //function : Modified -//purpose : +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_Gluer2::Modified(const TopoDS_Shape& theS) { @@ -74,8 +74,8 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer2::Modified(const TopoDS_Shape& theS) myHistShapes.Clear(); // aType=theS.ShapeType(); - if (!(aType==TopAbs_VERTEX || aType==TopAbs_EDGE || - aType==TopAbs_FACE || aType==TopAbs_SOLID)) { + if (!(aType==TopAbs_VERTEX || aType==TopAbs_EDGE || + aType==TopAbs_FACE || aType==TopAbs_SOLID)) { return myHistShapes; } // @@ -110,7 +110,7 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer2::Modified(const TopoDS_Shape& theS) } //======================================================================= //function : IsDeleted -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_Gluer2::IsDeleted(const TopoDS_Shape& theS) { @@ -140,7 +140,7 @@ Standard_Boolean GEOMAlgo_Gluer2::IsDeleted(const TopoDS_Shape& theS) } //======================================================================= //function : MapShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::MapShapes(const TopoDS_Shape& theS, TopTools_MapOfShape& theM) diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer2_3.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer2_3.cxx index 93ccc32ca..5ccb17521 100644 --- a/src/GEOMAlgo/GEOMAlgo_Gluer2_3.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer2_3.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Gluer2_3.cxx -// Created: -// Author: Peter KURNEV + +// File: GEOMAlgo_Gluer2_3.cxx +// Author: Peter KURNEV #include @@ -55,12 +55,12 @@ static void MapShapes1(const TopoDS_Shape& aS, - const TopAbs_ShapeEnum aType, - TopTools_IndexedMapOfShape& aM); + const TopAbs_ShapeEnum aType, + TopTools_IndexedMapOfShape& aM); //======================================================================= //function : Detect -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::Detect() { @@ -68,7 +68,7 @@ void GEOMAlgo_Gluer2::Detect() Standard_Integer iErr, aNbSD; TopTools_ListIteratorOfListOfShape aItLS; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS; - GEOMAlgo_GlueDetector aDetector; + //GEOMAlgo_GlueDetector aDetector; // myErrorStatus=0; myWarningStatus=0; @@ -77,18 +77,31 @@ void GEOMAlgo_Gluer2::Detect() myOriginsDetected.Clear(); // bCheckGeometry=Standard_True; - aDetector.SetArgument(myArgument); - aDetector.SetTolerance(myTolerance); - aDetector.SetCheckGeometry(bCheckGeometry); // - aDetector.Perform(); - iErr=aDetector.ErrorStatus(); + //modified by NIZNHY-PKV Tue Mar 13 13:33:35 2012f + myDetector.Clear(); + myDetector.SetContext(myContext); + //modified by NIZNHY-PKV Tue Mar 13 13:33:38 2012t + myDetector.SetArgument(myArgument); + myDetector.SetTolerance(myTolerance); + myDetector.SetCheckGeometry(bCheckGeometry); + // + myDetector.Perform(); + iErr=myDetector.ErrorStatus(); if (iErr) { - myErrorStatus=11;// Detector failed + // Detector is failed + myErrorStatus=11; return; } + //modified by NIZNHY-PKV Tue Mar 13 13:40:36 2012f + iErr=myDetector.WarningStatus(); + if (iErr) { + // Sticked shapes are detected + myWarningStatus=2; + } + //modified by NIZNHY-PKV Tue Mar 13 13:40:39 2012t // - const TopTools_DataMapOfShapeListOfShape& aImages=aDetector.Images(); + const TopTools_DataMapOfShapeListOfShape& aImages=myDetector.Images(); aItDMSLS.Initialize(aImages); for (; aItDMSLS.More(); aItDMSLS.Next()) { const TopoDS_Shape& aSkey=aItDMSLS.Key(); @@ -110,16 +123,16 @@ void GEOMAlgo_Gluer2::Detect() } //======================================================================= //function : PerformShapesToWork -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::PerformShapesToWork() -{ - Standard_Integer aNbSG, i, j, aNbC, aNb, aNbSD; +{ + Standard_Integer aNbSG, i, j, k, aNbC, aNb, aNbSD; TopTools_ListIteratorOfListOfShape aItLS1, aItLS2; TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS; NMTTools_CoupleOfShape aCS; NMTTools_ListOfCoupleOfShape aLCS; - NMTTools_ListIteratorOfListOfCoupleOfShape aItCS; + NMTTools_ListIteratorOfListOfCoupleOfShape aItCS; // myErrorStatus=0; myWarningStatus=0; @@ -144,8 +157,8 @@ void GEOMAlgo_Gluer2::PerformShapesToWork() const TopTools_ListOfShape& aLSD=aItDMSLS.Value(); aItLS1.Initialize(aLSD); for (; aItLS1.More(); aItLS1.Next()) { - const TopoDS_Shape& aSx=aItLS1.Value(); - myOriginsToWork.Bind(aSx, aSkey); + const TopoDS_Shape& aSx=aItLS1.Value(); + myOriginsToWork.Bind(aSx, aSkey); } } return; @@ -153,20 +166,20 @@ void GEOMAlgo_Gluer2::PerformShapesToWork() // // 1. Make pairs aItDMSLS.Initialize(myShapesToGlue); - for (; aItDMSLS.More(); aItDMSLS.Next()) { + for (k=0; aItDMSLS.More(); aItDMSLS.Next(), ++k) { //const TopoDS_Shape& aSkey=aItDMSLS.Key(); const TopTools_ListOfShape& aLSG=aItDMSLS.Value(); aItLS1.Initialize(aLSG); for (i=0; aItLS1.More(); aItLS1.Next(), ++i) { aItLS2.Initialize(aLSG); for (j=0; aItLS2.More(); aItLS2.Next(), ++j) { - if (j>i) { - const TopoDS_Shape& aSG1=aItLS1.Value(); - const TopoDS_Shape& aSG2=aItLS2.Value(); - aCS.SetShape1(aSG1); - aCS.SetShape2(aSG2); - TreatPair(aCS, aLCS); - } + if (j>i) { + const TopoDS_Shape& aSG1=aItLS1.Value(); + const TopoDS_Shape& aSG2=aItLS2.Value(); + aCS.SetShape1(aSG1); + aCS.SetShape2(aSG2); + TreatPair(aCS, aLCS); + } } } } @@ -194,10 +207,10 @@ void GEOMAlgo_Gluer2::PerformShapesToWork() } //======================================================================= //function : TreatPair -//purpose : +//purpose : //======================================================================= void GEOMAlgo_Gluer2::TreatPair(const NMTTools_CoupleOfShape& aCS, - NMTTools_ListOfCoupleOfShape& aLCS) + NMTTools_ListOfCoupleOfShape& aLCS) { if (myErrorStatus) { return; @@ -325,47 +338,23 @@ void GEOMAlgo_Gluer2::TreatPair(const NMTTools_CoupleOfShape& aCS, } //======================================================================= //function : MapShapes1 -//purpose : +//purpose : //======================================================================= void MapShapes1(const TopoDS_Shape& aS, - const TopAbs_ShapeEnum aType, - TopTools_IndexedMapOfShape& aM) + const TopAbs_ShapeEnum aType, + TopTools_IndexedMapOfShape& aM) { TopExp_Explorer aExp; - + aExp.Init (aS, aType); for ( ;aExp.More(); aExp.Next()) { const TopoDS_Shape aSx=aExp.Current(); if (aType==TopAbs_EDGE) { const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aSx); if (BRep_Tool::Degenerated(aEx)) { - continue; - } - } - aM.Add(aSx); - } -} -/* -//======================================================================= -//function : MapShapes1 -//purpose : -//======================================================================= -void MapShapes1(const TopoDS_Shape& aS, - const TopAbs_ShapeEnum aType, - TopTools_IndexedMapOfShape& aM) -{ - TopExp_Explorer aExp (aS, aType); - while (aExp.More()) { - const TopoDS_Shape aSx=aExp.Current(); - if (aType==TopAbs_EDGE) { - const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aSx); - if (BRep_Tool::Degenerated(aEx)) { - aExp.Next(); - continue; + continue; } } aM.Add(aSx); - aExp.Next(); } } -*/ diff --git a/src/GEOMAlgo/GEOMAlgo_GluerAlgo.cxx b/src/GEOMAlgo/GEOMAlgo_GluerAlgo.cxx index 89d546ccd..fe6f82a2c 100644 --- a/src/GEOMAlgo/GEOMAlgo_GluerAlgo.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GluerAlgo.cxx @@ -19,66 +19,58 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - // File: GEOMAlgo_GluerAlgo.cxx +// Created: // Author: Peter KURNEV - +// +// #include - -#include - -#if OCC_VERSION_LARGE > 0x06050200 #include -#endif + //======================================================================= //function : GEOMAlgo_GluerAlgo -//purpose : +//purpose : //======================================================================= GEOMAlgo_GluerAlgo::GEOMAlgo_GluerAlgo() { myTolerance=0.0001; myCheckGeometry=Standard_True; } - //======================================================================= //function : ~GEOMAlgo_GluerAlgo -//purpose : +//purpose : //======================================================================= GEOMAlgo_GluerAlgo::~GEOMAlgo_GluerAlgo() { } - //======================================================================= //function : SetArgument -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GluerAlgo::SetArgument(const TopoDS_Shape& theShape) { myArgument=theShape; } - //======================================================================= //function : Argument -//purpose : +//purpose : //======================================================================= const TopoDS_Shape& GEOMAlgo_GluerAlgo::Argument()const { return myArgument; } - //======================================================================= //function : SetTolerance -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GluerAlgo::SetTolerance(const Standard_Real aT) { myTolerance=aT; } - //======================================================================= //function : Tolerance -//purpose : +//purpose : //======================================================================= Standard_Real GEOMAlgo_GluerAlgo::Tolerance()const { @@ -87,83 +79,68 @@ Standard_Real GEOMAlgo_GluerAlgo::Tolerance()const //======================================================================= //function : SetCheckGeometry -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GluerAlgo::SetCheckGeometry(const Standard_Boolean aFlag) { myCheckGeometry=aFlag; } - //======================================================================= //function : CheckGeometry -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_GluerAlgo::CheckGeometry() const { return myCheckGeometry; } - -#if OCC_VERSION_LARGE > 0x06050200 //======================================================================= //function : SetContext -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GluerAlgo::SetContext(const Handle(IntTools_Context)& theContext) { myContext=theContext; } -#endif - //======================================================================= //function : Context -//purpose : +//purpose : //======================================================================= -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& GEOMAlgo_GluerAlgo::Context() -#else -IntTools_Context& GEOMAlgo_GluerAlgo::Context() -#endif { return myContext; } - //======================================================================= //function : Images -//purpose : +//purpose : //======================================================================= const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_GluerAlgo::Images()const { return myImages; } - //======================================================================= //function : Origins -//purpose : +//purpose : //======================================================================= const TopTools_DataMapOfShapeShape& GEOMAlgo_GluerAlgo::Origins()const { return myOrigins; } - //======================================================================= //function : Clear -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GluerAlgo::Clear() { myImages.Clear(); myOrigins.Clear(); } - //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= void GEOMAlgo_GluerAlgo::Perform() { -#if OCC_VERSION_LARGE > 0x06050200 if (myContext.IsNull()) { myContext=new IntTools_Context; } -#endif } diff --git a/src/GEOMAlgo/GEOMAlgo_GluerAlgo.hxx b/src/GEOMAlgo/GEOMAlgo_GluerAlgo.hxx index fc38a08ba..97f9b9ad1 100644 --- a/src/GEOMAlgo/GEOMAlgo_GluerAlgo.hxx +++ b/src/GEOMAlgo/GEOMAlgo_GluerAlgo.hxx @@ -19,88 +19,80 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - // File: GEOMAlgo_GluerAlgo.hxx +// Created: // Author: Peter KURNEV - +// +// #ifndef _GEOMAlgo_GluerAlgo_HeaderFile #define _GEOMAlgo_GluerAlgo_HeaderFile #include +#include #include #include - -#include #include #include #include - #include -#include - //======================================================================= //class : GEOMAlgo_GluerAlgo -//purpose : +//purpose : //======================================================================= class GEOMAlgo_GluerAlgo { public: - Standard_EXPORT + Standard_EXPORT GEOMAlgo_GluerAlgo(); - Standard_EXPORT + Standard_EXPORT virtual ~GEOMAlgo_GluerAlgo(); - Standard_EXPORT + Standard_EXPORT virtual void SetArgument(const TopoDS_Shape& theShape) ; - Standard_EXPORT + Standard_EXPORT const TopoDS_Shape& Argument() const; - - Standard_EXPORT + + Standard_EXPORT void SetTolerance(const Standard_Real aT) ; - - Standard_EXPORT + + Standard_EXPORT Standard_Real Tolerance() const; - - Standard_EXPORT + + Standard_EXPORT void SetCheckGeometry(const Standard_Boolean aFlag) ; - - Standard_EXPORT + + Standard_EXPORT Standard_Boolean CheckGeometry() const; - - Standard_EXPORT + + Standard_EXPORT virtual void Perform() ; - - Standard_EXPORT + + Standard_EXPORT virtual void Clear() ; -#if OCC_VERSION_LARGE > 0x06050200 - Standard_EXPORT void SetContext(const Handle(IntTools_Context)&); - Standard_EXPORT const Handle(IntTools_Context)& Context(); -#else - Standard_EXPORT IntTools_Context& Context(); -#endif + Standard_EXPORT + void SetContext(const Handle(IntTools_Context)&) ; - Standard_EXPORT + Standard_EXPORT + const Handle(IntTools_Context)& Context() ; + + Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Images() const; - - Standard_EXPORT + + Standard_EXPORT const TopTools_DataMapOfShapeShape& Origins() const; protected: TopoDS_Shape myArgument; Standard_Real myTolerance; Standard_Boolean myCheckGeometry; -#if OCC_VERSION_LARGE > 0x06050200 Handle(IntTools_Context) myContext; -#else - IntTools_Context myContext; -#endif TopTools_DataMapOfShapeListOfShape myImages; TopTools_DataMapOfShapeShape myOrigins; - + private: }; #endif diff --git a/src/GEOMAlgo/GEOMAlgo_HAlgo.cdl b/src/GEOMAlgo/GEOMAlgo_HAlgo.cdl deleted file mode 100644 index e90e4f6b0..000000000 --- a/src/GEOMAlgo/GEOMAlgo_HAlgo.cdl +++ /dev/null @@ -1,59 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_Algo.cdl --- Created: Sat Dec 04 12:37:56 2004 --- Author: Peter KURNEV --- --- -deferred class HAlgo from GEOMAlgo - inherits TShared from MMgt - ---Purpose: - ---uses ---raises - -is - Initialize - returns mutable HAlgo from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_HAlgo();" - - Perform(me:mutable) - is deferred; - - CheckData(me:mutable) - is virtual; - - CheckResult(me:mutable) - is virtual; - - ErrorStatus (me) - returns Integer from Standard; - - WarningStatus (me) - returns Integer from Standard; - -fields - myErrorStatus : Integer from Standard is protected; - myWarningStatus : Integer from Standard is protected; - -end HAlgo; diff --git a/src/GEOMAlgo/GEOMAlgo_HAlgo.cxx b/src/GEOMAlgo/GEOMAlgo_HAlgo.cxx index 999280b6b..b07876a31 100644 --- a/src/GEOMAlgo/GEOMAlgo_HAlgo.cxx +++ b/src/GEOMAlgo/GEOMAlgo_HAlgo.cxx @@ -20,16 +20,19 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Algo.cxx +// File: GEOMAlgo_Hlgo.cxx // Created: Sat Dec 04 12:39:47 2004 // Author: Peter KURNEV // // -#include +#include + +IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_HAlgo, MMgt_TShared); +IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, MMgt_TShared); //======================================================================= -// function: -// purpose: +// function: +// purpose: //======================================================================= GEOMAlgo_HAlgo::GEOMAlgo_HAlgo() : @@ -38,14 +41,14 @@ {} //======================================================================= // function: ~ -// purpose: +// purpose: //======================================================================= GEOMAlgo_HAlgo::~GEOMAlgo_HAlgo() { } //======================================================================= // function: CheckData -// purpose: +// purpose: //======================================================================= void GEOMAlgo_HAlgo::CheckData() { @@ -53,7 +56,7 @@ } //======================================================================= // function: CheckResult -// purpose: +// purpose: //======================================================================= void GEOMAlgo_HAlgo::CheckResult() { @@ -61,7 +64,7 @@ } //======================================================================= // function: ErrorStatus -// purpose: +// purpose: //======================================================================= Standard_Integer GEOMAlgo_HAlgo::ErrorStatus()const { @@ -69,7 +72,7 @@ } //======================================================================= // function: WarningStatus -// purpose: +// purpose: //======================================================================= Standard_Integer GEOMAlgo_HAlgo::WarningStatus()const { diff --git a/src/GEOMAlgo/GEOMAlgo_HAlgo.hxx b/src/GEOMAlgo/GEOMAlgo_HAlgo.hxx index 21e091438..52340ed2e 100644 --- a/src/GEOMAlgo/GEOMAlgo_HAlgo.hxx +++ b/src/GEOMAlgo/GEOMAlgo_HAlgo.hxx @@ -20,89 +20,56 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_HAlgo.hxx +// Created: Sat Dec 04 12:39:47 2004 +// Author: Peter KURNEV +// +// + #ifndef _GEOMAlgo_HAlgo_HeaderFile #define _GEOMAlgo_HAlgo_HeaderFile -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Handle_GEOMAlgo_HAlgo_HeaderFile -#include -#endif - -#ifndef _Standard_Integer_HeaderFile +#include +//#include #include -#endif -#ifndef _MMgt_TShared_HeaderFile #include -#endif - - - -class GEOMAlgo_HAlgo : public MMgt_TShared { - -public: - // Methods PUBLIC - // - - -Standard_EXPORT virtual void Perform() = 0; - - -Standard_EXPORT virtual void CheckData() ; - - -Standard_EXPORT virtual void CheckResult() ; - -Standard_EXPORT Standard_Integer ErrorStatus() const; +DEFINE_STANDARD_HANDLE(GEOMAlgo_HAlgo, MMgt_TShared); +//======================================================================= +//class : GEOMAlgo_HAlgo +//purpose : +//======================================================================= +class GEOMAlgo_HAlgo : public MMgt_TShared +{ + public: + Standard_EXPORT + virtual void Perform() = 0; -Standard_EXPORT Standard_Integer WarningStatus() const; -//Standard_EXPORT ~GEOMAlgo_HAlgo(); + Standard_EXPORT + virtual void CheckData() ; + Standard_EXPORT + virtual void CheckResult() ; + Standard_EXPORT + Standard_Integer ErrorStatus() const; + Standard_EXPORT + Standard_Integer WarningStatus() const; - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + DEFINE_STANDARD_RTTI(GEOMAlgo_HAlgo); -protected: + protected: + Standard_EXPORT + GEOMAlgo_HAlgo(); - // Methods PROTECTED - // - - -Standard_EXPORT GEOMAlgo_HAlgo(); -Standard_EXPORT virtual ~GEOMAlgo_HAlgo(); - - - // Fields PROTECTED - // -Standard_Integer myErrorStatus; -Standard_Integer myWarningStatus; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT + virtual ~GEOMAlgo_HAlgo(); + Standard_Integer myErrorStatus; + Standard_Integer myWarningStatus; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_HAlgo.ixx b/src/GEOMAlgo/GEOMAlgo_HAlgo.ixx deleted file mode 100644 index b32cf82b6..000000000 --- a/src/GEOMAlgo/GEOMAlgo_HAlgo.ixx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -//GEOMAlgo_HAlgo::~GEOMAlgo_HAlgo() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_HAlgo_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_HAlgo", - sizeof(GEOMAlgo_HAlgo), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_HAlgo) Handle(GEOMAlgo_HAlgo)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_HAlgo) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_HAlgo))) { - _anOtherObject = Handle(GEOMAlgo_HAlgo)((Handle(GEOMAlgo_HAlgo)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_HAlgo::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_HAlgo) ; -} -//Standard_Boolean GEOMAlgo_HAlgo::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(GEOMAlgo_HAlgo) == AType || MMgt_TShared::IsKind(AType)); -//} -//Handle_GEOMAlgo_HAlgo::~Handle_GEOMAlgo_HAlgo() {} - diff --git a/src/GEOMAlgo/GEOMAlgo_HAlgo.jxx b/src/GEOMAlgo/GEOMAlgo_HAlgo.jxx deleted file mode 100644 index 884df3fcb..000000000 --- a/src/GEOMAlgo/GEOMAlgo_HAlgo.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_HAlgo_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx deleted file mode 100644 index 54f60034e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile -#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile -#include -#endif - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class TopoDS_Shape; -class TColStd_MapIntegerHasher; -class GEOMAlgo_IndexedDataMapOfIntegerShape; - - - -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape : public TCollection_MapNode { - -public: - // 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(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Integer myKey1; -Standard_Integer myKey2; -TopoDS_Shape myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx deleted file mode 100644 index 153d42346..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile -#include -#endif -//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape))) { - _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::DynamicType() const -{ - 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() {} -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx deleted file mode 100644 index 92986b677..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile -#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile -#include -#endif - -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class GEOMAlgo_PassKey; -class TopTools_ListOfShape; -class GEOMAlgo_PassKeyMapHasher; -class GEOMAlgo_IndexedDataMapOfPassKeyListOfShape; - - -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape : 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_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape(const GEOMAlgo_PassKey& K1,const Standard_Integer K2,const TopTools_ListOfShape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); - GEOMAlgo_PassKey& Key1() const; - Standard_Integer& Key2() const; - TCollection_MapNodePtr& Next2() const; - TopTools_ListOfShape& Value() const; -Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape(); - - - - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -GEOMAlgo_PassKey myKey1; -Standard_Integer myKey2; -TopTools_ListOfShape myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey GEOMAlgo_PassKey -#define TheKey_hxx -#define TheItem TopTools_ListOfShape -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx deleted file mode 100644 index 9b1e91bce..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile -#include -#endif -GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_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}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape))) { - _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) ; -} -Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape() {} -#define TheKey GEOMAlgo_PassKey -#define TheKey_hxx -#define TheItem TopTools_ListOfShape -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx deleted file mode 100644 index fbdccc0cd..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile -#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile -#include -#endif - -#ifndef _GEOMAlgo_PassKeyShape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class GEOMAlgo_PassKeyShape; -class TopTools_ListOfShape; -class GEOMAlgo_PassKeyShapeMapHasher; -class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape; - - - -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape : public TCollection_MapNode { - -public: - // 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(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -GEOMAlgo_PassKeyShape myKey1; -Standard_Integer myKey2; -TopTools_ListOfShape myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey GEOMAlgo_PassKeyShape -#define TheKey_hxx -#define TheItem TopTools_ListOfShape -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx deleted file mode 100644 index a91d5c048..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _GEOMAlgo_PassKeyShape_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile -#include -#endif -//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape))) { - _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape::DynamicType() const -{ - 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() {} -#define TheKey GEOMAlgo_PassKeyShape -#define TheKey_hxx -#define TheItem TopTools_ListOfShape -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx deleted file mode 100644 index 0981ddbde..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile -#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Bnd_Box_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class TopoDS_Shape; -class Bnd_Box; -class TopTools_ShapeMapHasher; -class GEOMAlgo_IndexedDataMapOfShapeBox; - - - -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox : public TCollection_MapNode { - -public: - // 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(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -TopoDS_Shape myKey1; -Standard_Integer myKey2; -Bnd_Box myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem Bnd_Box -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeBox -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx deleted file mode 100644 index c4d6132ed..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Bnd_Box_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile -#include -#endif -//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox))) { - _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::DynamicType() const -{ - 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() {} -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem Bnd_Box -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeBox -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx deleted file mode 100644 index 34e1f416e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile -#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeInfo_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class TopoDS_Shape; -class GEOMAlgo_ShapeInfo; -class TopTools_ShapeMapHasher; -class GEOMAlgo_IndexedDataMapOfShapeShapeInfo; - - - -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo(const TopoDS_Shape& K1,const Standard_Integer K2,const GEOMAlgo_ShapeInfo& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); - - TopoDS_Shape& Key1() const; - - Standard_Integer& Key2() const; - - TCollection_MapNodePtr& Next2() const; - - GEOMAlgo_ShapeInfo& Value() const; -//Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -TopoDS_Shape myKey1; -Standard_Integer myKey2; -GEOMAlgo_ShapeInfo myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem GEOMAlgo_ShapeInfo -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeShapeInfo -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx deleted file mode 100644 index 1b9ff9ea6..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeInfo_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile -#include -#endif -//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo))) { - _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo::DynamicType() const -{ - return STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) ; -} -//Standard_Boolean GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo::~Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo() {} -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem GEOMAlgo_ShapeInfo -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeShapeInfo -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx deleted file mode 100644 index b4510ae04..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile -#define _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _TopAbs_State_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class TopoDS_Shape; -class TopTools_ShapeMapHasher; -class GEOMAlgo_IndexedDataMapOfShapeState; - - - -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState : public TCollection_MapNode { - -public: - // 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(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -TopoDS_Shape myKey1; -Standard_Integer myKey2; -TopAbs_State myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopAbs_State -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeState -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx deleted file mode 100644 index 0a3218980..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile -#include -#endif -//GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState))) { - _anOtherObject = Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)((Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState::DynamicType() const -{ - 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() {} -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopAbs_State -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeState -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx index 820819743..125122452 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,114 +16,29 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_IndexedDataMapOfIntegerShape.hxx +// Created: Wed Feb 22 11:22:18 2012 +// Author: +// -#ifndef _GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile -#define _GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Shape; -class TColStd_MapIntegerHasher; -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class GEOMAlgo_IndexedDataMapOfIntegerShape : public TCollection_BasicMap { -public: +#ifndef GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile +#define GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile - 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 - // -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); -} +#include +#include +#include -Standard_EXPORT TopoDS_Shape& ChangeFromIndex(const Standard_Integer I) ; - TopoDS_Shape& operator ()(const Standard_Integer I) -{ - return ChangeFromIndex(I); -} +#define _NCollection_MapHasher +#include -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) ; +typedef NCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfIntegerShape; -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K); -#endif +#undef _NCollection_MapHasher -private: - // Methods PRIVATE - // -Standard_EXPORT GEOMAlgo_IndexedDataMapOfIntegerShape(const GEOMAlgo_IndexedDataMapOfIntegerShape& Other); -}; -// other Inline functions and methods (like "C++: function call" methods) -// #endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx deleted file mode 100644 index b939bec52..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile -#include -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx deleted file mode 100644 index 48ca75f61..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile -#define _GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class GEOMAlgo_PassKey; -class TopTools_ListOfShape; -class GEOMAlgo_PassKeyMapHasher; -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class GEOMAlgo_IndexedDataMapOfPassKeyListOfShape : public TCollection_BasicMap { - -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 - // -Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyListOfShape(const Standard_Integer NbBuckets = 1); -Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Assign(const GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Other) ; - GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& operator =(const GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Other) -{ - return Assign(Other); -} - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; -Standard_EXPORT void Clear() ; -~GEOMAlgo_IndexedDataMapOfPassKeyListOfShape() -{ - Clear(); -} - -Standard_EXPORT Standard_Integer Add(const GEOMAlgo_PassKey& K,const TopTools_ListOfShape& I) ; -Standard_EXPORT void Substitute(const Standard_Integer I,const GEOMAlgo_PassKey& K,const TopTools_ListOfShape& T) ; -Standard_EXPORT void RemoveLast() ; -Standard_EXPORT Standard_Boolean Contains(const GEOMAlgo_PassKey& K) const; -Standard_EXPORT const GEOMAlgo_PassKey& 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_PassKey& K) const; -Standard_EXPORT const TopTools_ListOfShape& FindFromKey(const GEOMAlgo_PassKey& K) const; -Standard_EXPORT TopTools_ListOfShape& ChangeFromKey(const GEOMAlgo_PassKey& K) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const GEOMAlgo_PassKey& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const GEOMAlgo_PassKey& K); -#endif - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // -Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyListOfShape(const GEOMAlgo_IndexedDataMapOfPassKeyListOfShape& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx deleted file mode 100644 index 7cca1cc22..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile -#include -#endif - - -#define TheKey GEOMAlgo_PassKey -#define TheKey_hxx -#define TheItem TopTools_ListOfShape -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyListOfShape -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx index 60384040a..5c22084a6 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,157 +16,28 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx +// Created: Wed Feb 22 11:24:27 2012 +// Author: +// -#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile -#define _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class GEOMAlgo_PassKeyShape; -class TopTools_ListOfShape; -class GEOMAlgo_PassKeyShapeMapHasher; -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape : public TCollection_BasicMap { - -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 - // - - -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() ; +#ifndef GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile +#define GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile -Standard_EXPORT Standard_Boolean Contains(const GEOMAlgo_PassKeyShape& K) const; +#include +#include +#include -Standard_EXPORT const GEOMAlgo_PassKeyShape& FindKey(const Standard_Integer I) const; +#define _NCollection_MapHasher +#include -Standard_EXPORT const TopTools_ListOfShape& FindFromIndex(const Standard_Integer I) const; - const TopTools_ListOfShape& operator ()(const Standard_Integer I) const -{ - return FindFromIndex(I); -} +typedef NCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape; +#undef _NCollection_MapHasher -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) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const GEOMAlgo_PassKeyShape& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const GEOMAlgo_PassKeyShape& K); -#endif - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape(const GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx deleted file mode 100644 index 84d777224..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyShape_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile -#include -#endif - - -#define TheKey GEOMAlgo_PassKeyShape -#define TheKey_hxx -#define TheItem TopTools_ListOfShape -#define TheItem_hxx -#define Hasher GEOMAlgo_PassKeyShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox.hxx index 592e90453..7cd8010fe 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,155 +16,29 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_IndexedDataMapOfShapeBox.hxx +// Created: Wed Feb 22 11:14:14 2012 +// Author: +// -#ifndef _GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile -#define _GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Shape; -class Bnd_Box; -class TopTools_ShapeMapHasher; -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class GEOMAlgo_IndexedDataMapOfShapeBox : public TCollection_BasicMap { - -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 - // - - -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) ; +#ifndef GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile +#define GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile -Standard_EXPORT void RemoveLast() ; +#include +#include +#include -Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; +#define _NCollection_MapHasher +#include -Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; +typedef NCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeBox; +#undef _NCollection_MapHasher -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) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K); -#endif - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeBox(const GEOMAlgo_IndexedDataMapOfShapeBox& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx deleted file mode 100644 index 3ae3d1208..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Bnd_Box_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem Bnd_Box -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeBox -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx index 72d7d2216..09be03fe8 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx @@ -16,157 +16,28 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx +// Created: Wed Feb 22 11:16:54 2012 +// Author: +// -#ifndef _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile -#define _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Shape; -class GEOMAlgo_ShapeInfo; -class TopTools_ShapeMapHasher; -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class GEOMAlgo_IndexedDataMapOfShapeShapeInfo : public TCollection_BasicMap { - -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 - // - - -Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeShapeInfo(const Standard_Integer NbBuckets = 1); - - -Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Assign(const GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Other) ; - GEOMAlgo_IndexedDataMapOfShapeShapeInfo& operator =(const GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Other) -{ - return Assign(Other); -} - - - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - -Standard_EXPORT void Clear() ; -~GEOMAlgo_IndexedDataMapOfShapeShapeInfo() -{ - Clear(); -} - - - -Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const GEOMAlgo_ShapeInfo& I) ; - - -Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const GEOMAlgo_ShapeInfo& T) ; - - -Standard_EXPORT void RemoveLast() ; +#ifndef GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile +#define GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile -Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; +#include +#include +#include -Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; +#define _NCollection_MapHasher +#include +typedef NCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeShapeInfo; -Standard_EXPORT const GEOMAlgo_ShapeInfo& FindFromIndex(const Standard_Integer I) const; - const GEOMAlgo_ShapeInfo& operator ()(const Standard_Integer I) const -{ - return FindFromIndex(I); -} +#undef _NCollection_MapHasher -Standard_EXPORT GEOMAlgo_ShapeInfo& ChangeFromIndex(const Standard_Integer I) ; - GEOMAlgo_ShapeInfo& operator ()(const Standard_Integer I) -{ - return ChangeFromIndex(I); -} - - - -Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const; - - -Standard_EXPORT const GEOMAlgo_ShapeInfo& FindFromKey(const TopoDS_Shape& K) const; - - -Standard_EXPORT GEOMAlgo_ShapeInfo& ChangeFromKey(const TopoDS_Shape& K) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K); -#endif - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeShapeInfo(const GEOMAlgo_IndexedDataMapOfShapeShapeInfo& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeShapeInfo_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeShapeInfo_0.cxx deleted file mode 100644 index d991d0213..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeShapeInfo_0.cxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeInfo_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem GEOMAlgo_ShapeInfo -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeShapeInfo -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState.hxx index b7cee9ee2..35f5d3650 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState.hxx @@ -1,7 +1,21 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +/// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +/// +/// This library is free software; you can redistribute it and/or +/// modify it under the terms of the GNU Lesser General Public +/// License as published by the Free Software Foundation; either +/// version 2.1 of the License. +/// +/// This library is distributed in the hope that it will be useful, +/// but WITHOUT ANY WARRANTY; without even the implied warranty of +/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +/// Lesser General Public License for more details. +/// +/// You should have received a copy of the GNU Lesser General Public +/// License along with this library; if not, write to the Free Software +/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +/// +/// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +/// // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -19,157 +33,28 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_IndexedDataMapOfShapeState.hxx +// Created: Wed Feb 22 11:19:56 2012 +// Author: +// -#ifndef _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile -#define _GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _TopAbs_State_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Shape; -class TopTools_ShapeMapHasher; -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class GEOMAlgo_IndexedDataMapOfShapeState : public TCollection_BasicMap { - -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 - // - - -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) ; +#ifndef GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile +#define GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile -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) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K); -#endif - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT GEOMAlgo_IndexedDataMapOfShapeState(const GEOMAlgo_IndexedDataMapOfShapeState& Other); - - - // Fields PRIVATE - // - - -}; - +#include +#include +#include +#define _NCollection_MapHasher +#include +typedef NCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeState; +#undef _NCollection_MapHasher -// other Inline functions and methods (like "C++: function call" methods) -// #endif diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState_0.cxx deleted file mode 100644 index a74e1a295..000000000 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState_0.cxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopAbs_State -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState -#define TCollection_IndexedDataMapNode_Type_() GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_Type_() -#define TCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeState -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_KindOfBounds.hxx b/src/GEOMAlgo/GEOMAlgo_KindOfBounds.hxx index bebea023d..83646c9ef 100644 --- a/src/GEOMAlgo/GEOMAlgo_KindOfBounds.hxx +++ b/src/GEOMAlgo/GEOMAlgo_KindOfBounds.hxx @@ -1,5 +1,8 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -21,13 +24,12 @@ #define _GEOMAlgo_KindOfBounds_HeaderFile -enum GEOMAlgo_KindOfBounds { - GEOMAlgo_KB_UNKNOWN, +enum GEOMAlgo_KindOfBounds { +GEOMAlgo_KB_UNKNOWN, GEOMAlgo_KB_TRIMMED, GEOMAlgo_KB_INFINITE }; - #ifndef _Standard_PrimitiveTypes_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_KindOfClosed.hxx b/src/GEOMAlgo/GEOMAlgo_KindOfClosed.hxx index df72372e5..fecd41494 100644 --- a/src/GEOMAlgo/GEOMAlgo_KindOfClosed.hxx +++ b/src/GEOMAlgo/GEOMAlgo_KindOfClosed.hxx @@ -1,5 +1,8 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,18 +19,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #ifndef _GEOMAlgo_KindOfClosed_HeaderFile #define _GEOMAlgo_KindOfClosed_HeaderFile -enum GEOMAlgo_KindOfClosed { - GEOMAlgo_KC_UNKNOWN, +enum GEOMAlgo_KindOfClosed { +GEOMAlgo_KC_UNKNOWN, GEOMAlgo_KC_CLOSED, GEOMAlgo_KC_NOTCLOSED }; - #ifndef _Standard_PrimitiveTypes_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_KindOfName.hxx b/src/GEOMAlgo/GEOMAlgo_KindOfName.hxx index 0b1e3fca3..8c4241edd 100644 --- a/src/GEOMAlgo/GEOMAlgo_KindOfName.hxx +++ b/src/GEOMAlgo/GEOMAlgo_KindOfName.hxx @@ -1,5 +1,8 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -21,8 +24,8 @@ #define _GEOMAlgo_KindOfName_HeaderFile -enum GEOMAlgo_KindOfName { - GEOMAlgo_KN_UNKNOWN, +enum GEOMAlgo_KindOfName { +GEOMAlgo_KN_UNKNOWN, GEOMAlgo_KN_SPHERE, GEOMAlgo_KN_CYLINDER, GEOMAlgo_KN_TORUS, @@ -44,7 +47,6 @@ GEOMAlgo_KN_QUADRANGLE, GEOMAlgo_KN_ARCELLIPSE }; - #ifndef _Standard_PrimitiveTypes_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_KindOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_KindOfShape.hxx index 32156b217..899598a0b 100644 --- a/src/GEOMAlgo/GEOMAlgo_KindOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_KindOfShape.hxx @@ -1,5 +1,8 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -16,13 +19,12 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #ifndef _GEOMAlgo_KindOfShape_HeaderFile #define _GEOMAlgo_KindOfShape_HeaderFile -enum GEOMAlgo_KindOfShape { - GEOMAlgo_KS_UNKNOWN, +enum GEOMAlgo_KindOfShape { +GEOMAlgo_KS_UNKNOWN, GEOMAlgo_KS_SPHERE, GEOMAlgo_KS_CYLINDER, GEOMAlgo_KS_BOX, @@ -35,7 +37,6 @@ GEOMAlgo_KS_LINE, GEOMAlgo_KS_DEGENERATED }; - #ifndef _Standard_PrimitiveTypes_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx index ccde56848..8c19aa07e 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,126 +16,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx +// Created: Wed Feb 22 08:26:34 2012 +// Author: +// -#ifndef _GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile -#define _GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class GEOMAlgo_ListOfCoupleOfShapes; -class GEOMAlgo_CoupleOfShapes; -class GEOMAlgo_ListNodeOfListOfCoupleOfShapes; - +#ifndef GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile +#define GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile -#ifndef _Standard_HeaderFile -#include +#ifndef GEOMAlgo_ListOfCoupleOfShapes_HeaderFile +#include #endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes { - -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 - // - - -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; - - -friend class GEOMAlgo_ListOfCoupleOfShapes; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Address current; -Standard_Address previous; - - -}; - -#define Item GEOMAlgo_CoupleOfShapes -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_() -#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx deleted file mode 100644 index b06af1d69..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoMoreObject_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile -#include -#endif - - -#define Item GEOMAlgo_CoupleOfShapes -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_() -#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes -#define TCollection_List_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx index d04e32756..ff1f10c7e 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,126 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_ListIteratorOfListOfPnt.hxx +// Created: Wed Feb 22 08:33:12 2012 +// Author: +// -#ifndef _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile -#define _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class GEOMAlgo_ListOfPnt; -class gp_Pnt; -class GEOMAlgo_ListNodeOfListOfPnt; +#ifndef GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile +#define GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include +#ifndef GEOMAlgo_ListOfPnt_HeaderFile +#include #endif - -class GEOMAlgo_ListIteratorOfListOfPnt { - -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 - // - - -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; - - -friend class GEOMAlgo_ListOfPnt; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Address current; -Standard_Address previous; - - -}; - -#define Item gp_Pnt -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() -#define TCollection_List GEOMAlgo_ListOfPnt -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx deleted file mode 100644 index 917ceee44..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt_0.cxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoMoreObject_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListOfPnt_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListNodeOfListOfPnt_HeaderFile -#include -#endif - - -#define Item gp_Pnt -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() -#define TCollection_List GEOMAlgo_ListOfPnt -#define TCollection_List_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx deleted file mode 100644 index 6dcc8ae3e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile -#define _GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile -#include -#endif - -#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class GEOMAlgo_CoupleOfShapes; -class GEOMAlgo_ListOfCoupleOfShapes; -class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes; - - - -class GEOMAlgo_ListNodeOfListOfCoupleOfShapes : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -GEOMAlgo_ListNodeOfListOfCoupleOfShapes(const GEOMAlgo_CoupleOfShapes& I,const TCollection_MapNodePtr& n); - - GEOMAlgo_CoupleOfShapes& Value() const; -//Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfCoupleOfShapes(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -GEOMAlgo_CoupleOfShapes myValue; - - -}; - -#define Item GEOMAlgo_CoupleOfShapes -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_() -#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx deleted file mode 100644 index 8b17dad38..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile -#include -#endif -//GEOMAlgo_ListNodeOfListOfCoupleOfShapes::~GEOMAlgo_ListNodeOfListOfCoupleOfShapes() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ListNodeOfListOfCoupleOfShapes", - sizeof(GEOMAlgo_ListNodeOfListOfCoupleOfShapes), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes))) { - _anOtherObject = Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)((Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMAlgo_ListNodeOfListOfCoupleOfShapes::DynamicType() const -{ - 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() {} -#define Item GEOMAlgo_CoupleOfShapes -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_() -#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes -#define TCollection_List_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx deleted file mode 100644 index 5105bcd12..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_ListNodeOfListOfPnt_HeaderFile -#define _GEOMAlgo_ListNodeOfListOfPnt_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile -#include -#endif - -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class gp_Pnt; -class GEOMAlgo_ListOfPnt; -class GEOMAlgo_ListIteratorOfListOfPnt; - - - -class GEOMAlgo_ListNodeOfListOfPnt : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -GEOMAlgo_ListNodeOfListOfPnt(const gp_Pnt& I,const TCollection_MapNodePtr& n); - - gp_Pnt& Value() const; -//Standard_EXPORT ~GEOMAlgo_ListNodeOfListOfPnt(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -gp_Pnt myValue; - - -}; - -#define Item gp_Pnt -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() -#define TCollection_List GEOMAlgo_ListOfPnt -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx deleted file mode 100644 index 87f546af7..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListOfPnt_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile -#include -#endif -//GEOMAlgo_ListNodeOfListOfPnt::~GEOMAlgo_ListNodeOfListOfPnt() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfPnt_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ListNodeOfListOfPnt", - sizeof(GEOMAlgo_ListNodeOfListOfPnt), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMAlgo_ListNodeOfListOfPnt) Handle(GEOMAlgo_ListNodeOfListOfPnt)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMAlgo_ListNodeOfListOfPnt) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt))) { - _anOtherObject = Handle(GEOMAlgo_ListNodeOfListOfPnt)((Handle(GEOMAlgo_ListNodeOfListOfPnt)&)AnObject); - } - } - - return _anOtherObject ; -} -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() {} -#define Item gp_Pnt -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() -#define TCollection_List GEOMAlgo_ListOfPnt -#define TCollection_List_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes.hxx b/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes.hxx index 9716695f4..53954a6a8 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -20,179 +17,18 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile -#define _GEOMAlgo_ListOfCoupleOfShapes_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes; -class GEOMAlgo_CoupleOfShapes; -class GEOMAlgo_ListNodeOfListOfCoupleOfShapes; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_ListOfCoupleOfShapes { - -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 - // - - -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) ; +// File: GEOMAlgo_ListOfCoupleOfShapes.hxx +// Created: Wed Feb 22 08:23:27 2012 +// Author: +// +#ifndef GEOMAlgo_ListOfCoupleOfShapes_HeaderFile +#define GEOMAlgo_ListOfCoupleOfShapes_HeaderFile -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) ; - - -friend class GEOMAlgo_ListIteratorOfListOfCoupleOfShapes; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT GEOMAlgo_ListOfCoupleOfShapes(const GEOMAlgo_ListOfCoupleOfShapes& Other); - - - // Fields PRIVATE - // -Standard_Address myFirst; -Standard_Address myLast; - - -}; - -#define Item GEOMAlgo_CoupleOfShapes -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_() -#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// +#include +#include +typedef NCollection_List GEOMAlgo_ListOfCoupleOfShapes; +typedef GEOMAlgo_ListOfCoupleOfShapes::Iterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes; #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes_0.cxx deleted file mode 100644 index 11675e464..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes_0.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile -#include -#endif - - -#define Item GEOMAlgo_CoupleOfShapes -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Type_() -#define TCollection_List GEOMAlgo_ListOfCoupleOfShapes -#define TCollection_List_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx b/src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx index 299772ffe..385ebee9d 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,180 +16,20 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_ListOfPnt.hxx +// Created: Wed Feb 22 08:31:47 2012 +// Author: +// -#ifndef _GEOMAlgo_ListOfPnt_HeaderFile -#define _GEOMAlgo_ListOfPnt_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class GEOMAlgo_ListIteratorOfListOfPnt; -class gp_Pnt; -class GEOMAlgo_ListNodeOfListOfPnt; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_ListOfPnt { - -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 - // - - -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) ; +#ifndef GEOMAlgo_ListOfPnt_HeaderFile +#define GEOMAlgo_ListOfPnt_HeaderFile -Standard_EXPORT gp_Pnt& First() const; +#include +#include - -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) ; - - -friend class GEOMAlgo_ListIteratorOfListOfPnt; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT GEOMAlgo_ListOfPnt(const GEOMAlgo_ListOfPnt& Other); - - - // Fields PRIVATE - // -Standard_Address myFirst; -Standard_Address myLast; - - -}; - -#define Item gp_Pnt -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() -#define TCollection_List GEOMAlgo_ListOfPnt -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// +typedef NCollection_List GEOMAlgo_ListOfPnt; +typedef GEOMAlgo_ListOfPnt::Iterator GEOMAlgo_ListIteratorOfListOfPnt; #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx deleted file mode 100644 index 4d28a58b3..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ListOfPnt_0.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ListNodeOfListOfPnt_HeaderFile -#include -#endif - - -#define Item gp_Pnt -#define Item_hxx -#define TCollection_ListNode GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_hxx -#define TCollection_ListIterator GEOMAlgo_ListIteratorOfListOfPnt -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_GEOMAlgo_ListNodeOfListOfPnt -#define TCollection_ListNode_Type_() GEOMAlgo_ListNodeOfListOfPnt_Type_() -#define TCollection_List GEOMAlgo_ListOfPnt -#define TCollection_List_hxx -#include - diff --git a/src/GEOMAlgo/GEOMAlgo_PWireEdgeSet.hxx b/src/GEOMAlgo/GEOMAlgo_PWireEdgeSet.hxx index 81568c2b0..f803f847f 100644 --- a/src/GEOMAlgo/GEOMAlgo_PWireEdgeSet.hxx +++ b/src/GEOMAlgo/GEOMAlgo_PWireEdgeSet.hxx @@ -20,6 +20,11 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_PWireEdgeSet.hxx +// Created: +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_PWireEdgeSet_HeaderFile #define _GEOMAlgo_PWireEdgeSet_HeaderFile diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.cdl b/src/GEOMAlgo/GEOMAlgo_PassKey.cdl deleted file mode 100755 index 0160c679e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.cdl +++ /dev/null @@ -1,101 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_PassKey.cdl --- Created: Mon Nov 20 12:16:13 2006 --- Author: Peter KURNEV --- --- -class PassKey from GEOMAlgo - - ---Purpose: - -uses - Shape from TopoDS, - 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; - aI2 :Integer from Standard); - - SetIds(me:out; - aI1 :Integer from Standard; - aI2 :Integer from Standard; - aI3 :Integer from Standard); - - SetIds(me:out; - aI1 :Integer from Standard; - aI2 :Integer from Standard; - aI3 :Integer from Standard; - aI4 :Integer from Standard); - - SetIds(me:out; - aLS :ListOfInteger from TColStd); - - NbIds(me) - returns Integer from Standard; - - IsEqual(me; - aOther:PassKey from GEOMAlgo) - returns Boolean from Standard; - - HashCode(me; - Upper : Integer from Standard) - returns Integer from Standard; - - Id(me; - aIndex: Integer from Standard) - returns Integer from Standard; - - - Dump(me; - aHex:Integer from Standard=0); - - -fields - myNbIds: Integer from Standard 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 934c4f7c3..8f6f949e4 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKey.cxx @@ -20,12 +20,12 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Algo.cxx -// Created: Sat Dec 04 12:39:47 2004 +// File: GEOMAlgo_PassKey.cxx +// Created: // Author: Peter KURNEV // // -#include +#include #include #include @@ -33,7 +33,7 @@ #include #ifdef WNT -#pragma warning( disable : 4101) +#pragma warning( disable : 4101) #endif static @@ -42,15 +42,15 @@ static //======================================================================= //function : -//purpose : +//purpose : //======================================================================= GEOMAlgo_PassKey::GEOMAlgo_PassKey() { - Clear(); + Clear(); } //======================================================================= //function : -//purpose : +//purpose : //======================================================================= GEOMAlgo_PassKey::GEOMAlgo_PassKey(const GEOMAlgo_PassKey& aOther) { @@ -60,7 +60,7 @@ static } //======================================================================= //function :Assign -//purpose : +//purpose : //======================================================================= GEOMAlgo_PassKey& GEOMAlgo_PassKey::Assign(const GEOMAlgo_PassKey& aOther) { @@ -71,14 +71,14 @@ static } //======================================================================= //function :~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_PassKey::~GEOMAlgo_PassKey() { } //======================================================================= //function :Clear -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKey::Clear() { @@ -88,10 +88,10 @@ static } //======================================================================= //function :SetIds -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1) - + { Clear(); myNbIds=1; @@ -100,7 +100,7 @@ static } //======================================================================= //function :SetIds -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1, const Standard_Integer aId2) @@ -113,7 +113,7 @@ static } //======================================================================= //function :SetIds -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1, const Standard_Integer aId2, @@ -128,13 +128,13 @@ static } //======================================================================= //function :SetIds -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1, const Standard_Integer aId2, const Standard_Integer aId3, const Standard_Integer aId4) -{ +{ TColStd_ListOfInteger aLI; // aLI.Append(aId1); @@ -145,7 +145,7 @@ static } //======================================================================= //function :SetIds -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKey::SetIds(const TColStd_ListOfInteger& aLI) { @@ -167,7 +167,7 @@ static } //======================================================================= //function :NbIds -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_PassKey::NbIds()const { @@ -175,7 +175,7 @@ static } //======================================================================= //function :Id -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_PassKey::Id(const Standard_Integer aIndex) const { @@ -186,7 +186,7 @@ static } //======================================================================= //function :IsEqual -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_PassKey::IsEqual(const GEOMAlgo_PassKey& aOther) const { @@ -208,7 +208,7 @@ static } //======================================================================= //function : HashCode -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_PassKey::HashCode(const Standard_Integer aUpper) const { @@ -216,14 +216,14 @@ static } //======================================================================= //function : Dump -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKey::Dump(const Standard_Integer )const { } //======================================================================= // function: NormalizedId -// purpose : +// purpose : //======================================================================= Standard_Integer NormalizedId(const Standard_Integer aId, const Standard_Integer aDiv) diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.hxx b/src/GEOMAlgo/GEOMAlgo_PassKey.hxx index 6626b881b..9a992f205 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.hxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKey.hxx @@ -20,131 +20,85 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_PassKey.hxx +// Created: +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_PassKey_HeaderFile #define _GEOMAlgo_PassKey_HeaderFile -#ifndef _Standard_Integer_HeaderFile +#include +#include #include -#endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -class TColStd_ListOfInteger; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - +#include +//======================================================================= +//class : GEOMAlgo_PassKey +//purpose : +//======================================================================= class GEOMAlgo_PassKey { + public: + Standard_EXPORT + GEOMAlgo_PassKey(); -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 - // - - -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 Clear() ; - - -Standard_EXPORT void SetIds(const Standard_Integer aI1) ; - + Standard_EXPORT + virtual ~GEOMAlgo_PassKey(); -Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2) ; + Standard_EXPORT + GEOMAlgo_PassKey(const GEOMAlgo_PassKey& Other); + Standard_EXPORT + GEOMAlgo_PassKey& Assign(const GEOMAlgo_PassKey& Other) ; -Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2,const Standard_Integer aI3) ; + GEOMAlgo_PassKey& operator =(const GEOMAlgo_PassKey& Other) { + return Assign(Other); + } + Standard_EXPORT + void Clear() ; -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 Standard_Integer aI1) ; + Standard_EXPORT + void SetIds(const Standard_Integer aI1, + const Standard_Integer aI2) ; -Standard_EXPORT void SetIds(const TColStd_ListOfInteger& aLS) ; + 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 Standard_Integer NbIds() const; + 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_Boolean IsEqual(const GEOMAlgo_PassKey& aOther) const; + Standard_EXPORT + Standard_Integer HashCode(const Standard_Integer Upper) 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_Integer aHex = 0) const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -Standard_Integer myNbIds; -Standard_Integer mySum; -TColStd_IndexedMapOfInteger myMap; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT + Standard_Integer Id(const Standard_Integer aIndex) const; + Standard_EXPORT + void Dump(const Standard_Integer aHex = 0) const; + protected: + Standard_Integer myNbIds; + Standard_Integer mySum; + TColStd_IndexedMapOfInteger myMap; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.ixx b/src/GEOMAlgo/GEOMAlgo_PassKey.ixx deleted file mode 100644 index d84d83291..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.jxx b/src/GEOMAlgo/GEOMAlgo_PassKey.jxx deleted file mode 100644 index 114189ddc..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TColStd_ListOfInteger_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cdl b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cdl deleted file mode 100755 index 0fe39d297..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cdl +++ /dev/null @@ -1,49 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_PassKeyMapHasher.cdl --- Created: --- Author: Peter KURNEV --- --- -class PassKeyMapHasher from GEOMAlgo - - ---Purpose: - -uses - PassKey from GEOMAlgo - ---raises - -is - HashCode(myclass; - aPKey : PassKey from GEOMAlgo; - Upper : Integer from Standard) - returns Integer from Standard; - - - IsEqual(myclass; - aPKey1 : PassKey from GEOMAlgo; - aPKey2 : PassKey from GEOMAlgo) - returns Boolean from Standard; - -end PassKeyMapHasher; diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx index 060c1ff31..32e62875c 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx @@ -21,15 +21,15 @@ // // File: GEOMAlgo_PassKeyMapHasher.cxx -// Created: +// Created: // Author: Peter KURNEV // // -#include +#include //======================================================================= //function : HashCode -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_PassKeyMapHasher::HashCode(const GEOMAlgo_PassKey& aPK, const Standard_Integer Upper) @@ -38,7 +38,7 @@ } //======================================================================= //function :IsEqual -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_PassKeyMapHasher::IsEqual(const GEOMAlgo_PassKey& aPK1, const GEOMAlgo_PassKey& aPK2) diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx index 222c862aa..0b3039f1e 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx @@ -20,83 +20,32 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_PassKeyMapHasher.hxx +// Created: +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile #define _GEOMAlgo_PassKeyMapHasher_HeaderFile -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class GEOMAlgo_PassKey; - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - +#include +#include +#include +//======================================================================= +//class : GEOMAlgo_PassKeyMapHasher +//purpose : +//======================================================================= class GEOMAlgo_PassKeyMapHasher { - -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 - // - - -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) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + 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) ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.ixx b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.ixx deleted file mode 100644 index 72da2bec0..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.jxx b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.jxx deleted file mode 100644 index d90d66d0b..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_PassKey_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl deleted file mode 100755 index 29dbb98c4..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cdl +++ /dev/null @@ -1,97 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_PassKeyShape.cdl --- Created: --- Author: Peter KURNEV --- --- -class PassKeyShape from GEOMAlgo - - ---Purpose: - -uses - Shape from TopoDS, - ListOfShape from TopTools, - IndexedMapOfShape from TopTools - ---raises - -is - Create - returns PassKeyShape from GEOMAlgo; - ---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); - - SetShapes(me:out; - aS1 :Shape from TopoDS; - aS2 :Shape from TopoDS); - - SetShapes(me:out; - aS1 :Shape from TopoDS; - aS2 :Shape from TopoDS; - aS3 :Shape from TopoDS); - - SetShapes(me:out; - aS1 :Shape from TopoDS; - aS2 :Shape from TopoDS; - aS3 :Shape from TopoDS; - aS4 :Shape from TopoDS); - - 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 - 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 b558e302c..3aa4f4b04 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx @@ -21,22 +21,22 @@ // // File: GEOMAlgo_PassKeyShape.cxx -// Created: +// Created: // Author: Peter KURNEV // // -#include +#include #include #include -static +static Standard_Integer NormalizedId(const Standard_Integer aId, const Standard_Integer aDiv); //======================================================================= //function : -//purpose : +//purpose : //======================================================================= GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape() { @@ -44,7 +44,7 @@ static } //======================================================================= //function : -//purpose : +//purpose : //======================================================================= GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& aOther) { @@ -55,14 +55,14 @@ static } //======================================================================= //function :~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_PassKeyShape::~GEOMAlgo_PassKeyShape() { } //======================================================================= //function :Assign -//purpose : +//purpose : //======================================================================= GEOMAlgo_PassKeyShape& GEOMAlgo_PassKeyShape::Assign(const GEOMAlgo_PassKeyShape& aOther) { @@ -74,7 +74,7 @@ static } //======================================================================= //function :Clear -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKeyShape::Clear() { @@ -84,10 +84,10 @@ static } //======================================================================= //function :SetShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1) - + { Standard_Integer aHC; // @@ -99,7 +99,7 @@ static } //======================================================================= //function :SetShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, const TopoDS_Shape& aS2) @@ -112,7 +112,7 @@ static } //======================================================================= //function :SetShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, const TopoDS_Shape& aS2, @@ -127,7 +127,7 @@ static } //======================================================================= //function :SetShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, const TopoDS_Shape& aS2, @@ -144,7 +144,7 @@ static } //======================================================================= //function :SetShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKeyShape::SetShapes(const TopTools_ListOfShape& aLS) { @@ -167,7 +167,7 @@ static } //======================================================================= //function :NbIds -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_PassKeyShape::NbIds()const { @@ -175,7 +175,7 @@ static } //======================================================================= //function :IsEqual -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_PassKeyShape::IsEqual(const GEOMAlgo_PassKeyShape& aOther) const { @@ -197,7 +197,7 @@ static } //======================================================================= //function : HashCode -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_PassKeyShape::HashCode(const Standard_Integer aUpper) const { @@ -205,14 +205,14 @@ static } //======================================================================= //function : Dump -//purpose : +//purpose : //======================================================================= void GEOMAlgo_PassKeyShape::Dump(const Standard_Integer)const { } //======================================================================= // function: NormalizedId -// purpose : +// purpose : //======================================================================= Standard_Integer NormalizedId(const Standard_Integer aId, const Standard_Integer aDiv) diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx index 89872bff2..1f886be33 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx @@ -1,3 +1,4 @@ + // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, @@ -20,130 +21,85 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_PassKeyShape.hxx +// Created: +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_PassKeyShape_HeaderFile #define _GEOMAlgo_PassKeyShape_HeaderFile -#ifndef _Standard_Integer_HeaderFile +#include +#include #include -#endif -#ifndef _TopTools_IndexedMapOfShape_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -class TopoDS_Shape; -class TopTools_ListOfShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif +#include +#include +//======================================================================= +//class : GEOMAlgo_PassKeyShape +//purpose : +//======================================================================= class GEOMAlgo_PassKeyShape { + public: + Standard_EXPORT + GEOMAlgo_PassKeyShape(); -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 - // - - -Standard_EXPORT GEOMAlgo_PassKeyShape(); -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 + virtual ~GEOMAlgo_PassKeyShape(); + Standard_EXPORT + GEOMAlgo_PassKeyShape(const GEOMAlgo_PassKeyShape& Other); -Standard_EXPORT void SetShapes(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3) ; + 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& aS1,const TopoDS_Shape& aS2,const TopoDS_Shape& aS3,const TopoDS_Shape& aS4) ; + 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 TopTools_ListOfShape& aLS) ; + 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 Clear() ; + 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; - + 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; protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -Standard_Integer myNbIds; -Standard_Integer mySum; -Standard_Integer myUpper; -TopTools_IndexedMapOfShape myMap; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + Standard_Integer myNbIds; + Standard_Integer mySum; + Standard_Integer myUpper; + TopTools_IndexedMapOfShape myMap; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx deleted file mode 100644 index d4459e8f7..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx deleted file mode 100644 index 2fe24b08e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyShape_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cdl b/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cdl deleted file mode 100644 index d15fafa21..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cdl +++ /dev/null @@ -1,49 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_PassKeyMapHasher.cdl --- Created: --- Author: Peter KURNEV --- --- -class PassKeyShapeMapHasher from GEOMAlgo - - ---Purpose: - -uses - PassKeyShape from GEOMAlgo - ---raises - -is - HashCode(myclass; - aPKey : PassKeyShape from GEOMAlgo; - Upper : Integer from Standard) - returns Integer from Standard; - - - IsEqual(myclass; - aPKey1 : PassKeyShape from GEOMAlgo; - aPKey2 : PassKeyShape from GEOMAlgo) - returns Boolean from Standard; - -end PassKeyShapeMapHasher; diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cxx index 440099475..d90110080 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cxx @@ -21,15 +21,15 @@ // // File: GEOMAlgo_PassKeyMapHasher.cxx -// Created: +// Created: // Author: Peter KURNEV // // -#include +#include //======================================================================= //function : HashCode -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_PassKeyShapeMapHasher::HashCode(const GEOMAlgo_PassKeyShape& aPK, const Standard_Integer Upper) @@ -38,7 +38,7 @@ } //======================================================================= //function :IsEqual -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_PassKeyShapeMapHasher::IsEqual(const GEOMAlgo_PassKeyShape& aPK1, const GEOMAlgo_PassKeyShape& aPK2) diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.hxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.hxx index ef2d638ed..41f15bf3e 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.hxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.hxx @@ -20,83 +20,33 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_PassKeyMapHasher.hxx +// Created: +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile #define _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class GEOMAlgo_PassKeyShape; - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - - -class GEOMAlgo_PassKeyShapeMapHasher { - -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 - // - - -Standard_EXPORT static Standard_Integer HashCode(const GEOMAlgo_PassKeyShape& aPKey,const Standard_Integer Upper) ; - - -Standard_EXPORT static Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aPKey1,const GEOMAlgo_PassKeyShape& aPKey2) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - +#include +#include +#include + +//======================================================================= +//class : GEOMAlgo_PassKeyShapeMapHasher +//purpose : +//======================================================================= +class GEOMAlgo_PassKeyShapeMapHasher +{ + public: + Standard_EXPORT + static Standard_Integer HashCode(const GEOMAlgo_PassKeyShape& aPKey, + const Standard_Integer Upper) ; + + Standard_EXPORT + static Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aPKey1, + const GEOMAlgo_PassKeyShape& aPKey2) ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.ixx b/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.ixx deleted file mode 100644 index 8bb2bf916..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.jxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.jxx deleted file mode 100644 index f863c3d9e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_PassKeyShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cdl b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cdl deleted file mode 100644 index 08e413e25..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cdl +++ /dev/null @@ -1,78 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_ShapeAlgo.cdl --- Created: Tue Dec 7 12:05:19 2004 --- Author: Peter KURNEV --- -deferred class ShapeAlgo from GEOMAlgo - inherits Algo from GEOMAlgo - - ---Purpose: - -uses - Shape from TopoDS, - Context from IntTools - ---raises - -is - Initialize - returns ShapeAlgo from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeAlgo();" - - SetContext(me:out; - theContext:Context from IntTools); - ---Purpose: Sets cashed geometrical tools - - Context(me) - returns Context from IntTools; - ---Purpose: Returns cashed geometrical tools - ---C++: return const & - - SetShape(me:out; - aS:Shape from TopoDS); - - SetTolerance(me:out; - aT:Real from Standard); - - Shape(me) - returns Shape from TopoDS; - ---C++:return const & - - Tolerance(me) - returns Real from Standard; - - Result(me) - returns Shape from TopoDS; - ---C++:return const & - - Perform(me:out) - is redefined; - -fields - myShape : Shape from TopoDS is protected; - myTolerance : Real from Standard is protected; - myResult : Shape from TopoDS is protected; - myContext : Context from IntTools is protected; - -end ShapeAlgo; diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx index b9ee9b70e..b24f71b7a 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx @@ -23,63 +23,48 @@ // File: GEOMAlgo_ShapeAlgo.cxx // Created: Tue Dec 7 12:06:54 2004 // Author: Peter KURNEV - -#include - -#include +// +// +#include +#include //======================================================================= //function : GEOMAlgo_ShapeAlgo -//purpose : +//purpose : //======================================================================= GEOMAlgo_ShapeAlgo::GEOMAlgo_ShapeAlgo() - : GEOMAlgo_Algo() +: + GEOMAlgo_Algo() { myTolerance=0.0001; } - + //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_ShapeAlgo::~GEOMAlgo_ShapeAlgo() { } - -#if OCC_VERSION_LARGE > 0x06050200 //======================================================================= //function : SetContext -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeAlgo::SetContext(const Handle(IntTools_Context)& theContext) { myContext=theContext; } - //======================================================================= //function : Context -//purpose : +//purpose : //======================================================================= -const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const +const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const { return myContext; } - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_ShapeAlgo::Perform() -{ - if (myContext.IsNull()) { - myContext=new IntTools_Context; - } -} -#endif - //======================================================================= //function : SetShape -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeAlgo::SetShape(const TopoDS_Shape& aS) { @@ -87,7 +72,7 @@ void GEOMAlgo_ShapeAlgo::SetShape(const TopoDS_Shape& aS) } //======================================================================= //function : Shape -//purpose : +//purpose : //======================================================================= const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Shape()const { @@ -95,7 +80,7 @@ const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Shape()const } //======================================================================= //function : SetTolerance -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeAlgo::SetTolerance(const Standard_Real aT) { @@ -103,7 +88,7 @@ void GEOMAlgo_ShapeAlgo::SetTolerance(const Standard_Real aT) } //======================================================================= //function : Tolerance -//purpose : +//purpose : //======================================================================= Standard_Real GEOMAlgo_ShapeAlgo::Tolerance()const { @@ -111,9 +96,19 @@ Standard_Real GEOMAlgo_ShapeAlgo::Tolerance()const } //======================================================================= //function : Result -//purpose : +//purpose : //======================================================================= const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Result()const { return myResult; } +//======================================================================= +//function : Perform +//purpose : +//======================================================================= +void GEOMAlgo_ShapeAlgo::Perform() +{ + if (myContext.IsNull()) { + myContext=new IntTools_Context; + } +} diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx index 0fae9f9f3..98a8c0b3f 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx @@ -20,85 +20,66 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_ShapeAlgo.hxx +// Created: Tue Dec 7 12:06:54 2004 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_ShapeAlgo_HeaderFile #define _GEOMAlgo_ShapeAlgo_HeaderFile -#include - -#include - #include #include - #include - #include - -#if OCC_VERSION_LARGE > 0x06050200 #include -#else -#include -#endif - -class IntTools_Context; -class TopoDS_Shape; - -class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo { - -public: +#include - 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); - } +//======================================================================= +//class : GEOMAlgo_ShapeAlgo +//purpose : +//======================================================================= +class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo +{ + public: -#if OCC_VERSION_LARGE > 0x06050200 //! Sets cashed geometrical tools
- Standard_EXPORT void SetContext(const Handle(IntTools_Context)& theContext) ; + Standard_EXPORT + void SetContext(const Handle(IntTools_Context)& theContext) ; + //! Returns cashed geometrical tools
- Standard_EXPORT const Handle_IntTools_Context& Context() const; + Standard_EXPORT + const Handle_IntTools_Context& Context() const; - Standard_EXPORT virtual void Perform() ; -#endif + Standard_EXPORT + void SetShape(const TopoDS_Shape& aS) ; - Standard_EXPORT void SetShape(const TopoDS_Shape& aS) ; + Standard_EXPORT + void SetTolerance(const Standard_Real aT) ; - Standard_EXPORT void SetTolerance(const Standard_Real aT) ; + Standard_EXPORT + const TopoDS_Shape& Shape() const; - Standard_EXPORT const TopoDS_Shape& Shape() const; + Standard_EXPORT + Standard_Real Tolerance() const; - Standard_EXPORT Standard_Real Tolerance() const; + Standard_EXPORT + const TopoDS_Shape& Result() const; - Standard_EXPORT const TopoDS_Shape& Result() const; + Standard_EXPORT + virtual void Perform() ; protected: + Standard_EXPORT + GEOMAlgo_ShapeAlgo(); - - Standard_EXPORT GEOMAlgo_ShapeAlgo(); - Standard_EXPORT virtual ~GEOMAlgo_ShapeAlgo(); + Standard_EXPORT + virtual ~GEOMAlgo_ShapeAlgo(); TopoDS_Shape myShape; Standard_Real myTolerance; TopoDS_Shape myResult; -#if OCC_VERSION_LARGE > 0x06050200 Handle_IntTools_Context myContext; -#else - IntTools_Context myContext; -#endif - -private: - }; - -// other Inline functions and methods (like "C++: function call" methods) - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.ixx b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.ixx deleted file mode 100644 index 7eece2ffa..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.jxx b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.jxx deleted file mode 100644 index 16ac8077c..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _IntTools_Context_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfo.cdl b/src/GEOMAlgo/GEOMAlgo_ShapeInfo.cdl deleted file mode 100644 index 56fc525d3..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfo.cdl +++ /dev/null @@ -1,206 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- This library is free software; you can redistribute it and/or --- modify it 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_ShapeInfo.cdl --- Created: Mon Apr 2 14:04:24 2007 --- Author: Peter KURNEV --- -class ShapeInfo from GEOMAlgo - - ---Purpose: - -uses - Pnt from gp, - Dir from gp, - Ax2 from gp, - Ax3 from gp, - - ShapeEnum from TopAbs, - Shape from TopoDS, - - KindOfShape from GEOMAlgo, - KindOfBounds from GEOMAlgo, - KindOfClosed from GEOMAlgo, - KindOfName from GEOMAlgo ---raises - -is - Create - returns ShapeInfo from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeInfo();" - - Reset(me:out); - - SetType(me:out; - aType:ShapeEnum from TopAbs); - - Type(me) - returns ShapeEnum from TopAbs; - - SetNbSubShapes(me:out; - aType:ShapeEnum from TopAbs; - aNb :Integer from Standard); - - NbSubShapes(me; - aType:ShapeEnum from TopAbs) - returns Integer from Standard; - - SetKindOfShape (me:out; - aT:KindOfShape from GEOMAlgo); - - KindOfShape (me) - returns KindOfShape from GEOMAlgo; - - SetKindOfName (me:out; - aT: KindOfName from GEOMAlgo); - - KindOfName(me) - returns KindOfName from GEOMAlgo; - - SetKindOfBounds (me:out; - aT:KindOfBounds from GEOMAlgo); - - KindOfBounds (me) - returns KindOfBounds from GEOMAlgo; - - SetKindOfClosed (me:out; - aT:KindOfClosed from GEOMAlgo); - - KindOfClosed(me) - returns KindOfClosed from GEOMAlgo; - - SetLocation (me:out; - aP: Pnt from gp); - - Location (me) - returns Pnt from gp; - ---C++: return const& - - SetDirection (me:out; - aD:Dir from gp); - - Direction (me) - returns Dir from gp; - ---C++: return const& - - SetPosition (me:out; - aAx2 : Ax2 from gp); - - SetPosition (me:out; - aAx3 : Ax3 from gp); - - Position (me) - returns Ax3 from gp; - ---C++: return const& - - SetPnt1 (me:out; - aP: Pnt from gp); - - Pnt1 (me) - returns Pnt from gp; - ---C++: return const& - - SetPnt2 (me:out; - aP: Pnt from gp); - - Pnt2 (me) - returns Pnt from gp; - ---C++: return const& - - SetRadius1 (me:out; - aR: Real from Standard); - - Radius1(me) - returns Real from Standard; - - SetRadius2 (me:out; - aR: Real from Standard); - - Radius2(me) - returns Real from Standard; - - SetLength(me:out; - aL: Real from Standard); - - Length(me) - returns Real from Standard; - - SetWidth(me:out; - aW: Real from Standard); - - Width(me) - returns Real from Standard; - - SetHeight(me:out; - aH: Real from Standard); - - Height(me) - returns Real from Standard; - -- - -- Dump - -- - Dump(me); - - DumpVertex(me) - is protected; - - DumpEdge(me) - is protected; - - DumpWire(me) - is protected; - - DumpFace(me) - is protected; - - DumpShell(me) - is protected; - - DumpSolid(me) - is protected; - - DumpCompSolid(me) - is protected; - - DumpCompound(me) - is protected; - -fields - myType : ShapeEnum from TopAbs is protected; - myNbSubShapes : Integer from Standard[9] is protected; - myKindOfShape : KindOfShape from GEOMAlgo is protected; - myKindOfName : KindOfName from GEOMAlgo is protected; - myKindOfBounds : KindOfBounds from GEOMAlgo is protected; - myKindOfClosed : KindOfClosed from GEOMAlgo is protected; - -- - myLocation : Pnt from gp is protected; - myDirection : Dir from gp is protected; - myPosition : Ax3 from gp is protected; - -- - myRadius1 : Real from Standard is protected; - myRadius2 : Real from Standard is protected; - myLength : Real from Standard is protected; - myWidth : Real from Standard is protected; - myHeight : Real from Standard is protected; - -- - myPnt1 : Pnt from gp is protected; - myPnt2 : Pnt from gp is protected; - -- - myNbTypes : Integer from Standard is protected; -end ShapeInfo; diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx index c52739dcd..63d0ff90d 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include +#include static @@ -25,20 +25,20 @@ static static void DumpKindOfShape(const GEOMAlgo_KindOfShape aKS); static - void DumpKindOfClosed(const GEOMAlgo_KindOfClosed aKC); + void DumpKindOfClosed(const GEOMAlgo_KindOfClosed aKC); static void DumpKindOfBounds(const GEOMAlgo_KindOfBounds aKB); static void DumpKindOfName(const GEOMAlgo_KindOfName aKS); static - void DumpPosition(const gp_Ax3& aAx3); + void DumpPosition(const gp_Ax3& aAx3); static void DumpLocation(const gp_Pnt& aP); static void DumpDirection(const gp_Dir& aD); //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_ShapeInfo::GEOMAlgo_ShapeInfo() { @@ -46,14 +46,14 @@ static } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_ShapeInfo::~GEOMAlgo_ShapeInfo() { } //======================================================================= //function : Reset -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeInfo::Reset() { @@ -82,15 +82,15 @@ static } //======================================================================= //function : SetType -//purpose : +//purpose : //======================================================================= - void GEOMAlgo_ShapeInfo::SetType(const TopAbs_ShapeEnum aType) + void GEOMAlgo_ShapeInfo::SetType(const TopAbs_ShapeEnum aType) { myType=aType; } //======================================================================= //function : Type -//purpose : +//purpose : //======================================================================= TopAbs_ShapeEnum GEOMAlgo_ShapeInfo::Type() const { @@ -98,13 +98,13 @@ static } //======================================================================= //function : SetNbSubShapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeInfo::SetNbSubShapes(const TopAbs_ShapeEnum aType, - const Standard_Integer aNb) + const Standard_Integer aNb) { Standard_Integer iN; - + iN=TypeToInteger(aType); if (iN>=0 && iN=0 && iN +#include #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _GEOMAlgo_KindOfShape_HeaderFile #include -#endif -#ifndef _GEOMAlgo_KindOfName_HeaderFile #include -#endif -#ifndef _GEOMAlgo_KindOfBounds_HeaderFile #include -#endif -#ifndef _GEOMAlgo_KindOfClosed_HeaderFile #include -#endif -#ifndef _gp_Pnt_HeaderFile #include -#endif -#ifndef _gp_Dir_HeaderFile #include -#endif -#ifndef _gp_Ax3_HeaderFile #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif -class gp_Pnt; -class gp_Dir; -class gp_Ax2; -class gp_Ax3; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_ShapeInfo { - -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 - // - - -Standard_EXPORT GEOMAlgo_ShapeInfo(); -Standard_EXPORT virtual ~GEOMAlgo_ShapeInfo(); - - -Standard_EXPORT void Reset() ; - - -Standard_EXPORT void SetType(const TopAbs_ShapeEnum aType) ; - - -Standard_EXPORT TopAbs_ShapeEnum Type() const; - - -Standard_EXPORT void SetNbSubShapes(const TopAbs_ShapeEnum aType,const Standard_Integer aNb) ; - - -Standard_EXPORT Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const; - - -Standard_EXPORT void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ; - - -Standard_EXPORT GEOMAlgo_KindOfShape KindOfShape() const; - - -Standard_EXPORT void SetKindOfName(const GEOMAlgo_KindOfName aT) ; - - -Standard_EXPORT GEOMAlgo_KindOfName KindOfName() const; +#include -Standard_EXPORT void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ; +//======================================================================= +//class : GEOMAlgo_ShapeInfo +//purpose : +//======================================================================= +class GEOMAlgo_ShapeInfo +{ + public: + Standard_EXPORT + GEOMAlgo_ShapeInfo(); -Standard_EXPORT GEOMAlgo_KindOfBounds KindOfBounds() const; + Standard_EXPORT + virtual ~GEOMAlgo_ShapeInfo(); + Standard_EXPORT + void Reset() ; -Standard_EXPORT void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ; + Standard_EXPORT + void SetType(const TopAbs_ShapeEnum aType) ; + Standard_EXPORT + TopAbs_ShapeEnum Type() const; -Standard_EXPORT GEOMAlgo_KindOfClosed KindOfClosed() const; + Standard_EXPORT + void SetNbSubShapes(const TopAbs_ShapeEnum aType,const Standard_Integer aNb) ; + Standard_EXPORT + Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const; -Standard_EXPORT void SetLocation(const gp_Pnt& aP) ; + Standard_EXPORT + void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ; + Standard_EXPORT + GEOMAlgo_KindOfShape KindOfShape() const; -Standard_EXPORT const gp_Pnt& Location() const; + Standard_EXPORT + void SetKindOfName(const GEOMAlgo_KindOfName aT) ; + Standard_EXPORT + GEOMAlgo_KindOfName KindOfName() const; -Standard_EXPORT void SetDirection(const gp_Dir& aD) ; + Standard_EXPORT + void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ; + Standard_EXPORT + GEOMAlgo_KindOfBounds KindOfBounds() const; -Standard_EXPORT const gp_Dir& Direction() const; + Standard_EXPORT + void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ; + Standard_EXPORT + GEOMAlgo_KindOfClosed KindOfClosed() const; -Standard_EXPORT void SetPosition(const gp_Ax2& aAx2) ; + Standard_EXPORT + void SetLocation(const gp_Pnt& aP) ; + Standard_EXPORT + const gp_Pnt& Location() const; -Standard_EXPORT void SetPosition(const gp_Ax3& aAx3) ; + Standard_EXPORT + void SetDirection(const gp_Dir& aD) ; + Standard_EXPORT + const gp_Dir& Direction() const; -Standard_EXPORT const gp_Ax3& Position() const; + Standard_EXPORT + void SetPosition(const gp_Ax2& aAx2) ; + Standard_EXPORT + void SetPosition(const gp_Ax3& aAx3) ; -Standard_EXPORT void SetPnt1(const gp_Pnt& aP) ; + Standard_EXPORT + const gp_Ax3& Position() const; + Standard_EXPORT + void SetPnt1(const gp_Pnt& aP) ; -Standard_EXPORT const gp_Pnt& Pnt1() const; + Standard_EXPORT + const gp_Pnt& Pnt1() const; + Standard_EXPORT + void SetPnt2(const gp_Pnt& aP) ; -Standard_EXPORT void SetPnt2(const gp_Pnt& aP) ; + Standard_EXPORT + const gp_Pnt& Pnt2() const; + Standard_EXPORT + void SetRadius1(const Standard_Real aR) ; -Standard_EXPORT const gp_Pnt& Pnt2() const; + Standard_EXPORT + Standard_Real Radius1() const; + Standard_EXPORT + void SetRadius2(const Standard_Real aR) ; -Standard_EXPORT void SetRadius1(const Standard_Real aR) ; + Standard_EXPORT + Standard_Real Radius2() const; + Standard_EXPORT + void SetLength(const Standard_Real aL) ; -Standard_EXPORT Standard_Real Radius1() const; + Standard_EXPORT + Standard_Real Length() const; + Standard_EXPORT + void SetWidth(const Standard_Real aW) ; -Standard_EXPORT void SetRadius2(const Standard_Real aR) ; + Standard_EXPORT + Standard_Real Width() const; + Standard_EXPORT + void SetHeight(const Standard_Real aH) ; -Standard_EXPORT Standard_Real Radius2() const; + Standard_EXPORT + Standard_Real Height() const; + Standard_EXPORT + void Dump() const; -Standard_EXPORT void SetLength(const Standard_Real aL) ; + protected: + Standard_EXPORT + void DumpVertex() const; + Standard_EXPORT + void DumpEdge() const; -Standard_EXPORT Standard_Real Length() const; + Standard_EXPORT + void DumpWire() const; + Standard_EXPORT + void DumpFace() const; -Standard_EXPORT void SetWidth(const Standard_Real aW) ; + Standard_EXPORT + void DumpShell() const; + Standard_EXPORT + void DumpSolid() const; -Standard_EXPORT Standard_Real Width() const; + Standard_EXPORT + void DumpCompSolid() const; - -Standard_EXPORT void SetHeight(const Standard_Real aH) ; - - -Standard_EXPORT Standard_Real Height() const; - - -Standard_EXPORT void Dump() const; - - - - - -protected: - - // Methods PROTECTED - // - - -Standard_EXPORT void DumpVertex() const; - - -Standard_EXPORT void DumpEdge() const; - - -Standard_EXPORT void DumpWire() const; - - -Standard_EXPORT void DumpFace() const; - - -Standard_EXPORT void DumpShell() const; - - -Standard_EXPORT void DumpSolid() const; - - -Standard_EXPORT void DumpCompSolid() const; - - -Standard_EXPORT void DumpCompound() const; - - - // Fields PROTECTED - // -TopAbs_ShapeEnum myType; -Standard_Integer myNbSubShapes[9]; -GEOMAlgo_KindOfShape myKindOfShape; -GEOMAlgo_KindOfName myKindOfName; -GEOMAlgo_KindOfBounds myKindOfBounds; -GEOMAlgo_KindOfClosed myKindOfClosed; -gp_Pnt myLocation; -gp_Dir myDirection; -gp_Ax3 myPosition; -Standard_Real myRadius1; -Standard_Real myRadius2; -Standard_Real myLength; -Standard_Real myWidth; -Standard_Real myHeight; -gp_Pnt myPnt1; -gp_Pnt myPnt2; -Standard_Integer myNbTypes; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT + void DumpCompound() const; + TopAbs_ShapeEnum myType; + Standard_Integer myNbSubShapes[9]; + GEOMAlgo_KindOfShape myKindOfShape; + GEOMAlgo_KindOfName myKindOfName; + GEOMAlgo_KindOfBounds myKindOfBounds; + GEOMAlgo_KindOfClosed myKindOfClosed; + gp_Pnt myLocation; + gp_Dir myDirection; + gp_Ax3 myPosition; + Standard_Real myRadius1; + Standard_Real myRadius2; + Standard_Real myLength; + Standard_Real myWidth; + Standard_Real myHeight; + gp_Pnt myPnt1; + gp_Pnt myPnt2; + Standard_Integer myNbTypes; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfo.ixx b/src/GEOMAlgo/GEOMAlgo_ShapeInfo.ixx deleted file mode 100644 index 0368e314b..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfo.ixx +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfo.jxx b/src/GEOMAlgo/GEOMAlgo_ShapeInfo.jxx deleted file mode 100644 index e6672ca3a..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfo.jxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _gp_Dir_HeaderFile -#include -#endif -#ifndef _gp_Ax2_HeaderFile -#include -#endif -#ifndef _gp_Ax3_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeInfo_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cdl b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cdl deleted file mode 100644 index a5d3189d3..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cdl +++ /dev/null @@ -1,148 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- This library is free software; you can redistribute it and/or --- modify it 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_ShapeInfoFiller.cdl --- Created: Mon Apr 2 15:05:34 2007 --- Author: Peter KURNEV --- -class ShapeInfoFiller from GEOMAlgo - inherits Algo from GEOMAlgo - - ---Purpose: - -uses - Pln from gp, - Sphere from gp, - Cylinder from gp, - Cone from gp, - Torus from gp, - - Shape from TopoDS, - Face from TopoDS, - Solid from TopoDS, - - ShapeInfo from GEOMAlgo, - KindOfName from GEOMAlgo, - IndexedDataMapOfShapeShapeInfo from GEOMAlgo - ---raises - -is - - Create - returns ShapeInfoFiller from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeInfoFiller();" - - SetShape(me:out; - aS:Shape from TopoDS); - - Shape(me) - returns Shape from TopoDS; - ---C++:return const & - - SetTolerance(me:out; - aT:Real from Standard); - - Tolerance(me) - returns Real from Standard; - - Info(me) - returns ShapeInfo from GEOMAlgo; - ---C++:return const & - - Info(me; - aS:Shape from TopoDS) - returns ShapeInfo from GEOMAlgo; - ---C++:return const & - - Perform(me:out) - is redefined; - - CheckData(me:out) - is redefined protected; - - FillNbSubShapes(me:out; - aS:Shape from TopoDS; - aInfo: out ShapeInfo from GEOMAlgo) - is protected; - - FillSubShapes(me:out; - aS:Shape from TopoDS) - is protected; - - FillShape(me:out; - aS:Shape from TopoDS) - is protected; - - FillVertex(me:out; - aS:Shape from TopoDS) - is protected; - - FillEdge(me:out; - aS:Shape from TopoDS) - is protected; - - FillFace(me:out; - aS:Shape from TopoDS) - is protected; - - FillSolid(me:out; - aS:Shape from TopoDS) - is protected; - - FillContainer(me:out; - aS:Shape from TopoDS) - is protected; - - - FillDetails(me:out; - aF:Face from TopoDS; - aPln:Pln from gp) - is protected; - - FillDetails(me:out; - aF:Face from TopoDS; - aSph:Sphere from gp) - is protected; - - FillDetails(me:out; - aF:Face from TopoDS; - aCyl:Cylinder from gp) - is protected; - - FillDetails(me:out; - aF:Face from TopoDS; - aCone:Cone from gp) - is protected; - - FillDetails(me:out; - aF:Face from TopoDS; - aTorus:Torus from gp) - is protected; - - FillDetails(me:out; - aS:Solid from TopoDS) - is protected; - -fields - myShape : Shape from TopoDS is protected; - myEmptyInfo : ShapeInfo from GEOMAlgo is protected; - myMapInfo : IndexedDataMapOfShapeShapeInfo from GEOMAlgo is protected; - myTolerance : Real from Standard is protected; -end ShapeInfoFiller; diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx index 3211fa232..614852e72 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include +#include #include @@ -57,7 +57,7 @@ -static +static Standard_Boolean IsAllowedType(const GeomAbs_CurveType aCT); static Standard_Boolean IsAllowedType(const GeomAbs_SurfaceType aST); @@ -67,8 +67,8 @@ static Standard_Integer NbShells(const TopoDS_Solid& aS); //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_ShapeInfoFiller::GEOMAlgo_ShapeInfoFiller() : @@ -78,14 +78,14 @@ static } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_ShapeInfoFiller::~GEOMAlgo_ShapeInfoFiller() { } //======================================================================= //function : SetTolerance -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeInfoFiller::SetTolerance(const Standard_Real aT) { @@ -93,7 +93,7 @@ static } //======================================================================= //function : Tolerance -//purpose : +//purpose : //======================================================================= Standard_Real GEOMAlgo_ShapeInfoFiller::Tolerance()const { @@ -101,15 +101,15 @@ static } //======================================================================= //function : SetShape -//purpose : +//purpose : //======================================================================= - void GEOMAlgo_ShapeInfoFiller::SetShape(const TopoDS_Shape& aS) + void GEOMAlgo_ShapeInfoFiller::SetShape(const TopoDS_Shape& aS) { myShape=aS; } //======================================================================= //function : Shape -//purpose : +//purpose : //======================================================================= const TopoDS_Shape& GEOMAlgo_ShapeInfoFiller::Shape() const { @@ -117,15 +117,15 @@ static } //======================================================================= //function : Info -//purpose : +//purpose : //======================================================================= const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info() const { - return Info(myShape); + return Info(myShape); } //======================================================================= //function : Info -//purpose : +//purpose : //======================================================================= const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info(const TopoDS_Shape& aS) const { @@ -135,12 +135,12 @@ static return aInfo; } } - return myEmptyInfo; + return myEmptyInfo; } //======================================================================= //function : CheckData -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeInfoFiller::CheckData() { @@ -153,9 +153,9 @@ static } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= - void GEOMAlgo_ShapeInfoFiller::Perform() + void GEOMAlgo_ShapeInfoFiller::Perform() { myErrorStatus=0; // @@ -169,8 +169,8 @@ static FillShape(myShape); } //======================================================================= -//function :FillShape -//purpose : +//function :FillShape +//purpose : //======================================================================= void GEOMAlgo_ShapeInfoFiller::FillShape(const TopoDS_Shape& aS) { @@ -182,7 +182,7 @@ static case TopAbs_VERTEX: FillVertex(aS); break; - // + // case TopAbs_EDGE: FillEdge(aS); break; @@ -201,14 +201,14 @@ static case TopAbs_COMPOUND: FillContainer(aS); break; - // + // default: break; } } //======================================================================= -//function :FillSubShapes -//purpose : +//function :FillSubShapes +//purpose : //======================================================================= void GEOMAlgo_ShapeInfoFiller::FillSubShapes(const TopoDS_Shape& aS) { @@ -222,9 +222,9 @@ static } //======================================================================= //function : FillContainer -//purpose : +//purpose : //======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillContainer(const TopoDS_Shape& aS) + void GEOMAlgo_ShapeInfoFiller::FillContainer(const TopoDS_Shape& aS) { myErrorStatus=0; // @@ -267,9 +267,9 @@ static } //======================================================================= //function : FillSolid -//purpose : +//purpose : //======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillSolid(const TopoDS_Shape& aS) + void GEOMAlgo_ShapeInfoFiller::FillSolid(const TopoDS_Shape& aS) { Standard_Integer aNbShells; TopoDS_Solid aSd; @@ -299,18 +299,18 @@ static FillDetails(aSd); } //======================================================================= -//function :FillFace -//purpose : +//function :FillFace +//purpose : //======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillFace(const TopoDS_Shape& aS) + void GEOMAlgo_ShapeInfoFiller::FillFace(const TopoDS_Shape& aS) { myErrorStatus=0; // Standard_Boolean bIsAllowedType; - Standard_Integer aNbWires;//, iRet + Standard_Integer aNbWires;//, iRet Standard_Boolean bInf, bInfU1, bInfU2, bInfV1, bInfV2; Standard_Real aUMin, aUMax, aVMin, aVMax, aR1, aR2; - gp_Pnt aP0; + gp_Pnt aP0; gp_Dir aDN; gp_Ax3 aAx3; GeomAbs_SurfaceType aST; @@ -399,7 +399,7 @@ static // FillDetails(aF, aSphere); }// else if (aST==GeomAbs_Sphere) { - // + // // 3. Cylinder else if (aST==GeomAbs_Cylinder) { gp_Cylinder aCyl; @@ -431,7 +431,7 @@ static } FillDetails(aF, aCyl); } - // + // // 4. Cone else if (aST==GeomAbs_Cone) { gp_Cone aCone; @@ -463,7 +463,7 @@ static } FillDetails(aF, aCone); } - // + // // 5. Torus else if (aST==GeomAbs_Torus) { gp_Torus aTorus; @@ -488,10 +488,10 @@ static } } //======================================================================= -//function :FillEdge -//purpose : +//function :FillEdge +//purpose : //======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillEdge(const TopoDS_Shape& aS) + void GEOMAlgo_ShapeInfoFiller::FillEdge(const TopoDS_Shape& aS) { myErrorStatus=0; // @@ -616,7 +616,7 @@ static aInfo.SetKindOfName(GEOMAlgo_KN_ARCCIRCLE); // gp_Vec aVecX(aP, aP1); - gp_Dir aDirX(aVecX); + gp_Dir aDirX(aVecX); gp_Ax2 aAx2new(aP, aAx2.Direction(), aDirX); aInfo.SetPosition(aAx2new); } @@ -658,7 +658,7 @@ static aInfo.SetKindOfName(GEOMAlgo_KN_ARCELLIPSE); // gp_Vec aVecX(aP, aP1); - gp_Dir aDirX(aVecX); + gp_Dir aDirX(aVecX); gp_Ax2 aAx2new(aP, aAx2.Direction(), aDirX); aInfo.SetPosition(aAx2new); } @@ -667,10 +667,10 @@ static FillSubShapes(aS); } //======================================================================= -//function :FillVertex -//purpose : +//function :FillVertex +//purpose : //======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillVertex(const TopoDS_Shape& aS) + void GEOMAlgo_ShapeInfoFiller::FillVertex(const TopoDS_Shape& aS) { myErrorStatus=0; // @@ -695,7 +695,7 @@ static } //======================================================================= //function : FillNbSubshapes -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeInfoFiller::FillNbSubShapes(const TopoDS_Shape& aS, GEOMAlgo_ShapeInfo& aInfo) @@ -704,7 +704,7 @@ static // Standard_Integer i, aNb, aNbS; TopTools_IndexedMapOfShape aM; - TopAbs_ShapeEnum aST; + TopAbs_ShapeEnum aST; TopAbs_ShapeEnum aTypes[]= { //TopAbs_FACE, TopAbs_EDGE, TopAbs_VERTEX TopAbs_COMPOUND, @@ -716,7 +716,7 @@ static TopAbs_EDGE, TopAbs_VERTEX }; - + // aST=aS.ShapeType(); aNb=sizeof(aTypes)/sizeof(aTypes[0]); @@ -731,8 +731,8 @@ static } } //======================================================================= -//function :NbShells -//purpose : +//function :NbShells +//purpose : //======================================================================= Standard_Integer NbShells(const TopoDS_Solid& aSd) { @@ -750,7 +750,7 @@ Standard_Integer NbShells(const TopoDS_Solid& aSd) } //======================================================================= //function : NbWires -//purpose : +//purpose : //======================================================================= Standard_Integer NbWires(const TopoDS_Face& aF) { @@ -768,7 +768,7 @@ Standard_Integer NbWires(const TopoDS_Face& aF) } //======================================================================= //function : IsAllowedType -//purpose : +//purpose : //======================================================================= Standard_Boolean IsAllowedType(const GeomAbs_CurveType aCT) { @@ -788,14 +788,14 @@ Standard_Boolean IsAllowedType(const GeomAbs_CurveType aCT) } //======================================================================= //function : IsAllowedType -//purpose : +//purpose : //======================================================================= Standard_Boolean IsAllowedType(const GeomAbs_SurfaceType aST) { Standard_Boolean bRet; Standard_Integer i, aNb; GeomAbs_SurfaceType aTypes[]={ - GeomAbs_Plane, GeomAbs_Cylinder, + GeomAbs_Plane, GeomAbs_Cylinder, GeomAbs_Cone, GeomAbs_Sphere, GeomAbs_Torus }; @@ -810,9 +810,9 @@ Standard_Boolean IsAllowedType(const GeomAbs_SurfaceType aST) } // // myErrorStatus -// +// // 0 - Ok // 1 - The object is just initialized // -// 10 - Null shape +// 10 - Null shape // 11 - circle/ellipse edge without vertices diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.hxx b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.hxx index 180f8bbda..5e71ec394 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.hxx @@ -16,169 +16,108 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - #ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile #define _GEOMAlgo_ShapeInfoFiller_HeaderFile -#ifndef _TopoDS_Shape_HeaderFile +#include +#include #include -#endif -#ifndef _GEOMAlgo_ShapeInfo_HeaderFile #include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif -#ifndef _GEOMAlgo_Algo_HeaderFile #include -#endif -class TopoDS_Shape; -class GEOMAlgo_ShapeInfo; -class TopoDS_Face; -class gp_Pln; -class gp_Sphere; -class gp_Cylinder; -class gp_Cone; -class gp_Torus; -class TopoDS_Solid; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_ShapeInfoFiller : public GEOMAlgo_Algo { - -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 - // - - -Standard_EXPORT GEOMAlgo_ShapeInfoFiller(); -Standard_EXPORT virtual ~GEOMAlgo_ShapeInfoFiller(); - - -Standard_EXPORT void SetShape(const TopoDS_Shape& aS) ; - - -Standard_EXPORT const TopoDS_Shape& Shape() const; - - -Standard_EXPORT void SetTolerance(const Standard_Real aT) ; - - -Standard_EXPORT Standard_Real Tolerance() const; - - -Standard_EXPORT const GEOMAlgo_ShapeInfo& Info() const; - - -Standard_EXPORT const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const; +#include +#include +#include +#include +#include +#include +#include +//======================================================================= +//class : GEOMAlgo_ShapeInfoFiller +//purpose : +//======================================================================= +class GEOMAlgo_ShapeInfoFiller : public GEOMAlgo_Algo +{ + public: + Standard_EXPORT + GEOMAlgo_ShapeInfoFiller(); -Standard_EXPORT virtual void Perform() ; + Standard_EXPORT + virtual ~GEOMAlgo_ShapeInfoFiller(); + Standard_EXPORT + void SetShape(const TopoDS_Shape& aS) ; + Standard_EXPORT + const TopoDS_Shape& Shape() const; + Standard_EXPORT + void SetTolerance(const Standard_Real aT) ; + Standard_EXPORT + Standard_Real Tolerance() const; -protected: + Standard_EXPORT + const GEOMAlgo_ShapeInfo& Info() const; - // Methods PROTECTED - // + Standard_EXPORT + const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const; + Standard_EXPORT + virtual void Perform() ; -Standard_EXPORT virtual void CheckData() ; + protected: + Standard_EXPORT + virtual void CheckData() ; + Standard_EXPORT + void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ; -Standard_EXPORT void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ; + Standard_EXPORT + void FillSubShapes(const TopoDS_Shape& aS) ; + Standard_EXPORT + void FillShape(const TopoDS_Shape& aS) ; -Standard_EXPORT void FillSubShapes(const TopoDS_Shape& aS) ; + Standard_EXPORT + void FillVertex(const TopoDS_Shape& aS) ; + Standard_EXPORT + void FillEdge(const TopoDS_Shape& aS) ; -Standard_EXPORT void FillShape(const TopoDS_Shape& aS) ; + Standard_EXPORT + void FillFace(const TopoDS_Shape& aS) ; + Standard_EXPORT + void FillSolid(const TopoDS_Shape& aS) ; -Standard_EXPORT void FillVertex(const TopoDS_Shape& aS) ; + Standard_EXPORT + void FillContainer(const TopoDS_Shape& aS) ; + Standard_EXPORT + void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ; -Standard_EXPORT void FillEdge(const TopoDS_Shape& aS) ; + Standard_EXPORT + void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ; + Standard_EXPORT + void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ; -Standard_EXPORT void FillFace(const TopoDS_Shape& aS) ; + Standard_EXPORT + void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ; + Standard_EXPORT + void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ; -Standard_EXPORT void FillSolid(const TopoDS_Shape& aS) ; - - -Standard_EXPORT void FillContainer(const TopoDS_Shape& aS) ; - - -Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ; - - -Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ; - - -Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ; - - -Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ; - - -Standard_EXPORT void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ; - - -Standard_EXPORT void FillDetails(const TopoDS_Solid& aS) ; - - - // Fields PROTECTED - // -TopoDS_Shape myShape; -GEOMAlgo_ShapeInfo myEmptyInfo; -GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo; -Standard_Real myTolerance; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT + void FillDetails(const TopoDS_Solid& aS) ; + TopoDS_Shape myShape; + GEOMAlgo_ShapeInfo myEmptyInfo; + GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo; + Standard_Real myTolerance; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.ixx b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.ixx deleted file mode 100644 index 2c7ecc63a..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.ixx +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.jxx b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.jxx deleted file mode 100644 index 984a8a53e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.jxx +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeInfo_HeaderFile -#include -#endif -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _gp_Pln_HeaderFile -#include -#endif -#ifndef _gp_Sphere_HeaderFile -#include -#endif -#ifndef _gp_Cylinder_HeaderFile -#include -#endif -#ifndef _gp_Cone_HeaderFile -#include -#endif -#ifndef _gp_Torus_HeaderFile -#include -#endif -#ifndef _TopoDS_Solid_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeInfoFiller_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx index e3ae5eae3..c641edd85 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#include +#include #include diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSet.cdl b/src/GEOMAlgo/GEOMAlgo_ShapeSet.cdl deleted file mode 100755 index 65a7267db..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSet.cdl +++ /dev/null @@ -1,88 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_ShapeSet.cdl --- Created: --- Author: Peter KURNEV --- -class ShapeSet from GEOMAlgo - - ---Purpose: Implementation some formal - -- opereations with Set of shapes - -uses - Shape from TopoDS, - MapOfOrientedShape from TopTools, - ListOfShape from TopTools, - ShapeEnum from TopAbs - ---raises - -is - Create - ---Purpose: Empty constructor - returns ShapeSet from GEOMAlgo; - - Add(me:out; - theLS:ListOfShape from TopTools); - ---Purpose: Adds shapes from the list theLS to the Set - - Add(me:out; - theShape:Shape from TopoDS); - ---Purpose: Adds shape theShape to the Set - - Add(me:out; - theShape:Shape from TopoDS; - theType :ShapeEnum from TopAbs); - ---Purpose: Adds sub-shapes of shape theShape, - -- that have type theType to the Set - - Subtract(me:out; - theSet:ShapeSet from GEOMAlgo); - ---Purpose: Removes shapes of theSet from the Set - - Clear(me:out); - ---Purpose: Clears internal fields - - Contains(me; - theSet:ShapeSet from GEOMAlgo) - ---Purpose: Returns True if the Set contains - -- all shapes of theSet - returns Boolean from Standard; - - GetSet(me) - ---Purpose: Returns the Set - returns ListOfShape from TopTools; - ---C++: return const & - --modified by NIZNHY-PKV Wed Oct 28 13:51:45 2010f - IsEqual(me; - theOther: ShapeSet from GEOMAlgo) - ---Purpose: Returns True if the Set==theSet - returns Boolean from Standard; - ---C++: alias operator == - --modified by NIZNHY-PKV Wed Oct 28 13:51:50 2010t - -fields - myMap : MapOfOrientedShape from TopTools is protected; - myList : ListOfShape from TopTools is protected; - -end ShapeSet; diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx index 72df4ecf3..3e84aa098 100755 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx @@ -21,10 +21,10 @@ // // File: GEOMAlgo_ShapeSet.cxx -// Created: -// Author: Peter KURNEV +// Created: +// Author: Peter KURNEV // -#include +#include #include @@ -32,15 +32,15 @@ #include //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_ShapeSet::GEOMAlgo_ShapeSet() { } //======================================================================= //function : Clear -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeSet::Clear() { @@ -49,7 +49,7 @@ } //======================================================================= //function : Add -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeSet::Add(const TopoDS_Shape& theShape) { @@ -59,7 +59,7 @@ } //======================================================================= //function : Add -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeSet::Add(const TopoDS_Shape& theShape, const TopAbs_ShapeEnum theType) @@ -76,7 +76,7 @@ } //======================================================================= //function : Add -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeSet::Add(const TopTools_ListOfShape& theLS) { @@ -91,8 +91,8 @@ } } //======================================================================= -//function :GetSet -//purpose : +//function :GetSet +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_ShapeSet::GetSet()const { @@ -100,7 +100,7 @@ } //======================================================================= //function : Contains -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_ShapeSet::Contains(const GEOMAlgo_ShapeSet& theOther)const { @@ -125,7 +125,7 @@ } //======================================================================= //function : Subtract -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeSet::Subtract(const GEOMAlgo_ShapeSet& theOther) { @@ -148,7 +148,7 @@ //modified by NIZNHY-PKV Wed Oct 28 13:51:36 2010f //======================================================================= //function : IsEqual -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_ShapeSet::IsEqual(const GEOMAlgo_ShapeSet& theOther)const { diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSet.hxx b/src/GEOMAlgo/GEOMAlgo_ShapeSet.hxx index c06f6a932..b304a8bba 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSet.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeSet.hxx @@ -20,100 +20,73 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_ShapeSet.hxx +// Created: +// Author: Peter KURNEV +// #ifndef _GEOMAlgo_ShapeSet_HeaderFile #define _GEOMAlgo_ShapeSet_HeaderFile -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - -#ifndef _TopTools_MapOfOrientedShape_HeaderFile #include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile #include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -class TopTools_ListOfShape; -class TopoDS_Shape; - +#include //! Implementation some formal
//! opereations with Set of shapes
-class GEOMAlgo_ShapeSet { -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); - } - +//======================================================================= +//class : GEOMAlgo_ShapeSet +//purpose : +//======================================================================= +class GEOMAlgo_ShapeSet +{ + public: //! Empty constructor
- Standard_EXPORT GEOMAlgo_ShapeSet(); + Standard_EXPORT + GEOMAlgo_ShapeSet(); + //! Adds shapes from the list theLS to the Set
- Standard_EXPORT void Add(const TopTools_ListOfShape& theLS) ; + Standard_EXPORT + void Add(const TopTools_ListOfShape& theLS) ; + //! Adds shape theShape to the Set
- Standard_EXPORT void Add(const TopoDS_Shape& theShape) ; + Standard_EXPORT + void Add(const TopoDS_Shape& theShape) ; + //! Adds sub-shapes of shape theShape,
-//! that have type theType to the Set
- Standard_EXPORT void Add(const TopoDS_Shape& theShape,const TopAbs_ShapeEnum theType) ; + //! that have type theType to the Set
+ Standard_EXPORT + void Add(const TopoDS_Shape& theShape,const TopAbs_ShapeEnum theType) ; + //! Removes shapes of theSet from the Set
- Standard_EXPORT void Subtract(const GEOMAlgo_ShapeSet& theSet) ; + Standard_EXPORT + void Subtract(const GEOMAlgo_ShapeSet& theSet) ; + //! Clears internal fields
Standard_EXPORT void Clear() ; - //! Returns True if the Set contains
-//! all shapes of theSet
- Standard_EXPORT Standard_Boolean Contains(const GEOMAlgo_ShapeSet& theSet) const; - //! Returns the Set
- Standard_EXPORT const TopTools_ListOfShape& GetSet() const; - //! Returns True if the Set==theSet
- Standard_EXPORT Standard_Boolean IsEqual(const GEOMAlgo_ShapeSet& theOther) const; - Standard_Boolean operator ==(const GEOMAlgo_ShapeSet& theOther) const -{ - return IsEqual(theOther); -} - - - - - -protected: - - - -TopTools_MapOfOrientedShape myMap; -TopTools_ListOfShape myList; - - -private: + //! Returns True if the Set contains
+ //! all shapes of theSet
+ Standard_EXPORT + Standard_Boolean Contains(const GEOMAlgo_ShapeSet& theSet) const; + //! Returns the Set
+ Standard_EXPORT + const TopTools_ListOfShape& GetSet() const; + //! Returns True if the Set==theSet
+ Standard_EXPORT + Standard_Boolean IsEqual(const GEOMAlgo_ShapeSet& theOther) const; + Standard_Boolean operator ==(const GEOMAlgo_ShapeSet& theOther) const { + return IsEqual(theOther); + } + protected: + TopTools_MapOfOrientedShape myMap; + TopTools_ListOfShape myList; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSet.ixx b/src/GEOMAlgo/GEOMAlgo_ShapeSet.ixx deleted file mode 100644 index e006551e7..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSet.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSet.jxx b/src/GEOMAlgo/GEOMAlgo_ShapeSet.jxx deleted file mode 100644 index 44da338b7..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSet.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeSet_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl deleted file mode 100644 index 2fab3b54b..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cdl +++ /dev/null @@ -1,67 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_ShapeSolid.cdl --- Created: Thu Jan 13 12:44:07 2005 --- Author: Peter KURNEV --- -deferred class ShapeSolid from GEOMAlgo - inherits Algo from GEOMAlgo - - ---Purpose: - -uses - State from TopAbs, - ListOfShape from TopTools, - PDSFiller from BOPTools, - DSFiller from BOPTools ---raises - -is - Initialize - returns ShapeSolid from GEOMAlgo; - - - SetFiller(me:out; - aDSF:DSFiller from BOPTools); - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid();" - - - Shapes(me; - aState:State from TopAbs) - returns ListOfShape from TopTools; - ---C++: return const & - - BuildResult (me:out) - is deferred protected; - - Prepare(me:out) - is deferred protected; - -fields - myLSIN : ListOfShape from TopTools is protected; - myLSOUT : ListOfShape from TopTools is protected; - myLSON : ListOfShape from TopTools is protected; - myRank : Integer from Standard is protected; - myDSFiller : PDSFiller from BOPTools is protected; - -end ShapeSolid; diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx index 82bbbfc2b..04f69b29a 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx @@ -25,14 +25,14 @@ // Author: Peter KURNEV // // -#include +#include #include #include //======================================================================= //function : GEOMAlgo_ShapeSolid -//purpose : +//purpose : //======================================================================= GEOMAlgo_ShapeSolid::GEOMAlgo_ShapeSolid() : @@ -43,14 +43,14 @@ GEOMAlgo_ShapeSolid::GEOMAlgo_ShapeSolid() } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_ShapeSolid::~GEOMAlgo_ShapeSolid() { } //======================================================================= //function : SetFiller -//purpose : +//purpose : //======================================================================= void GEOMAlgo_ShapeSolid::SetFiller(const BOPTools_DSFiller& aDSFiller) { @@ -58,7 +58,7 @@ void GEOMAlgo_ShapeSolid::SetFiller(const BOPTools_DSFiller& aDSFiller) } //======================================================================= // function: Shapes -// purpose: +// purpose: //======================================================================= const TopTools_ListOfShape& GEOMAlgo_ShapeSolid::Shapes(const TopAbs_State aState) const { @@ -73,10 +73,10 @@ const TopTools_ListOfShape& GEOMAlgo_ShapeSolid::Shapes(const TopAbs_State aStat break; case TopAbs_ON: pL=&myLSON; - break; + break; default: pL=&myLSON; - break; + break; } return *pL; } diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx index 85eb68dd2..47e3edac7 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx @@ -20,108 +20,54 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_ShapeSolid.hxx +// Created: Thu Jan 13 12:54:48 2005 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_ShapeSolid_HeaderFile #define _GEOMAlgo_ShapeSolid_HeaderFile -#ifndef _TopTools_ListOfShape_HeaderFile +#include +#include #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _BOPTools_PDSFiller_HeaderFile #include -#endif -#ifndef _GEOMAlgo_Algo_HeaderFile #include -#endif -#ifndef _TopAbs_State_HeaderFile #include -#endif -class BOPTools_DSFiller; -class TopTools_ListOfShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_ShapeSolid : public GEOMAlgo_Algo { - -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 - // - - -Standard_EXPORT void SetFiller(const BOPTools_DSFiller& aDSF) ; -Standard_EXPORT virtual ~GEOMAlgo_ShapeSolid(); - - -Standard_EXPORT const TopTools_ListOfShape& Shapes(const TopAbs_State aState) const; - +#include +//======================================================================= +//function : GEOMAlgo_ShapeSolid +//purpose : +//======================================================================= +class GEOMAlgo_ShapeSolid : public GEOMAlgo_Algo +{ + 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; protected: + Standard_EXPORT + GEOMAlgo_ShapeSolid(); - // Methods PROTECTED - // - - -Standard_EXPORT GEOMAlgo_ShapeSolid(); - - -Standard_EXPORT virtual void BuildResult() = 0; - - -Standard_EXPORT virtual void Prepare() = 0; - - - // Fields PROTECTED - // -TopTools_ListOfShape myLSIN; -TopTools_ListOfShape myLSOUT; -TopTools_ListOfShape myLSON; -Standard_Integer myRank; -BOPTools_PDSFiller myDSFiller; - - -private: + Standard_EXPORT + virtual void BuildResult() = 0; - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT + virtual void Prepare() = 0; + TopTools_ListOfShape myLSIN; + TopTools_ListOfShape myLSOUT; + TopTools_ListOfShape myLSON; + Standard_Integer myRank; + BOPTools_PDSFiller myDSFiller; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx deleted file mode 100644 index 0ed159b4f..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx deleted file mode 100644 index faca670b4..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _BOPTools_DSFiller_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShapeSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl deleted file mode 100644 index 6dca21eed..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cdl +++ /dev/null @@ -1,53 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_ShellSolid.cdl --- Created: Wed Jan 12 12:45:20 2005 --- Author: Peter KURNEV --- -class ShellSolid from GEOMAlgo - inherits ShapeSolid from GEOMAlgo - ---Purpose: - ---uses ---raises - -is - Create - returns ShellSolid from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_ShellSolid();" - - Perform (me:out) - is redefined; - - Prepare(me:out) - is redefined protected; - - BuildResult (me:out) - is redefined protected; - - DetectSDFaces(me:out) - is protected; - ---fields - -end ShellSolid; diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx index de0f483bc..c032c1111 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx @@ -23,10 +23,9 @@ // File: GEOMAlgo_ShellSolid.cxx // Created: Wed Jan 12 12:49:45 2005 // Author: Peter KURNEV - -#include - -#include +// +// +#include #include @@ -76,7 +75,7 @@ //======================================================================= //function : GEOMAlgo_ShellSolid -//purpose : +//purpose : //======================================================================= GEOMAlgo_ShellSolid::GEOMAlgo_ShellSolid() : @@ -85,16 +84,16 @@ GEOMAlgo_ShellSolid::GEOMAlgo_ShellSolid() } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_ShellSolid::~GEOMAlgo_ShellSolid() { } //======================================================================= -// function: -// purpose: +// function: +// purpose: //======================================================================= -void GEOMAlgo_ShellSolid::Perform() +void GEOMAlgo_ShellSolid::Perform() { myErrorStatus=0; // @@ -125,12 +124,12 @@ void GEOMAlgo_ShellSolid::Perform() } //======================================================================= // function: Prepare -// purpose: +// purpose: //======================================================================= -void GEOMAlgo_ShellSolid::Prepare() +void GEOMAlgo_ShellSolid::Prepare() { const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller(); - // + // // 1 States BOPTools_SolidStateFiller aStateFiller(aPaveFiller); aStateFiller.Do(); @@ -148,9 +147,9 @@ void GEOMAlgo_ShellSolid::Prepare() } //================================================================================= // function: BuildResult -// purpose: +// purpose: //================================================================================= -void GEOMAlgo_ShellSolid::BuildResult() +void GEOMAlgo_ShellSolid::BuildResult() { Standard_Boolean bIsTouchCase; Standard_Integer i, j, nF1, nF2, aNbFFs, aNbS, aNbCurves, nSp, iRank1; @@ -262,19 +261,13 @@ void GEOMAlgo_ShellSolid::BuildResult() aTol=1.e-7; // BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP3D); - const TopoDS_Solid& aRefSolid=(myRank==1) ? + const TopoDS_Solid& aRefSolid=(myRank==1) ? TopoDS::Solid(aDS.Tool()) : TopoDS::Solid(aDS.Object()); // BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)& aPaveFiller; -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx=pPF->Context(); // BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aRefSolid); -#else - IntTools_Context& aCtx=pPF->ChangeContext(); - // - BRepClass3d_SolidClassifier& aSC=aCtx.SolidClassifier(aRefSolid); -#endif aSC.Perform(aP3D, aTol); aSt=aSC.State(); if (aSt==TopAbs_IN) { @@ -283,15 +276,15 @@ void GEOMAlgo_ShellSolid::BuildResult() else if (aSt==TopAbs_OUT) { myLSOUT.Append(aF1); } - } - break; - } // if (aNbPB<2) { + } + break; + } // if (aNbPB<2) { } //for (; anExp.More(); anExp.Next()) - } + } } //======================================================================= // function: DetectSDFaces -// purpose: +// purpose: //======================================================================= void GEOMAlgo_ShellSolid::DetectSDFaces() { @@ -306,9 +299,9 @@ void GEOMAlgo_ShellSolid::DetectSDFaces() aNb=aFFs.Extent(); for (i=1; i<=aNb; i++) { bFlag=Standard_False; - + BOPTools_SSInterference& aFF=aFFs(i); - + nF1=aFF.Index1(); nF2=aFF.Index2(); const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF1)); @@ -321,11 +314,11 @@ void GEOMAlgo_ShellSolid::DetectSDFaces() if (!aNbSps) { continue; } - + const BOPTools_PaveBlock& aPB=aLPB.First(); const TopoDS_Edge& aSpE=TopoDS::Edge(aDS.Shape(aPB.Edge())); - - BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF1, aDNF1); + + BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF1, aDNF1); BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF2, aDNF2); iSenseFlag=BOPTools_Tools3D::SenseFlag (aDNF1, aDNF2); // @@ -334,13 +327,13 @@ void GEOMAlgo_ShellSolid::DetectSDFaces() // TopoDS_Face aF1FWD=aF1; aF1FWD.Orientation (TopAbs_FORWARD); - + BOP_WireEdgeSet aWES (aF1FWD); BOP_SDFWESFiller aWESFiller(nF1, nF2, *myDSFiller); aWESFiller.SetSenseFlag(iSenseFlag); aWESFiller.SetOperation(BOP_COMMON); aWESFiller.Do(aWES); - + BOP_FaceBuilder aFB; aFB.Do(aWES); const TopTools_ListOfShape& aLF=aFB.NewFaces(); @@ -355,7 +348,7 @@ void GEOMAlgo_ShellSolid::DetectSDFaces() // Standard_Boolean bIsValidIn2D, bNegativeFlag; bIsValidIn2D=BOPTools_Tools3D::IsValidArea (aFaceResult, bNegativeFlag); - if (bIsValidIn2D) { + if (bIsValidIn2D) { //if(CheckSameDomainFaceInside(aFaceResult, aF2)) { iZone=1; break; @@ -364,15 +357,15 @@ void GEOMAlgo_ShellSolid::DetectSDFaces() // } } - - if (iZone) { + + if (iZone) { bFlag=Standard_True; aFF.SetStatesMap(aWESFiller.StatesMap()); } - + }// if (iSenseFlag) - + aFF.SetTangentFacesFlag(bFlag); aFF.SetSenseFlag (iSenseFlag); - }// end of for (i=1; i<=aNb; i++) + }// end of for (i=1; i<=aNb; i++) } diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx index 2e8a043f4..941405861 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx @@ -20,89 +20,42 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_ShellSolid.hxx +// Created: Wed Jan 12 12:49:45 2005 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_ShellSolid_HeaderFile #define _GEOMAlgo_ShellSolid_HeaderFile -#ifndef _GEOMAlgo_ShapeSolid_HeaderFile -#include -#endif - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - - -class GEOMAlgo_ShellSolid : public GEOMAlgo_ShapeSolid { - -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 - // - - -Standard_EXPORT GEOMAlgo_ShellSolid(); -Standard_EXPORT virtual ~GEOMAlgo_ShellSolid(); - - -Standard_EXPORT virtual void Perform() ; - - - - - -protected: - - // Methods PROTECTED - // - - -Standard_EXPORT virtual void Prepare() ; - - -Standard_EXPORT virtual void BuildResult() ; - - -Standard_EXPORT void DetectSDFaces() ; - - - // Fields PROTECTED - // - +#include -private: +//======================================================================= +//class : GEOMAlgo_ShellSolid +//purpose : +//======================================================================= +class GEOMAlgo_ShellSolid : public GEOMAlgo_ShapeSolid +{ + public: + Standard_EXPORT + GEOMAlgo_ShellSolid(); - // Methods PRIVATE - // + Standard_EXPORT + virtual ~GEOMAlgo_ShellSolid(); + Standard_EXPORT + virtual void Perform() ; - // Fields PRIVATE - // + protected: + Standard_EXPORT + virtual void Prepare() ; + Standard_EXPORT + virtual void BuildResult() ; + Standard_EXPORT + void DetectSDFaces() ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx deleted file mode 100644 index 0cf9ad15f..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx deleted file mode 100644 index 861ac2697..000000000 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_ShellSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl deleted file mode 100644 index d8939882e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cdl +++ /dev/null @@ -1,58 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_SolidSolid.cdl --- Created: Wed Jan 26 12:05:14 2005 --- Author: Peter KURNEV --- -class SolidSolid from GEOMAlgo - inherits ShellSolid from GEOMAlgo - - ---Purpose: - -uses - Shape from TopoDS - ---raises - -is - Create - returns SolidSolid from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_SolidSolid();" - - Perform (me:out) - is redefined; - - BuildResult (me:out) - is redefined protected; - - SetShape2 (me:out; - aS: Shape from TopoDS); - - Shape2 (me) - returns Shape from TopoDS; - ---C++: return const & - -fields - myS2: Shape from TopoDS is protected; - -end SolidSolid; diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx index 69c0a0cf1..31ea5d161 100644 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx @@ -25,7 +25,7 @@ // Author: Peter KURNEV // // -#include +#include #include @@ -44,7 +44,7 @@ //======================================================================= //function : GEOMAlgo_SolidSolid -//purpose : +//purpose : //======================================================================= GEOMAlgo_SolidSolid::GEOMAlgo_SolidSolid() : @@ -53,32 +53,32 @@ GEOMAlgo_SolidSolid::GEOMAlgo_SolidSolid() } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_SolidSolid::~GEOMAlgo_SolidSolid() { } //======================================================================= // function: SetShape2 -// purpose: +// purpose: //======================================================================= void GEOMAlgo_SolidSolid::SetShape2(const TopoDS_Shape& aS2) { myS2=aS2; -} +} //======================================================================= // function: Shape2 -// purpose: +// purpose: //======================================================================= const TopoDS_Shape& GEOMAlgo_SolidSolid::Shape2()const { return myS2; -} +} //======================================================================= // function: Perform -// purpose: +// purpose: //======================================================================= -void GEOMAlgo_SolidSolid::Perform() +void GEOMAlgo_SolidSolid::Perform() { myErrorStatus=0; try { @@ -108,9 +108,9 @@ void GEOMAlgo_SolidSolid::Perform() } //================================================================================= // function: BuildResult -// purpose: +// purpose: //================================================================================= -void GEOMAlgo_SolidSolid::BuildResult() +void GEOMAlgo_SolidSolid::BuildResult() { myErrorStatus=0; // @@ -122,7 +122,7 @@ void GEOMAlgo_SolidSolid::BuildResult() GEOMAlgo_IndexedDataMapOfShapeState aMFS; // // 1. classify the faces - GEOMAlgo_ShellSolid::BuildResult(); + GEOMAlgo_ShellSolid::BuildResult(); // // 2. fill Shape-State map aIt.Initialize(myLSIN); @@ -163,9 +163,9 @@ void GEOMAlgo_SolidSolid::BuildResult() for(j=1; j +// #ifndef _GEOMAlgo_SolidSolid_HeaderFile #define _GEOMAlgo_SolidSolid_HeaderFile -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_ShellSolid_HeaderFile -#include -#endif -class TopoDS_Shape; - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - - -class GEOMAlgo_SolidSolid : public GEOMAlgo_ShellSolid { - -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 - // - - -Standard_EXPORT GEOMAlgo_SolidSolid(); -Standard_EXPORT virtual ~GEOMAlgo_SolidSolid(); - - -Standard_EXPORT virtual void Perform() ; - - -Standard_EXPORT void SetShape2(const TopoDS_Shape& aS) ; - +#include +#include -Standard_EXPORT const TopoDS_Shape& Shape2() const; +//======================================================================= +//function : GEOMAlgo_SolidSolid +//purpose : +//======================================================================= +class GEOMAlgo_SolidSolid : public GEOMAlgo_ShellSolid +{ + 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; protected: - - // Methods PROTECTED - // - - -Standard_EXPORT virtual void BuildResult() ; - - - // Fields PROTECTED - // -TopoDS_Shape myS2; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT + virtual void BuildResult() ; + TopoDS_Shape myS2; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx b/src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx deleted file mode 100644 index 123d6d85a..000000000 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx b/src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx deleted file mode 100644 index 704f2d32b..000000000 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_SolidSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_Splitter.cdl b/src/GEOMAlgo/GEOMAlgo_Splitter.cdl deleted file mode 100755 index 4c3477c26..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Splitter.cdl +++ /dev/null @@ -1,103 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_Splitter.cdl --- Created: --- Author: Peter KURNEV --- -class Splitter from GEOMAlgo - inherits Builder from GEOMAlgo - - ---Purpose: Implementation of Gluing Operation Algorithm (GA) - -uses - - ShapeEnum from TopAbs, - Shape from TopoDS, - ListOfShape from TopTools, - MapOfShape from TopTools - ---raises - -is - - Create - ---Purpose: Empty constructor - returns Splitter from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_Splitter();" - - Clear(me:out) - ---Purpose: Clears internal fields and arguments - is redefined; - - AddTool (me:out; - theShape: Shape from TopoDS) - ---Purpose: Adds Tool argument theShape of the operation - is virtual; - - Tools(me) - ---Purpose: Returns the arguments of the operation - returns ListOfShape from TopTools; - ---C++: return const & - - SetLimit(me:out; - aLimit:ShapeEnum from TopAbs); - - Limit(me) - returns ShapeEnum from TopAbs; - - SetLimitMode(me:out; - aLimitMode:Integer from Standard); - - LimitMode(me) - returns Integer from Standard; - - -- - -- Protected methods - -- - BuildResult(me:out; - theType: ShapeEnum from TopAbs) - ---Purpose: Build the resulting shapes of type theType - is redefined protected; - - PostTreat(me:out) - ---Purpose: Provides post-tratment actions - is redefined protected; - - -- ===================================================== - -- - -- Debug methods - -- - AddToolCompound (me:out; - theShape: Shape from TopoDS); - ---Purpose: Adds Tool arguments of the operation as - -- shapes of upper level of container shape theShape - -- ===================================================== - -fields - myTools : ListOfShape from TopTools is protected; - myMapTools : MapOfShape from TopTools is protected; - myLimit : ShapeEnum from TopAbs is protected; - myLimitMode : Integer from Standard is protected; - -end Splitter; - diff --git a/src/GEOMAlgo/GEOMAlgo_Splitter.cxx b/src/GEOMAlgo/GEOMAlgo_Splitter.cxx index d4db73266..7411dce89 100755 --- a/src/GEOMAlgo/GEOMAlgo_Splitter.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Splitter.cxx @@ -23,7 +23,7 @@ // File: GEOMAlgo_Splitter.cxx // Author: Peter KURNEV // -#include +#include #include diff --git a/src/GEOMAlgo/GEOMAlgo_Splitter.hxx b/src/GEOMAlgo/GEOMAlgo_Splitter.hxx index 8d3fe560a..469080fe6 100644 --- a/src/GEOMAlgo/GEOMAlgo_Splitter.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Splitter.hxx @@ -19,128 +19,79 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - +// File: GEOMAlgo_Splitter.hxx +// +// Author: Peter KURNEV +// #ifndef _GEOMAlgo_Splitter_HeaderFile #define _GEOMAlgo_Splitter_HeaderFile -#ifndef _TopTools_ListOfShape_HeaderFile +#include +#include #include -#endif -#ifndef _TopTools_MapOfShape_HeaderFile #include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _GEOMAlgo_Builder_HeaderFile #include -#endif -class TopoDS_Shape; -class TopTools_ListOfShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif +#include //! Implementation of Gluing Operation Algorithm (GA)
-class GEOMAlgo_Splitter : public GEOMAlgo_Builder { - -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 - // - -//! Empty constructor
-Standard_EXPORT GEOMAlgo_Splitter(); -Standard_EXPORT virtual ~GEOMAlgo_Splitter(); - -//! Clears internal fields and arguments
-Standard_EXPORT virtual void Clear() ; - -//! Adds Tool argument theShape of the operation
-Standard_EXPORT virtual void AddTool(const TopoDS_Shape& theShape) ; - -//! Returns the arguments of the operation
-Standard_EXPORT const TopTools_ListOfShape& Tools() const; - - -Standard_EXPORT void SetLimit(const TopAbs_ShapeEnum aLimit) ; - - -Standard_EXPORT TopAbs_ShapeEnum Limit() const; - - -Standard_EXPORT void SetLimitMode(const Standard_Integer aLimitMode) ; - - -Standard_EXPORT Standard_Integer LimitMode() const; - -//! Adds Tool arguments of the operation as
-//! shapes of upper level of container shape theShape
-//! =====================================================
-Standard_EXPORT void AddToolCompound(const TopoDS_Shape& theShape) ; - - - - - -protected: - - // Methods PROTECTED - // - -//! Build the resulting shapes of type theType
-Standard_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType) ; - -//! Provides post-tratment actions
-Standard_EXPORT virtual void PostTreat() ; - - - // Fields PROTECTED - // -TopTools_ListOfShape myTools; -TopTools_MapOfShape myMapTools; -TopAbs_ShapeEnum myLimit; -Standard_Integer myLimitMode; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - +//======================================================================= +//function : GEOMAlgo_Splitter +//purpose : +//======================================================================= +class GEOMAlgo_Splitter : public GEOMAlgo_Builder +{ + public: + + //! Empty constructor
+ Standard_EXPORT + GEOMAlgo_Splitter(); + + Standard_EXPORT + virtual ~GEOMAlgo_Splitter(); + + //! Clears internal fields and arguments
+ Standard_EXPORT + virtual void Clear() ; + + //! Adds Tool argument theShape of the operation
+ Standard_EXPORT + virtual void AddTool(const TopoDS_Shape& theShape) ; + + //! Returns the arguments of the operation
+ Standard_EXPORT + const TopTools_ListOfShape& Tools() const; + + Standard_EXPORT + void SetLimit(const TopAbs_ShapeEnum aLimit) ; + + Standard_EXPORT + TopAbs_ShapeEnum Limit() const; + + Standard_EXPORT + void SetLimitMode(const Standard_Integer aLimitMode) ; + + Standard_EXPORT + Standard_Integer LimitMode() const; + //! Adds Tool arguments of the operation as
+ //! shapes of upper level of container shape theShape
+ //! =====================================================
+ Standard_EXPORT + void AddToolCompound(const TopoDS_Shape& theShape) ; + + protected: + //! Build the resulting shapes of type theType
+ Standard_EXPORT + virtual void BuildResult(const TopAbs_ShapeEnum theType) ; + //! Provides post-tratment actions
+ Standard_EXPORT + virtual void PostTreat() ; + + + TopTools_ListOfShape myTools; + TopTools_MapOfShape myMapTools; + TopAbs_ShapeEnum myLimit; + Standard_Integer myLimitMode; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Splitter.ixx b/src/GEOMAlgo/GEOMAlgo_Splitter.ixx deleted file mode 100644 index 040713310..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Splitter.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_Splitter.jxx b/src/GEOMAlgo/GEOMAlgo_Splitter.jxx deleted file mode 100644 index 909f327cf..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Splitter.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_Splitter_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_State.hxx b/src/GEOMAlgo/GEOMAlgo_State.hxx index 65204c1ff..423d494b2 100644 --- a/src/GEOMAlgo/GEOMAlgo_State.hxx +++ b/src/GEOMAlgo/GEOMAlgo_State.hxx @@ -20,21 +20,19 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef _GEOMAlgo_State_HeaderFile #define _GEOMAlgo_State_HeaderFile - - -enum GEOMAlgo_State { - GEOMAlgo_ST_UNKNOWN, -GEOMAlgo_ST_IN, -GEOMAlgo_ST_OUT, -GEOMAlgo_ST_ON, -GEOMAlgo_ST_ONIN, -GEOMAlgo_ST_ONOUT, -GEOMAlgo_ST_INOUT +enum GEOMAlgo_State { + GEOMAlgo_ST_UNKNOWN, + GEOMAlgo_ST_IN, + GEOMAlgo_ST_OUT, + GEOMAlgo_ST_ON, + GEOMAlgo_ST_ONIN, + GEOMAlgo_ST_ONOUT, + GEOMAlgo_ST_INOUT }; - #ifndef _Standard_PrimitiveTypes_HeaderFile #include #endif diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.cdl b/src/GEOMAlgo/GEOMAlgo_StateCollector.cdl deleted file mode 100644 index eeebd834e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_StateCollector.cdl +++ /dev/null @@ -1,50 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_StateCollector.cdl --- Created: Thu Mar 10 09:39:25 2005 --- Author: Peter KURNEV --- -class StateCollector from GEOMAlgo - - ---Purpose: - -uses - State from TopAbs - ---raises - -is - Create - returns StateCollector from GEOMAlgo; - - AppendState(me:out; - aSt:State from TopAbs) - returns Boolean from Standard; - - State(me) - returns State from TopAbs; - -fields - myCounter:Integer from Standard[3]; - -end StateCollector; diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.cxx b/src/GEOMAlgo/GEOMAlgo_StateCollector.cxx index 78e58e3e7..5e593541f 100644 --- a/src/GEOMAlgo/GEOMAlgo_StateCollector.cxx +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.cxx @@ -25,13 +25,13 @@ // Author: Peter KURNEV // // -#include +#include //======================================================================= //function : GEOMAlgo_StateCollector -//purpose : +//purpose : //======================================================================= -GEOMAlgo_StateCollector::GEOMAlgo_StateCollector() +GEOMAlgo_StateCollector::GEOMAlgo_StateCollector() { myCounter[0]=0; myCounter[1]=0; @@ -39,9 +39,9 @@ GEOMAlgo_StateCollector::GEOMAlgo_StateCollector() } //======================================================================= //function : AppendState -//purpose : +//purpose : //======================================================================= -Standard_Boolean GEOMAlgo_StateCollector::AppendState(const TopAbs_State aSt) +Standard_Boolean GEOMAlgo_StateCollector::AppendState(const TopAbs_State aSt) { Standard_Boolean bIsToBreak; // @@ -51,7 +51,7 @@ Standard_Boolean GEOMAlgo_StateCollector::AppendState(const TopAbs_State aSt) break; case TopAbs_OUT: ++myCounter[1]; - break; + break; case TopAbs_ON: ++myCounter[2]; break; @@ -64,9 +64,9 @@ Standard_Boolean GEOMAlgo_StateCollector::AppendState(const TopAbs_State aSt) } //======================================================================= //function : State -//purpose : +//purpose : //======================================================================= -TopAbs_State GEOMAlgo_StateCollector::State()const +TopAbs_State GEOMAlgo_StateCollector::State()const { TopAbs_State aSt; // diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.hxx b/src/GEOMAlgo/GEOMAlgo_StateCollector.hxx index da598fa45..5ac5a96cf 100644 --- a/src/GEOMAlgo/GEOMAlgo_StateCollector.hxx +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.hxx @@ -20,89 +20,37 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_StateCollector.hxx +// Created: Thu Mar 10 09:42:11 2005 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_StateCollector_HeaderFile #define _GEOMAlgo_StateCollector_HeaderFile -#ifndef _Standard_Integer_HeaderFile +#include +#include #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _TopAbs_State_HeaderFile #include -#endif - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_StateCollector { - -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 - // - - -Standard_EXPORT GEOMAlgo_StateCollector(); - - -Standard_EXPORT Standard_Boolean AppendState(const TopAbs_State aSt) ; - -Standard_EXPORT TopAbs_State State() const; +//======================================================================= +// class : GEOMAlgo_StateCollector +//purpose : +//======================================================================= +class GEOMAlgo_StateCollector +{ + public: + Standard_EXPORT + GEOMAlgo_StateCollector(); + Standard_EXPORT + Standard_Boolean AppendState(const TopAbs_State aSt) ; + Standard_EXPORT + TopAbs_State State() const; - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Integer myCounter[3]; - - + protected: + Standard_Integer myCounter[3]; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.ixx b/src/GEOMAlgo/GEOMAlgo_StateCollector.ixx deleted file mode 100644 index 051a5c362..000000000 --- a/src/GEOMAlgo/GEOMAlgo_StateCollector.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.jxx b/src/GEOMAlgo/GEOMAlgo_StateCollector.jxx deleted file mode 100644 index 3aaaa8dde..000000000 --- a/src/GEOMAlgo/GEOMAlgo_StateCollector.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_StateCollector_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl deleted file mode 100644 index 5c2f745ad..000000000 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cdl +++ /dev/null @@ -1,97 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_SurfaceTools.cdl --- Created: Thu Jan 27 11:03:49 2005 --- Author: Peter KURNEV --- -class SurfaceTools from GEOMAlgo - - ---Purpose: - -uses - Pnt from gp, - Pln from gp, - Cylinder from gp, - Sphere from gp, - Surface from Geom, - Surface from GeomAdaptor, - State from TopAbs, - State from GEOMAlgo - ---raises - -is - - - IsAnalytic(myclass; - aS:Surface from Geom) - returns Boolean from Standard; - - IsCoaxial(myclass; - aP1 : Pnt from gp; - aP2 : Pnt from gp; - aCyl : Cylinder from gp; - aTol : Real from Standard) - returns Boolean from Standard; - - IsConformState(myclass; - aST1:State from TopAbs; - aST2:State from GEOMAlgo) - returns Boolean from Standard; - - GetState(myclass; - aP:Pnt from gp; - aS:Surface from GeomAdaptor; - aTol:Real from Standard; - aSt:out State from TopAbs) - returns Integer from Standard; - - GetState(myclass; - aP:Pnt from gp; - aS:Surface from Geom; - aTol:Real from Standard; - aSt:out State from TopAbs) - returns Integer from Standard; - - Distance(myclass; - aP:Pnt from gp; - aPln:Pln from gp) - returns Real from Standard; - - Distance(myclass; - aP:Pnt from gp; - aCyl:Cylinder from gp) - returns Real from Standard; - - Distance(myclass; - aP:Pnt from gp; - aSph:Sphere from gp) - returns Real from Standard; - - ReverseState(myclass; - aSt: State from TopAbs) - returns State from TopAbs; - ---fields - -end SurfaceTools; diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx index 56b70d5e5..f9d0f036b 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx @@ -25,7 +25,7 @@ // Author: Peter KURNEV // // -#include +#include #include @@ -45,7 +45,7 @@ //======================================================================= //function : GetState -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP, const GeomAdaptor_Surface& aGAS, @@ -69,19 +69,19 @@ aR=0.; aDp=GEOMAlgo_SurfaceTools::Distance(aP, aPln); break; - - case GeomAbs_Cylinder: + + case GeomAbs_Cylinder: aCyl=aGAS.Cylinder(); aR=aCyl.Radius(); aDp=GEOMAlgo_SurfaceTools::Distance(aP, aCyl); - break; + break; - case GeomAbs_Sphere: + case GeomAbs_Sphere: aSph=aGAS.Sphere(); aR=aSph.Radius(); aDp=GEOMAlgo_SurfaceTools::Distance(aP, aSph); break; - + default: iErr=1; // unprocessed surface type break; @@ -101,7 +101,7 @@ } //======================================================================= //function : GetState -//purpose : +//purpose : //======================================================================= Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP, const Handle(Geom_Surface)& aSurf, @@ -120,7 +120,7 @@ } //======================================================================= //function : ReverseState -//purpose : +//purpose : //======================================================================= TopAbs_State GEOMAlgo_SurfaceTools::ReverseState(const TopAbs_State aState) { @@ -141,9 +141,9 @@ } //======================================================================= //function : Distance -//purpose : +//purpose : //======================================================================= -Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, +Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, const gp_Sphere& aSph) { Standard_Real aD; @@ -155,9 +155,9 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, } //======================================================================= //function : Distance -//purpose : +//purpose : //======================================================================= -Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, +Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, const gp_Cylinder& aCyl) { Standard_Real aD; @@ -170,9 +170,9 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, } //======================================================================= //function : Distance -//purpose : +//purpose : //======================================================================= -Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, +Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, const gp_Pln& aPL) { Standard_Real aD; @@ -188,7 +188,7 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, } //======================================================================= //function : IsCoaxial -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_SurfaceTools::IsCoaxial(const gp_Pnt& aP1, const gp_Pnt& aP2, @@ -213,7 +213,7 @@ Standard_Boolean GEOMAlgo_SurfaceTools::IsCoaxial(const gp_Pnt& aP1, } //======================================================================= //function : IsAnalytic -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_SurfaceTools::IsAnalytic(const Handle(Geom_Surface)& aSurf) { @@ -223,14 +223,14 @@ Standard_Boolean GEOMAlgo_SurfaceTools::IsAnalytic(const Handle(Geom_Surface)& a // aGAS.Load(aSurf); aType=aGAS.GetType(); - bRet=(aType==GeomAbs_Plane || + bRet=(aType==GeomAbs_Plane || aType==GeomAbs_Cylinder || aType==GeomAbs_Sphere); return bRet; } //======================================================================= //function : IsConformState -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_SurfaceTools::IsConformState(const TopAbs_State aST1, const GEOMAlgo_State aST2) diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx index d405d91df..565a95172 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx @@ -20,121 +20,75 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_SurfaceTools.hxx +// Created: Thu Jan 27 11:05:16 2005 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_SurfaceTools_HeaderFile #define _GEOMAlgo_SurfaceTools_HeaderFile -#ifndef _Standard_Boolean_HeaderFile +#include +#include #include -#endif -#ifndef _Handle_Geom_Surface_HeaderFile #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif -#ifndef _TopAbs_State_HeaderFile #include -#endif -#ifndef _GEOMAlgo_State_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -class Geom_Surface; -class gp_Pnt; -class gp_Cylinder; -class GeomAdaptor_Surface; -class gp_Pln; -class gp_Sphere; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_SurfaceTools { - -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 - // - - -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) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - +#include +#include +#include +#include +#include +#include + + +//======================================================================= +//function : GEOMAlgo_SurfaceTools +//purpose : +//======================================================================= +class GEOMAlgo_SurfaceTools +{ + 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) ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx deleted file mode 100644 index 44c08deae..000000000 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx deleted file mode 100644 index 515bbc9db..000000000 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.jxx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Geom_Surface_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _gp_Cylinder_HeaderFile -#include -#endif -#ifndef _GeomAdaptor_Surface_HeaderFile -#include -#endif -#ifndef _gp_Pln_HeaderFile -#include -#endif -#ifndef _gp_Sphere_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_SurfaceTools_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.cdl b/src/GEOMAlgo/GEOMAlgo_Tools.cdl deleted file mode 100644 index a765e56bd..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Tools.cdl +++ /dev/null @@ -1,124 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_Tools.cdl --- Created: Mon Dec 6 11:26:02 2004 --- Author: Peter KURNEV - -class Tools from GEOMAlgo - - ---Purpose: - -uses - Pnt from gp, - Surface from Geom, - ShapeEnum from TopAbs, - Edge from TopoDS, - Face from TopoDS, - Shape from TopoDS, - ListOfShape from TopTools, - IndexedDataMapOfShapeListOfShape from TopTools, - Context from IntTools, - IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo --qft - ---raises - -is - IsCompositeShape(myclass; - aS :Shape from TopoDS) - returns Boolean from Standard; - - RefineSDShapes(myclass; - aMSD:out IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo; --qft - aTol:Real from Standard; - aCtx: Context from IntTools) - returns Integer from Standard; - - FindSDShapes(myclass; - aLE :ListOfShape from TopTools; - aTol:Real from Standard; - aMEE:out IndexedDataMapOfShapeListOfShape from TopTools; - aCtx: Context from IntTools) - returns Integer from Standard; - - FindSDShapes(myclass; - aE1 :Shape from TopoDS; - aLE :ListOfShape from TopTools; - aTol :Real from Standard; - aLESD :out ListOfShape from TopTools; - aCtx : Context from IntTools) - returns Integer from Standard; - - ProjectPointOnShape(myclass; - aP1: Pnt from gp; - aS :Shape from TopoDS; - aP2:out Pnt from gp; - aCtx : Context from IntTools) - returns Boolean from Standard; - - PointOnShape(myclass; - aS :Shape from TopoDS; - aP3D:out Pnt from gp); - - PointOnEdge(myclass; - aE :Edge from TopoDS; - aP3D:out Pnt from gp); - - PointOnEdge(myclass; - aE :Edge from TopoDS; - aT :Real from Standard; - aP3D:out Pnt from gp); - - PointOnFace(myclass; - aF :Face from TopoDS; - aP3D:out Pnt from gp); - - PointOnFace(myclass; - aF :Face from TopoDS; - aU :Real from Standard; - aV :Real from Standard; - aP3D:out Pnt from gp); - - RefinePCurveForEdgeOnFace (myclass; - aE : Edge from TopoDS; - aF : Face from TopoDS; - aU1 : Real from Standard; - aU2 : Real from Standard); - - IsUPeriodic(myclass; - aS:Surface from Geom) - returns Boolean from Standard; - - CorrectWires(myclass; - aS :Shape from TopoDS) - returns Boolean from Standard; - - BuildPCurveForEdgeOnFace (myclass; - aE : Edge from TopoDS; - aEold: Edge from TopoDS; - aF : Face from TopoDS; - aCtx : Context from IntTools) - returns Integer from Standard; - ---fields - -end Tools; diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.cxx b/src/GEOMAlgo/GEOMAlgo_Tools.cxx index 5b5a23e96..8ae8a8e8f 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools.cxx @@ -24,12 +24,7 @@ // Created: Mon Dec 6 11:35:29 2004 // Author: Peter KURNEV -#include - -#include -#include - -#include +#include #include #include @@ -66,6 +61,9 @@ #include #include +#include +#include + static void GetCount(const TopoDS_Shape& aS, Standard_Integer& iCnt); @@ -118,13 +116,9 @@ void GetCount(const TopoDS_Shape& aS, //function : RefineSDShapes //purpose : //======================================================================= -Standard_Integer GEOMAlgo_Tools::RefineSDShapes (GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE, - const Standard_Real aTol, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx) -#else - IntTools_Context& aCtx) -#endif + Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE, + const Standard_Real aTol, + const Handle(IntTools_Context)& aCtx) { Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd; TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd; @@ -184,14 +178,10 @@ Standard_Integer GEOMAlgo_Tools::RefineSDShapes (GEOMAlgo_IndexedDataMapOfPassKe //function : FindSDShapes //purpose : //======================================================================= -Standard_Integer GEOMAlgo_Tools::FindSDShapes (const TopTools_ListOfShape& aLE, - const Standard_Real aTol, - TopTools_IndexedDataMapOfShapeListOfShape& aMEE, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx) -#else - IntTools_Context& aCtx) -#endif +Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopTools_ListOfShape& aLE, + const Standard_Real aTol, + TopTools_IndexedDataMapOfShapeListOfShape& aMEE, + const Handle(IntTools_Context)& aCtx) { Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr; TopTools_ListOfShape aLESD; @@ -264,11 +254,7 @@ Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopoDS_Shape& aE1, const TopTools_ListOfShape& aLE, const Standard_Real aTol, TopTools_ListOfShape& aLESD, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx) -#else - IntTools_Context& aCtx) -#endif { Standard_Boolean bIsDone; Standard_Real aTol2, aD2; @@ -306,11 +292,7 @@ Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopoDS_Shape& aE1, Standard_Boolean GEOMAlgo_Tools::ProjectPointOnShape(const gp_Pnt& aP1, const TopoDS_Shape& aS, gp_Pnt& aP2, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx) -#else - IntTools_Context& aCtx) -#endif { Standard_Boolean bIsDone = Standard_False; Standard_Real aT2; @@ -332,11 +314,7 @@ Standard_Boolean GEOMAlgo_Tools::ProjectPointOnShape(const gp_Pnt& aP1, if (aC3D.IsNull()) { return Standard_True; } -#if OCC_VERSION_LARGE > 0x06050200 bIsDone = aCtx->ProjectPointOnEdge(aP1, aE2, aT2); -#else - bIsDone = aCtx.ProjectPointOnEdge(aP1, aE2, aT2); -#endif } if (!bIsDone) { return bIsDone; @@ -349,11 +327,7 @@ Standard_Boolean GEOMAlgo_Tools::ProjectPointOnShape(const gp_Pnt& aP1, case TopAbs_FACE: { const TopoDS_Face& aF2 = TopoDS::Face(aS); -#if OCC_VERSION_LARGE > 0x06050200 GeomAPI_ProjectPointOnSurf& aProj = aCtx->ProjPS(aF2); -#else - GeomAPI_ProjectPointOnSurf& aProj = aCtx.ProjPS(aF2); -#endif // aProj.Perform(aP1); bIsDone = aProj.IsDone(); @@ -515,11 +489,7 @@ Standard_Integer GEOMAlgo_Tools::BuildPCurveForEdgeOnFace(const TopoDS_Edge& aEold, const TopoDS_Edge& aEnew, const TopoDS_Face& aF, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx) -#else - IntTools_Context& aCtx) -#endif { Standard_Boolean bIsClosed, bUClosed, bHasOld; Standard_Integer iRet, aNbPoints; @@ -584,11 +554,7 @@ Standard_Integer aS=BRep_Tool::Surface(aF); aS->D0(aUS1, aVS1, aP); // -#if OCC_VERSION_LARGE > 0x06050200 GeomAPI_ProjectPointOnCurve& aProjPC=aCtx->ProjPC(aEnew); -#else - GeomAPI_ProjectPointOnCurve& aProjPC=aCtx.ProjPC(aEnew); -#endif // aProjPC.Perform(aP); aNbPoints=aProjPC.NbPoints(); diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.hxx b/src/GEOMAlgo/GEOMAlgo_Tools.hxx index e4fefabac..d4345eec7 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools.hxx @@ -20,135 +20,102 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_Tools.hxx +// Created: Mon Dec 6 11:35:29 2004 +// Author: Peter KURNEV + #ifndef _GEOMAlgo_Tools_HeaderFile #define _GEOMAlgo_Tools_HeaderFile -#include - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif - -#if OCC_VERSION_LARGE > 0x06050200 -#ifndef _Handle_IntTools_Context_HeaderFile #include -#endif -#endif - -#ifndef _Handle_Geom_Surface_HeaderFile #include -#endif - -class TopoDS_Shape; -class GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape; -class IntTools_Context; -class TopTools_ListOfShape; -class TopTools_IndexedDataMapOfShapeListOfShape; -class gp_Pnt; -class TopoDS_Edge; -class TopoDS_Face; -class Geom_Surface; - - -class GEOMAlgo_Tools { - +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//class : GEOMAlgo_Tools +//purpose : +//======================================================================= +class GEOMAlgo_Tools + { 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); - } - - Standard_EXPORT static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS); - - Standard_EXPORT static Standard_Integer RefineSDShapes (GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD, - const Standard_Real aTol, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx); -#else - IntTools_Context& aCtx); -#endif - - Standard_EXPORT static Standard_Integer FindSDShapes (const TopTools_ListOfShape& aLE, - const Standard_Real aTol, - TopTools_IndexedDataMapOfShapeListOfShape& aMEE, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx); -#else - IntTools_Context& aCtx); -#endif - - Standard_EXPORT static Standard_Integer FindSDShapes (const TopoDS_Shape& aE1, - const TopTools_ListOfShape& aLE, - const Standard_Real aTol, - TopTools_ListOfShape& aLESD, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx); -#else - IntTools_Context& aCtx); -#endif - - Standard_EXPORT static Standard_Boolean ProjectPointOnShape (const gp_Pnt& aP1, - const TopoDS_Shape& aS, - gp_Pnt& aP2, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx); -#else - IntTools_Context& aCtx); -#endif - - 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); - - Standard_EXPORT static Standard_Boolean CorrectWires(const TopoDS_Shape& aS); - - Standard_EXPORT static Standard_Integer BuildPCurveForEdgeOnFace (const TopoDS_Edge& aE, - const TopoDS_Edge& aEold, - const TopoDS_Face& aF, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx); -#else - IntTools_Context& aCtx); -#endif - -protected: - -private: + Standard_EXPORT + static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS) ; + + Standard_EXPORT + static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD, + const Standard_Real aTol, + const Handle(IntTools_Context)& aCtx) ; + + Standard_EXPORT + static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE, + const Standard_Real aTol, + TopTools_IndexedDataMapOfShapeListOfShape& aMEE, + const Handle(IntTools_Context)& aCtx) ; + + Standard_EXPORT + static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1, + const TopTools_ListOfShape& aLE, + const Standard_Real aTol, + TopTools_ListOfShape& aLESD, + const Handle(IntTools_Context)& aCtx) ; + + Standard_EXPORT + static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1, + const TopoDS_Shape& aS,gp_Pnt& aP2, + const Handle(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) ; + + Standard_EXPORT + static Standard_Boolean CorrectWires(const TopoDS_Shape& aS) ; + + Standard_EXPORT + static Standard_Integer BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE, + const TopoDS_Edge& aEold, + const TopoDS_Face& aF, + const Handle(IntTools_Context)& aCtx) ; }; - -// other Inline functions and methods (like "C++: function call" methods) - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.ixx b/src/GEOMAlgo/GEOMAlgo_Tools.ixx deleted file mode 100644 index 28ebd1573..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Tools.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.jxx b/src/GEOMAlgo/GEOMAlgo_Tools.jxx deleted file mode 100644 index f3305ace9..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Tools.jxx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile -#include -#endif -#ifndef _IntTools_Context_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _TopoDS_Edge_HeaderFile -#include -#endif -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _Geom_Surface_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_Tools_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_Tools3D.cdl b/src/GEOMAlgo/GEOMAlgo_Tools3D.cdl deleted file mode 100755 index 269b7bf5d..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Tools3D.cdl +++ /dev/null @@ -1,254 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_Tools3D.cdl --- Created: --- Author: Peter KURNEV --- -class Tools3D from GEOMAlgo - - ---Purpose: Auxiliary tools for Algorithms - -uses - State from TopAbs, - ShapeEnum from TopAbs, - Pnt from gp, - Pnt2d from gp, - Shape from TopoDS, - Vertex from TopoDS, - Edge from TopoDS, - Face from TopoDS, - Solid from TopoDS, - - ListOfShape from TopTools, - IndexedMapOfShape from TopTools, - IndexedDataMapOfShapeListOfShape from TopTools, - Context from IntTools, - ListOfCoupleOfShape from NMTTools - ---raises - -is - IsSplitToReverse(myclass; - theSplit : Shape from TopoDS; - theShape : Shape from TopoDS; - theContext: Context from IntTools) - ---Purpose: Returns True if the shape theSplit has opposite - -- direction than theShape - -- theContext - cashed geometrical tools - returns Boolean from Standard; - - IsSplitToReverse(myclass; - theSplit : Face from TopoDS; - theShape : Face from TopoDS; - theContext: Context from IntTools) - ---Purpose: Returns True if normal direction of the face - -- theShape is not the same as for the face - -- theSplit - -- theContext - cashed geometrical tools - returns Boolean from Standard; - - IsSplitToReverse(myclass; - theEdge : Edge from TopoDS; - theSplit : Edge from TopoDS; - theContext: Context from IntTools) - ---Purpose: Returns True if tangent direction of the edge - -- theEdge is not the same as for the edge - -- theSplit - -- theContext - cashed geometrical tools - returns Boolean from Standard; - - Sense (myclass; - theF1: Face from TopoDS; - theF2: Face from TopoDS) - ---Purpose: For the couple of faces theF1, theF2 - -- computes sense value - -- Returns 0 if the faces are not sensible - -- Returns 1 if the faces have same sense - -- Returns 2 if the faces have opposite sense - returns Integer from Standard; - - CopyFace(myclass; - theF1: Face from TopoDS; - theF2:out Face from TopoDS); - ---Purpose: Makes new face theF2 from surface and wires - -- of the face theF1 - - MakeContainer(myclass; - theType:ShapeEnum from TopAbs; - theShape:out Shape from TopoDS); - ---Purpose: Makes empty shape theShape of the type theType - - - MakeConnexityBlock(myclass; - theLS :ListOfShape from TopTools; - theMapAvoid:IndexedMapOfShape from TopTools; - theLSCB :out ListOfShape from TopTools); - ---Purpose: For the list of faces theLS build block - -- theLSCB in terms of connexity by edges - -- theMapAvoid - set of edges to avoid for - -- the treatment - - ComputeStateByOnePoint(myclass; - theShape :Shape from TopoDS; - theSolid :Solid from TopoDS; - theTol :Real from Standard; - theContext: Context from IntTools) - ---Purpose: Computes the 3-D state of the shape theShape - -- toward solid theSolid. - -- theTol - value of precision of computation - -- theContext- cahed geometrical tools - -- Returns 3-D state. - returns State from TopAbs; - - ComputeState(myclass; - thePoint :Pnt from gp; - theSolid :Solid from TopoDS; - theTol :Real from Standard; - theContext: Context from IntTools) - ---Purpose: Computes the 3-D state of the point thePoint - -- toward solid theSolid. - -- theTol - value of precision of computation - -- theContext- cahed geometrical tools - -- Returns 3-D state. - returns State from TopAbs; - - ComputeState(myclass; - theVertex:Vertex from TopoDS; - theSolid :Solid from TopoDS; - theTol :Real from Standard; - theContext: Context from IntTools) - ---Purpose: Computes the 3-D state of the vertex theVertex - -- toward solid theSolid. - -- theTol - value of precision of computation - -- theContext- cahed geometrical tools - -- Returns 3-D state. - returns State from TopAbs; - - ComputeState(myclass; - theEdge :Edge from TopoDS; - theSolid :Solid from TopoDS; - theTol :Real from Standard; - theContext: Context from IntTools) - ---Purpose: Computes the 3-D state of the edge theEdge - -- toward solid theSolid. - -- theTol - value of precision of computation - -- theContext- cahed geometrical tools - -- Returns 3-D state. - returns State from TopAbs; - - ComputeState(myclass; - theFace :Face from TopoDS; - theSolid :Solid from TopoDS; - theTol :Real from Standard; - theBounds:IndexedMapOfShape from TopTools; - theContext: Context from IntTools) - ---Purpose: Computes the 3-D state of the face theFace - -- toward solid theSolid. - -- theTol - value of precision of computation - -- theBounds - set of edges of theFace to avoid - -- theContext- cahed geometrical tools - -- Returns 3-D state. - returns State from TopAbs; - - IsInternalFace(myclass; - theFace :Face from TopoDS; - theEdge :Edge from TopoDS; - theFace1 :Face from TopoDS; - theFace2 :Face from TopoDS; - theContext: Context from IntTools) - ---Purpose: Returns True if the face theFace is inside of the - -- couple of faces theFace1, theFace2. - -- The faces theFace, theFace1, theFace2 must - -- share the edge theEdge - returns Boolean from Standard; - - IsInternalFace(myclass; - theFace :Face from TopoDS; - theEdge :Edge from TopoDS; - theLF :ListOfShape from TopTools; - theContext: Context from IntTools) - ---Purpose: Returns True if the face theFace is inside of the - -- appropriate couple of faces (from the set theLF) . - -- The faces of the set theLF and theFace must - -- share the edge theEdge - returns Boolean from Standard; - - IsInternalFace(myclass; - theFace :Face from TopoDS; - theSolid :Solid from TopoDS; - theMEF :IndexedDataMapOfShapeListOfShape from TopTools; - theTol :Real from Standard; - theContext: Context from IntTools) - ---Purpose: Returns True if the face theFace is inside the - -- solid theSolid. - -- theMEF - Map Edge/Faces for theSolid - -- theTol - value of precision of computation - -- theContext- cahed geometrical tools - returns Boolean from Standard; - - - GetFaceOff(myclass; - theEdge :Edge from TopoDS; - theFace :Face from TopoDS; - theLCEF :ListOfCoupleOfShape from NMTTools; - theFaceOff :out Face from TopoDS); - ---Purpose: For the face theFace and its edge theEdge - -- finds the face suitable to produce shell. - -- theLCEF - set of faces to search. All faces - -- from theLCEF must share edge theEdge - - GetEdgeOnFace (myclass; - theEdge :Edge from TopoDS; - theFace :Face from TopoDS; - theEdgeOnF :out Edge from TopoDS) - ---Purpose: For the face theFace gets the edge theEdgeOnF - -- that is the same as theEdge - -- Returns True if such edge exists - -- Returns False if there is no such edge - returns Boolean from Standard; - - GetEdgeOff (myclass; - theEdge :Edge from TopoDS; - theFace :Face from TopoDS; - theEdgeOff :out Edge from TopoDS) - ---Purpose: Returns True if the face theFace contains - -- the edge theEdge but with opposite orientation. - -- If the method returns True theEdgeOff is the - -- edge founded - returns Boolean from Standard; - ---modified by NIZNHY-PKV Tue Nov 22 12:18:30 2011f - PntInFace(myclass; - theF : Face from TopoDS; - theP :out Pnt from gp; - theP2D:out Pnt2d from gp) - ---Purpose: Computes a point inside the face . - -- - 2D representation of - -- on the surface of - -- Returns 0 in case of success. - returns Integer from Standard; ---modified by NIZNHY-PKV Tue Nov 22 12:18:36 2011t - ---fields -end Tools3D; - diff --git a/src/GEOMAlgo/GEOMAlgo_Tools3D.cxx b/src/GEOMAlgo/GEOMAlgo_Tools3D.cxx index 71652ea0d..81d7b75e1 100755 --- a/src/GEOMAlgo/GEOMAlgo_Tools3D.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools3D.cxx @@ -19,17 +19,11 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - // File : GEOMAlgo_Tools3D.cxx +// Created : // Author : Peter KURNEV -#include - -#include -#include -#include - -#include +#include #include @@ -50,7 +44,6 @@ #include #include - #include #include @@ -76,7 +69,7 @@ #include #include - +// #include #include #include @@ -94,15 +87,19 @@ #include #include +#include +#include +#include #include #include #include #include #include - +// #include +// static Standard_Boolean FindFacePairs (const TopoDS_Edge& , const TopTools_ListOfShape& , @@ -120,11 +117,7 @@ static Standard_Real aT, gp_Pnt& aPF, gp_Dir& aDNF, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx); -#else - IntTools_Context& aCtx); -#endif //======================================================================= //function : IsInternalFace @@ -134,11 +127,7 @@ Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace, const TopoDS_Solid& theSolid, const TopTools_IndexedDataMapOfShapeListOfShape& theMEF, const Standard_Real theTol, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theContext) -#else - IntTools_Context& theContext) -#endif { Standard_Boolean bRet; Standard_Integer aNbF; @@ -204,11 +193,7 @@ Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace, Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace, const TopoDS_Edge& theEdge, const TopTools_ListOfShape& theLF, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theContext) -#else - IntTools_Context& theContext) -#endif { Standard_Boolean bRet; Standard_Boolean aNbF; @@ -251,11 +236,7 @@ Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace, const TopoDS_Edge& theEdge, const TopoDS_Face& theFace1, const TopoDS_Face& theFace2, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theContext) -#else - IntTools_Context& theContext) -#endif { Standard_Boolean bRet; Standard_Real aT1, aT2, aT, aDt2D, aDt2Dx; @@ -445,11 +426,7 @@ Standard_Boolean GEOMAlgo_Tools3D::GetEdgeOff (const TopoDS_Edge& theE1, const TopoDS_Solid& theRef, const Standard_Real theTol, const TopTools_IndexedMapOfShape& theBounds, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theCtx) -#else - IntTools_Context& theCtx) -#endif { TopAbs_State aState; TopExp_Explorer aExp; @@ -490,11 +467,7 @@ Standard_Boolean GEOMAlgo_Tools3D::GetEdgeOff (const TopoDS_Edge& theE1, TopAbs_State GEOMAlgo_Tools3D::ComputeStateByOnePoint(const TopoDS_Shape& theS, const TopoDS_Solid& theRef, const Standard_Real theTol, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theCtx) -#else - IntTools_Context& theCtx) -#endif { TopAbs_State aState; TopAbs_ShapeEnum aType; @@ -518,11 +491,7 @@ Standard_Boolean GEOMAlgo_Tools3D::GetEdgeOff (const TopoDS_Edge& theE1, TopAbs_State GEOMAlgo_Tools3D::ComputeState(const TopoDS_Vertex& theV, const TopoDS_Solid& theRef, const Standard_Real theTol, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theCtx) -#else - IntTools_Context& theCtx) -#endif { TopAbs_State aState; gp_Pnt aP3D; @@ -538,11 +507,7 @@ Standard_Boolean GEOMAlgo_Tools3D::GetEdgeOff (const TopoDS_Edge& theE1, TopAbs_State GEOMAlgo_Tools3D::ComputeState(const TopoDS_Edge& theE, const TopoDS_Solid& theRef, const Standard_Real theTol, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theCtx) -#else - IntTools_Context& theCtx) -#endif { Standard_Real aT1, aT2, aT = 0.; TopAbs_State aState; @@ -592,19 +557,11 @@ Standard_Boolean GEOMAlgo_Tools3D::GetEdgeOff (const TopoDS_Edge& theE1, TopAbs_State GEOMAlgo_Tools3D::ComputeState(const gp_Pnt& theP, const TopoDS_Solid& theRef, const Standard_Real theTol, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theCtx) -#else - IntTools_Context& theCtx) -#endif { TopAbs_State aState; // -#if OCC_VERSION_LARGE > 0x06050200 BRepClass3d_SolidClassifier& aSC=theCtx->SolidClassifier(theRef); -#else - BRepClass3d_SolidClassifier& aSC=theCtx.SolidClassifier(theRef); -#endif aSC.Perform(theP, theTol); // aState=aSC.State(); @@ -615,13 +572,9 @@ Standard_Boolean GEOMAlgo_Tools3D::GetEdgeOff (const TopoDS_Edge& theE1, // function: IsSplitToReverse // purpose: //======================================================================= -Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse (const TopoDS_Shape& theSp, + Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Shape& theSp, const TopoDS_Shape& theSr, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theCtx) -#else - IntTools_Context& theCtx) -#endif { Standard_Boolean bRet; TopAbs_ShapeEnum aType; @@ -653,13 +606,9 @@ Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse (const TopoDS_Shape& theSp, //function :IsSplitToReverse //purpose : //======================================================================= -Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse (const TopoDS_Face& theFSp, + Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Face& theFSp, const TopoDS_Face& theFSr, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theContext) -#else - IntTools_Context& theContext) -#endif { Standard_Boolean bRet, bFound, bInFace; Standard_Real aT1, aT2, aT, aU, aV, aScPr; @@ -728,11 +677,7 @@ Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse (const TopoDS_Face& theFSp, //modified by NIZNHY-PKV Tue Nov 22 10:50:37 2011t // // Parts of theContext.ComputeVS(..) -#if OCC_VERSION_LARGE > 0x06050200 GeomAPI_ProjectPointOnSurf& aProjector=theContext->ProjPS(theFSr); -#else - GeomAPI_ProjectPointOnSurf& aProjector=theContext.ProjPS(theFSr); -#endif aProjector.Perform(aPFSp); if (!aProjector.IsDone()) { return bRet; @@ -740,11 +685,7 @@ Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse (const TopoDS_Face& theFSp, // aProjector.LowerDistanceParameters(aU, aV); gp_Pnt2d aP2D(aU, aV); -#if OCC_VERSION_LARGE > 0x06050200 bInFace=theContext->IsPointInFace (theFSr, aP2D); -#else - bInFace=theContext.IsPointInFace (theFSr, aP2D); -#endif if (!bInFace) { return bRet; } @@ -766,13 +707,9 @@ Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse (const TopoDS_Face& theFSp, //function :IsSplitToReverse //purpose : //======================================================================= -Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse (const TopoDS_Edge& theSplit, + Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Edge& theSplit, const TopoDS_Edge& theEdge, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& theContext) -#else - IntTools_Context& theContext) -#endif { Standard_Boolean bRet, aFlag, bIsDegenerated; Standard_Real aTE, aTS, aScPr, aTa, aTb, aT1, aT2; @@ -804,11 +741,7 @@ Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse (const TopoDS_Edge& theSplit aFlag=BOPTools_Tools2D::EdgeTangent(theSplit, aTS, aVS); gp_Dir aDTS(aVS); // -#if OCC_VERSION_LARGE > 0x06050200 aFlag=theContext->ProjectPointOnEdge(aP, theEdge, aTE); -#else - aFlag=theContext.ProjectPointOnEdge(aP, theEdge, aTE); -#endif aFlag=BOPTools_Tools2D::EdgeTangent(theEdge, aTE, aVE); gp_Dir aDTE(aVE); // @@ -1153,11 +1086,7 @@ void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx, Standard_Real aT, gp_Pnt& aPF, gp_Dir& aDNF, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx) -#else - IntTools_Context& aCtx) -#endif { Standard_Boolean bReverse; Standard_Real aT1, aT2, dT, aU, aV; @@ -1237,11 +1166,7 @@ void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx, aDNF.Reverse(); } // -#if OCC_VERSION_LARGE > 0x06050200 GeomAPI_ProjectPointOnSurf& aProjector=aCtx->ProjPS(aF); -#else - GeomAPI_ProjectPointOnSurf& aProjector=aCtx.ProjPS(aF); -#endif // aProjector.Perform(aPFx); if(aProjector.IsDone()) { @@ -1257,9 +1182,9 @@ void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx, //modified by NIZNHY-PKV Tue Nov 22 10:36:59 2011f //======================================================================= //function : PntInFace -//purpose : +//purpose : //======================================================================= -Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF, +Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF, gp_Pnt& theP, gp_Pnt2d& theP2D) { @@ -1285,8 +1210,8 @@ Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF, aTolTangfIntr=1.e-10; // Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr); - Geom2dHatch_Hatcher aHatcher(aIntr, - aTolHatch2D, aTolHatch3D, + Geom2dHatch_Hatcher aHatcher(aIntr, + aTolHatch2D, aTolHatch3D, Standard_True, Standard_False); // iErr=0; @@ -1294,7 +1219,7 @@ Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF, // aFF=aF; aFF.Orientation (TopAbs_FORWARD); - // + // aS=BRep_Tool::Surface(aFF); BRepTools::UVBounds(aFF, aUMin, aUMax, aVMin, aVMax); // diff --git a/src/GEOMAlgo/GEOMAlgo_Tools3D.hxx b/src/GEOMAlgo/GEOMAlgo_Tools3D.hxx index e23fa4917..d23d73b60 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools3D.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools3D.hxx @@ -19,184 +19,140 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File : GEOMAlgo_Tools3D.hxx +// Created : +// Author : Peter KURNEV #ifndef _GEOMAlgo_Tools3D_HeaderFile #define _GEOMAlgo_Tools3D_HeaderFile -#include - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#if OCC_VERSION_LARGE > 0x06050200 -#ifndef _Handle_IntTools_Context_HeaderFile #include -#endif -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile #include -#endif -#ifndef _TopAbs_State_HeaderFile #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif - -class TopoDS_Shape; -class IntTools_Context; -class TopoDS_Face; -class TopoDS_Edge; -class TopTools_ListOfShape; -class TopTools_IndexedMapOfShape; -class TopoDS_Solid; -class gp_Pnt; -class gp_Pnt2d; -class TopoDS_Vertex; -class TopTools_IndexedDataMapOfShapeListOfShape; -class NMTTools_ListOfCoupleOfShape; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //! Auxiliary tools for Algorithms
+//======================================================================= +//class : GEOMAlgo_Tools3D +//purpose : +//======================================================================= class GEOMAlgo_Tools3D { - -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); - } - + public: //! Returns True if the shape theSplit has opposite
//! direction than theShape
//! theContext - cashed geometrical tools
- Standard_EXPORT static Standard_Boolean IsSplitToReverse (const TopoDS_Shape& theSplit, - const TopoDS_Shape& theShape, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& theContext); -#else - IntTools_Context& theContext); -#endif + Standard_EXPORT + static Standard_Boolean IsSplitToReverse(const TopoDS_Shape& theSplit, + const TopoDS_Shape& theShape, + const Handle(IntTools_Context)& theContext) ; //! Returns True if normal direction of the face
//! theShape is not the same as for the face
//! theSplit
//! theContext - cashed geometrical tools
- Standard_EXPORT static Standard_Boolean IsSplitToReverse (const TopoDS_Face& theSplit, - const TopoDS_Face& theShape, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& theContext); -#else - IntTools_Context& theContext); -#endif + Standard_EXPORT + static Standard_Boolean IsSplitToReverse(const TopoDS_Face& theSplit, + const TopoDS_Face& theShape, + const Handle(IntTools_Context)& theContext) ; //! Returns True if tangent direction of the edge
//! theEdge is not the same as for the edge
//! theSplit
//! theContext - cashed geometrical tools
- Standard_EXPORT static Standard_Boolean IsSplitToReverse (const TopoDS_Edge& theEdge, - const TopoDS_Edge& theSplit, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& theContext); -#else - IntTools_Context& theContext); -#endif + Standard_EXPORT + static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theEdge, + const TopoDS_Edge& theSplit, + const Handle(IntTools_Context)& theContext) ; //! For the couple of faces theF1, theF2
//! computes sense value
//! Returns 0 if the faces are not sensible
//! Returns 1 if the faces have same sense
//! Returns 2 if the faces have opposite sense
- Standard_EXPORT static Standard_Integer Sense (const TopoDS_Face& theF1, const TopoDS_Face& theF2); + Standard_EXPORT + static Standard_Integer Sense(const TopoDS_Face& theF1, + const TopoDS_Face& theF2) ; //! Makes new face theF2 from surface and wires
//! of the face theF1
- Standard_EXPORT static void CopyFace (const TopoDS_Face& theF1, TopoDS_Face& theF2); + Standard_EXPORT + static void CopyFace(const TopoDS_Face& theF1, + TopoDS_Face& theF2) ; //! Makes empty shape theShape of the type theType
- Standard_EXPORT static void MakeContainer (const TopAbs_ShapeEnum theType, TopoDS_Shape& theShape); + Standard_EXPORT + static void MakeContainer(const TopAbs_ShapeEnum theType, + TopoDS_Shape& theShape) ; //! For the list of faces theLS build block
//! theLSCB in terms of connexity by edges
//! theMapAvoid - set of edges to avoid for
//! the treatment
- Standard_EXPORT static void MakeConnexityBlock (const TopTools_ListOfShape& theLS, - const TopTools_IndexedMapOfShape& theMapAvoid, - TopTools_ListOfShape& theLSCB); + Standard_EXPORT + static void MakeConnexityBlock(const TopTools_ListOfShape& theLS, + const TopTools_IndexedMapOfShape& theMapAvoid, + TopTools_ListOfShape& theLSCB) ; //! Computes the 3-D state of the shape theShape
//! toward solid theSolid.
//! theTol - value of precision of computation
//! theContext- cahed geometrical tools
//! Returns 3-D state.
- Standard_EXPORT static TopAbs_State ComputeStateByOnePoint (const TopoDS_Shape& theShape, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& theContext); -#else - IntTools_Context& theContext); -#endif + Standard_EXPORT + static TopAbs_State ComputeStateByOnePoint(const TopoDS_Shape& theShape, + const TopoDS_Solid& theSolid, + const Standard_Real theTol, + const Handle(IntTools_Context)& theContext) ; //! Computes the 3-D state of the point thePoint
//! toward solid theSolid.
//! theTol - value of precision of computation
//! theContext- cahed geometrical tools
//! Returns 3-D state.
- Standard_EXPORT static TopAbs_State ComputeState (const gp_Pnt& thePoint, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& theContext); -#else - IntTools_Context& theContext); -#endif + Standard_EXPORT + static TopAbs_State ComputeState(const gp_Pnt& thePoint, + const TopoDS_Solid& theSolid, + const Standard_Real theTol, + const Handle(IntTools_Context)& theContext) ; //! Computes the 3-D state of the vertex theVertex
//! toward solid theSolid.
//! theTol - value of precision of computation
//! theContext- cahed geometrical tools
//! Returns 3-D state.
- Standard_EXPORT static TopAbs_State ComputeState (const TopoDS_Vertex& theVertex, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& theContext); -#else - IntTools_Context& theContext); -#endif + Standard_EXPORT + static TopAbs_State ComputeState(const TopoDS_Vertex& theVertex, + const TopoDS_Solid& theSolid, + const Standard_Real theTol, + const Handle(IntTools_Context)& theContext) ; //! Computes the 3-D state of the edge theEdge
//! toward solid theSolid.
//! theTol - value of precision of computation
//! theContext- cahed geometrical tools
//! Returns 3-D state.
- Standard_EXPORT static TopAbs_State ComputeState (const TopoDS_Edge& theEdge, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& theContext); -#else - IntTools_Context& theContext); -#endif + Standard_EXPORT + static TopAbs_State ComputeState(const TopoDS_Edge& theEdge, + const TopoDS_Solid& theSolid, + const Standard_Real theTol, + const Handle(IntTools_Context)& theContext) ; //! Computes the 3-D state of the face theFace
//! toward solid theSolid.
@@ -204,97 +160,81 @@ public: //! theBounds - set of edges of theFace to avoid
//! theContext- cahed geometrical tools
//! Returns 3-D state.
- Standard_EXPORT static TopAbs_State ComputeState (const TopoDS_Face& theFace, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, - const TopTools_IndexedMapOfShape& theBounds, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& theContext); -#else - IntTools_Context& theContext); -#endif + Standard_EXPORT + static TopAbs_State ComputeState(const TopoDS_Face& theFace, + const TopoDS_Solid& theSolid, + const Standard_Real theTol, + const TopTools_IndexedMapOfShape& theBounds, + const Handle(IntTools_Context)& theContext) ; //! Returns True if the face theFace is inside of the
//! couple of faces theFace1, theFace2.
//! The faces theFace, theFace1, theFace2 must
//! share the edge theEdge
- Standard_EXPORT static Standard_Boolean IsInternalFace (const TopoDS_Face& theFace, - const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace1, - const TopoDS_Face& theFace2, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& theContext); -#else - IntTools_Context& theContext); -#endif + Standard_EXPORT + static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace, + const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace1, + const TopoDS_Face& theFace2, + const Handle(IntTools_Context)& theContext) ; //! Returns True if the face theFace is inside of the
//! appropriate couple of faces (from the set theLF) .
//! The faces of the set theLF and theFace must
//! share the edge theEdge
- Standard_EXPORT static Standard_Boolean IsInternalFace (const TopoDS_Face& theFace, - const TopoDS_Edge& theEdge, - const TopTools_ListOfShape& theLF, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& theContext); -#else - IntTools_Context& theContext); -#endif + Standard_EXPORT + static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace, + const TopoDS_Edge& theEdge, + const TopTools_ListOfShape& theLF, + const Handle(IntTools_Context)& theContext) ; //! Returns True if the face theFace is inside the
//! solid theSolid.
//! theMEF - Map Edge/Faces for theSolid
//! theTol - value of precision of computation
//! theContext- cahed geometrical tools
- Standard_EXPORT static Standard_Boolean IsInternalFace (const TopoDS_Face& theFace, - const TopoDS_Solid& theSolid, - const TopTools_IndexedDataMapOfShapeListOfShape& theMEF, - const Standard_Real theTol, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& theContext); -#else - IntTools_Context& theContext); -#endif + Standard_EXPORT + static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace, + const TopoDS_Solid& theSolid, + const TopTools_IndexedDataMapOfShapeListOfShape& theMEF, + const Standard_Real theTol, + const Handle(IntTools_Context)& theContext) ; //! For the face theFace and its edge theEdge
//! finds the face suitable to produce shell.
//! theLCEF - set of faces to search. All faces
//! from theLCEF must share edge theEdge
- Standard_EXPORT static void GetFaceOff (const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace, - const NMTTools_ListOfCoupleOfShape& theLCEF, - TopoDS_Face& theFaceOff); + Standard_EXPORT + static void GetFaceOff(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + const NMTTools_ListOfCoupleOfShape& theLCEF, + TopoDS_Face& theFaceOff) ; //! For the face theFace gets the edge theEdgeOnF
//! that is the same as theEdge
//! Returns True if such edge exists
//! Returns False if there is no such edge
- Standard_EXPORT static Standard_Boolean GetEdgeOnFace (const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace, - TopoDS_Edge& theEdgeOnF); + Standard_EXPORT + static Standard_Boolean GetEdgeOnFace(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + TopoDS_Edge& theEdgeOnF) ; //! Returns True if the face theFace contains
//! the edge theEdge but with opposite orientation.
//! If the method returns True theEdgeOff is the
//! edge founded
- Standard_EXPORT static Standard_Boolean GetEdgeOff (const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace, - TopoDS_Edge& theEdgeOff); + Standard_EXPORT + static Standard_Boolean GetEdgeOff(const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace, + TopoDS_Edge& theEdgeOff) ; //! Computes a point inside the face .
//! - 2D representation of
//! on the surface of
//! Returns 0 in case of success.
- Standard_EXPORT static Standard_Integer PntInFace (const TopoDS_Face& theF, - gp_Pnt& theP, - gp_Pnt2d& theP2D); - -protected: - -private: - + Standard_EXPORT + static Standard_Integer PntInFace(const TopoDS_Face& theF, + gp_Pnt& theP, + gp_Pnt2d& theP2D) ; }; - -// other Inline functions and methods (like "C++: function call" methods) - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_Tools3D.ixx b/src/GEOMAlgo/GEOMAlgo_Tools3D.ixx deleted file mode 100644 index 636d0174d..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Tools3D.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_Tools3D.jxx b/src/GEOMAlgo/GEOMAlgo_Tools3D.jxx deleted file mode 100644 index dacd81f3c..000000000 --- a/src/GEOMAlgo/GEOMAlgo_Tools3D.jxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _IntTools_Context_HeaderFile -#include -#endif -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _TopoDS_Edge_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TopTools_IndexedMapOfShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Solid_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _TopoDS_Vertex_HeaderFile -#include -#endif -#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile -#include -#endif -#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile -#include -#endif -#ifndef _gp_Pnt2d_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_Tools3D_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_Tools_1.cxx b/src/GEOMAlgo/GEOMAlgo_Tools_1.cxx index 9223836db..56caf6c91 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools_1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools_1.cxx @@ -21,7 +21,7 @@ // Author: Peter KURNEV // -#include +#include // #include @@ -57,8 +57,8 @@ #include #include -static - inline Standard_Boolean IsEqual(const TopoDS_Shape& aS1, +static + inline Standard_Boolean IsEqual(const TopoDS_Shape& aS1, const TopoDS_Shape& aS2) { return TopTools_ShapeMapHasher::IsEqual(aS1, aS2); } @@ -69,7 +69,7 @@ static //======================================================================= //function : CorrectWires -//purpose : +//purpose : //======================================================================= Standard_Boolean GEOMAlgo_Tools::CorrectWires(const TopoDS_Shape& aShape) { @@ -79,7 +79,7 @@ static TopTools_MapOfShape aMF; GeomAdaptor_Surface aGAS; GeomAbs_SurfaceType aTS; - TopLoc_Location aLoc; + TopLoc_Location aLoc; // bRet=Standard_False; // @@ -105,7 +105,7 @@ static } //======================================================================= //class: GEOMAlgo_InfoEdge -//purpose : +//purpose : //======================================================================= class GEOMAlgo_InfoEdge { public: @@ -118,7 +118,7 @@ class GEOMAlgo_InfoEdge { ~GEOMAlgo_InfoEdge(){ }; // - void Init(const TopoDS_Edge& aE, + void Init(const TopoDS_Edge& aE, const TopoDS_Face& aF); // void SetTolInt(const Standard_Real aTolInt) { @@ -158,14 +158,14 @@ class GEOMAlgo_InfoEdge { Handle(Geom_Curve) myC3D; }; // -typedef NCollection_DataMap GEOMAlgo_DataMapOfShapeInfoEdge; -typedef GEOMAlgo_DataMapOfShapeInfoEdge::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeInfoEdge; +typedef NCollection_DataMap GEOMAlgo_DataMapOfShapeInfoEdge; +typedef GEOMAlgo_DataMapOfShapeInfoEdge::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeInfoEdge; //======================================================================= //function : Init -//purpose : +//purpose : //======================================================================= - void GEOMAlgo_InfoEdge::Init(const TopoDS_Edge& aE, + void GEOMAlgo_InfoEdge::Init(const TopoDS_Edge& aE, const TopoDS_Face& aF) { Standard_Real aT1, aT2, aT1x, aT2x; @@ -198,7 +198,7 @@ typedef GEOMAlgo_DataMapOfShapeInfoEdge::Iterator GEOMAlgo_DataMapIteratorOfData } //======================================================================= //function : CorrectWire -//purpose : +//purpose : //======================================================================= Standard_Boolean CorrectWire(const TopoDS_Wire& aW, const TopoDS_Face& aF) @@ -218,7 +218,7 @@ Standard_Boolean CorrectWire(const TopoDS_Wire& aW, aItW.Initialize(aW); for (; aItW.More(); aItW.Next()) { const TopoDS_Edge& aE=*((TopoDS_Edge*)&aItW.Value()); - + aItE.Initialize(aE); for (aNbV=0; aItE.More(); aItE.Next(), ++aNbV) { } @@ -275,17 +275,17 @@ Standard_Boolean CorrectWire(const TopoDS_Wire& aW, aTolV=BRep_Tool::Tolerance(aV); // const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aLE.First()); - const GEOMAlgo_InfoEdge& aIE1=aDMEIE.Find(aE1); + const GEOMAlgo_InfoEdge& aIE1=aDMEIE.Find(aE1); const Geom2dAdaptor_Curve& aGAC1=aIE1.Adaptor(); const IntRes2d_Domain& aDomain1=aIE1.Domain(); // - const TopoDS_Edge& aE2=*((TopoDS_Edge*)&aLE.Last()); + const TopoDS_Edge& aE2=*((TopoDS_Edge*)&aLE.Last()); const GEOMAlgo_InfoEdge& aIE2=aDMEIE.Find(aE2); const Geom2dAdaptor_Curve& aGAC2=aIE2.Adaptor(); const IntRes2d_Domain& aDomain2=aIE2.Domain(); // aInter.Perform(aGAC1, aDomain1,aGAC2, aDomain2, aTolInt, aTolInt); - if(!aInter.IsDone()) { + if(!aInter.IsDone()) { continue; } // @@ -314,7 +314,7 @@ Standard_Boolean CorrectWire(const TopoDS_Wire& aW, aS->D0(aP2D1.X(), aP2D1.Y(), aP3D1); } // - const Handle(Geom_Curve)& aC3D2=aIE2.Curve(); + const Handle(Geom_Curve)& aC3D2=aIE2.Curve(); if (!aC3D2.IsNull()) { aP3D2=aC3D2->Value(aIP_ParamOnSecond); } diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl deleted file mode 100644 index 4cdb1cc56..000000000 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cdl +++ /dev/null @@ -1,51 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_VertexSolid.cdl --- Created: Wed Jan 12 16:34:53 2005 --- Author: Peter KURNEV --- -class VertexSolid from GEOMAlgo - inherits ShapeSolid from GEOMAlgo - - ---Purpose: - ---uses ---raises - -is - Create - returns VertexSolid from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_VertexSolid();" - - Perform (me:out) - is redefined; - - Prepare(me:out) - is redefined protected; - - BuildResult (me:out) - is redefined protected; - ---fields - -end VertexSolid; diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx index c182ece74..76d087cff 100644 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx @@ -23,10 +23,9 @@ // File: GEOMAlgo_VertexSolid.cxx // Created: Wed Jan 12 16:36:40 2005 // Author: Peter KURNEV - -#include - -#include +// +// +#include #include @@ -61,7 +60,7 @@ //======================================================================= //function : GEOMAlgo_VertexSolid -//purpose : +//purpose : //======================================================================= GEOMAlgo_VertexSolid::GEOMAlgo_VertexSolid() : @@ -70,14 +69,14 @@ GEOMAlgo_VertexSolid::GEOMAlgo_VertexSolid() } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_VertexSolid::~GEOMAlgo_VertexSolid() { } //======================================================================= // function: Perform -// purpose: +// purpose: //======================================================================= void GEOMAlgo_VertexSolid::Perform() { @@ -105,7 +104,7 @@ void GEOMAlgo_VertexSolid::Perform() myRank=(aNbF) ? 2 : 1; // bIsNewFiller=myDSFiller->IsNewFiller(); - + if (bIsNewFiller) { Prepare(); myDSFiller->SetNewFiller(!bIsNewFiller); @@ -116,10 +115,10 @@ void GEOMAlgo_VertexSolid::Perform() catch (Standard_Failure) { myErrorStatus = 12; } -} +} //======================================================================= // function: Prepare -// purpose: +// purpose: //======================================================================= void GEOMAlgo_VertexSolid::Prepare() { @@ -136,23 +135,15 @@ void GEOMAlgo_VertexSolid::Prepare() BOPTools_InterferencePool* pIP=(BOPTools_InterferencePool*) &aIP; BOPTools_CArray1OfVVInterference& aVVs=pIP->VVInterferences(); const BOPTools_PaveFiller& aPF=myDSFiller->PaveFiller(); - BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)&aPF; -#if OCC_VERSION_LARGE > 0x06050200 + BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)&aPF; const Handle(IntTools_Context)& aCtx=pPF->Context(); -#else - IntTools_Context& aCtx=pPF->ChangeContext(); -#endif // const TopoDS_Shape& aObj=aDS.Object(); const TopoDS_Shape& aTool=aDS.Tool(); // const TopoDS_Solid& aSolid=(myRank==1) ? TopoDS::Solid(aTool) : TopoDS::Solid(aObj); // -#if OCC_VERSION_LARGE > 0x06050200 BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid); -#else - BRepClass3d_SolidClassifier& aSC=aCtx.SolidClassifier(aSolid); -#endif // iBeg=1; iEnd=aDS.NumberOfShapesOfTheObject(); @@ -186,12 +177,12 @@ void GEOMAlgo_VertexSolid::Prepare() pDS->SetState (n2, BooleanOperations_ON); iFound=1; break; - } + } } if (iFound) { continue; } - // + // aP3D=BRep_Tool::Pnt(aV); aTol=1.E-7; aSC.Perform(aP3D, aTol); @@ -206,7 +197,7 @@ void GEOMAlgo_VertexSolid::Prepare() } //======================================================================= // function: BuildResult -// purpose: +// purpose: //======================================================================= void GEOMAlgo_VertexSolid::BuildResult() { diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx index 826693fdc..5e10a6060 100644 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx @@ -20,86 +20,39 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_VertexSolid.hxx +// Created: Wed Jan 12 16:36:40 2005 +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_VertexSolid_HeaderFile #define _GEOMAlgo_VertexSolid_HeaderFile -#ifndef _GEOMAlgo_ShapeSolid_HeaderFile -#include -#endif - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - - -class GEOMAlgo_VertexSolid : public GEOMAlgo_ShapeSolid { - -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 - // - - -Standard_EXPORT GEOMAlgo_VertexSolid(); -Standard_EXPORT virtual ~GEOMAlgo_VertexSolid(); - - -Standard_EXPORT virtual void Perform() ; - +#include +//======================================================================= +//class : GEOMAlgo_VertexSolid +//purpose : +//======================================================================= +class GEOMAlgo_VertexSolid : public GEOMAlgo_ShapeSolid +{ + public: + Standard_EXPORT + GEOMAlgo_VertexSolid(); + Standard_EXPORT + virtual ~GEOMAlgo_VertexSolid(); + Standard_EXPORT + virtual void Perform() ; protected: + Standard_EXPORT + virtual void Prepare() ; - // Methods PROTECTED - // - - -Standard_EXPORT virtual void Prepare() ; - - -Standard_EXPORT virtual void BuildResult() ; - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + Standard_EXPORT + virtual void BuildResult() ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx deleted file mode 100644 index c2faedfc5..000000000 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx deleted file mode 100644 index a93527759..000000000 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_VertexSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_WESCorrector.cdl b/src/GEOMAlgo/GEOMAlgo_WESCorrector.cdl deleted file mode 100755 index 34d4c0c63..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WESCorrector.cdl +++ /dev/null @@ -1,84 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_WESCorrector.cdl --- Created: --- Author: Peter KURNEV --- -class WESCorrector from GEOMAlgo - inherits Algo from GEOMAlgo - - ---Purpose: - --- The algorithm to change the Wire Edges Set (WES) contents. - -- The NewWES will contain only wires instead of wires and edges. - -- -uses - WireEdgeSet from GEOMAlgo, - PWireEdgeSet from GEOMAlgo, - ListOfConnexityBlock from BOP - -is - Create - returns WESCorrector from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_WESCorrector();" - ---Purpose: - -- Empty constructor; - -- - - SetWES (me:out; - aWES: WireEdgeSet from GEOMAlgo); - ---Purpose: - -- Modifier - -- - Perform (me:out) - is redefined; - ---Purpose: - --- Performs the algorithm that consists of two steps - --- 1. Make conexity blocks ( DoConnexityBlocks() ) - --- 2. Make corrections ( DoCorrections() ) - --- - - WES (me:out) - returns WireEdgeSet from GEOMAlgo; - ---C++: return & - ---Purpose: - --- Selector - --- - NewWES (me:out) - returns WireEdgeSet from GEOMAlgo; - ---C++: return & - ---Purpose: - --- Selector - --- - DoConnexityBlocks(me:out) - is protected; - - DoCorrections(me:out) - is protected; - -fields - - myWES : PWireEdgeSet from GEOMAlgo is protected; - myNewWES : WireEdgeSet from GEOMAlgo is protected; - myConnexityBlocks : ListOfConnexityBlock from BOP is protected; - -end WESCorrector; diff --git a/src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx b/src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx index 7a041087f..83fea18f7 100755 --- a/src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx +++ b/src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx @@ -23,7 +23,7 @@ // File: NMTAlgo_WESCorrector.cxx // Author: Peter KURNEV -#include +#include #include @@ -404,6 +404,7 @@ Standard_Boolean IsToScale(const TopoDS_Face& aF, Standard_Real& aScale) { Standard_Boolean bRet; + Standard_Real aV1, aV2, dV, aTr; GeomAbs_SurfaceType aType; BRepAdaptor_Surface aBAS; // @@ -413,8 +414,6 @@ Standard_Boolean IsToScale(const TopoDS_Face& aF, aBAS.Initialize(aF); aType=aBAS.GetType(); if (aType==GeomAbs_Cylinder) { - Standard_Real aV1, aV2, dV, dU, aTr, aC; - // aTr=1.e5; aV1=aBAS.FirstVParameter(); aV2=aBAS.LastVParameter(); @@ -425,16 +424,6 @@ Standard_Boolean IsToScale(const TopoDS_Face& aF, aScale=1./aTr; return bRet; } - //modified by NIZNHY-PKV Fri Mar 30 10:54:34 2012f - dU=M_PI; - aC=dV/dU; - aTr=25.; - if(aC>aTr){ - bRet=!bRet; - aScale=1./aC; - return bRet; - } - //modified by NIZNHY-PKV Fri Mar 30 10:54:35 2012t } return bRet; } diff --git a/src/GEOMAlgo/GEOMAlgo_WESCorrector.hxx b/src/GEOMAlgo/GEOMAlgo_WESCorrector.hxx index 3b1571bdf..8348935fc 100644 --- a/src/GEOMAlgo/GEOMAlgo_WESCorrector.hxx +++ b/src/GEOMAlgo/GEOMAlgo_WESCorrector.hxx @@ -1,3 +1,4 @@ + // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, @@ -19,119 +20,68 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - +// File: NMTAlgo_WESCorrector.hxx +// Created: +// Author: Peter KURNEV +// +// #ifndef _GEOMAlgo_WESCorrector_HeaderFile #define _GEOMAlgo_WESCorrector_HeaderFile -#ifndef _GEOMAlgo_PWireEdgeSet_HeaderFile +#include +#include #include -#endif -#ifndef _GEOMAlgo_WireEdgeSet_HeaderFile #include -#endif -#ifndef _BOP_ListOfConnexityBlock_HeaderFile #include -#endif -#ifndef _GEOMAlgo_Algo_HeaderFile #include -#endif -class GEOMAlgo_WireEdgeSet; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif //! The algorithm to change the Wire Edges Set (WES) contents.
//! The NewWES will contain only wires instead of wires and edges.
-class GEOMAlgo_WESCorrector : public GEOMAlgo_Algo { - -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 - // - - -//! Empty constructor;
-//!
-Standard_EXPORT GEOMAlgo_WESCorrector(); -Standard_EXPORT virtual ~GEOMAlgo_WESCorrector(); - - -//! Modifier
-Standard_EXPORT void SetWES(const GEOMAlgo_WireEdgeSet& aWES) ; - - -//! Performs the algorithm that consists of two steps
-//! 1. Make conexity blocks ( DoConnexityBlocks() )
-//! 2. Make corrections ( DoCorrections() )
-Standard_EXPORT virtual void Perform() ; - - -//! Selector
-Standard_EXPORT GEOMAlgo_WireEdgeSet& WES() ; - - -//! Selector
-Standard_EXPORT GEOMAlgo_WireEdgeSet& NewWES() ; - - - - +//======================================================================= +//class : GEOMAlgo_WESCorrector +//purpose : +//======================================================================= +class GEOMAlgo_WESCorrector : public GEOMAlgo_Algo +{ + public: + //! Empty constructor;
+ //!
+ Standard_EXPORT + GEOMAlgo_WESCorrector(); + + Standard_EXPORT + virtual ~GEOMAlgo_WESCorrector(); + + //! Modifier
+ Standard_EXPORT + void SetWES(const GEOMAlgo_WireEdgeSet& aWES) ; + + //! Performs the algorithm that consists of two steps
+ //! 1. Make conexity blocks ( DoConnexityBlocks() )
+ //! 2. Make corrections ( DoCorrections() )
+ Standard_EXPORT + virtual void Perform() ; + + //! Selector
+ Standard_EXPORT + GEOMAlgo_WireEdgeSet& WES() ; + + //! Selector
+ Standard_EXPORT + GEOMAlgo_WireEdgeSet& NewWES() ; protected: + Standard_EXPORT + void DoConnexityBlocks() ; - // Methods PROTECTED - // - - -Standard_EXPORT void DoConnexityBlocks() ; - - -Standard_EXPORT void DoCorrections() ; - - - // Fields PROTECTED - // -GEOMAlgo_PWireEdgeSet myWES; -GEOMAlgo_WireEdgeSet myNewWES; -BOP_ListOfConnexityBlock myConnexityBlocks; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT + void DoCorrections() ; + GEOMAlgo_PWireEdgeSet myWES; + GEOMAlgo_WireEdgeSet myNewWES; + BOP_ListOfConnexityBlock myConnexityBlocks; }; - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_WESCorrector.ixx b/src/GEOMAlgo/GEOMAlgo_WESCorrector.ixx deleted file mode 100644 index 2f98b1e8e..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WESCorrector.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_WESCorrector.jxx b/src/GEOMAlgo/GEOMAlgo_WESCorrector.jxx deleted file mode 100644 index 5c49eedb4..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WESCorrector.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_WireEdgeSet_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_WESCorrector_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_WESScaler.cdl b/src/GEOMAlgo/GEOMAlgo_WESScaler.cdl deleted file mode 100644 index a4576c072..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WESScaler.cdl +++ /dev/null @@ -1,121 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- This library is free software; you can redistribute it and/or --- modify it 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_WESScaler.cdl --- Created: --- Author: --- - - -class WESScaler from GEOMAlgo - inherits Algo from GEOMAlgo - - ---Purpose: - -uses - Face from TopoDS, - Shape from TopoDS, - ListOfShape from TopTools, - DataMapOfOrientedShapeShape from GEOMAlgo, - WireEdgeSet from GEOMAlgo, - PWireEdgeSet from GEOMAlgo - ---raises - -is - Create - ---Purpose: Empty constructor - returns WESScaler from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_WESScaler();" - - SetScale (me:out; - aWES: Real from Standard); - ---Purpose: - -- Modifier - - Scale(me) - returns Real from Standard; - ---Purpose: - -- Selector - - SetFace (me:out; - aF: Face from TopoDS); - - Face (me) - returns Face from TopoDS; - ---C++: return const & - - SetEdges (me:out; - aLE:ListOfShape from TopTools); - - Edges (me) - returns ListOfShape from TopTools; - ---C++: return const & - - Perform(me:out) - ---Purpose: Performs the algorithm - is redefined; - - FaceScaled (me) - returns Face from TopoDS; - ---C++: return const & - - EdgesScaled (me) - returns ListOfShape from TopTools; - ---C++: return const & - - Image(me; - aS:Shape from TopoDS) - returns Shape from TopoDS; - ---C++: return const & - ---Purpose: - - Origin(me; - aS:Shape from TopoDS) - returns Shape from TopoDS; - ---C++: return const & - - ---Purpose: - Images(me) - returns DataMapOfOrientedShapeShape from GEOMAlgo; - ---C++: return const & - ---Purpose: - --- Selector - - Origins(me) - returns DataMapOfOrientedShapeShape from GEOMAlgo; - ---C++: return const & - ---Purpose: - --- Selector - - CheckData(me:out) - ---Purpose: Performs the algorithm - is redefined protected; - -fields - myScale : Real from Standard is protected; - myFace : Face from TopoDS is protected; - - myEdges : ListOfShape from TopTools is protected; - myFaceScaled : Face from TopoDS is protected; - myEdgesScaled : ListOfShape from TopTools is protected; - myImages : DataMapOfOrientedShapeShape from GEOMAlgo is protected; - myOrigins : DataMapOfOrientedShapeShape from GEOMAlgo is protected; - myShapeTmp : Shape from TopoDS is protected; -end WESScaler; - diff --git a/src/GEOMAlgo/GEOMAlgo_WESScaler.cxx b/src/GEOMAlgo/GEOMAlgo_WESScaler.cxx index 5b3341a10..aea8c7fad 100644 --- a/src/GEOMAlgo/GEOMAlgo_WESScaler.cxx +++ b/src/GEOMAlgo/GEOMAlgo_WESScaler.cxx @@ -17,12 +17,12 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File: GEOMAlgo_WESScaler.cxx -// Created: -// Author: +// Created: +// Author: // -#include +#include #include #include @@ -39,10 +39,10 @@ //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= - GEOMAlgo_WESScaler::GEOMAlgo_WESScaler() + GEOMAlgo_WESScaler::GEOMAlgo_WESScaler() : GEOMAlgo_Algo() { @@ -50,14 +50,14 @@ } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= - GEOMAlgo_WESScaler::~GEOMAlgo_WESScaler() + GEOMAlgo_WESScaler::~GEOMAlgo_WESScaler() { } //======================================================================= // function: SetScale -// purpose: +// purpose: //======================================================================= void GEOMAlgo_WESScaler::SetScale (const Standard_Real aScale) { @@ -65,15 +65,15 @@ } //======================================================================= // function: Scale -// purpose: +// purpose: //======================================================================= - Standard_Real GEOMAlgo_WESScaler::Scale()const + Standard_Real GEOMAlgo_WESScaler::Scale()const { return myScale; } //======================================================================= // function: SetFace -// purpose: +// purpose: //======================================================================= void GEOMAlgo_WESScaler::SetFace(const TopoDS_Face& aF) { @@ -81,7 +81,7 @@ } //======================================================================= // function: Face -// purpose: +// purpose: //======================================================================= const TopoDS_Face& GEOMAlgo_WESScaler::Face()const { @@ -89,7 +89,7 @@ } //======================================================================= // function: SetEdges -// purpose: +// purpose: //======================================================================= void GEOMAlgo_WESScaler::SetEdges(const TopTools_ListOfShape& aLE) { @@ -97,7 +97,7 @@ } //======================================================================= // function: Edges -// purpose: +// purpose: //======================================================================= const TopTools_ListOfShape& GEOMAlgo_WESScaler::Edges()const { @@ -105,7 +105,7 @@ } //======================================================================= // function: FaceScaled -// purpose: +// purpose: //======================================================================= const TopoDS_Face& GEOMAlgo_WESScaler::FaceScaled()const { @@ -113,7 +113,7 @@ } //======================================================================= // function: EdgesScaled -// purpose: +// purpose: //======================================================================= const TopTools_ListOfShape& GEOMAlgo_WESScaler::EdgesScaled()const { @@ -121,7 +121,7 @@ } //======================================================================= // function: Image -// purpose: +// purpose: //======================================================================= const TopoDS_Shape& GEOMAlgo_WESScaler::Image (const TopoDS_Shape& aS) const { @@ -132,7 +132,7 @@ } //======================================================================= // function: Origin -// purpose: +// purpose: //======================================================================= const TopoDS_Shape& GEOMAlgo_WESScaler::Origin (const TopoDS_Shape& aS) const { @@ -143,7 +143,7 @@ } //======================================================================= // function: Images -// purpose: +// purpose: //======================================================================= const GEOMAlgo_DataMapOfOrientedShapeShape& GEOMAlgo_WESScaler::Images () const { @@ -151,7 +151,7 @@ } //======================================================================= // function: Origins -// purpose: +// purpose: //======================================================================= const GEOMAlgo_DataMapOfOrientedShapeShape& GEOMAlgo_WESScaler::Origins () const { @@ -159,7 +159,7 @@ } //======================================================================= // function: CheckData -// purpose: +// purpose: //======================================================================= void GEOMAlgo_WESScaler::CheckData() { @@ -179,7 +179,7 @@ } //======================================================================= // function: Perform -// purpose: +// purpose: //======================================================================= void GEOMAlgo_WESScaler::Perform() { @@ -235,7 +235,7 @@ // const TopoDS_Shape& aSR=aBT.Shape(); // - // Refined image face FR + // Refined image face FR aFR=aSR.EmptyCopied(); aItS.Initialize(aSR); for (i=0; aItS.More(); aItS.Next(),++i) { diff --git a/src/GEOMAlgo/GEOMAlgo_WESScaler.hxx b/src/GEOMAlgo/GEOMAlgo_WESScaler.hxx index 8b9df122f..bd1d1d5ee 100644 --- a/src/GEOMAlgo/GEOMAlgo_WESScaler.hxx +++ b/src/GEOMAlgo/GEOMAlgo_WESScaler.hxx @@ -16,151 +16,95 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_WESScaler.hxx +// Created: +// Author: +// #ifndef _GEOMAlgo_WESScaler_HeaderFile #define _GEOMAlgo_WESScaler_HeaderFile -#ifndef _Standard_Real_HeaderFile +#include +#include #include -#endif -#ifndef _TopoDS_Face_HeaderFile #include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile #include -#endif -#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile #include -#endif -#ifndef _TopoDS_Shape_HeaderFile #include -#endif -#ifndef _GEOMAlgo_Algo_HeaderFile #include -#endif -class TopoDS_Face; -class TopTools_ListOfShape; -class TopoDS_Shape; -class GEOMAlgo_DataMapOfOrientedShapeShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class GEOMAlgo_WESScaler : public GEOMAlgo_Algo { +//======================================================================= +//function : GEOMAlgo_WESScaler +//purpose : +//======================================================================= +class GEOMAlgo_WESScaler : public GEOMAlgo_Algo +{ public: + //! Empty constructor
+ Standard_EXPORT + GEOMAlgo_WESScaler(); - 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 - // - -//! Empty constructor
-Standard_EXPORT GEOMAlgo_WESScaler(); -Standard_EXPORT virtual ~GEOMAlgo_WESScaler(); - - -//! Modifier
-Standard_EXPORT void SetScale(const Standard_Real aWES) ; - - -//! Selector
-Standard_EXPORT Standard_Real Scale() const; - - -Standard_EXPORT void SetFace(const TopoDS_Face& aF) ; - + Standard_EXPORT + virtual ~GEOMAlgo_WESScaler(); -Standard_EXPORT const TopoDS_Face& Face() const; + //! Modifier
+ Standard_EXPORT + void SetScale(const Standard_Real aWES) ; + //! Selector
+ Standard_EXPORT + Standard_Real Scale() const; -Standard_EXPORT void SetEdges(const TopTools_ListOfShape& aLE) ; + Standard_EXPORT + void SetFace(const TopoDS_Face& aF) ; + Standard_EXPORT + const TopoDS_Face& Face() const; -Standard_EXPORT const TopTools_ListOfShape& Edges() const; + Standard_EXPORT + void SetEdges(const TopTools_ListOfShape& aLE) ; -//! Performs the algorithm
-Standard_EXPORT virtual void Perform() ; + Standard_EXPORT + const TopTools_ListOfShape& Edges() const; + //! Performs the algorithm
+ Standard_EXPORT + virtual void Perform() ; -Standard_EXPORT const TopoDS_Face& FaceScaled() const; + Standard_EXPORT + const TopoDS_Face& FaceScaled() const; + Standard_EXPORT + const TopTools_ListOfShape& EdgesScaled() const; -Standard_EXPORT const TopTools_ListOfShape& EdgesScaled() const; + Standard_EXPORT + const TopoDS_Shape& Image(const TopoDS_Shape& aS) const; + Standard_EXPORT + const TopoDS_Shape& Origin(const TopoDS_Shape& aS) const; -Standard_EXPORT const TopoDS_Shape& Image(const TopoDS_Shape& aS) const; + //! Selector
+ Standard_EXPORT + const GEOMAlgo_DataMapOfOrientedShapeShape& Images() const; + //! Selector
+ Standard_EXPORT + const GEOMAlgo_DataMapOfOrientedShapeShape& Origins() const; -Standard_EXPORT const TopoDS_Shape& Origin(const TopoDS_Shape& aS) const; + protected: - -//! Selector
-Standard_EXPORT const GEOMAlgo_DataMapOfOrientedShapeShape& Images() const; - - -//! Selector
-Standard_EXPORT const GEOMAlgo_DataMapOfOrientedShapeShape& Origins() const; - - - - - -protected: - - // Methods PROTECTED - // - -//! Performs the algorithm
-Standard_EXPORT virtual void CheckData() ; - - - // Fields PROTECTED - // -Standard_Real myScale; -TopoDS_Face myFace; -TopTools_ListOfShape myEdges; -TopoDS_Face myFaceScaled; -TopTools_ListOfShape myEdgesScaled; -GEOMAlgo_DataMapOfOrientedShapeShape myImages; -GEOMAlgo_DataMapOfOrientedShapeShape myOrigins; -TopoDS_Shape myShapeTmp; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + //! Performs the algorithm
+ Standard_EXPORT virtual void CheckData() ; + Standard_Real myScale; + TopoDS_Face myFace; + TopTools_ListOfShape myEdges; + TopoDS_Face myFaceScaled; + TopTools_ListOfShape myEdgesScaled; + GEOMAlgo_DataMapOfOrientedShapeShape myImages; + GEOMAlgo_DataMapOfOrientedShapeShape myOrigins; + TopoDS_Shape myShapeTmp; }; - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_WESScaler.ixx b/src/GEOMAlgo/GEOMAlgo_WESScaler.ixx deleted file mode 100644 index 61f0ad3b0..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WESScaler.ixx +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_WESScaler.jxx b/src/GEOMAlgo/GEOMAlgo_WESScaler.jxx deleted file mode 100644 index 068012de0..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WESScaler.jxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_WESScaler_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cdl b/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cdl deleted file mode 100755 index 289a18bb8..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cdl +++ /dev/null @@ -1,70 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_WireEdgeSet.cdl --- Created: --- Author: Peter KURNEV --- --- -class WireEdgeSet from GEOMAlgo - - ---Purpose: - -uses - Face from TopoDS, - Shape from TopoDS, - ListOfShape from TopTools ---raises - -is - Create - returns WireEdgeSet from GEOMAlgo; - - Clear(me:out); - - SetFace(me:out; - aF:Face from TopoDS); - - Face(me) - returns Face from TopoDS; - ---C++: return const & - - AddStartElement(me:out; - sS: Shape from TopoDS); - - StartElements(me) - returns ListOfShape from TopTools; - ---C++: return const & - - AddShape(me:out; - sS:Shape from TopoDS); - - Shapes(me) - returns ListOfShape from TopTools; - ---C++: return const & - -fields - myFace : Face from TopoDS is protected; - myStartShapes : ListOfShape from TopTools is protected; - myShapes : ListOfShape from TopTools is protected; - -end WireEdgeSet; diff --git a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx b/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx index 9e0a85433..5a39f0e10 100755 --- a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx +++ b/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx @@ -21,15 +21,15 @@ // // File: GEOMAlgo_WireEdgeSet.cxx -// Created: +// Created: // Author: Peter KURNEV // // -#include +#include //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= GEOMAlgo_WireEdgeSet::GEOMAlgo_WireEdgeSet() { @@ -38,7 +38,7 @@ //======================================================================= //function : Clear -//purpose : +//purpose : //======================================================================= void GEOMAlgo_WireEdgeSet::Clear() { @@ -47,7 +47,7 @@ } //======================================================================= //function : SetFace -//purpose : +//purpose : //======================================================================= void GEOMAlgo_WireEdgeSet::SetFace(const TopoDS_Face& aF) { @@ -55,15 +55,15 @@ } //======================================================================= //function : Face -//purpose : +//purpose : //======================================================================= - const TopoDS_Face& GEOMAlgo_WireEdgeSet::Face()const + const TopoDS_Face& GEOMAlgo_WireEdgeSet::Face()const { return myFace; } //======================================================================= //function : AddStartElement -//purpose : +//purpose : //======================================================================= void GEOMAlgo_WireEdgeSet::AddStartElement(const TopoDS_Shape& aE) { @@ -71,7 +71,7 @@ } //======================================================================= //function : StartElements -//purpose : +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_WireEdgeSet::StartElements()const { @@ -79,7 +79,7 @@ } //======================================================================= //function : AddShape -//purpose : +//purpose : //======================================================================= void GEOMAlgo_WireEdgeSet::AddShape(const TopoDS_Shape& aW) { @@ -87,7 +87,7 @@ } //======================================================================= //function : Shapes -//purpose : +//purpose : //======================================================================= const TopTools_ListOfShape& GEOMAlgo_WireEdgeSet::Shapes()const { diff --git a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.hxx b/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.hxx index 0432d6943..97708870e 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.hxx +++ b/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.hxx @@ -20,106 +20,54 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_WireEdgeSet.hxx +// Created: +// Author: Peter KURNEV +// +// + #ifndef _GEOMAlgo_WireEdgeSet_HeaderFile #define _GEOMAlgo_WireEdgeSet_HeaderFile -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -class TopoDS_Face; -class TopoDS_Shape; -class TopTools_ListOfShape; - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - +#include +#include +#include +//======================================================================= +//function : GEOMAlgo_WireEdgeSet +//purpose : +//======================================================================= class GEOMAlgo_WireEdgeSet { + public: + Standard_EXPORT + GEOMAlgo_WireEdgeSet(); -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 - // - - -Standard_EXPORT GEOMAlgo_WireEdgeSet(); - - -Standard_EXPORT void Clear() ; - - -Standard_EXPORT void SetFace(const TopoDS_Face& aF) ; - - -Standard_EXPORT const TopoDS_Face& Face() const; - + Standard_EXPORT + void Clear() ; -Standard_EXPORT void AddStartElement(const TopoDS_Shape& sS) ; + Standard_EXPORT + void SetFace(const TopoDS_Face& aF) ; + Standard_EXPORT + const TopoDS_Face& Face() const; -Standard_EXPORT const TopTools_ListOfShape& StartElements() const; - - -Standard_EXPORT void AddShape(const TopoDS_Shape& sS) ; - - -Standard_EXPORT const TopTools_ListOfShape& Shapes() const; - + Standard_EXPORT + void AddStartElement(const TopoDS_Shape& sS) ; + Standard_EXPORT + const TopTools_ListOfShape& StartElements() const; + Standard_EXPORT + void AddShape(const TopoDS_Shape& sS) ; + Standard_EXPORT + const TopTools_ListOfShape& Shapes() const; protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -TopoDS_Face myFace; -TopTools_ListOfShape myStartShapes; -TopTools_ListOfShape myShapes; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + TopoDS_Face myFace; + TopTools_ListOfShape myStartShapes; + TopTools_ListOfShape myShapes; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.ixx b/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.ixx deleted file mode 100644 index 8c24d13f5..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.jxx b/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.jxx deleted file mode 100644 index 8b65519d0..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.jxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_WireEdgeSet_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.cdl b/src/GEOMAlgo/GEOMAlgo_WireSolid.cdl deleted file mode 100644 index de7588f4f..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.cdl +++ /dev/null @@ -1,50 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_WireSolid.cdl --- Created: Wed Jan 12 10:17:00 2005 --- Author: Peter KURNEV --- -class WireSolid from GEOMAlgo - inherits ShapeSolid from GEOMAlgo - ---Purpose: - ---uses ---raises - -is - Create - returns WireSolid from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_WireSolid();" - - Perform (me:out) - is redefined; - - Prepare(me:out) - is redefined protected; - - BuildResult (me:out) - is redefined protected; - ---fields - -end WireSolid; diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx b/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx index 715fa5533..3acfda53c 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx @@ -25,7 +25,7 @@ // Author: Peter KURNEV // // -#include +#include #include @@ -47,23 +47,23 @@ //======================================================================= //function : GEOMAlgo_WireSolid -//purpose : +//purpose : //======================================================================= GEOMAlgo_WireSolid::GEOMAlgo_WireSolid() -: +: GEOMAlgo_ShapeSolid() { } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= GEOMAlgo_WireSolid::~GEOMAlgo_WireSolid() { } //======================================================================= // function: Perform -// purpose: +// purpose: //======================================================================= void GEOMAlgo_WireSolid::Perform() { @@ -82,7 +82,7 @@ void GEOMAlgo_WireSolid::Perform() Standard_Boolean bIsNewFiller; // bIsNewFiller=myDSFiller->IsNewFiller(); - + if (bIsNewFiller) { Prepare(); myDSFiller->SetNewFiller(!bIsNewFiller); @@ -93,10 +93,10 @@ void GEOMAlgo_WireSolid::Perform() catch (Standard_Failure) { myErrorStatus= 12; } -} +} //======================================================================= // function: Prepare -// purpose: +// purpose: //======================================================================= void GEOMAlgo_WireSolid::Prepare() { @@ -108,7 +108,7 @@ void GEOMAlgo_WireSolid::Prepare() } //======================================================================= // function: BuildResult -// purpose: +// purpose: //======================================================================= void GEOMAlgo_WireSolid::BuildResult() { @@ -166,7 +166,7 @@ void GEOMAlgo_WireSolid::BuildResult() } else if (aState==BooleanOperations_ON) { myLSON.Append(aE); - } + } } } } diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.hxx b/src/GEOMAlgo/GEOMAlgo_WireSolid.hxx index 82ffd60fe..93a5463ed 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_WireSolid.hxx @@ -20,86 +20,39 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_WireSolid.hxx +// Created: Wed Jan 12 10:19:31 2005 +// Author: Peter KURNEV +// + #ifndef _GEOMAlgo_WireSolid_HeaderFile #define _GEOMAlgo_WireSolid_HeaderFile -#ifndef _GEOMAlgo_ShapeSolid_HeaderFile -#include -#endif - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - - -class GEOMAlgo_WireSolid : public GEOMAlgo_ShapeSolid { - -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 - // - - -Standard_EXPORT GEOMAlgo_WireSolid(); -Standard_EXPORT virtual ~GEOMAlgo_WireSolid(); - - -Standard_EXPORT virtual void Perform() ; - - - - - -protected: - - // Methods PROTECTED - // - - -Standard_EXPORT virtual void Prepare() ; - - -Standard_EXPORT virtual void BuildResult() ; - - - // Fields PROTECTED - // - - -private: +#include - // Methods PRIVATE - // +//======================================================================= +//class : GEOMAlgo_WireSolid +//purpose : +//======================================================================= +class GEOMAlgo_WireSolid : public GEOMAlgo_ShapeSolid +{ + public: + Standard_EXPORT + GEOMAlgo_WireSolid(); + Standard_EXPORT + virtual ~GEOMAlgo_WireSolid(); - // Fields PRIVATE - // + Standard_EXPORT + virtual void Perform() ; + protected: + Standard_EXPORT + virtual void Prepare() ; + Standard_EXPORT + virtual void BuildResult() ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.ixx b/src/GEOMAlgo/GEOMAlgo_WireSolid.ixx deleted file mode 100644 index ca53f6723..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.jxx b/src/GEOMAlgo/GEOMAlgo_WireSolid.jxx deleted file mode 100644 index 88f953cec..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_WireSolid_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/GEOMAlgo_WireSplitter.cdl b/src/GEOMAlgo/GEOMAlgo_WireSplitter.cdl deleted file mode 100755 index db1821977..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireSplitter.cdl +++ /dev/null @@ -1,89 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: GEOMAlgo_WireSplitter.cdl --- Created: --- Author: Peter KURNEV --- --- -class WireSplitter from GEOMAlgo - inherits Algo from GEOMAlgo - - ---Purpose: - --- the algorithm to split multiconnexed set of edges - --- wires on a face onto simple connexed wires - --- . -uses - Face from TopoDS, - Vertex from TopoDS, - Edge from TopoDS, - - SequenceOfPnt2d from TColgp, - SequenceOfShape from TopTools, - ListOfShape from TopTools, - - ListOfListOfShape from BOPTColStd, - - EdgeInfo from BOP, - IndexedDataMapOfVertexListEdgeInfo from BOP - ---raises - -is - Create - returns WireSplitter from GEOMAlgo; - ---C++: alias "Standard_EXPORT virtual ~GEOMAlgo_WireSplitter();" - - SetFace (me:out; - aF: Face from TopoDS); - - SetEdges (me:out; - aLE:ListOfShape from TopTools); - - Edges (me) - returns ListOfShape from TopTools; - ---C++: return const & - - Perform (me:out) - is redefined; - - IsNothingToDo (me) - returns Boolean from Standard; - - Face (me) - returns Face from TopoDS; - ---C++: return const & - - Shapes (me) - returns ListOfListOfShape from BOPTColStd; - ---C++: return const & - -fields - myFace : Face from TopoDS is protected; - myIsDone : Boolean from Standard is protected; - myNothingToDo: Boolean from Standard is protected; - myShapes : ListOfListOfShape from BOPTColStd is protected; - mySmartMap : IndexedDataMapOfVertexListEdgeInfo from BOP is protected; - myEdges : ListOfShape from TopTools is protected; - -end WireSplitter; - diff --git a/src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx b/src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx index 7cbdc8f6c..b9a452053 100755 --- a/src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx +++ b/src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx @@ -23,7 +23,7 @@ // File: GEOMAlgo_WireSplitter.cxx // Author: Peter KURNEV -#include +#include #include #include @@ -113,9 +113,14 @@ static Standard_Real Tolerance2D (const TopoDS_Vertex& aV, const GeomAdaptor_Surface& aGAS); + +//modified by NIZNHY-PKV Thu Apr 19 09:04:59 2012f static - Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& ); -// + Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta, + const BOP_ListOfEdgeInfo& aLEInfo); +//static +// Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& ); +//modified by NIZNHY-PKV Thu Apr 19 09:04:53 2012t //======================================================================= // function: @@ -444,10 +449,10 @@ static BOPTColStd_ListOfListOfShape& myShapes, BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap) { - Standard_Integer i,j, aNb, aNbj; + Standard_Integer i,j, aNb, aNbj, iCnt; Standard_Real aTol, anAngleIn, anAngleOut, anAngle, aMinAngle; Standard_Real aTol2D, aTol2D2; - Standard_Real aTol2, aD2;//, aTolUVb, aTolVVb; + Standard_Real aTol2, aD2; Standard_Boolean anIsSameV2d, anIsSameV, anIsFound, anIsOut, anIsNotPassed; BOP_ListIteratorOfListOfEdgeInfo anIt; TopoDS_Vertex aVb; @@ -479,8 +484,6 @@ static GetNextVertex (pVa, aEOuta, aVb); gp_Pnt2d aPb=Coord2d(aVb, aEOuta, myFace); - - //const BOP_ListOfEdgeInfo& aLEInfoVb=mySmartMap.FindFromKey(aVb); // aTol=2.*Tolerance2D(aVb, aGAS); aTol2=10.*aTol*aTol; @@ -557,27 +560,25 @@ static aMinAngle=100.; anIsFound=Standard_False; - - Standard_Integer aCurIndexE = 0; - + // + //modified by NIZNHY-PKV Thu Apr 19 09:05:09 2012f + iCnt=NbWaysOut (aEOuta, aLEInfo); + //iCnt=NbWaysOut (aLEInfo); + //modified by NIZNHY-PKV Thu Apr 19 09:05:12 2012t + if (!iCnt) { // no way to go . (Error) + return ; + } + // anIt.Initialize(aLEInfo); for (; anIt.More(); anIt.Next()) { BOP_EdgeInfo& anEI=anIt.Value(); const TopoDS_Edge& aE=anEI.Edge(); anIsOut=!anEI.IsIn(); anIsNotPassed=!anEI.Passed(); - + // if (anIsOut && anIsNotPassed) { - aCurIndexE++; - // - // Is there one way to go out of the vertex - // we have to use it only. - Standard_Integer iCnt; - iCnt=NbWaysOut (aLEInfo); - // - if (!iCnt) { - // no way to go . (Error) - return ; + if (aE.IsSame(aEOuta)) { + continue; } // if (iCnt==1) { @@ -597,7 +598,6 @@ static continue; } // - // anAngleOut=anEI.Angle(); // anAngle=ClockWiseAngle(anAngleIn, anAngleOut); @@ -613,7 +613,7 @@ static // no way to go . (Error) return; } - + // aEOutb=pEdgeInfo->Edge(); // Path (aGAS, myFace, aVb, aEOutb, *pEdgeInfo, aLS, @@ -746,11 +746,9 @@ static dA=A1-A2; if (dA <= 0.) { dA=aTwoPi+dA; - //modified by NIZNHY-PKV Thu Feb 17 08:26:39 2011f if (dA <= 1.e-14) { dA=aTwoPi; } - //modified by NIZNHY-PKV Thu Feb 17 08:26:42 2011t } //xx else if (dA <= 1.e-14) { @@ -848,7 +846,33 @@ Standard_Real Angle (const gp_Dir2d& aDir2D) return anAngle; } - +//modified by NIZNHY-PKV Thu Apr 19 09:02:04 2012f +//======================================================================= +// function: NbWaysOut +// purpose: +//======================================================================= +Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta, + const BOP_ListOfEdgeInfo& aLEInfo) +{ + Standard_Boolean bIsOut, bIsNotPassed; + Standard_Integer iCnt=0; + BOP_ListIteratorOfListOfEdgeInfo anIt; + // + anIt.Initialize(aLEInfo); + for (; anIt.More(); anIt.Next()) { + BOP_EdgeInfo& aEI=anIt.Value(); + const TopoDS_Edge& aE=aEI.Edge(); + bIsOut=!aEI.IsIn(); + bIsNotPassed=!aEI.Passed(); + if (bIsOut && bIsNotPassed) { + if (!aE.IsSame(aEOuta)) { + iCnt++; + } + } + } + return iCnt; +} +/* //======================================================================= // function: NbWaysOut // purpose: @@ -871,3 +895,5 @@ Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& aLEInfo) } return iCnt; } +*/ +//modified by NIZNHY-PKV Thu Apr 19 09:01:57 2012t diff --git a/src/GEOMAlgo/GEOMAlgo_WireSplitter.hxx b/src/GEOMAlgo/GEOMAlgo_WireSplitter.hxx index 673a20914..cbfc9ff05 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireSplitter.hxx +++ b/src/GEOMAlgo/GEOMAlgo_WireSplitter.hxx @@ -20,125 +20,65 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: GEOMAlgo_WireSplitter.hxx +// Author: Peter KURNEV + #ifndef _GEOMAlgo_WireSplitter_HeaderFile #define _GEOMAlgo_WireSplitter_HeaderFile -#ifndef _TopoDS_Face_HeaderFile +#include +#include #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _BOPTColStd_ListOfListOfShape_HeaderFile #include -#endif -#ifndef _BOP_IndexedDataMapOfVertexListEdgeInfo_HeaderFile #include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile #include -#endif -#ifndef _GEOMAlgo_Algo_HeaderFile #include -#endif -class TopoDS_Face; -class TopTools_ListOfShape; -class BOPTColStd_ListOfListOfShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - //! the algorithm to split multiconnexed set of edges
//! wires on a face onto simple connexed wires
//! .
-class GEOMAlgo_WireSplitter : public GEOMAlgo_Algo { - +//======================================================================= +//class : GEOMAlgo_WireSplitter +//purpose : +//======================================================================= +class GEOMAlgo_WireSplitter : public GEOMAlgo_Algo +{ public: + Standard_EXPORT + GEOMAlgo_WireSplitter(); - 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 - // - - -Standard_EXPORT GEOMAlgo_WireSplitter(); -Standard_EXPORT virtual ~GEOMAlgo_WireSplitter(); - - -Standard_EXPORT void SetFace(const TopoDS_Face& aF) ; - - -Standard_EXPORT void SetEdges(const TopTools_ListOfShape& aLE) ; - + Standard_EXPORT + virtual ~GEOMAlgo_WireSplitter(); -Standard_EXPORT const TopTools_ListOfShape& Edges() const; + Standard_EXPORT + void SetFace(const TopoDS_Face& aF) ; + Standard_EXPORT + void SetEdges(const TopTools_ListOfShape& aLE) ; -Standard_EXPORT virtual void Perform() ; - - -Standard_EXPORT Standard_Boolean IsNothingToDo() const; - - -Standard_EXPORT const TopoDS_Face& Face() const; - - -Standard_EXPORT const BOPTColStd_ListOfListOfShape& Shapes() const; + Standard_EXPORT + const TopTools_ListOfShape& Edges() const; + Standard_EXPORT + virtual void Perform() ; + Standard_EXPORT + Standard_Boolean IsNothingToDo() const; + Standard_EXPORT + const TopoDS_Face& Face() const; + Standard_EXPORT + const BOPTColStd_ListOfListOfShape& Shapes() const; protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -TopoDS_Face myFace; -Standard_Boolean myIsDone; -Standard_Boolean myNothingToDo; -BOPTColStd_ListOfListOfShape myShapes; -BOP_IndexedDataMapOfVertexListEdgeInfo mySmartMap; -TopTools_ListOfShape myEdges; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + TopoDS_Face myFace; + Standard_Boolean myIsDone; + Standard_Boolean myNothingToDo; + BOPTColStd_ListOfListOfShape myShapes; + BOP_IndexedDataMapOfVertexListEdgeInfo mySmartMap; + TopTools_ListOfShape myEdges; }; - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/GEOMAlgo/GEOMAlgo_WireSplitter.ixx b/src/GEOMAlgo/GEOMAlgo_WireSplitter.ixx deleted file mode 100644 index 3a6fd5959..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireSplitter.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo/GEOMAlgo_WireSplitter.jxx b/src/GEOMAlgo/GEOMAlgo_WireSplitter.jxx deleted file mode 100644 index 6d3af0b9a..000000000 --- a/src/GEOMAlgo/GEOMAlgo_WireSplitter.jxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _BOPTColStd_ListOfListOfShape_HeaderFile -#include -#endif -#ifndef _GEOMAlgo_WireSplitter_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo/Handle_BlockFix_BlockFixAPI.hxx b/src/GEOMAlgo/Handle_BlockFix_BlockFixAPI.hxx index 9a823485a..3fce5be46 100644 --- a/src/GEOMAlgo/Handle_BlockFix_BlockFixAPI.hxx +++ b/src/GEOMAlgo/Handle_BlockFix_BlockFixAPI.hxx @@ -42,24 +42,24 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(BlockFix_BlockFixAPI); class Handle(BlockFix_BlockFixAPI) : public Handle(MMgt_TShared) { public: - void* operator new(size_t,void* anAddress) + void* operator new(size_t,void* anAddress) { return anAddress; } - void* operator new(size_t size) - { - return Standard::Allocate(size); + void* operator new(size_t size) + { + return Standard::Allocate(size); } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); } - Handle(BlockFix_BlockFixAPI)():Handle(MMgt_TShared)() {} - Handle(BlockFix_BlockFixAPI)(const Handle(BlockFix_BlockFixAPI)& aHandle) : Handle(MMgt_TShared)(aHandle) + Handle(BlockFix_BlockFixAPI)():Handle(MMgt_TShared)() {} + Handle(BlockFix_BlockFixAPI)(const Handle(BlockFix_BlockFixAPI)& aHandle) : Handle(MMgt_TShared)(aHandle) { } - Handle(BlockFix_BlockFixAPI)(const BlockFix_BlockFixAPI* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) + Handle(BlockFix_BlockFixAPI)(const BlockFix_BlockFixAPI* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) { } @@ -75,18 +75,18 @@ class Handle(BlockFix_BlockFixAPI) : public Handle(MMgt_TShared) { return *this; } - BlockFix_BlockFixAPI* operator->() + BlockFix_BlockFixAPI* operator->() { return (BlockFix_BlockFixAPI *)ControlAccess(); } - BlockFix_BlockFixAPI* operator->() const + BlockFix_BlockFixAPI* operator->() const { return (BlockFix_BlockFixAPI *)ControlAccess(); } Standard_EXPORT ~Handle(BlockFix_BlockFixAPI)(); - + Standard_EXPORT static const Handle(BlockFix_BlockFixAPI) DownCast(const Handle(Standard_Transient)& AnObject); }; #endif diff --git a/src/GEOMAlgo/Handle_BlockFix_PeriodicSurfaceModifier.hxx b/src/GEOMAlgo/Handle_BlockFix_PeriodicSurfaceModifier.hxx index 3f7838436..1cb29e022 100644 --- a/src/GEOMAlgo/Handle_BlockFix_PeriodicSurfaceModifier.hxx +++ b/src/GEOMAlgo/Handle_BlockFix_PeriodicSurfaceModifier.hxx @@ -42,24 +42,24 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(BlockFix_PeriodicSurfaceModi class Handle(BlockFix_PeriodicSurfaceModifier) : public Handle(BRepTools_Modification) { public: - void* operator new(size_t,void* anAddress) + void* operator new(size_t,void* anAddress) { return anAddress; } - void* operator new(size_t size) - { - return Standard::Allocate(size); + void* operator new(size_t size) + { + return Standard::Allocate(size); } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); } - Handle(BlockFix_PeriodicSurfaceModifier)():Handle(BRepTools_Modification)() {} - Handle(BlockFix_PeriodicSurfaceModifier)(const Handle(BlockFix_PeriodicSurfaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle) + Handle(BlockFix_PeriodicSurfaceModifier)():Handle(BRepTools_Modification)() {} + Handle(BlockFix_PeriodicSurfaceModifier)(const Handle(BlockFix_PeriodicSurfaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle) { } - Handle(BlockFix_PeriodicSurfaceModifier)(const BlockFix_PeriodicSurfaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem) + Handle(BlockFix_PeriodicSurfaceModifier)(const BlockFix_PeriodicSurfaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem) { } @@ -75,18 +75,18 @@ class Handle(BlockFix_PeriodicSurfaceModifier) : public Handle(BRepTools_Modific return *this; } - BlockFix_PeriodicSurfaceModifier* operator->() + BlockFix_PeriodicSurfaceModifier* operator->() { return (BlockFix_PeriodicSurfaceModifier *)ControlAccess(); } - BlockFix_PeriodicSurfaceModifier* operator->() const + BlockFix_PeriodicSurfaceModifier* operator->() const { return (BlockFix_PeriodicSurfaceModifier *)ControlAccess(); } Standard_EXPORT ~Handle(BlockFix_PeriodicSurfaceModifier)(); - + Standard_EXPORT static const Handle(BlockFix_PeriodicSurfaceModifier) DownCast(const Handle(Standard_Transient)& AnObject); }; #endif diff --git a/src/GEOMAlgo/Handle_BlockFix_SphereSpaceModifier.hxx b/src/GEOMAlgo/Handle_BlockFix_SphereSpaceModifier.hxx index ac7191b56..33dc8a198 100644 --- a/src/GEOMAlgo/Handle_BlockFix_SphereSpaceModifier.hxx +++ b/src/GEOMAlgo/Handle_BlockFix_SphereSpaceModifier.hxx @@ -42,24 +42,24 @@ Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(BlockFix_SphereSpaceModifier class Handle(BlockFix_SphereSpaceModifier) : public Handle(BRepTools_Modification) { public: - void* operator new(size_t,void* anAddress) + void* operator new(size_t,void* anAddress) { return anAddress; } - void* operator new(size_t size) - { - return Standard::Allocate(size); + void* operator new(size_t size) + { + return Standard::Allocate(size); } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); } - Handle(BlockFix_SphereSpaceModifier)():Handle(BRepTools_Modification)() {} - Handle(BlockFix_SphereSpaceModifier)(const Handle(BlockFix_SphereSpaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle) + Handle(BlockFix_SphereSpaceModifier)():Handle(BRepTools_Modification)() {} + Handle(BlockFix_SphereSpaceModifier)(const Handle(BlockFix_SphereSpaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle) { } - Handle(BlockFix_SphereSpaceModifier)(const BlockFix_SphereSpaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem) + Handle(BlockFix_SphereSpaceModifier)(const BlockFix_SphereSpaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem) { } @@ -75,18 +75,18 @@ class Handle(BlockFix_SphereSpaceModifier) : public Handle(BRepTools_Modificatio return *this; } - BlockFix_SphereSpaceModifier* operator->() + BlockFix_SphereSpaceModifier* operator->() { return (BlockFix_SphereSpaceModifier *)ControlAccess(); } - BlockFix_SphereSpaceModifier* operator->() const + BlockFix_SphereSpaceModifier* operator->() const { return (BlockFix_SphereSpaceModifier *)ControlAccess(); } Standard_EXPORT ~Handle(BlockFix_SphereSpaceModifier)(); - + Standard_EXPORT static const Handle(BlockFix_SphereSpaceModifier) DownCast(const Handle(Standard_Transient)& AnObject); }; #endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_Clsf.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_Clsf.hxx deleted file mode 100644 index eb9bd7038..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_Clsf.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile -#define _Handle_GEOMAlgo_Clsf_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_GEOMAlgo_HAlgo_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(GEOMAlgo_HAlgo); -class GEOMAlgo_Clsf; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_Clsf); - -class Handle(GEOMAlgo_Clsf) : public Handle(GEOMAlgo_HAlgo) { - public: - Handle(GEOMAlgo_Clsf)():Handle(GEOMAlgo_HAlgo)() {} - Handle(GEOMAlgo_Clsf)(const Handle(GEOMAlgo_Clsf)& aHandle) : Handle(GEOMAlgo_HAlgo)(aHandle) - { - } - - Handle(GEOMAlgo_Clsf)(const GEOMAlgo_Clsf* anItem) : Handle(GEOMAlgo_HAlgo)((GEOMAlgo_HAlgo *)anItem) - { - } - - Handle(GEOMAlgo_Clsf)& operator=(const Handle(GEOMAlgo_Clsf)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_Clsf)& operator=(const GEOMAlgo_Clsf* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_Clsf* operator->() const - { - return (GEOMAlgo_Clsf *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_Clsf)(); - - Standard_EXPORT static const Handle(GEOMAlgo_Clsf) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_ClsfBox.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_ClsfBox.hxx deleted file mode 100644 index 5667b30b8..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_ClsfBox.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_ClsfBox_HeaderFile -#define _Handle_GEOMAlgo_ClsfBox_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(GEOMAlgo_Clsf); -class GEOMAlgo_ClsfBox; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ClsfBox); - -class Handle(GEOMAlgo_ClsfBox) : public Handle(GEOMAlgo_Clsf) { - public: - Handle(GEOMAlgo_ClsfBox)():Handle(GEOMAlgo_Clsf)() {} - Handle(GEOMAlgo_ClsfBox)(const Handle(GEOMAlgo_ClsfBox)& aHandle) : Handle(GEOMAlgo_Clsf)(aHandle) - { - } - - Handle(GEOMAlgo_ClsfBox)(const GEOMAlgo_ClsfBox* anItem) : Handle(GEOMAlgo_Clsf)((GEOMAlgo_Clsf *)anItem) - { - } - - Handle(GEOMAlgo_ClsfBox)& operator=(const Handle(GEOMAlgo_ClsfBox)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_ClsfBox)& operator=(const GEOMAlgo_ClsfBox* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_ClsfBox* operator->() const - { - return (GEOMAlgo_ClsfBox *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_ClsfBox)(); - - Standard_EXPORT static const Handle(GEOMAlgo_ClsfBox) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_ClsfSolid.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_ClsfSolid.hxx deleted file mode 100644 index cd5d0d151..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_ClsfSolid.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_ClsfSolid_HeaderFile -#define _Handle_GEOMAlgo_ClsfSolid_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(GEOMAlgo_Clsf); -class GEOMAlgo_ClsfSolid; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ClsfSolid); - -class Handle(GEOMAlgo_ClsfSolid) : public Handle(GEOMAlgo_Clsf) { - public: - Handle(GEOMAlgo_ClsfSolid)():Handle(GEOMAlgo_Clsf)() {} - Handle(GEOMAlgo_ClsfSolid)(const Handle(GEOMAlgo_ClsfSolid)& aHandle) : Handle(GEOMAlgo_Clsf)(aHandle) - { - } - - Handle(GEOMAlgo_ClsfSolid)(const GEOMAlgo_ClsfSolid* anItem) : Handle(GEOMAlgo_Clsf)((GEOMAlgo_Clsf *)anItem) - { - } - - Handle(GEOMAlgo_ClsfSolid)& operator=(const Handle(GEOMAlgo_ClsfSolid)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_ClsfSolid)& operator=(const GEOMAlgo_ClsfSolid* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_ClsfSolid* operator->() const - { - return (GEOMAlgo_ClsfSolid *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_ClsfSolid)(); - - Standard_EXPORT static const Handle(GEOMAlgo_ClsfSolid) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_ClsfSurf.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_ClsfSurf.hxx deleted file mode 100644 index 9464374fd..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_ClsfSurf.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_ClsfSurf_HeaderFile -#define _Handle_GEOMAlgo_ClsfSurf_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_GEOMAlgo_Clsf_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(GEOMAlgo_Clsf); -class GEOMAlgo_ClsfSurf; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ClsfSurf); - -class Handle(GEOMAlgo_ClsfSurf) : public Handle(GEOMAlgo_Clsf) { - public: - Handle(GEOMAlgo_ClsfSurf)():Handle(GEOMAlgo_Clsf)() {} - Handle(GEOMAlgo_ClsfSurf)(const Handle(GEOMAlgo_ClsfSurf)& aHandle) : Handle(GEOMAlgo_Clsf)(aHandle) - { - } - - Handle(GEOMAlgo_ClsfSurf)(const GEOMAlgo_ClsfSurf* anItem) : Handle(GEOMAlgo_Clsf)((GEOMAlgo_Clsf *)anItem) - { - } - - Handle(GEOMAlgo_ClsfSurf)& operator=(const Handle(GEOMAlgo_ClsfSurf)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_ClsfSurf)& operator=(const GEOMAlgo_ClsfSurf* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_ClsfSurf* operator->() const - { - return (GEOMAlgo_ClsfSurf *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_ClsfSurf)(); - - Standard_EXPORT static const Handle(GEOMAlgo_ClsfSurf) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx deleted file mode 100644 index 1d72173ac..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile -#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle(Standard_Type); -class Handle(TCollection_MapNode); -class GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape; - -DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape,TCollection_MapNode) - -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx deleted file mode 100644 index c731d16d3..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile -#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle(Standard_Type); -class Handle(TCollection_MapNode); -class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger; - -DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger,TCollection_MapNode) - -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx deleted file mode 100644 index f60fe7fc6..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile -#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle(Standard_Type); -class Handle(TCollection_MapNode); -class GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape; - -DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape,TCollection_MapNode) - -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx deleted file mode 100644 index 730be085e..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile -#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle(Standard_Type); -class Handle(TCollection_MapNode); -class GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape; - -DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape,TCollection_MapNode) - -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx deleted file mode 100644 index aa7c289f4..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile -#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle(Standard_Type); -class Handle(TCollection_MapNode); -class GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape; - -DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape,TCollection_MapNode) - -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx deleted file mode 100644 index 87e5d56e9..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile -#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle(Standard_Type); -class Handle(TCollection_MapNode); -class GEOMAlgo_DataMapNodeOfDataMapOfShapePnt; - -DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfShapePnt,TCollection_MapNode) - -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx deleted file mode 100644 index 6952cc9b5..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile -#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle(Standard_Type); -class Handle(TCollection_MapNode); -class GEOMAlgo_DataMapNodeOfDataMapOfShapeReal; - -DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal,TCollection_MapNode) - -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx deleted file mode 100644 index 82ffa4fca..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile -#define _Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle(Standard_Type); -class Handle(TCollection_MapNode); -class GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet; - -DEFINE_STANDARD_HANDLE(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet,TCollection_MapNode) - -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_HAlgo.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_HAlgo.hxx deleted file mode 100644 index 8fc3ba405..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_HAlgo.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_HAlgo_HeaderFile -#define _Handle_GEOMAlgo_HAlgo_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_MMgt_TShared_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(MMgt_TShared); -class GEOMAlgo_HAlgo; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_HAlgo); - -class Handle(GEOMAlgo_HAlgo) : public Handle(MMgt_TShared) { - public: - Handle(GEOMAlgo_HAlgo)():Handle(MMgt_TShared)() {} - Handle(GEOMAlgo_HAlgo)(const Handle(GEOMAlgo_HAlgo)& aHandle) : Handle(MMgt_TShared)(aHandle) - { - } - - Handle(GEOMAlgo_HAlgo)(const GEOMAlgo_HAlgo* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) - { - } - - Handle(GEOMAlgo_HAlgo)& operator=(const Handle(GEOMAlgo_HAlgo)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_HAlgo)& operator=(const GEOMAlgo_HAlgo* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_HAlgo* operator->() const - { - return (GEOMAlgo_HAlgo *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_HAlgo)(); - - Standard_EXPORT static const Handle(GEOMAlgo_HAlgo) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx deleted file mode 100644 index e868435d2..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile -#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape); - -class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) : public Handle(TCollection_MapNode) { - public: - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)():Handle(TCollection_MapNode)() {} - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* operator->() const - { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(); - - Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx deleted file mode 100644 index 0978f3678..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile -#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape); - -class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) : 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_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)():Handle(TCollection_MapNode)() {} - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* operator->() - { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape *)ControlAccess(); - } - - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape* operator->() const - { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape *)ControlAccess(); - } - - Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape)(); - - Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx deleted file mode 100644 index dc3d4ccc8..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile -#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape); - -class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) : public Handle(TCollection_MapNode) { - public: - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)():Handle(TCollection_MapNode)() {} - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape* operator->() const - { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape)(); - - Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx deleted file mode 100644 index e695dcdf9..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile -#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox); - -class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) : public Handle(TCollection_MapNode) { - public: - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)():Handle(TCollection_MapNode)() {} - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* operator->() const - { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(); - - Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx deleted file mode 100644 index 28474380d..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile -#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo); - -class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) : public Handle(TCollection_MapNode) { - public: - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)():Handle(TCollection_MapNode)() {} - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo* operator->() const - { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo)(); - - Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx deleted file mode 100644 index 8027299fb..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile -#define _Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState); - -class Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) : public Handle(TCollection_MapNode) { - public: - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)():Handle(TCollection_MapNode)() {} - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& operator=(const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)& operator=(const GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState* operator->() const - { - return (GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState)(); - - Standard_EXPORT static const Handle(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx deleted file mode 100644 index 409531f1f..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile -#define _Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class GEOMAlgo_ListNodeOfListOfCoupleOfShapes; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfCoupleOfShapes); - -class Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) : public Handle(TCollection_MapNode) { - public: - Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)():Handle(TCollection_MapNode)() {} - Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)(const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)(const GEOMAlgo_ListNodeOfListOfCoupleOfShapes* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)& operator=(const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)& operator=(const GEOMAlgo_ListNodeOfListOfCoupleOfShapes* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_ListNodeOfListOfCoupleOfShapes* operator->() const - { - return (GEOMAlgo_ListNodeOfListOfCoupleOfShapes *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes)(); - - Standard_EXPORT static const Handle(GEOMAlgo_ListNodeOfListOfCoupleOfShapes) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx b/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx deleted file mode 100644 index dd6d2ae33..000000000 --- a/src/GEOMAlgo/Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile -#define _Handle_GEOMAlgo_ListNodeOfListOfPnt_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class GEOMAlgo_ListNodeOfListOfPnt; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMAlgo_ListNodeOfListOfPnt); - -class Handle(GEOMAlgo_ListNodeOfListOfPnt) : public Handle(TCollection_MapNode) { - public: - Handle(GEOMAlgo_ListNodeOfListOfPnt)():Handle(TCollection_MapNode)() {} - Handle(GEOMAlgo_ListNodeOfListOfPnt)(const Handle(GEOMAlgo_ListNodeOfListOfPnt)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(GEOMAlgo_ListNodeOfListOfPnt)(const GEOMAlgo_ListNodeOfListOfPnt* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(GEOMAlgo_ListNodeOfListOfPnt)& operator=(const Handle(GEOMAlgo_ListNodeOfListOfPnt)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMAlgo_ListNodeOfListOfPnt)& operator=(const GEOMAlgo_ListNodeOfListOfPnt* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMAlgo_ListNodeOfListOfPnt* operator->() const - { - return (GEOMAlgo_ListNodeOfListOfPnt *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(GEOMAlgo_ListNodeOfListOfPnt)(); - - Standard_EXPORT static const Handle(GEOMAlgo_ListNodeOfListOfPnt) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo/Makefile.am b/src/GEOMAlgo/Makefile.am index db733bc4a..e6a6dcb25 100644 --- a/src/GEOMAlgo/Makefile.am +++ b/src/GEOMAlgo/Makefile.am @@ -28,9 +28,9 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am lib_LTLIBRARIES = libGEOMAlgo.la dist_libGEOMAlgo_la_SOURCES = \ - BlockFix.cxx \ BlockFix_BlockFixAPI.cxx \ BlockFix_CheckTool.cxx \ + BlockFix.cxx \ BlockFix_PeriodicSurfaceModifier.cxx \ BlockFix_SphereSpaceModifier.cxx \ BlockFix_UnionEdges.cxx \ @@ -52,73 +52,31 @@ dist_libGEOMAlgo_la_SOURCES = \ GEOMAlgo_ClsfSolid.cxx \ GEOMAlgo_ClsfSurf.cxx \ GEOMAlgo_CoupleOfShapes.cxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_0.cxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_0.cxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_0.cxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_0.cxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_0.cxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_0.cxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_0.cxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_0.cxx \ - GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape_0.cxx \ - GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx \ - GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx \ - GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx \ - GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape_0.cxx \ - GEOMAlgo_DataMapNodeOfDataMapOfShapePnt_0.cxx \ - GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx \ - GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx \ - GEOMAlgo_DataMapOfOrientedShapeShape_0.cxx \ - GEOMAlgo_DataMapOfPassKeyInteger_0.cxx \ - GEOMAlgo_DataMapOfPassKeyShapeShape_0.cxx \ - GEOMAlgo_DataMapOfRealListOfShape_0.cxx \ - GEOMAlgo_DataMapOfShapeMapOfShape_0.cxx \ - GEOMAlgo_DataMapOfShapePnt_0.cxx \ - GEOMAlgo_DataMapOfShapeReal_0.cxx \ - GEOMAlgo_DataMapOfShapeShapeSet_0.cxx \ GEOMAlgo_FinderShapeOn1.cxx \ GEOMAlgo_FinderShapeOn2.cxx \ GEOMAlgo_FinderShapeOn.cxx \ GEOMAlgo_FinderShapeOnQuad.cxx \ - GEOMAlgo_GetInPlace.cxx \ GEOMAlgo_GetInPlace_1.cxx \ GEOMAlgo_GetInPlace_2.cxx \ GEOMAlgo_GetInPlace_3.cxx \ + GEOMAlgo_GetInPlace.cxx \ GEOMAlgo_GlueAnalyser.cxx \ - GEOMAlgo_Gluer.cxx \ GEOMAlgo_GlueDetector.cxx \ - GEOMAlgo_Gluer2.cxx \ GEOMAlgo_Gluer2_1.cxx \ GEOMAlgo_Gluer2_2.cxx \ GEOMAlgo_Gluer2_3.cxx \ + GEOMAlgo_Gluer2.cxx \ GEOMAlgo_GluerAlgo.cxx \ + GEOMAlgo_Gluer.cxx \ GEOMAlgo_HAlgo.cxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx \ - GEOMAlgo_IndexedDataMapOfIntegerShape_0.cxx \ - GEOMAlgo_IndexedDataMapOfPassKeyListOfShape_0.cxx \ - GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_0.cxx \ - GEOMAlgo_IndexedDataMapOfShapeBox_0.cxx \ - GEOMAlgo_IndexedDataMapOfShapeShapeInfo_0.cxx \ - GEOMAlgo_IndexedDataMapOfShapeState_0.cxx \ - GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_0.cxx \ - GEOMAlgo_ListIteratorOfListOfPnt_0.cxx \ - GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx \ - GEOMAlgo_ListNodeOfListOfPnt_0.cxx \ - GEOMAlgo_ListOfCoupleOfShapes_0.cxx \ - GEOMAlgo_ListOfPnt_0.cxx \ GEOMAlgo_PassKey.cxx \ GEOMAlgo_PassKeyMapHasher.cxx \ GEOMAlgo_PassKeyShape.cxx \ GEOMAlgo_PassKeyShapeMapHasher.cxx \ GEOMAlgo_ShapeAlgo.cxx \ GEOMAlgo_ShapeInfo.cxx \ - GEOMAlgo_ShapeInfoFiller.cxx \ GEOMAlgo_ShapeInfoFiller_1.cxx \ + GEOMAlgo_ShapeInfoFiller.cxx \ GEOMAlgo_ShapeSet.cxx \ GEOMAlgo_ShapeSolid.cxx \ GEOMAlgo_ShellSolid.cxx \ @@ -126,9 +84,9 @@ dist_libGEOMAlgo_la_SOURCES = \ GEOMAlgo_Splitter.cxx \ GEOMAlgo_StateCollector.cxx \ GEOMAlgo_SurfaceTools.cxx \ + GEOMAlgo_Tools_1.cxx \ GEOMAlgo_Tools3D.cxx \ GEOMAlgo_Tools.cxx \ - GEOMAlgo_Tools_1.cxx \ GEOMAlgo_VertexSolid.cxx \ GEOMAlgo_WESCorrector.cxx \ GEOMAlgo_WESScaler.cxx \ @@ -164,41 +122,17 @@ salomeinclude_HEADERS = \ Handle_BlockFix_SphereSpaceModifier.hxx \ Handle_BlockFix_PeriodicSurfaceModifier.hxx \ GEOMAlgo_Algo.hxx \ - GEOMAlgo_Algo.ixx \ - GEOMAlgo_Algo.jxx \ GEOMAlgo_BuilderArea.hxx \ - GEOMAlgo_BuilderArea.ixx \ - GEOMAlgo_BuilderArea.jxx \ GEOMAlgo_BuilderFace.hxx \ - GEOMAlgo_BuilderFace.ixx \ - GEOMAlgo_BuilderFace.jxx \ GEOMAlgo_Builder.hxx \ - GEOMAlgo_Builder.ixx \ - GEOMAlgo_Builder.jxx \ GEOMAlgo_BuilderShape.hxx \ - GEOMAlgo_BuilderShape.ixx \ - GEOMAlgo_BuilderShape.jxx \ GEOMAlgo_BuilderSolid.hxx \ - GEOMAlgo_BuilderSolid.ixx \ - GEOMAlgo_BuilderSolid.jxx \ GEOMAlgo_BuilderTools.hxx \ - GEOMAlgo_BuilderTools.ixx \ - GEOMAlgo_BuilderTools.jxx \ GEOMAlgo_ClsfBox.hxx \ - GEOMAlgo_ClsfBox.ixx \ - GEOMAlgo_ClsfBox.jxx \ GEOMAlgo_Clsf.hxx \ - GEOMAlgo_Clsf.ixx \ - GEOMAlgo_Clsf.jxx \ GEOMAlgo_ClsfSolid.hxx \ - GEOMAlgo_ClsfSolid.ixx \ - GEOMAlgo_ClsfSolid.jxx \ GEOMAlgo_ClsfSurf.hxx \ - GEOMAlgo_ClsfSurf.ixx \ - GEOMAlgo_ClsfSurf.jxx \ GEOMAlgo_CoupleOfShapes.hxx \ - GEOMAlgo_CoupleOfShapes.ixx \ - GEOMAlgo_CoupleOfShapes.jxx \ GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx \ GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx \ GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx \ @@ -207,14 +141,6 @@ salomeinclude_HEADERS = \ GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx \ GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx \ GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx \ - GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx \ - GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx \ - GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx \ - GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx \ - GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx \ - GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx \ - GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx \ - GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx \ GEOMAlgo_DataMapOfOrientedShapeShape.hxx \ GEOMAlgo_DataMapOfPassKeyInteger.hxx \ GEOMAlgo_DataMapOfPassKeyShapeShape.hxx \ @@ -223,37 +149,18 @@ salomeinclude_HEADERS = \ GEOMAlgo_DataMapOfShapePnt.hxx \ GEOMAlgo_DataMapOfShapeReal.hxx \ GEOMAlgo_DataMapOfShapeShapeSet.hxx \ - GEOMAlgo_FinderShapeOn1.ixx \ GEOMAlgo_FinderShapeOn1.hxx \ - GEOMAlgo_FinderShapeOn1.jxx \ GEOMAlgo_FinderShapeOn2.hxx \ - GEOMAlgo_FinderShapeOn2.ixx \ - GEOMAlgo_FinderShapeOn2.jxx \ GEOMAlgo_FinderShapeOn.hxx \ - GEOMAlgo_FinderShapeOn.ixx \ - GEOMAlgo_FinderShapeOn.jxx \ GEOMAlgo_FinderShapeOnQuad.hxx \ GEOMAlgo_GetInPlace.hxx \ GEOMAlgo_GlueAnalyser.hxx \ - GEOMAlgo_GlueAnalyser.ixx \ - GEOMAlgo_GlueAnalyser.jxx \ - GEOMAlgo_Gluer.hxx \ - GEOMAlgo_Gluer.ixx \ - GEOMAlgo_Gluer.jxx \ GEOMAlgo_GlueDetector.hxx \ GEOMAlgo_Gluer2.hxx \ GEOMAlgo_GluerAlgo.hxx \ + GEOMAlgo_Gluer.hxx \ GEOMAlgo_HAlgo.hxx \ - GEOMAlgo_HAlgo.ixx \ - GEOMAlgo_HAlgo.jxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx \ - GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx \ GEOMAlgo_IndexedDataMapOfIntegerShape.hxx \ - GEOMAlgo_IndexedDataMapOfPassKeyListOfShape.hxx \ GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx \ GEOMAlgo_IndexedDataMapOfShapeBox.hxx \ GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx \ @@ -264,99 +171,32 @@ salomeinclude_HEADERS = \ GEOMAlgo_KindOfShape.hxx \ GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx \ GEOMAlgo_ListIteratorOfListOfPnt.hxx \ - GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx \ - GEOMAlgo_ListNodeOfListOfPnt.hxx \ GEOMAlgo_ListOfCoupleOfShapes.hxx \ GEOMAlgo_ListOfPnt.hxx \ GEOMAlgo_PassKey.hxx \ - GEOMAlgo_PassKey.ixx \ - GEOMAlgo_PassKey.jxx \ GEOMAlgo_PassKeyMapHasher.hxx \ - GEOMAlgo_PassKeyMapHasher.ixx \ - GEOMAlgo_PassKeyMapHasher.jxx \ GEOMAlgo_PassKeyShape.hxx \ - GEOMAlgo_PassKeyShape.ixx \ - GEOMAlgo_PassKeyShape.jxx \ GEOMAlgo_PassKeyShapeMapHasher.hxx \ - GEOMAlgo_PassKeyShapeMapHasher.ixx \ - GEOMAlgo_PassKeyShapeMapHasher.jxx \ GEOMAlgo_PWireEdgeSet.hxx \ GEOMAlgo_ShapeAlgo.hxx \ - GEOMAlgo_ShapeAlgo.ixx \ - GEOMAlgo_ShapeAlgo.jxx \ GEOMAlgo_ShapeInfo.hxx \ - GEOMAlgo_ShapeInfo.ixx \ - GEOMAlgo_ShapeInfo.jxx \ GEOMAlgo_ShapeInfoFiller.hxx \ - GEOMAlgo_ShapeInfoFiller.ixx \ - GEOMAlgo_ShapeInfoFiller.jxx \ GEOMAlgo_ShapeSet.hxx \ - GEOMAlgo_ShapeSet.ixx \ - GEOMAlgo_ShapeSet.jxx \ GEOMAlgo_ShapeSolid.hxx \ - GEOMAlgo_ShapeSolid.ixx \ - GEOMAlgo_ShapeSolid.jxx \ GEOMAlgo_ShellSolid.hxx \ - GEOMAlgo_ShellSolid.ixx \ - GEOMAlgo_ShellSolid.jxx \ GEOMAlgo_SolidSolid.hxx \ - GEOMAlgo_SolidSolid.ixx \ - GEOMAlgo_SolidSolid.jxx \ GEOMAlgo_Splitter.hxx \ - GEOMAlgo_Splitter.ixx \ - GEOMAlgo_Splitter.jxx \ GEOMAlgo_StateCollector.hxx \ - GEOMAlgo_StateCollector.ixx \ - GEOMAlgo_StateCollector.jxx \ GEOMAlgo_State.hxx \ GEOMAlgo_SurfaceTools.hxx \ - GEOMAlgo_SurfaceTools.ixx \ - GEOMAlgo_SurfaceTools.jxx \ GEOMAlgo_Tools3D.hxx \ - GEOMAlgo_Tools3D.ixx \ - GEOMAlgo_Tools3D.jxx \ GEOMAlgo_Tools.hxx \ - GEOMAlgo_Tools.ixx \ - GEOMAlgo_Tools.jxx \ GEOMAlgo_VertexSolid.hxx \ - GEOMAlgo_VertexSolid.ixx \ - GEOMAlgo_VertexSolid.jxx \ GEOMAlgo_WESCorrector.hxx \ - GEOMAlgo_WESCorrector.ixx \ - GEOMAlgo_WESCorrector.jxx \ GEOMAlgo_WESScaler.hxx \ - GEOMAlgo_WESScaler.ixx \ - GEOMAlgo_WESScaler.jxx \ GEOMAlgo_WireEdgeSet.hxx \ - GEOMAlgo_WireEdgeSet.ixx \ - GEOMAlgo_WireEdgeSet.jxx \ GEOMAlgo_WireSolid.hxx \ - GEOMAlgo_WireSolid.ixx \ - GEOMAlgo_WireSolid.jxx \ - GEOMAlgo_WireSplitter.hxx \ - GEOMAlgo_WireSplitter.ixx \ - GEOMAlgo_WireSplitter.jxx \ - Handle_GEOMAlgo_ClsfBox.hxx \ - Handle_GEOMAlgo_Clsf.hxx \ - Handle_GEOMAlgo_ClsfSolid.hxx \ - Handle_GEOMAlgo_ClsfSurf.hxx \ - Handle_GEOMAlgo_DataMapNodeOfDataMapOfOrientedShapeShape.hxx \ - Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx \ - Handle_GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx \ - Handle_GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx \ - Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx \ - Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx \ - Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapeMapOfShape.hxx \ - Handle_GEOMAlgo_DataMapNodeOfDataMapOfShapePnt.hxx \ - Handle_GEOMAlgo_HAlgo.hxx \ - Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \ - Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx \ - Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx \ - Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \ - Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx \ - Handle_GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx \ - Handle_GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx \ - Handle_GEOMAlgo_ListNodeOfListOfPnt.hxx + GEOMAlgo_WireSplitter.hxx libGEOMAlgo_la_CPPFLAGS = \ $(CAS_CPPFLAGS) \ @@ -379,46 +219,8 @@ CDL_FILES = \ BlockFix_SphereSpaceModifier.cdl \ BlockFix_UnionEdges.cdl \ BlockFix_UnionFaces.cdl \ - GEOMAlgo.cdl \ - GEOMAlgo_Algo.cdl \ - GEOMAlgo_Builder.cdl \ - GEOMAlgo_BuilderArea.cdl \ - GEOMAlgo_BuilderFace.cdl \ - GEOMAlgo_BuilderShape.cdl \ - GEOMAlgo_BuilderSolid.cdl \ - GEOMAlgo_BuilderTools.cdl \ - GEOMAlgo_Clsf.cdl \ - GEOMAlgo_ClsfBox.cdl \ - GEOMAlgo_ClsfSolid.cdl \ - GEOMAlgo_ClsfSurf.cdl \ - GEOMAlgo_CoupleOfShapes.cdl \ - GEOMAlgo_FinderShapeOn.cdl \ - GEOMAlgo_FinderShapeOn1.cdl \ - GEOMAlgo_FinderShapeOn2.cdl \ - GEOMAlgo_GlueAnalyser.cdl \ - GEOMAlgo_Gluer.cdl \ - GEOMAlgo_HAlgo.cdl \ - GEOMAlgo_PassKey.cdl \ - GEOMAlgo_PassKeyMapHasher.cdl \ - GEOMAlgo_PassKeyShape.cdl \ - GEOMAlgo_PassKeyShapeMapHasher.cdl \ - GEOMAlgo_ShapeAlgo.cdl \ - GEOMAlgo_ShapeInfo.cdl \ - GEOMAlgo_ShapeInfoFiller.cdl \ - GEOMAlgo_ShapeSet.cdl \ - GEOMAlgo_ShapeSolid.cdl \ - GEOMAlgo_ShellSolid.cdl \ - GEOMAlgo_SolidSolid.cdl \ - GEOMAlgo_Splitter.cdl \ - GEOMAlgo_StateCollector.cdl \ - GEOMAlgo_SurfaceTools.cdl \ - GEOMAlgo_Tools.cdl \ - GEOMAlgo_Tools3D.cdl \ - GEOMAlgo_VertexSolid.cdl \ - GEOMAlgo_WESCorrector.cdl \ - GEOMAlgo_WESScaler.cdl \ - GEOMAlgo_WireEdgeSet.cdl \ - GEOMAlgo_WireSolid.cdl \ - GEOMAlgo_WireSplitter.cdl + GEOMAlgo.cdl -EXTRA_DIST += $(CDL_FILES) +EXTRA_DIST += \ + $(CDL_FILES) \ + FILES diff --git a/src/GEOMAlgo_NEW/BlockFix.cdl b/src/GEOMAlgo_NEW/BlockFix.cdl deleted file mode 100644 index 961af6625..000000000 --- a/src/GEOMAlgo_NEW/BlockFix.cdl +++ /dev/null @@ -1,67 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: BlockFix.cdl --- Created: Tue Dec 7 11:59:05 2004 --- Author: Pavel Durandin --- -package BlockFix - -uses - - TColStd, - gp, - Geom, - Geom2d, - GeomAbs, - TopLoc, - TopoDS, - BRepTools, - TopTools, - ShapeBuild - -is - - class SphereSpaceModifier; - - class UnionFaces; - - class UnionEdges; - - class BlockFixAPI; - ---Purpose: API class to perform the fixing of the - -- block - - class PeriodicSurfaceModifier; - - class CheckTool; - - RotateSphereSpace (S: Shape from TopoDS; Tol: Real) - returns Shape from TopoDS; - - FixRanges (S: Shape from TopoDS; Tol: Real) - returns Shape from TopoDS; - ---Purpose: checking and fixing cases where parametric - -- boundaries of face based on periodic surface are not - -- contained in the range of this surface. - -end BlockFix; diff --git a/src/GEOMAlgo_NEW/BlockFix.cxx b/src/GEOMAlgo_NEW/BlockFix.cxx deleted file mode 100644 index 0e4f9bb21..000000000 --- a/src/GEOMAlgo_NEW/BlockFix.cxx +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com - -// File: BlockFix.cxx -// Created: Tue Dec 7 11:59:05 2004 -// Author: Pavel DURANDIN - -#include - -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -//======================================================================= -//function : FixResult -//purpose : auxilary -//======================================================================= -static void FixResult(const TopoDS_Shape& result, - Handle(ShapeBuild_ReShape)& Context, - const Standard_Real Tol) -{ - for (TopExp_Explorer ex_f(result,TopAbs_FACE); ex_f.More(); ex_f.Next()) { - TopoDS_Shape aShape = Context->Apply(ex_f.Current().Oriented(TopAbs_FORWARD)); - // face coud not be dropped or splitted on this step - TopoDS_Face aFace = TopoDS::Face(aShape); - TopLoc_Location L; - Handle(Geom_Surface) Surf = BRep_Tool::Surface(aFace,L); - - if( Surf->IsKind(STANDARD_TYPE(Geom_SphericalSurface)) || - Surf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ) { - - Standard_Integer nbWires = 0; - for (TopExp_Explorer ex_w(aFace,TopAbs_WIRE); ex_w.More(); ex_w.Next()) { - nbWires++; - Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(TopoDS::Wire(ex_w.Current()), - aFace, - Precision::Confusion()); - sfw->FixReorder(); - if(sfw->StatusReorder ( ShapeExtend_FAIL )) - continue; - - sfw->SetPrecision(2.*Tol); - sfw->FixShifted(); - - Standard_Boolean isDone = sfw->LastFixStatus ( ShapeExtend_DONE ); - isDone |= sfw->FixDegenerated(); - - // remove degenerated edges from not degenerated points - ShapeAnalysis_Edge sae; - Handle(ShapeExtend_WireData) sewd = sfw->WireData(); - Standard_Integer i; - for( i = 1; i<=sewd->NbEdges();i++) { - TopoDS_Edge E = sewd->Edge(i); - if(BRep_Tool::Degenerated(E)&&!sae.HasPCurve(E,aFace)) { - sewd->Remove(i); - isDone = Standard_True; - i--; - } - } - - //isDone |= sfw->FixLacking(); // commented by skl 22.03.2005 (PAL8395) - - // remove neighbour seam edges - if(isDone) { - for( i = 1; iNbEdges();i++) { - if(sewd->IsSeam(i) && sewd->IsSeam(i+1)) { - isDone = Standard_True; - sewd->Remove(i); - sewd->Remove(i); - i--; - } - } - if(sewd->IsSeam(1) && sewd->IsSeam(sewd->NbEdges())) { - sewd->Remove(1); - sewd->Remove(sewd->NbEdges()); - } - } - - if(isDone) { - TopoDS_Wire ResWire = sfw->Wire(); - Context->Replace(ex_w.Current(), ResWire); - }; - } - // Implement fix orientation in case of several wires - if(nbWires > 1) { - TopoDS_Face aFixedFace = TopoDS::Face(Context->Apply(aFace)); - Handle(ShapeFix_Face) sff = new ShapeFix_Face(aFixedFace); - if(sff->FixOrientation()) - Context->Replace(aFixedFace,sff->Face()); - } - } - } -} - -//======================================================================= -//function : RotateSphereSpace -//purpose : -//======================================================================= -TopoDS_Shape BlockFix::RotateSphereSpace (const TopoDS_Shape& S, - const Standard_Real Tol) -{ - // Create a modification description - Handle(BlockFix_SphereSpaceModifier) SR = new BlockFix_SphereSpaceModifier; - SR->SetTolerance(Tol); - - TopTools_DataMapOfShapeShape context; - BRepTools_Modifier MD; - TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD ); - - Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape; - FixResult(result,RS,Tol); - result = RS->Apply(result); - - ShapeFix_Edge sfe; - for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) { - TopoDS_Edge E = TopoDS::Edge(exp.Current()); - sfe.FixVertexTolerance (E); - } - - ShapeFix::SameParameter(result,Standard_False); - return result; -} - -//======================================================================= -//function : RefillProblemFaces -//purpose : -//======================================================================= -TopoDS_Shape BlockFix::RefillProblemFaces (const TopoDS_Shape& aShape) -{ - Standard_Integer NbSamples = 10; - - TopTools_ListOfShape theFaces; - - TopExp_Explorer Explo(aShape, TopAbs_FACE); - for (; Explo.More(); Explo.Next()) - { - TopoDS_Face aFace = TopoDS::Face(Explo.Current()); - BRepAdaptor_Surface BAsurf(aFace); - GeomAbs_SurfaceType SurfType = BAsurf.GetType(); - if (SurfType >= GeomAbs_BezierSurface) - { - TopExp_Explorer fexp(aFace, TopAbs_EDGE); - for (; fexp.More(); fexp.Next()) - { - const TopoDS_Edge& anEdge = TopoDS::Edge(fexp.Current()); - if (BRep_Tool::Degenerated(anEdge)) - { - TopoDS_Vertex V1, V2; - TopExp::Vertices(anEdge, V1, V2); - if (V1.IsSame(V2)) - { - gp_Pnt aPnt = BRep_Tool::Pnt(V1); - Standard_Real TolV = BRep_Tool::Tolerance(V1); - Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); - Handle(ShapeAnalysis_Surface) Analyser = new ShapeAnalysis_Surface(aSurf); - if (Analyser->IsDegenerated(aPnt, TolV)) - { - theFaces.Append(aFace); - break; - } - } - } - } - } - } - - //Now all problem faces are collected in the list "theFaces" - BRepTools_Substitution aSubst; - TopTools_ListIteratorOfListOfShape itl(theFaces); - for (; itl.More(); itl.Next()) - { - const TopoDS_Face& aFace = TopoDS::Face(itl.Value()); - BRepOffsetAPI_MakeFilling Filler; - for (Explo.Init(aFace, TopAbs_EDGE); Explo.More(); Explo.Next()) - { - const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current()); - if (!BRep_Tool::Degenerated(anEdge)) - Filler.Add(anEdge, GeomAbs_C0); - } - Standard_Real Umin, Umax, Vmin, Vmax; - BRepTools::UVBounds(aFace, Umin, Umax, Vmin, Vmax); - //Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); - Standard_Integer i, j; - for (i = 1; i < NbSamples; i++) - for (j = 1; j < NbSamples; j++) { - /* - gp_Pnt aPoint = aSurf->Value(Umin + i*(Umax-Umin)/NbSamples, - Vmin + j*(Vmax-Vmin)/NbSamples); - Filler.Add(aPoint); - */ - Filler.Add(Umin + i*(Umax-Umin)/NbSamples, - Vmin + j*(Vmax-Vmin)/NbSamples, - aFace, GeomAbs_G1); - } - - Filler.Build(); - if (Filler.IsDone()) - { - for (Explo.Init(aFace, TopAbs_EDGE); Explo.More(); Explo.Next()) - { - const TopoDS_Edge& anEdge = TopoDS::Edge(Explo.Current()); - TopTools_ListOfShape Ledge; - if (!BRep_Tool::Degenerated(anEdge)) - { - const TopTools_ListOfShape& Ledges = Filler.Generated(anEdge); - if (!Ledges.IsEmpty()) { - TopoDS_Shape NewEdge = Ledges.First(); - Ledge.Append(NewEdge.Oriented(TopAbs_FORWARD)); - } - } - aSubst.Substitute(anEdge, Ledge); - } - TopTools_ListOfShape Lface; - TopoDS_Face NewFace = TopoDS::Face(Filler.Shape()); - NewFace.Orientation(TopAbs_FORWARD); - BRepAdaptor_Surface NewBAsurf(NewFace); - gp_Pnt MidPnt; - gp_Vec D1U, D1V, Normal, NewNormal; - Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace); - aSurf->D1((Umin+Umax)*0.5, (Vmin+Vmax)*0.5, MidPnt, D1U, D1V); - Normal = D1U ^ D1V; - NewBAsurf.D1((NewBAsurf.FirstUParameter() + NewBAsurf.LastUParameter())*0.5, - (NewBAsurf.FirstVParameter() + NewBAsurf.LastVParameter())*0.5, - MidPnt, D1U, D1V); - NewNormal = D1U ^ D1V; - if (Normal * NewNormal < 0.) - NewFace.Reverse(); - Lface.Append(NewFace); - aSubst.Substitute(aFace, Lface); - } - } - aSubst.Build(aShape); - - TopoDS_Shape Result = aShape; - if (aSubst.IsCopied(aShape)) - Result = aSubst.Copy(aShape).First(); - - BRepTools::RemoveUnusedPCurves(Result); - - return Result; -} - -//======================================================================= -//function : FixRanges -//purpose : -//======================================================================= -TopoDS_Shape BlockFix::FixRanges (const TopoDS_Shape& S, - const Standard_Real Tol) -{ - // Create a modification description - Handle(BlockFix_PeriodicSurfaceModifier) SR = new BlockFix_PeriodicSurfaceModifier; - SR->SetTolerance(Tol); - - TopTools_DataMapOfShapeShape context; - BRepTools_Modifier MD; - TopoDS_Shape result = ShapeCustom::ApplyModifier ( S, SR, context,MD ); - - Handle(ShapeBuild_ReShape) RS = new ShapeBuild_ReShape; - FixResult(result,RS,Tol); - result = RS->Apply(result); - - ShapeFix_Edge sfe; - for(TopExp_Explorer exp(result,TopAbs_EDGE); exp.More(); exp.Next()) { - TopoDS_Edge E = TopoDS::Edge(exp.Current()); - sfe.FixVertexTolerance (E); - } - - ShapeFix::SameParameter(result,Standard_False); - - return result; -} diff --git a/src/GEOMAlgo_NEW/BlockFix.hxx b/src/GEOMAlgo_NEW/BlockFix.hxx deleted file mode 100644 index 34007be5c..000000000 --- a/src/GEOMAlgo_NEW/BlockFix.hxx +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _BlockFix_HeaderFile -#define _BlockFix_HeaderFile - -#ifndef _Standard_Real_HeaderFile -#include -#endif - -class TopoDS_Shape; -class BlockFix_SphereSpaceModifier; -class BlockFix_UnionFaces; -class BlockFix_UnionEdges; -class BlockFix_BlockFixAPI; -class BlockFix_PeriodicSurfaceModifier; -class BlockFix_CheckTool; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class BlockFix { - -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); - } - - Standard_EXPORT static TopoDS_Shape RotateSphereSpace(const TopoDS_Shape& S,const Standard_Real Tol); - Standard_EXPORT static TopoDS_Shape RefillProblemFaces(const TopoDS_Shape& S); - Standard_EXPORT static TopoDS_Shape FixRanges(const TopoDS_Shape& S,const Standard_Real Tol); - -protected: - -private: - -friend class BlockFix_SphereSpaceModifier; -friend class BlockFix_UnionFaces; -friend class BlockFix_UnionEdges; -friend class BlockFix_BlockFixAPI; -friend class BlockFix_PeriodicSurfaceModifier; -friend class BlockFix_CheckTool; - -}; - -// other Inline functions and methods (like "C++: function call" methods) - -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix.ixx b/src/GEOMAlgo_NEW/BlockFix.ixx deleted file mode 100644 index 2ea228ff7..000000000 --- a/src/GEOMAlgo_NEW/BlockFix.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo_NEW/BlockFix.jxx b/src/GEOMAlgo_NEW/BlockFix.jxx deleted file mode 100644 index 8649f8895..000000000 --- a/src/GEOMAlgo_NEW/BlockFix.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _BlockFix_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cdl b/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cdl deleted file mode 100644 index 8cb4c49ce..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cdl +++ /dev/null @@ -1,68 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: BlockFix_BlockFixAPI.cdl --- Created: Tue Dec 7 17:56:09 2004 --- Author: Pavel Durandin --- -class BlockFixAPI from BlockFix inherits TShared from MMgt - - ---Purpose: - -uses - - Shape from TopoDS, - ReShape from ShapeBuild - -is - Create returns BlockFixAPI from BlockFix; - ---Purpose: Empty constructor - - SetShape(me: mutable; Shape: Shape from TopoDS); - ---Purpose: Sets the shape to be operated on - ---C++: inline - - Perform(me: mutable); - ---Purpose: - - Shape(me) returns Shape from TopoDS; - ---Purpose: Returns resulting shape. - ---C++: inline - - Context(me:mutable) returns ReShape from ShapeBuild; - ---Purpose: Returns modifiable context for storing the - -- mofifications - ---C++: inline - ---C++: return & - - Tolerance (me:mutable) returns Real; - ---Purpose: Returns modifiable tolerance of recognition - ---C++: inline - ---C++: return & - -fields - - myContext : ReShape from ShapeBuild; - myShape : Shape from TopoDS; - myTolerance : Real from Standard; - -end BlockFixAPI from BlockFix; diff --git a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cxx b/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cxx deleted file mode 100644 index 3c82e4a84..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cxx +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com - -// File: BlockFix_BlockFixAPI.cxx -// Created: Tue Dec 7 11:59:05 2004 -// Author: Pavel DURANDIN - -#include - -#include -#include -#include - -#include - -#include - -#include - -//======================================================================= -//function : ShapeConvert_CanonicAPI -//purpose : -//======================================================================= - -BlockFix_BlockFixAPI::BlockFix_BlockFixAPI() -{ - myTolerance = Precision::Confusion(); - myOptimumNbFaces = 6; -} - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void BlockFix_BlockFixAPI::Perform() -{ - // processing spheres with degenerativities - TopoDS_Shape aShape = Shape(); - myShape = BlockFix::RotateSphereSpace(aShape,myTolerance); - - // try to approximate non-canonic surfaces - // with singularities on boundaries by filling - myShape = BlockFix::RefillProblemFaces(myShape); - - // faces unification - BlockFix_UnionFaces aFaceUnifier; - aFaceUnifier.GetTolerance() = myTolerance; - aFaceUnifier.GetOptimumNbFaces() = myOptimumNbFaces; - TopoDS_Shape aResult = aFaceUnifier.Perform(myShape); - - // avoid problem with degenerated edges appearance - // due to shape quality regress - ShapeUpgrade_RemoveLocations RemLoc; - RemLoc.Remove(aResult); - aResult = RemLoc.GetResult(); - - // edges unification - BlockFix_UnionEdges anEdgeUnifier; - myShape = anEdgeUnifier.Perform(aResult,myTolerance); - - TopoDS_Shape aRes = BlockFix::FixRanges(myShape,myTolerance); - myShape = aRes; -} diff --git a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.hxx b/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.hxx deleted file mode 100644 index 7be25cc57..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.hxx +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _BlockFix_BlockFixAPI_HeaderFile -#define _BlockFix_BlockFixAPI_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_BlockFix_BlockFixAPI_HeaderFile -#include -#endif - -#ifndef _Handle_ShapeBuild_ReShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _MMgt_TShared_HeaderFile -#include -#endif - -class ShapeBuild_ReShape; -class TopoDS_Shape; - - -class BlockFix_BlockFixAPI : public MMgt_TShared -{ -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 - // - Standard_EXPORT BlockFix_BlockFixAPI(); - void SetShape(const TopoDS_Shape& Shape); - Standard_EXPORT void Perform(); - TopoDS_Shape Shape() const; - Handle_ShapeBuild_ReShape& Context(); - Standard_Real& Tolerance(); - Standard_Integer& OptimumNbFaces(); - Standard_EXPORT ~BlockFix_BlockFixAPI(); - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& BlockFix_BlockFixAPI_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -private: - // Fields PRIVATE - // - Handle_ShapeBuild_ReShape myContext; - TopoDS_Shape myShape; - Standard_Real myTolerance; - Standard_Integer myOptimumNbFaces; -}; - -#include - -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.ixx b/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.ixx deleted file mode 100644 index 4d06a875e..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.ixx +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -BlockFix_BlockFixAPI::~BlockFix_BlockFixAPI() {} - - - -Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_() -{ - - static Handle_Standard_Type 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("BlockFix_BlockFixAPI", - sizeof(BlockFix_BlockFixAPI), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(BlockFix_BlockFixAPI) Handle(BlockFix_BlockFixAPI)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(BlockFix_BlockFixAPI) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(BlockFix_BlockFixAPI))) { - _anOtherObject = Handle(BlockFix_BlockFixAPI)((Handle(BlockFix_BlockFixAPI)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& BlockFix_BlockFixAPI::DynamicType() const -{ - return STANDARD_TYPE(BlockFix_BlockFixAPI) ; -} -Standard_Boolean BlockFix_BlockFixAPI::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(BlockFix_BlockFixAPI) == AType || MMgt_TShared::IsKind(AType)); -} -Handle_BlockFix_BlockFixAPI::~Handle_BlockFix_BlockFixAPI() {} - diff --git a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.jxx b/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.jxx deleted file mode 100644 index 945a6ed88..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _ShapeBuild_ReShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _BlockFix_BlockFixAPI_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.lxx b/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.lxx deleted file mode 100644 index 5992e1794..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.lxx +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -//======================================================================= -//function : SetShape -//purpose : -//======================================================================= - -inline void BlockFix_BlockFixAPI::SetShape(const TopoDS_Shape& Shape) -{ - myShape = Shape; -} - -//======================================================================= -//function : Shape -//purpose : -//======================================================================= - -inline TopoDS_Shape BlockFix_BlockFixAPI::Shape() const -{ - return myShape; -} - -//======================================================================= -//function : Context -//purpose : -//======================================================================= - -inline Handle(ShapeBuild_ReShape)& BlockFix_BlockFixAPI::Context() -{ - return myContext; -} - -//======================================================================= -//function : Tolerance -//purpose : -//======================================================================= - -inline Standard_Real& BlockFix_BlockFixAPI::Tolerance() -{ - return myTolerance; -} - -//======================================================================= -//function : OptimumNbFaces -//purpose : -//======================================================================= - -inline Standard_Integer& BlockFix_BlockFixAPI::OptimumNbFaces() -{ - return myOptimumNbFaces; -} diff --git a/src/GEOMAlgo_NEW/BlockFix_CheckTool.cdl b/src/GEOMAlgo_NEW/BlockFix_CheckTool.cdl deleted file mode 100644 index c5423377f..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_CheckTool.cdl +++ /dev/null @@ -1,67 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: BlockFix_CheckTool.cdl --- Created: Fri Dec 17 10:36:58 2004 --- Author: Sergey KUUL --- -class CheckTool from BlockFix - - ---Purpose: - -uses - - Shape from TopoDS, - SequenceOfShape from TopTools - -is - - Create returns CheckTool from BlockFix; - ---Purpose: Empty constructor - - SetShape(me: in out; aShape: Shape from TopoDS); - - Perform(me: in out); - ---Purpose: - - NbPossibleBlocks(me) returns Integer; - - PossibleBlock(me; num: Integer) returns Shape from TopoDS; - - DumpCheckResult(me; S : in out OStream); - ---Purpose: Dumps results of checking - - -fields - - myShape : Shape from TopoDS; - myHasCheck : Boolean; - myNbSolids : Integer; - myNbBlocks : Integer; - myPossibleBlocks : SequenceOfShape from TopTools; - myNbDegen : Integer; - myNbUF : Integer; - myNbUE : Integer; - myNbUFUE : Integer; - myBadRanges : Integer; - -end CheckTool; diff --git a/src/GEOMAlgo_NEW/BlockFix_CheckTool.cxx b/src/GEOMAlgo_NEW/BlockFix_CheckTool.cxx deleted file mode 100644 index 674ef69dd..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_CheckTool.cxx +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: BlockFix_CheckTool.cxx -// Created: 17.12.04 11:15:25 -// Author: Sergey KUUL -// -#include - -//#include -//#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -//======================================================================= -//function : BlockFix_CheckTool() -//purpose : Constructor -//======================================================================= - -BlockFix_CheckTool::BlockFix_CheckTool( ) -{ - myHasCheck = Standard_False; - myPossibleBlocks.Clear(); -} - - -//======================================================================= -//function : SetShape -//purpose : -//======================================================================= - -void BlockFix_CheckTool::SetShape(const TopoDS_Shape& aShape) -{ - myHasCheck = Standard_False; - myShape = aShape; - myPossibleBlocks.Clear(); -} - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -void BlockFix_CheckTool::Perform() -{ - myNbSolids=0; - myNbBlocks=0; - myNbDegen=0; - myNbUF=0; - myNbUE=0; - myNbUFUE=0; - - TopExp_Explorer exps (myShape, TopAbs_SOLID); - TopTools_MapOfShape mapS; - for (; exps.More(); exps.Next()) { - TopoDS_Solid aSolid = TopoDS::Solid(exps.Current()); - if (!mapS.Add(aSolid)) continue; - myNbSolids++; - Standard_Boolean IsBlock=Standard_True; - Standard_Boolean MayBeUF=Standard_False; - Standard_Boolean MayBeUE=Standard_False; - Standard_Integer nf=0; - TopExp_Explorer expf (aSolid, TopAbs_FACE); - TopTools_MapOfShape mapF; - for (; expf.More(); expf.Next()) { - if (mapF.Add(expf.Current())) - nf++; - } - - if (nf < 6) { - IsBlock = Standard_False; - } - else if (nf > 6) { - IsBlock = Standard_False; - // check faces unification - TopTools_SequenceOfShape faces; - mapF.Clear(); - for (expf.Init(aSolid, TopAbs_FACE); expf.More(); expf.Next()) { - if (mapF.Add(expf.Current())) { - TopoDS_Face aFace = TopoDS::Face(expf.Current()); - faces.Append(aFace); - } - } - Standard_Boolean HasFacesForUnification = Standard_False; - for (Standard_Integer i=1; i 0) { - IsBlock = Standard_False; - myNbDegen++; - myPossibleBlocks.Append(aSolid); - continue; - } - if (nbe < 12) - IsBlock = Standard_False; - if (nbe > 12) { - IsBlock = Standard_False; - // check edges unification - // creating map of edge faces - TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces; - TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces); - - mapF.Clear(); - for (expf.Init(aSolid, TopAbs_FACE); expf.More(); expf.Next()) { - TopoDS_Face aFace = TopoDS::Face(expf.Current()); - if (!mapF.Add(aFace)) continue; - TopTools_IndexedDataMapOfShapeListOfShape aMapFacesEdges; - - TopTools_MapOfShape mapEe; - for (expe.Init(aFace, TopAbs_EDGE); expe.More(); expe.Next()) { - TopoDS_Edge edge = TopoDS::Edge(expe.Current()); - if (!mapEe.Add(edge)) continue; - if (!aMapEdgeFaces.Contains(edge)) continue; - const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge); - TopTools_ListIteratorOfListOfShape anIter (aList); - for (; anIter.More(); anIter.Next()) { - TopoDS_Face face = TopoDS::Face(anIter.Value()); - if (face.IsSame(aFace)) continue; - if (aMapFacesEdges.Contains(face)) { - aMapFacesEdges.ChangeFromKey(face).Append(edge); - } - else { - TopTools_ListOfShape ListEdges; - ListEdges.Append(edge); - aMapFacesEdges.Add(face,ListEdges); - } - } - } - Standard_Integer i = 1; - for (; i <= aMapFacesEdges.Extent(); i++) { - const TopTools_ListOfShape& ListEdges = aMapFacesEdges.FindFromIndex(i); - if (ListEdges.Extent() > 1) break; - } - if (i <= aMapFacesEdges.Extent()) { - MayBeUE = Standard_True; - break; - } - } - } - - if (IsBlock) - myNbBlocks++; - else { - if (MayBeUF) { - myPossibleBlocks.Append(aSolid); - if (MayBeUE) - myNbUFUE++; - else - myNbUF++; - } - else if (MayBeUE) { - myNbUE++; - myPossibleBlocks.Append(aSolid); - } - } - } - - myHasCheck = Standard_True; -} - - -//======================================================================= -//function : NbPossibleBlocks -//purpose : -//======================================================================= - -Standard_Integer BlockFix_CheckTool::NbPossibleBlocks() const -{ - return myPossibleBlocks.Length(); -} - - -//======================================================================= -//function : PossibleBlock -//purpose : -//======================================================================= - -TopoDS_Shape BlockFix_CheckTool::PossibleBlock(const Standard_Integer num) const -{ - TopoDS_Shape res; - if( num>0 && num<=myPossibleBlocks.Length() ) - res = myPossibleBlocks.Value(num); - return res; -} - - -//======================================================================= -//function : DumpCheckResult -//purpose : -//======================================================================= - -void BlockFix_CheckTool::DumpCheckResult(Standard_OStream& S) const -{ - if(!myHasCheck) - S<<"Check not performed!"< - - - - diff --git a/src/GEOMAlgo_NEW/BlockFix_CheckTool.jxx b/src/GEOMAlgo_NEW/BlockFix_CheckTool.jxx deleted file mode 100644 index 7574af057..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_CheckTool.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _BlockFix_CheckTool_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.cdl b/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.cdl deleted file mode 100644 index 374af919c..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.cdl +++ /dev/null @@ -1,135 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: BlockFix_PeriodicSurfaceModifier.cdl --- Created: Wed Dec 15 10:03:50 2004 --- Author: Sergey KUUL --- -class PeriodicSurfaceModifier from BlockFix inherits Modification from BRepTools - - ---Purpose: - -uses - Vertex from TopoDS, - Edge from TopoDS, - Face from TopoDS, - Location from TopLoc, - Shape from GeomAbs, - Pnt from gp, - Curve from Geom, - Curve from Geom2d, - Surface from Geom, - IndexedMapOfTransient from TColStd, - DataMapOfShapeInteger from TopTools - -is - - Create returns mutable PeriodicSurfaceModifier from BlockFix; - - SetTolerance(me: mutable; Toler: Real); - ---Purpose: Sets the tolerance for recognition of geometry - - NewSurface(me: mutable; F : Face from TopoDS; - S : out Surface from Geom; - L : out Location from TopLoc; - Tol: out Real from Standard; - RevWires : out Boolean from Standard; - RevFace : out Boolean from Standard) - returns Boolean from Standard; - ---Purpose: Returns Standard_True if the face has been - -- modified. In this case, is the new geometric - -- support of the face, the new location, - -- the new tolerance. Otherwise, returns - -- Standard_False, and , , are not - -- significant. - - NewCurve(me: mutable; E : Edge from TopoDS; - C : out Curve from Geom; - L : out Location from TopLoc; - Tol: out Real from Standard) - returns Boolean from Standard; - ---Purpose: Returns Standard_True if the edge has been - -- modified. In this case, is the new geometric - -- support of the edge, the new location, - -- the new tolerance. Otherwise, returns - -- Standard_False, and , , are not - -- significant. - - NewPoint(me: mutable; V : Vertex from TopoDS; - P : out Pnt from gp; - Tol: out Real from Standard) - returns Boolean from Standard; - ---Purpose: Returns Standard_True if the vertex has been - -- modified. In this case,

is the new geometric - -- support of the vertex, the new tolerance. - -- Otherwise, returns Standard_False, and

, - -- are not significant. - - NewCurve2d(me: mutable; E : Edge from TopoDS; - F : Face from TopoDS; - NewE : Edge from TopoDS; - NewF : Face from TopoDS; - C : out Curve from Geom2d; - Tol : out Real from Standard) - returns Boolean from Standard; - ---Purpose: Returns Standard_True if the edge has a new - -- curve on surface on the face .In this case, - -- is the new geometric support of the edge, the - -- new location, the new tolerance. - -- - -- Otherwise, returns Standard_False, and , , - -- are not significant. - -- - -- is the new edge created from . - -- is the new face created from . They may be usefull. - - NewParameter(me: mutable; V : Vertex from TopoDS; - E : Edge from TopoDS; - P : out Real from Standard; - Tol: out Real from Standard) - returns Boolean from Standard; - ---Purpose: Returns Standard_True if the Vertex has a new - -- parameter on the edge . In this case,

is - -- the parameter, the new tolerance. - -- Otherwise, returns Standard_False, and

, - -- are not significant. - - Continuity(me: mutable; E : Edge from TopoDS; - F1,F2 : Face from TopoDS; - NewE : Edge from TopoDS; - NewF1,NewF2: Face from TopoDS) - returns Shape from GeomAbs; - ---Purpose: Returns the continuity of between - -- and . - -- - -- is the new edge created from . - -- (resp. ) is the new face created from - -- (resp. ). - - -fields - - myTolerance : Real; - myMapOfFaces : DataMapOfShapeInteger from TopTools; - myMapOfSurfaces: IndexedMapOfTransient from TColStd; - -end PeriodicSurfaceModifier; diff --git a/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.cxx b/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.cxx deleted file mode 100644 index 1e9f33ca0..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.cxx +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: BlockFix_PeriodicSurfaceModifier.cxx -// Created: 15.12.04 10:08:50 -// Author: Sergey KUUL - -#include - -#include -#include -#include -#include -#include -#include -#include - - -//======================================================================= -//function : BlockFix_PeriodicSurfaceModifier() -//purpose : Constructor -//======================================================================= - -BlockFix_PeriodicSurfaceModifier::BlockFix_PeriodicSurfaceModifier ( ) -{ - myMapOfFaces.Clear(); - myMapOfSurfaces.Clear(); -} - - -//======================================================================= -//function : SetTolerance -//purpose : -//======================================================================= - -void BlockFix_PeriodicSurfaceModifier::SetTolerance(const Standard_Real Tol) -{ - myTolerance = Tol; -} - - -//======================================================================= -//function : ModifySurface -//purpose : auxilary -//======================================================================= - -static Standard_Boolean ModifySurface(const TopoDS_Face& aFace, - const Handle(Geom_Surface)& aSurface, - Handle(Geom_Surface)& aNewSurface) -{ - Handle(Geom_Surface) S = aSurface; - - if(S->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) { - Handle(Geom_CylindricalSurface) aCyl = - Handle(Geom_CylindricalSurface)::DownCast(S); - Standard_Real Umin, Umax, Vmin, Vmax; - BRepTools::UVBounds(aFace, Umin, Umax, Vmin, Vmax); - if (Umin < -Precision::PConfusion() || Umax > 2*M_PI + Precision::PConfusion()) { - gp_Ax3 ax3 = aCyl->Position(); - gp_Ax1 NDir = ax3.Axis(); - gp_Ax3 newax3 = ax3.Rotated(NDir,Umin-Precision::PConfusion()); - Handle(Geom_CylindricalSurface) aNewCyl = - new Geom_CylindricalSurface(newax3,aCyl->Radius()); - aNewSurface = aNewCyl; - return Standard_True; - } - } - - if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) { - Handle(Geom_SphericalSurface) aSphere = Handle(Geom_SphericalSurface)::DownCast(S); - Standard_Real Umin, Umax, Vmin, Vmax; - BRepTools::UVBounds(aFace, Umin, Umax, Vmin, Vmax); - if (Umin < -Precision::PConfusion() || Umax > 2*M_PI + Precision::PConfusion()) { - gp_Ax3 ax3 = aSphere->Position(); - gp_Ax1 NDir = ax3.Axis(); - gp_Ax3 newax3 = ax3.Rotated(NDir,Umin-Precision::PConfusion()); - Handle(Geom_SphericalSurface) aNewSphere = new Geom_SphericalSurface(newax3,aSphere->Radius()); - aNewSurface = aNewSphere; - return Standard_True; - } - } - - return Standard_False; -} - - -//======================================================================= -//function : NewSurface -//purpose : -//======================================================================= - -Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewSurface(const TopoDS_Face& F, - Handle(Geom_Surface)& S, - TopLoc_Location& L,Standard_Real& Tol, - Standard_Boolean& RevWires, - Standard_Boolean& RevFace) -{ - TopLoc_Location LS; - Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS); - - if(ModifySurface(F, SIni, S)) { - - RevWires = Standard_False; - RevFace = Standard_False; - - L = LS; - Tol = BRep_Tool::Tolerance(F); - - Standard_Integer anIndex = myMapOfSurfaces.Add(S); - myMapOfFaces.Bind(F,anIndex); - return Standard_True; - } - - return Standard_False; -} - - -//======================================================================= -//function : NewCurve -//purpose : -//======================================================================= - -Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve(const TopoDS_Edge& /*E*/, - Handle(Geom_Curve)& /*C*/, - TopLoc_Location& /*L*/, - Standard_Real& /*Tol*/) -{ - return Standard_False; -} - - -//======================================================================= -//function : NewPoint -//purpose : -//======================================================================= - -Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewPoint(const TopoDS_Vertex& /*V*/, - gp_Pnt& /*P*/, - Standard_Real& /*Tol*/) -{ - return Standard_False; -} - - -//======================================================================= -//function : NewCurve2d -//purpose : -//======================================================================= - -Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewCurve2d(const TopoDS_Edge& E, - const TopoDS_Face& F, - const TopoDS_Edge& /*NewE*/, - const TopoDS_Face& /*NewF*/, - Handle(Geom2d_Curve)& C, - Standard_Real& Tol) -{ - //check if undelying surface of the face was modified - if(myMapOfFaces.IsBound(F)) { - Standard_Integer anIndex = myMapOfFaces.Find(F); - - Handle(Geom_Surface) aNewSurf = Handle(Geom_Surface)::DownCast(myMapOfSurfaces.FindKey(anIndex)); - - Standard_Real f,l; - TopLoc_Location LC, LS; - Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l ); - Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS); - - //taking into accound the orientation of the seam - C = BRep_Tool::CurveOnSurface(E,F,f,l); - Tol = BRep_Tool::Tolerance(E); - - BRep_Builder B; - TopoDS_Edge TempE; - B.MakeEdge(TempE); - B.Add(TempE, TopExp::FirstVertex(E)); - B.Add(TempE, TopExp::LastVertex(E)); - - if(!C3d.IsNull()) - B.UpdateEdge(TempE, Handle(Geom_Curve)::DownCast(C3d->Transformed(LC.Transformation())), Precision::Confusion()); - B.Range(TempE, f, l); - - Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge; - Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSurf->Transformed(LS.Transformation())); - TopLoc_Location LTemp; - LTemp.Identity(); - - Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F); - Standard_Real aWorkTol = 2*myTolerance+Tol; - sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol)); - sfe->FixSameParameter(TempE); - - //keep the orientation of original edge - TempE.Orientation(E.Orientation()); - C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l); - - //surface was modified - return Standard_True; - } - - return Standard_False; -} - - -//======================================================================= -//function : NewParameter -//purpose : -//======================================================================= - -Standard_Boolean BlockFix_PeriodicSurfaceModifier::NewParameter(const TopoDS_Vertex& /*V*/, - const TopoDS_Edge& /*E*/, - Standard_Real& /*P*/, - Standard_Real& /*Tol*/) -{ - return Standard_False; -} - - -//======================================================================= -//function : Continuity -//purpose : -//======================================================================= - -GeomAbs_Shape BlockFix_PeriodicSurfaceModifier::Continuity(const TopoDS_Edge& E, - const TopoDS_Face& F1, - const TopoDS_Face& F2, - const TopoDS_Edge& /*NewE*/, - const TopoDS_Face& /*NewF1*/, - const TopoDS_Face& /*NewF2*/) -{ - return BRep_Tool::Continuity(E,F1,F2); -} - diff --git a/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.hxx b/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.hxx deleted file mode 100644 index 39d2062ea..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.hxx +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _BlockFix_PeriodicSurfaceModifier_HeaderFile -#define _BlockFix_PeriodicSurfaceModifier_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_BlockFix_PeriodicSurfaceModifier_HeaderFile -#include -#endif - -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _TopTools_DataMapOfShapeInteger_HeaderFile -#include -#endif -#ifndef _TColStd_IndexedMapOfTransient_HeaderFile -#include -#endif -#ifndef _BRepTools_Modification_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Handle_Geom_Surface_HeaderFile -#include -#endif -#ifndef _Handle_Geom_Curve_HeaderFile -#include -#endif -#ifndef _Handle_Geom2d_Curve_HeaderFile -#include -#endif -#ifndef _GeomAbs_Shape_HeaderFile -#include -#endif -class TopoDS_Face; -class Geom_Surface; -class TopLoc_Location; -class TopoDS_Edge; -class Geom_Curve; -class TopoDS_Vertex; -class gp_Pnt; -class Geom2d_Curve; - - -class BlockFix_PeriodicSurfaceModifier : public BRepTools_Modification { - -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 - // -Standard_EXPORT BlockFix_PeriodicSurfaceModifier(); -Standard_EXPORT void SetTolerance(const Standard_Real Toler) ; -Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ; -Standard_EXPORT Standard_Boolean NewCurve(const TopoDS_Edge& E,Handle(Geom_Curve)& C,TopLoc_Location& L,Standard_Real& Tol) ; -Standard_EXPORT Standard_Boolean NewPoint(const TopoDS_Vertex& V,gp_Pnt& P,Standard_Real& Tol) ; -Standard_EXPORT Standard_Boolean NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F,const TopoDS_Edge& NewE,const TopoDS_Face& NewF,Handle(Geom2d_Curve)& C,Standard_Real& Tol) ; -Standard_EXPORT Standard_Boolean NewParameter(const TopoDS_Vertex& V,const TopoDS_Edge& E,Standard_Real& P,Standard_Real& Tol) ; -Standard_EXPORT GeomAbs_Shape Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1,const TopoDS_Face& F2,const TopoDS_Edge& NewE,const TopoDS_Face& NewF1,const TopoDS_Face& NewF2) ; -Standard_EXPORT ~BlockFix_PeriodicSurfaceModifier(); - - - - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Real myTolerance; -TopTools_DataMapOfShapeInteger myMapOfFaces; -TColStd_IndexedMapOfTransient myMapOfSurfaces; - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.ixx b/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.ixx deleted file mode 100644 index da3bdc95e..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.ixx +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -BlockFix_PeriodicSurfaceModifier::~BlockFix_PeriodicSurfaceModifier() {} - - - -Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(BRepTools_Modification); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(BRepTools_Modification); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("BlockFix_PeriodicSurfaceModifier", - sizeof(BlockFix_PeriodicSurfaceModifier), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(BlockFix_PeriodicSurfaceModifier) Handle(BlockFix_PeriodicSurfaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(BlockFix_PeriodicSurfaceModifier) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier))) { - _anOtherObject = Handle(BlockFix_PeriodicSurfaceModifier)((Handle(BlockFix_PeriodicSurfaceModifier)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& BlockFix_PeriodicSurfaceModifier::DynamicType() const -{ - return STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) ; -} -Standard_Boolean BlockFix_PeriodicSurfaceModifier::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier) == AType || BRepTools_Modification::IsKind(AType)); -} -Handle_BlockFix_PeriodicSurfaceModifier::~Handle_BlockFix_PeriodicSurfaceModifier() {} - diff --git a/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.jxx b/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.jxx deleted file mode 100644 index 29c1c1e34..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_PeriodicSurfaceModifier.jxx +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _Geom_Surface_HeaderFile -#include -#endif -#ifndef _TopLoc_Location_HeaderFile -#include -#endif -#ifndef _TopoDS_Edge_HeaderFile -#include -#endif -#ifndef _Geom_Curve_HeaderFile -#include -#endif -#ifndef _TopoDS_Vertex_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _Geom2d_Curve_HeaderFile -#include -#endif -#ifndef _BlockFix_PeriodicSurfaceModifier_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.cdl b/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.cdl deleted file mode 100644 index da614611b..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.cdl +++ /dev/null @@ -1,139 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: BlockFix_SphereSpaceModifier.cdl --- Created: Tue Dec 7 12:01:49 2004 --- Author: Pavel Durandin --- -class SphereSpaceModifier from BlockFix inherits Modification from BRepTools - - ---Purpose: Rotation of the parametric space of the sphere in order - -- to avoid the seam and degenerared edge within it - -uses - Vertex from TopoDS, - Edge from TopoDS, - Face from TopoDS, - Location from TopLoc, - Shape from GeomAbs, - Pnt from gp, - Curve from Geom, - Curve from Geom2d, - Surface from Geom, - IndexedMapOfTransient from TColStd, - DataMapOfShapeInteger from TopTools - -is - - Create returns mutable SphereSpaceModifier from BlockFix; - - SetTolerance(me: mutable; Toler: Real); - ---Purpose: Sets the tolerance for recognition of geometry - - NewSurface(me: mutable; F : Face from TopoDS; - S : out Surface from Geom; - L : out Location from TopLoc; - Tol: out Real from Standard; - RevWires : out Boolean from Standard; - RevFace : out Boolean from Standard) - returns Boolean from Standard; - ---Purpose: Returns Standard_True if the face has been - -- modified. In this case, is the new geometric - -- support of the face, the new location, - -- the new tolerance. Otherwise, returns - -- Standard_False, and , , are not - -- significant. - - NewCurve(me: mutable; E : Edge from TopoDS; - C : out Curve from Geom; - L : out Location from TopLoc; - Tol: out Real from Standard) - returns Boolean from Standard; - ---Purpose: Returns Standard_True if the edge has been - -- modified. In this case, is the new geometric - -- support of the edge, the new location, - -- the new tolerance. Otherwise, returns - -- Standard_False, and , , are not - -- significant. - - NewPoint(me: mutable; V : Vertex from TopoDS; - P : out Pnt from gp; - Tol: out Real from Standard) - returns Boolean from Standard; - ---Purpose: Returns Standard_True if the vertex has been - -- modified. In this case,

is the new geometric - -- support of the vertex, the new tolerance. - -- Otherwise, returns Standard_False, and

, - -- are not significant. - - NewCurve2d(me: mutable; E : Edge from TopoDS; - F : Face from TopoDS; - NewE : Edge from TopoDS; - NewF : Face from TopoDS; - C : out Curve from Geom2d; - Tol : out Real from Standard) - returns Boolean from Standard; - ---Purpose: Returns Standard_True if the edge has a new - -- curve on surface on the face .In this case, - -- is the new geometric support of the edge, the - -- new location, the new tolerance. - -- - -- Otherwise, returns Standard_False, and , , - -- are not significant. - -- - -- is the new edge created from . - -- is the new face created from . They may be usefull. - - NewParameter(me: mutable; V : Vertex from TopoDS; - E : Edge from TopoDS; - P : out Real from Standard; - Tol: out Real from Standard) - returns Boolean from Standard; - ---Purpose: Returns Standard_True if the Vertex has a new - -- parameter on the edge . In this case,

is - -- the parameter, the new tolerance. - -- Otherwise, returns Standard_False, and

, - -- are not significant. - - Continuity(me: mutable; E : Edge from TopoDS; - F1,F2 : Face from TopoDS; - NewE : Edge from TopoDS; - NewF1,NewF2: Face from TopoDS) - returns Shape from GeomAbs; - ---Purpose: Returns the continuity of between - -- and . - -- - -- is the new edge created from . - -- (resp. ) is the new face created from - -- (resp. ). - - ForRotation(me: mutable; F: Face from TopoDS) returns Boolean; - -fields - - myTolerance : Real; - myMapOfFaces : DataMapOfShapeInteger from TopTools; - myMapOfSpheres: IndexedMapOfTransient from TColStd; - --myMapOfGeom: MapOfShapeTransient from TColStd; - -end SphereSpaceModifier; - diff --git a/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.cxx b/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.cxx deleted file mode 100644 index 9e2db755a..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.cxx +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: BlockFix.cxx -// Created: Tue Dec 7 11:59:05 2004 -// Author: Pavel DURANDIN - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -//======================================================================= -//function : BlockFix_SphereSpaceModifier -//purpose : -//======================================================================= - -BlockFix_SphereSpaceModifier::BlockFix_SphereSpaceModifier() -{ - myMapOfFaces.Clear(); - myMapOfSpheres.Clear(); -} - -//======================================================================= -//function : SetTolerance -//purpose : -//======================================================================= - -void BlockFix_SphereSpaceModifier::SetTolerance(const Standard_Real Tol) -{ - myTolerance = Tol; -} - - -//======================================================================= -//function : NewSurface -//purpose : -//======================================================================= - - -static Standard_Boolean ModifySurface(const TopoDS_Face& aFace, - const Handle(Geom_Surface)& aSurface, - Handle(Geom_Surface)& aNewSurface) -{ - Handle(Geom_Surface) S = aSurface; - if(S->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { - Handle(Geom_RectangularTrimmedSurface) RTS = - Handle(Geom_RectangularTrimmedSurface)::DownCast(S); - S = RTS->BasisSurface(); - } - - if(S->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) { - Standard_Real Umin, Umax, Vmin, Vmax; - ShapeAnalysis::GetFaceUVBounds(aFace,Umin, Umax, Vmin, Vmax); - Standard_Real PI2 = M_PI/2.; - if(Vmax > PI2 - Precision::PConfusion() || Vmin < -PI2+::Precision::PConfusion()) { - Handle(Geom_SphericalSurface) aSphere = Handle(Geom_SphericalSurface)::DownCast(S); - gp_Sphere sp = aSphere->Sphere(); - gp_Ax3 ax3 = sp.Position(); - if(Abs(Vmax-Vmin) < PI2) { - gp_Ax3 axnew3(ax3.Axis().Location(), ax3.Direction()^ax3.XDirection(),ax3.XDirection()); - sp.SetPosition(axnew3); - Handle(Geom_SphericalSurface) aNewSphere = new Geom_SphericalSurface(sp); - aNewSurface = aNewSphere; - return Standard_True; - } - else { - gp_Pnt PC = ax3.Location(); - Standard_Real Vpar; - if(fabs(PI2-Vmax)>fabs(-PI2-Vmin)) - Vpar = (PI2+Vmax)/2.; - else - Vpar = (-PI2+Vmin)/2.; - Standard_Real Upar = (Umin+Umax)/2.;; - gp_Pnt PN,PX; - S->D0(Upar,Vpar,PN); - S->D0(Upar+PI2,0.,PX); - gp_Dir newNorm(gp_Vec(PC,PN)); - gp_Dir newDirX(gp_Vec(PC,PX)); - gp_Ax3 axnew3(ax3.Axis().Location(), newNorm, newDirX); - sp.SetPosition(axnew3); - Handle(Geom_SphericalSurface) aNewSphere = new Geom_SphericalSurface(sp); - aNewSurface = aNewSphere; - return Standard_True; - } - } - } - return Standard_False; -} - - -Standard_Boolean BlockFix_SphereSpaceModifier::NewSurface(const TopoDS_Face& F, - Handle(Geom_Surface)& S, - TopLoc_Location& L,Standard_Real& Tol, - Standard_Boolean& RevWires, - Standard_Boolean& RevFace) -{ - TopLoc_Location LS; - Handle(Geom_Surface) SIni = BRep_Tool::Surface(F, LS); - - //check if pole of the sphere in the parametric space - if(ModifySurface(F, SIni, S)) { - - RevWires = Standard_False; - RevFace = Standard_False; - - L = LS; - Tol = BRep_Tool::Tolerance(F); - - Standard_Integer anIndex = myMapOfSpheres.Add(S); - myMapOfFaces.Bind(F,anIndex); - return Standard_True; - } - - return Standard_False; -} - -//======================================================================= -//function : NewCurve -//purpose : -//======================================================================= - -Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve(const TopoDS_Edge& /*E*/,Handle(Geom_Curve)& /*C*/, - TopLoc_Location& /*L*/,Standard_Real& /*Tol*/) -{ - return Standard_False; -} - -//======================================================================= -//function : NewPoint -//purpose : -//======================================================================= - -Standard_Boolean BlockFix_SphereSpaceModifier::NewPoint(const TopoDS_Vertex& /*V*/, - gp_Pnt& /*P*/, - Standard_Real& /*Tol*/) -{ - return Standard_False; -} - -//======================================================================= -//function : NewCurve2d -//purpose : -//======================================================================= - -Standard_Boolean BlockFix_SphereSpaceModifier::NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F, - const TopoDS_Edge& /*NewE*/,const TopoDS_Face& /*NewF*/, - Handle(Geom2d_Curve)& C,Standard_Real& Tol) -{ - //check if undelying surface of the face was modified - if(myMapOfFaces.IsBound(F)) { - Standard_Integer anIndex = myMapOfFaces.Find(F); - - Handle(Geom_Surface) aNewSphere = Handle(Geom_Surface)::DownCast(myMapOfSpheres.FindKey(anIndex)); - - Standard_Real f,l; - TopLoc_Location LC, LS; - Handle(Geom_Curve) C3d = BRep_Tool::Curve ( E, LC, f, l ); - Handle(Geom_Surface) S = BRep_Tool::Surface(F, LS); - - //taking into accound the orientation of the seam - C = BRep_Tool::CurveOnSurface(E,F,f,l); - Tol = BRep_Tool::Tolerance(E); - - BRep_Builder B; - TopoDS_Edge TempE; - B.MakeEdge(TempE); - B.Add(TempE, TopExp::FirstVertex(E)); - B.Add(TempE, TopExp::LastVertex(E)); - - if(!C3d.IsNull()) - B.UpdateEdge(TempE, Handle(Geom_Curve)::DownCast(C3d->Transformed(LC.Transformation())), Precision::Confusion()); - B.Range(TempE, f, l); - - Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge; - Handle(Geom_Surface) STemp = Handle(Geom_Surface)::DownCast(aNewSphere->Transformed(LS.Transformation())); - TopLoc_Location LTemp; - LTemp.Identity(); - - Standard_Boolean isClosed = BRep_Tool::IsClosed (E, F); - Standard_Real aWorkTol = 2*myTolerance+Tol; - sfe->FixAddPCurve(TempE, STemp, LTemp, isClosed, Max(Precision::Confusion(), aWorkTol)); - sfe->FixSameParameter(TempE); - - //keep the orientation of original edge - TempE.Orientation(E.Orientation()); - C = BRep_Tool::CurveOnSurface(TempE, STemp, LTemp, f, l); - - // shifting seam of sphere - if(isClosed && !C.IsNull()) { - Standard_Real f2,l2; - Handle(Geom2d_Curve) c22 = - BRep_Tool::CurveOnSurface(TopoDS::Edge(TempE.Reversed()),STemp, LTemp,f2,l2); - Standard_Real dPreci = Precision::PConfusion()*Precision::PConfusion(); - if((C->Value(f).SquareDistance(c22->Value(f2)) < dPreci) - ||(C->Value(l).SquareDistance(c22->Value(l2)) < dPreci)) { - gp_Vec2d shift(S->UPeriod(),0.); - C->Translate(shift); - } - } - //sphere was modified - return Standard_True; - } - - return Standard_False; -} - - -//======================================================================= -//function : NewParameter -//purpose : -//======================================================================= - -Standard_Boolean BlockFix_SphereSpaceModifier::NewParameter(const TopoDS_Vertex& /*V*/,const TopoDS_Edge& /*E*/, - Standard_Real& /*P*/,Standard_Real& /*Tol*/) -{ - return Standard_False; -} - - -//======================================================================= -//function : Continuity -//purpose : -//======================================================================= - -GeomAbs_Shape BlockFix_SphereSpaceModifier::Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1, - const TopoDS_Face& F2,const TopoDS_Edge& /*NewE*/, - const TopoDS_Face& /*NewF1*/,const TopoDS_Face& /*NewF2*/) -{ - return BRep_Tool::Continuity(E,F1,F2); -} diff --git a/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.hxx b/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.hxx deleted file mode 100644 index fb11fdbae..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.hxx +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _BlockFix_SphereSpaceModifier_HeaderFile -#define _BlockFix_SphereSpaceModifier_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_BlockFix_SphereSpaceModifier_HeaderFile -#include -#endif - -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _TopTools_DataMapOfShapeInteger_HeaderFile -#include -#endif -#ifndef _TColStd_IndexedMapOfTransient_HeaderFile -#include -#endif -#ifndef _BRepTools_Modification_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Handle_Geom_Surface_HeaderFile -#include -#endif -#ifndef _Handle_Geom_Curve_HeaderFile -#include -#endif -#ifndef _Handle_Geom2d_Curve_HeaderFile -#include -#endif -#ifndef _GeomAbs_Shape_HeaderFile -#include -#endif -class TopoDS_Face; -class Geom_Surface; -class TopLoc_Location; -class TopoDS_Edge; -class Geom_Curve; -class TopoDS_Vertex; -class gp_Pnt; -class Geom2d_Curve; - - -class BlockFix_SphereSpaceModifier : public BRepTools_Modification { - -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 - // -Standard_EXPORT BlockFix_SphereSpaceModifier(); -Standard_EXPORT void SetTolerance(const Standard_Real Toler) ; -Standard_EXPORT Standard_Boolean NewSurface(const TopoDS_Face& F,Handle(Geom_Surface)& S,TopLoc_Location& L,Standard_Real& Tol,Standard_Boolean& RevWires,Standard_Boolean& RevFace) ; -Standard_EXPORT Standard_Boolean NewCurve(const TopoDS_Edge& E,Handle(Geom_Curve)& C,TopLoc_Location& L,Standard_Real& Tol) ; -Standard_EXPORT Standard_Boolean NewPoint(const TopoDS_Vertex& V,gp_Pnt& P,Standard_Real& Tol) ; -Standard_EXPORT Standard_Boolean NewCurve2d(const TopoDS_Edge& E,const TopoDS_Face& F,const TopoDS_Edge& NewE,const TopoDS_Face& NewF,Handle(Geom2d_Curve)& C,Standard_Real& Tol) ; -Standard_EXPORT Standard_Boolean NewParameter(const TopoDS_Vertex& V,const TopoDS_Edge& E,Standard_Real& P,Standard_Real& Tol) ; -Standard_EXPORT GeomAbs_Shape Continuity(const TopoDS_Edge& E,const TopoDS_Face& F1,const TopoDS_Face& F2,const TopoDS_Edge& NewE,const TopoDS_Face& NewF1,const TopoDS_Face& NewF2) ; -Standard_EXPORT Standard_Boolean ForRotation(const TopoDS_Face& F) ; -Standard_EXPORT ~BlockFix_SphereSpaceModifier(); - - - - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Real myTolerance; -TopTools_DataMapOfShapeInteger myMapOfFaces; -TColStd_IndexedMapOfTransient myMapOfSpheres; - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.ixx b/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.ixx deleted file mode 100644 index 482241f6d..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.ixx +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -BlockFix_SphereSpaceModifier::~BlockFix_SphereSpaceModifier() {} - - - -Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(BRepTools_Modification); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(BRepTools_Modification); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("BlockFix_SphereSpaceModifier", - sizeof(BlockFix_SphereSpaceModifier), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(BlockFix_SphereSpaceModifier) Handle(BlockFix_SphereSpaceModifier)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(BlockFix_SphereSpaceModifier) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(BlockFix_SphereSpaceModifier))) { - _anOtherObject = Handle(BlockFix_SphereSpaceModifier)((Handle(BlockFix_SphereSpaceModifier)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& BlockFix_SphereSpaceModifier::DynamicType() const -{ - return STANDARD_TYPE(BlockFix_SphereSpaceModifier) ; -} -Standard_Boolean BlockFix_SphereSpaceModifier::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(BlockFix_SphereSpaceModifier) == AType || BRepTools_Modification::IsKind(AType)); -} -Handle_BlockFix_SphereSpaceModifier::~Handle_BlockFix_SphereSpaceModifier() {} - diff --git a/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.jxx b/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.jxx deleted file mode 100644 index 050734179..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_SphereSpaceModifier.jxx +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _Geom_Surface_HeaderFile -#include -#endif -#ifndef _TopLoc_Location_HeaderFile -#include -#endif -#ifndef _TopoDS_Edge_HeaderFile -#include -#endif -#ifndef _Geom_Curve_HeaderFile -#include -#endif -#ifndef _TopoDS_Vertex_HeaderFile -#include -#endif -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _Geom2d_Curve_HeaderFile -#include -#endif -#ifndef _BlockFix_SphereSpaceModifier_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix_UnionEdges.cdl b/src/GEOMAlgo_NEW/BlockFix_UnionEdges.cdl deleted file mode 100644 index 05a9f3870..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_UnionEdges.cdl +++ /dev/null @@ -1,49 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: BlockFix_UnionEdges.cdl --- Created: Tue Dec 7 15:24:51 2004 --- Author: Sergey KUUL --- -class UnionEdges from BlockFix - - ---Purpose: - -uses - - Shape from TopoDS, - ReShape from ShapeBuild - -is - - Create returns UnionEdges from BlockFix; - - Perform(me: in out; Shape: Shape from TopoDS; - Tol : Real) - returns Shape from TopoDS; - -fields - - myTolerance : Real; - myContext : ReShape from ShapeBuild; - -end UnionEdges; diff --git a/src/GEOMAlgo_NEW/BlockFix_UnionEdges.cxx b/src/GEOMAlgo_NEW/BlockFix_UnionEdges.cxx deleted file mode 100644 index 95a1a713e..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_UnionEdges.cxx +++ /dev/null @@ -1,589 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com - -// File: BlockFix_UnionEdges.cxx -// Created: 07.12.04 15:27:30 -// Author: Sergey KUUL - -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "utilities.h" - -//======================================================================= -//function : BlockFix_UnionEdges() -//purpose : Constructor -//======================================================================= -BlockFix_UnionEdges::BlockFix_UnionEdges ( ) -{ -} - -//======================================================================= -//function : GlueEdgesWithPCurves -//purpose : Glues the pcurves of the sequence of edges -// and glues their 3d curves -//======================================================================= -static TopoDS_Edge GlueEdgesWithPCurves(const TopTools_SequenceOfShape& aChain, - const TopoDS_Vertex& FirstVertex, - const TopoDS_Vertex& LastVertex) -{ - Standard_Integer i, j; - - TopoDS_Edge FirstEdge = TopoDS::Edge(aChain(1)); - //TColGeom2d_SequenceOfCurve PCurveSeq; - TColGeom_SequenceOfSurface SurfSeq; - //TopTools_SequenceOfShape LocSeq; - - BRep_ListIteratorOfListOfCurveRepresentation itr( (Handle(BRep_TEdge)::DownCast(FirstEdge.TShape()))->Curves() ); - for (; itr.More(); itr.Next()) - { - Handle(BRep_CurveRepresentation) CurveRep = itr.Value(); - if (CurveRep->IsCurveOnSurface()) - { - //PCurveSeq.Append(CurveRep->PCurve()); - SurfSeq.Append(CurveRep->Surface()); - /* - TopoDS_Shape aLocShape; - aLocShape.Location(CurveRep->Location()); - LocSeq.Append(aLocShape); - */ - } - } - - Standard_Real fpar, lpar; - BRep_Tool::Range(FirstEdge, fpar, lpar); - TopoDS_Edge PrevEdge = FirstEdge; - TopoDS_Vertex CV; - Standard_Real MaxTol = 0.; - - TopoDS_Edge ResEdge; - BRep_Builder BB; - - Standard_Integer nb_curve = aChain.Length(); //number of curves - TColGeom_Array1OfBSplineCurve tab_c3d(0,nb_curve-1); //array of the curves - TColStd_Array1OfReal tabtolvertex(0,nb_curve-1); //(0,nb_curve-2); //array of the tolerances - - TopoDS_Vertex PrevVertex = FirstVertex; - for (i = 1; i <= nb_curve; i++) - { - TopoDS_Edge anEdge = TopoDS::Edge(aChain(i)); - TopoDS_Vertex VF, VL; - TopExp::Vertices(anEdge, VF, VL); - Standard_Boolean ToReverse = (!VF.IsSame(PrevVertex)); - - Standard_Real Tol1 = BRep_Tool::Tolerance(VF); - Standard_Real Tol2 = BRep_Tool::Tolerance(VL); - if (Tol1 > MaxTol) - MaxTol = Tol1; - if (Tol2 > MaxTol) - MaxTol = Tol2; - - if (i > 1) - { - TopExp::CommonVertex(PrevEdge, anEdge, CV); - Standard_Real Tol = BRep_Tool::Tolerance(CV); - tabtolvertex(i-2) = Tol; - } - - Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar); - Handle(Geom_TrimmedCurve) aTrCurve = new Geom_TrimmedCurve(aCurve, fpar, lpar); - tab_c3d(i-1) = GeomConvert::CurveToBSplineCurve(aTrCurve); - GeomConvert::C0BSplineToC1BSplineCurve(tab_c3d(i-1), Precision::Confusion()); - if (ToReverse) - tab_c3d(i-1)->Reverse(); - PrevVertex = (ToReverse)? VF : VL; - PrevEdge = anEdge; - } - Handle(TColGeom_HArray1OfBSplineCurve) concatcurve; //array of the concatenated curves - Handle(TColStd_HArray1OfInteger) ArrayOfIndices; //array of the remining Vertex - GeomConvert::ConcatC1(tab_c3d, - tabtolvertex, - ArrayOfIndices, - concatcurve, - Standard_False, - Precision::Confusion()); //C1 concatenation - - if (concatcurve->Length() > 1) - { - GeomConvert_CompCurveToBSplineCurve Concat(concatcurve->Value(concatcurve->Lower())); - - for (i = concatcurve->Lower()+1; i <= concatcurve->Upper(); i++) - Concat.Add( concatcurve->Value(i), MaxTol, Standard_True ); - - concatcurve->SetValue(concatcurve->Lower(), Concat.BSplineCurve()); - } - Handle(Geom_BSplineCurve) ResCurve = concatcurve->Value(concatcurve->Lower()); - - TColGeom2d_SequenceOfBoundedCurve ResPCurves; - TopLoc_Location aLoc; - for (j = 1; j <= SurfSeq.Length(); j++) - { - TColGeom2d_Array1OfBSplineCurve tab_c2d(0,nb_curve-1); //array of the pcurves - - PrevVertex = FirstVertex; - PrevEdge = FirstEdge; - //TopLoc_Location theLoc = LocSeq(j).Location(); - for (i = 1; i <= nb_curve; i++) - { - TopoDS_Edge anEdge = TopoDS::Edge(aChain(i)); - TopoDS_Vertex VF, VL; - TopExp::Vertices(anEdge, VF, VL); - Standard_Boolean ToReverse = (!VF.IsSame(PrevVertex)); - - /* - Handle(Geom2d_Curve) aPCurve = - BRep_Tool::CurveOnSurface(anEdge, SurfSeq(j), anEdge.Location()*theLoc, fpar, lpar); - */ - Handle(Geom2d_Curve) aPCurve = - BRep_Tool::CurveOnSurface(anEdge, SurfSeq(j), aLoc, fpar, lpar); - Handle(Geom2d_TrimmedCurve) aTrPCurve = new Geom2d_TrimmedCurve(aPCurve, fpar, lpar); - tab_c2d(i-1) = Geom2dConvert::CurveToBSplineCurve(aTrPCurve); - Geom2dConvert::C0BSplineToC1BSplineCurve(tab_c2d(i-1), Precision::Confusion()); - if (ToReverse) - tab_c2d(i-1)->Reverse(); - PrevVertex = (ToReverse)? VF : VL; - PrevEdge = anEdge; - } - Handle(TColGeom2d_HArray1OfBSplineCurve) concatc2d; //array of the concatenated curves - Handle(TColStd_HArray1OfInteger) ArrayOfInd2d; //array of the remining Vertex - Geom2dConvert::ConcatC1(tab_c2d, - tabtolvertex, - ArrayOfInd2d, - concatc2d, - Standard_False, - Precision::Confusion()); //C1 concatenation - - if (concatc2d->Length() > 1) - { - Geom2dConvert_CompCurveToBSplineCurve Concat2d(concatc2d->Value(concatc2d->Lower())); - - for (i = concatc2d->Lower()+1; i <= concatc2d->Upper(); i++) - Concat2d.Add( concatc2d->Value(i), MaxTol, Standard_True ); - - concatc2d->SetValue(concatc2d->Lower(), Concat2d.BSplineCurve()); - } - Handle(Geom2d_BSplineCurve) aResPCurve = concatc2d->Value(concatc2d->Lower()); - ResPCurves.Append(aResPCurve); - } - - ResEdge = BRepLib_MakeEdge(ResCurve, - FirstVertex, LastVertex, - ResCurve->FirstParameter(), ResCurve->LastParameter()); - BB.SameRange(ResEdge, Standard_False); - BB.SameParameter(ResEdge, Standard_False); - for (j = 1; j <= ResPCurves.Length(); j++) - { - BB.UpdateEdge(ResEdge, ResPCurves(j), SurfSeq(j), aLoc, MaxTol); - BB.Range(ResEdge, SurfSeq(j), aLoc, ResPCurves(j)->FirstParameter(), ResPCurves(j)->LastParameter()); - } - - BRepLib::SameParameter(ResEdge, MaxTol, Standard_True); - - return ResEdge; -} - -//======================================================================= -//function : MergeEdges -//purpose : auxilary -//======================================================================= -static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges, - const TopoDS_Face& aFace, - const Standard_Real Tol, - TopoDS_Edge& anEdge) -{ - // make chain for union - BRep_Builder B; - ShapeAnalysis_Edge sae; - TopoDS_Edge FirstE = TopoDS::Edge(SeqEdges.Value(1)); - TopoDS_Edge LastE = FirstE; - TopoDS_Vertex VF = sae.FirstVertex(FirstE); - TopoDS_Vertex VL = sae.LastVertex(LastE); - TopTools_SequenceOfShape aChain; - aChain.Append(FirstE); - TColStd_MapOfInteger IndUsedEdges; - IndUsedEdges.Add(1); - Standard_Integer j; - for(j=2; j<=SeqEdges.Length(); j++) { - for(Standard_Integer k=2; k<=SeqEdges.Length(); k++) { - if(IndUsedEdges.Contains(k)) continue; - TopoDS_Edge edge = TopoDS::Edge(SeqEdges.Value(k)); - TopoDS_Vertex VF2 = sae.FirstVertex(edge); - TopoDS_Vertex VL2 = sae.LastVertex(edge); - if(sae.FirstVertex(edge).IsSame(VL)) { - aChain.Append(edge); - LastE = edge; - VL = sae.LastVertex(LastE); - IndUsedEdges.Add(k); - } - else if(sae.LastVertex(edge).IsSame(VF)) { - aChain.Prepend(edge); - FirstE = edge; - VF = sae.FirstVertex(FirstE); - IndUsedEdges.Add(k); - } - } - } - if(aChain.Length()IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) { - Handle(Geom_TrimmedCurve) tc = - Handle(Geom_TrimmedCurve)::DownCast(c3d1); - c3d1 = tc->BasisCurve(); - } - TopoDS_Edge edge2 = TopoDS::Edge(aChain.Value(j+1)); - Handle(Geom_Curve) c3d2 = BRep_Tool::Curve(edge2,Loc,fp2,lp2); - if(c3d2.IsNull()) break; - while(c3d2->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) { - Handle(Geom_TrimmedCurve) tc = - Handle(Geom_TrimmedCurve)::DownCast(c3d2); - c3d2 = tc->BasisCurve(); - } - if( c3d1->IsKind(STANDARD_TYPE(Geom_Line)) && c3d2->IsKind(STANDARD_TYPE(Geom_Line)) ) { - // union lines - Handle(Geom_Line) L1 = Handle(Geom_Line)::DownCast(c3d1); - Handle(Geom_Line) L2 = Handle(Geom_Line)::DownCast(c3d2); - gp_Dir Dir1 = L1->Position().Direction(); - gp_Dir Dir2 = L2->Position().Direction(); - //if(!Dir1.IsEqual(Dir2,Precision::Angular())) { - //if(!Dir1.IsParallel(Dir2,Precision::Angular())) { - if(!Dir1.IsParallel(Dir2,Tol)) { - continue; - } - // can union lines => create new edge - TopoDS_Vertex V1 = sae.FirstVertex(edge1); - gp_Pnt PV1 = BRep_Tool::Pnt(V1); - TopoDS_Vertex V2 = sae.LastVertex(edge2); - gp_Pnt PV2 = BRep_Tool::Pnt(V2); - gp_Vec Vec(PV1,PV2); - Handle(Geom_Line) L = new Geom_Line(gp_Ax1(PV1,Vec)); - Standard_Real dist = PV1.Distance(PV2); - Handle(Geom_TrimmedCurve) tc = new Geom_TrimmedCurve(L,0.0,dist); - TopoDS_Edge E; - B.MakeEdge (E,tc,Precision::Confusion()); - B.Add (E,V1); B.Add (E,V2); - B.UpdateVertex(V1, 0., E, 0.); - B.UpdateVertex(V2, dist, E, 0.); - //ShapeFix_Edge sfe; - //sfe.FixAddPCurve(E,aFace,Standard_False); - //sfe.FixSameParameter(E); - aChain.Remove(j); - aChain.SetValue(j,E); - j--; - } - if( c3d1->IsKind(STANDARD_TYPE(Geom_Circle)) && c3d2->IsKind(STANDARD_TYPE(Geom_Circle)) ) { - // union circles - Handle(Geom_Circle) C1 = Handle(Geom_Circle)::DownCast(c3d1); - Handle(Geom_Circle) C2 = Handle(Geom_Circle)::DownCast(c3d2); - gp_Pnt P01 = C1->Location(); - gp_Pnt P02 = C2->Location(); - if (P01.Distance(P02) > Precision::Confusion()) continue; - // can union circles => create new edge - TopoDS_Vertex V1 = sae.FirstVertex(edge1); - gp_Pnt PV1 = BRep_Tool::Pnt(V1); - TopoDS_Vertex V2 = sae.LastVertex(edge2); - gp_Pnt PV2 = BRep_Tool::Pnt(V2); - TopoDS_Vertex VM = sae.LastVertex(edge1); - gp_Pnt PVM = BRep_Tool::Pnt(VM); - GC_MakeCircle MC (PV1,PVM,PV2); - Handle(Geom_Circle) C = MC.Value(); - TopoDS_Edge E; - if (!MC.IsDone() || C.IsNull()) { - // jfa for Mantis issue 0020228 - if (PV1.Distance(PV2) > Precision::Confusion()) continue; - // closed chain - C = C1; - B.MakeEdge (E,C,Precision::Confusion()); - B.Add(E,V1); - B.Add(E,V2); - } - else { - gp_Pnt P0 = C->Location(); - gp_Dir D1(gp_Vec(P0,PV1)); - gp_Dir D2(gp_Vec(P0,PV2)); - Standard_Real fpar = C->XAxis().Direction().Angle(D1); - if(fabs(fpar)>Precision::Confusion()) { - // check orientation - gp_Dir ND = C->XAxis().Direction().Crossed(D1); - if(ND.IsOpposite(C->Axis().Direction(),Precision::Confusion())) { - fpar = -fpar; - } - } - Standard_Real lpar = C->XAxis().Direction().Angle(D2); - if(fabs(lpar)>Precision::Confusion()) { - // check orientation - gp_Dir ND = C->XAxis().Direction().Crossed(D2); - if(ND.IsOpposite(C->Axis().Direction(),Precision::Confusion())) { - lpar = -lpar; - } - } - if (lpar < fpar) lpar += 2*M_PI; - Handle(Geom_TrimmedCurve) tc = new Geom_TrimmedCurve(C,fpar,lpar); - B.MakeEdge (E,tc,Precision::Confusion()); - B.Add(E,V1); - B.Add(E,V2); - B.UpdateVertex(V1, fpar, E, 0.); - B.UpdateVertex(V2, lpar, E, 0.); - } - aChain.Remove(j); - aChain.SetValue(j,E); - j--; - } - } - if (j < aChain.Length()) { - MESSAGE ("null curve3d in edge..."); - return Standard_False; - } - if (aChain.Length() > 1) { - // second step: union edges with various curves - // skl for bug 0020052 from Mantis: perform such unions - // only if curves are bspline or bezier - bool NeedUnion = true; - for(j=1; j<=aChain.Length(); j++) { - TopoDS_Edge edge = TopoDS::Edge(aChain.Value(j)); - Handle(Geom_Curve) c3d = BRep_Tool::Curve(edge,Loc,fp1,lp1); - if(c3d.IsNull()) continue; - while(c3d->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) { - Handle(Geom_TrimmedCurve) tc = - Handle(Geom_TrimmedCurve)::DownCast(c3d); - c3d = tc->BasisCurve(); - } - if( ( c3d->IsKind(STANDARD_TYPE(Geom_BSplineCurve)) || - c3d->IsKind(STANDARD_TYPE(Geom_BezierCurve)) ) ) continue; - NeedUnion = false; - break; - } - if(NeedUnion) { - MESSAGE ("can not make analitical union => make approximation"); - TopoDS_Edge E = GlueEdgesWithPCurves(aChain, VF, VL); - /* - TopoDS_Wire W; - B.MakeWire(W); - for(j=1; j<=aChain.Length(); j++) { - TopoDS_Edge edge = TopoDS::Edge(aChain.Value(j)); - B.Add(W,edge); - } - Handle(BRepAdaptor_HCompCurve) Adapt = new BRepAdaptor_HCompCurve(W); - Approx_Curve3d Conv(Adapt,Tol,GeomAbs_C1,9,1000); - Handle(Geom_BSplineCurve) bc = Conv.Curve(); - TopoDS_Edge E; - B.MakeEdge (E,bc,Precision::Confusion()); - B.Add (E,VF); - B.Add (E,VL); - */ - aChain.SetValue(1,E); - } - else { - MESSAGE ("can not make approximation for such types of curves"); - return Standard_False; - } - } - - anEdge = TopoDS::Edge(aChain.Value(1)); - return Standard_True; -} - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -TopoDS_Shape BlockFix_UnionEdges::Perform(const TopoDS_Shape& Shape, - const Standard_Real Tol) -{ - myContext = new ShapeBuild_ReShape; - myTolerance = Tol; - TopoDS_Shape aResult = myContext->Apply(Shape); - - // processing each solid - TopAbs_ShapeEnum aType = TopAbs_SOLID; - TopExp_Explorer exps (Shape, aType); - if (!exps.More()) { - aType = TopAbs_SHELL; - exps.Init(Shape, aType); - } - for (; exps.More(); exps.Next()) { - //TopoDS_Solid aSolid = TopoDS::Solid(exps.Current()); - TopoDS_Shape aSolid = exps.Current(); - - TopTools_IndexedMapOfShape ChangedFaces; - - // creating map of edge faces - TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces; - TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces); - - Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape; - TopoDS_Shape aRes = aSolid; - aRes = aContext->Apply(aSolid); - - // processing each face - TopExp_Explorer exp; - for (exp.Init(aRes, TopAbs_FACE); exp.More(); exp.Next()) { - TopoDS_Face aFace = - TopoDS::Face(aContext->Apply(exp.Current().Oriented(TopAbs_FORWARD))); - TopTools_IndexedDataMapOfShapeListOfShape aMapFacesEdges; - - for (TopExp_Explorer expe(aFace,TopAbs_EDGE); expe.More(); expe.Next()) { - TopoDS_Edge edge = TopoDS::Edge(expe.Current()); - if (!aMapEdgeFaces.Contains(edge)) continue; - const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge); - TopTools_ListIteratorOfListOfShape anIter(aList); - for ( ; anIter.More(); anIter.Next()) { - TopoDS_Face face = TopoDS::Face(anIter.Value()); - TopoDS_Face face1 = TopoDS::Face(aContext->Apply(anIter.Value())); - if (face1.IsSame(aFace)) continue; - if (aMapFacesEdges.Contains(face)) { - aMapFacesEdges.ChangeFromKey(face).Append(edge); - } - else { - TopTools_ListOfShape ListEdges; - ListEdges.Append(edge); - aMapFacesEdges.Add(face,ListEdges); - } - } - } - - for (Standard_Integer i=1; i<=aMapFacesEdges.Extent(); i++) { - const TopTools_ListOfShape& ListEdges = aMapFacesEdges.FindFromIndex(i); - TopTools_SequenceOfShape SeqEdges; - TopTools_ListIteratorOfListOfShape anIter(ListEdges); - for ( ; anIter.More(); anIter.Next()) { - SeqEdges.Append(anIter.Value()); - } - if (SeqEdges.Length()==1) continue; - TopoDS_Edge E; - if ( MergeEdges(SeqEdges,aFace,Tol,E) ) { - // now we have only one edge - aChain.Value(1) - // we have to replace old ListEdges with this new edge - aContext->Replace(SeqEdges(1),E); - for (Standard_Integer j=2; j<=SeqEdges.Length(); j++) { - aContext->Remove(SeqEdges(j)); - } - TopoDS_Face tmpF = TopoDS::Face(exp.Current()); - if ( !ChangedFaces.Contains(tmpF) ) - ChangedFaces.Add(tmpF); - tmpF = TopoDS::Face(aMapFacesEdges.FindKey(i)); - if ( !ChangedFaces.Contains(tmpF) ) - ChangedFaces.Add(tmpF); - } - } - - } // end processing each face - - // fix changed faces and replace them in the local context - for (Standard_Integer i=1; i<=ChangedFaces.Extent(); i++) { - TopoDS_Face aFace = TopoDS::Face(aContext->Apply(ChangedFaces.FindKey(i))); - Handle(ShapeFix_Face) sff = new ShapeFix_Face(aFace); - sff->SetContext(myContext); - sff->SetPrecision(myTolerance); - sff->SetMinTolerance(myTolerance); - sff->SetMaxTolerance(Max(1.,myTolerance*1000.)); - sff->Perform(); - aContext->Replace(aFace,sff->Face()); - } - - if (ChangedFaces.Extent() > 0) { - // fix changed shell and replace it in the local context - TopoDS_Shape aRes1 = aContext->Apply(aRes); - TopExp_Explorer expsh; - for (expsh.Init(aRes1, TopAbs_SHELL); expsh.More(); expsh.Next()) { - TopoDS_Shell aShell = TopoDS::Shell(expsh.Current()); - Handle(ShapeFix_Shell) sfsh = new ShapeFix_Shell; - sfsh->FixFaceOrientation(aShell); - aContext->Replace(aShell,sfsh->Shell()); - } - TopoDS_Shape aRes2 = aContext->Apply(aRes1); - // put new solid into global context - myContext->Replace(aSolid,aRes2); - } - - } // end processing each solid - - aResult = myContext->Apply(Shape); - return aResult; -} diff --git a/src/GEOMAlgo_NEW/BlockFix_UnionEdges.hxx b/src/GEOMAlgo_NEW/BlockFix_UnionEdges.hxx deleted file mode 100644 index b38e941fb..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_UnionEdges.hxx +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _BlockFix_UnionEdges_HeaderFile -#define _BlockFix_UnionEdges_HeaderFile - -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _Handle_ShapeBuild_ReShape_HeaderFile -#include -#endif -class ShapeBuild_ReShape; -class TopoDS_Shape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class BlockFix_UnionEdges { - -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 - // -Standard_EXPORT BlockFix_UnionEdges(); -Standard_EXPORT TopoDS_Shape Perform(const TopoDS_Shape& Shape,const Standard_Real Tol) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Real myTolerance; -Handle_ShapeBuild_ReShape myContext; - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix_UnionEdges.ixx b/src/GEOMAlgo_NEW/BlockFix_UnionEdges.ixx deleted file mode 100644 index 27e87ac6c..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_UnionEdges.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo_NEW/BlockFix_UnionEdges.jxx b/src/GEOMAlgo_NEW/BlockFix_UnionEdges.jxx deleted file mode 100644 index 558e8d82b..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_UnionEdges.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _ShapeBuild_ReShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _BlockFix_UnionEdges_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix_UnionFaces.cdl b/src/GEOMAlgo_NEW/BlockFix_UnionFaces.cdl deleted file mode 100644 index 371cb25ea..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_UnionFaces.cdl +++ /dev/null @@ -1,65 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: BlockFix_UnionFaces.cdl --- Created: Tue Dec 7 17:15:42 2004 --- Author: Pavel Durandin --- -class UnionFaces from BlockFix - -uses - - Face from TopoDS, - Shape from TopoDS - -is - - Create returns UnionFaces from BlockFix; - ---Purpose: Empty constructor - - GetTolerance(me: in out) returns Real; - ---Purpose: Returns modifiable tolerance - ---C++: return& - - Perform (me: in out; Shape: Shape from TopoDS) returns Shape from TopoDS; - ---Purpose: Performs the unification of the fsces - -- whith the same geometry - - IsSameDomain(me; aFace : Face from TopoDS; - aChekedFace: Face from TopoDS) - returns Boolean is virtual; - ---Purpose: Returns true is surfaces have same geometrically domain - -- with given tolerance - - MovePCurves(me; aTarget: in out Face from TopoDS; - aSource: Face from TopoDS) - is virtual; - ---Purpose: Creates pcurves on aTarget face for each edge from - -- aSource one. - -fields - - myTolerance: Real; - -end; - - diff --git a/src/GEOMAlgo_NEW/BlockFix_UnionFaces.cxx b/src/GEOMAlgo_NEW/BlockFix_UnionFaces.cxx deleted file mode 100644 index c800fd421..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_UnionFaces.cxx +++ /dev/null @@ -1,722 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: BlockFix_UnionFaces.cxx -// Created: Tue Dec 7 17:15:42 2004 -// Author: Pavel DURANDIN - -#include - -#include - -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 -#include -#else -#include -#endif - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#include -#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC - -//======================================================================= -//function : BlockFix_UnionFaces -//purpose : -//======================================================================= - -BlockFix_UnionFaces::BlockFix_UnionFaces() - : myTolerance(Precision::Confusion()), - myOptimumNbFaces(6) -{ -} - - -//======================================================================= -//function : GetTolerance -//purpose : -//======================================================================= - -Standard_Real& BlockFix_UnionFaces::GetTolerance() -{ - return myTolerance; -} - - -//======================================================================= -//function : GetOptimumNbFaces -//purpose : -//======================================================================= - -Standard_Integer& BlockFix_UnionFaces::GetOptimumNbFaces() -{ - return myOptimumNbFaces; -} - - -//======================================================================= -//function : AddOrdinaryEdges -//purpose : auxilary -//======================================================================= -// adds edges from the shape to the sequence -// seams and equal edges are dropped -// Returns true if one of original edges dropped -static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges, - const TopoDS_Shape aShape, - Standard_Integer& anIndex) -{ - //map of edges - TopTools_MapOfShape aNewEdges; - //add edges without seams - for(TopExp_Explorer exp(aShape,TopAbs_EDGE); exp.More(); exp.Next()) { - TopoDS_Shape edge = exp.Current(); - if(aNewEdges.Contains(edge)) - aNewEdges.Remove(edge); - else - aNewEdges.Add(edge); - } - - Standard_Boolean isDropped = Standard_False; - //merge edges and drop seams - for(Standard_Integer i = 1; i <= edges.Length(); i++) { - TopoDS_Shape current = edges(i); - if(aNewEdges.Contains(current)) { - - aNewEdges.Remove(current); - edges.Remove(i); - i--; - - if(!isDropped) { - isDropped = Standard_True; - anIndex = i; - } - } - } - - //add edges to the sequemce - for(TopTools_MapIteratorOfMapOfShape anIter(aNewEdges); anIter.More(); anIter.Next()) - edges.Append(anIter.Key()); - - return isDropped; -} - - -//======================================================================= -//function : ClearRts -//purpose : auxilary -//======================================================================= -static Handle(Geom_Surface) ClearRts(const Handle(Geom_Surface)& aSurface) -{ - if(aSurface->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) { - Handle(Geom_RectangularTrimmedSurface) rts = - Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurface); - return rts->BasisSurface(); - } - return aSurface; -} - - -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - -TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape) -{ - Handle(ShapeBuild_ReShape) myContext = new ShapeBuild_ReShape; - TopoDS_Shape aResShape = myContext->Apply(Shape); - - // processing each solid - TopExp_Explorer exps; - for (exps.Init(Shape, TopAbs_SOLID); exps.More(); exps.Next()) { - TopoDS_Solid aSolid = TopoDS::Solid(exps.Current()); - - // creating map of edge faces - TopTools_IndexedDataMapOfShapeListOfShape aMapEdgeFaces; - TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces); - - // map of processed shapes - TopTools_MapOfShape aProcessed; - - Handle(ShapeBuild_ReShape) aContext = new ShapeBuild_ReShape; - - Standard_Integer NbModif = 0; - Standard_Boolean hasFailed = Standard_False; - Standard_Real tol = Min(Max(Precision::Confusion(), myTolerance/10.), 0.1); - - // count faces - int nbf = 0; - TopExp_Explorer exp; - TopTools_MapOfShape mapF; - for (exp.Init(aSolid, TopAbs_FACE); exp.More(); exp.Next()) { - if (mapF.Add(exp.Current())) - nbf++; - } - - bool doUnion = ((myOptimumNbFaces == 0) || - ((myOptimumNbFaces > 0) && (nbf > myOptimumNbFaces))); - - // processing each face - mapF.Clear(); - for (exp.Init(aSolid, TopAbs_FACE); exp.More() && doUnion; exp.Next()) { - TopoDS_Face aFace = TopoDS::Face(exp.Current().Oriented(TopAbs_FORWARD)); - - if (aProcessed.Contains(aFace)) - continue; - - Standard_Integer dummy; - TopTools_SequenceOfShape edges; - AddOrdinaryEdges(edges,aFace,dummy); - - TopTools_SequenceOfShape faces; - faces.Append(aFace); - - //surface and location to construct result - TopLoc_Location aBaseLocation; - Handle(Geom_Surface) aBaseSurface = BRep_Tool::Surface(aFace,aBaseLocation); - aBaseSurface = ClearRts(aBaseSurface); - - // find adjacent faces to union - Standard_Integer i; - for (i = 1; i <= edges.Length(); i++) { - TopoDS_Edge edge = TopoDS::Edge(edges(i)); - if (BRep_Tool::Degenerated(edge)) - continue; - - const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge); - TopTools_ListIteratorOfListOfShape anIter(aList); - for (; anIter.More(); anIter.Next()) { - TopoDS_Face anCheckedFace = TopoDS::Face(anIter.Value().Oriented(TopAbs_FORWARD)); - if (anCheckedFace.IsSame(aFace)) - continue; - - if (aProcessed.Contains(anCheckedFace)) - continue; - - if (IsSameDomain(aFace,anCheckedFace)) { - - if (aList.Extent() != 2) { - // non mainfold case is not processed - continue; - } - - // replacing pcurves - TopoDS_Face aMockUpFace; - BRep_Builder B; - B.MakeFace(aMockUpFace,aBaseSurface,aBaseLocation,0.); - MovePCurves(aMockUpFace,anCheckedFace); - - if (AddOrdinaryEdges(edges,aMockUpFace,dummy)) { - // sequence edges is modified - i = dummy; - } - - faces.Append(anCheckedFace); - aProcessed.Add(anCheckedFace); - break; - } - } - } - - // all faces collected in the sequence. Perform union of faces - if (faces.Length() > 1) { - NbModif++; - TopoDS_Face aResult; - BRep_Builder B; - B.MakeFace(aResult,aBaseSurface,aBaseLocation,0); - Standard_Integer nbWires = 0; - - // connecting wires - while (edges.Length()>0) { - - Standard_Boolean isEdge3d = Standard_False; - nbWires++; - TopTools_MapOfShape aVertices; - TopoDS_Wire aWire; - B.MakeWire(aWire); - - TopoDS_Edge anEdge = TopoDS::Edge(edges(1)); - edges.Remove(1); - - isEdge3d |= !BRep_Tool::Degenerated(anEdge); - B.Add(aWire,anEdge); - TopoDS_Vertex V1,V2; - TopExp::Vertices(anEdge,V1,V2); - aVertices.Add(V1); - aVertices.Add(V2); - - Standard_Boolean isNewFound = Standard_False; - do { - isNewFound = Standard_False; - for(Standard_Integer j = 1; j <= edges.Length(); j++) { - anEdge = TopoDS::Edge(edges(j)); - TopExp::Vertices(anEdge,V1,V2); - if(aVertices.Contains(V1) || aVertices.Contains(V2)) { - isEdge3d |= !BRep_Tool::Degenerated(anEdge); - aVertices.Add(V1); - aVertices.Add(V2); - B.Add(aWire,anEdge); - edges.Remove(j); - j--; - isNewFound = Standard_True; - } - } - } while (isNewFound); - - // sorting any type of edges - aWire = TopoDS::Wire(aContext->Apply(aWire)); - - TopoDS_Face tmpF = TopoDS::Face(aContext->Apply(faces(1).Oriented(TopAbs_FORWARD))); - Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(aWire,tmpF,Precision::Confusion()); - sfw->FixReorder(); - Standard_Boolean isDegRemoved = Standard_False; - if(!sfw->StatusReorder ( ShapeExtend_FAIL )) { - // clear degenerated edges if at least one with 3d curve exist - if(isEdge3d) { - Handle(ShapeExtend_WireData) sewd = sfw->WireData(); - for(Standard_Integer j = 1; j<=sewd->NbEdges();j++) { - TopoDS_Edge E = sewd->Edge(j); - if(BRep_Tool::Degenerated(E)) { - sewd->Remove(j); - isDegRemoved = Standard_True; - j--; - } - } - } - sfw->FixShifted(); - if(isDegRemoved) - sfw->FixDegenerated(); - } - TopoDS_Wire aWireFixed = sfw->Wire(); - aContext->Replace(aWire,aWireFixed); - // add resulting wire - if(isEdge3d) { - B.Add(aResult,aWireFixed); - } - else { - // sorting edges - Handle(ShapeExtend_WireData) sbwd = sfw->WireData(); - Standard_Integer nbEdges = sbwd->NbEdges(); - // sort degenerated edges and create one edge instead of several ones - ShapeAnalysis_WireOrder sawo(Standard_False, 0); - ShapeAnalysis_Edge sae; - Standard_Integer aLastEdge = nbEdges; - for(Standard_Integer j = 1; j <= nbEdges; j++) { - Standard_Real f,l; - //smh protection on NULL pcurve - Handle(Geom2d_Curve) c2d; - if(!sae.PCurve(sbwd->Edge(j),tmpF,c2d,f,l)) { - aLastEdge--; - continue; - } - sawo.Add(c2d->Value(f).XY(),c2d->Value(l).XY()); - } - sawo.Perform(); - - // constructind one degenerative edge - gp_XY aStart, anEnd, tmp; - Standard_Integer nbFirst = sawo.Ordered(1); - TopoDS_Edge anOrigE = TopoDS::Edge(sbwd->Edge(nbFirst).Oriented(TopAbs_FORWARD)); - ShapeBuild_Edge sbe; - TopoDS_Vertex aDummyV; - TopoDS_Edge E = sbe.CopyReplaceVertices(anOrigE,aDummyV,aDummyV); - sawo.XY(nbFirst,aStart,tmp); - sawo.XY(sawo.Ordered(aLastEdge),tmp,anEnd); - - gp_XY aVec = anEnd-aStart; - Handle(Geom2d_Line) aLine = new Geom2d_Line(aStart,gp_Dir2d(anEnd-aStart)); - - B.UpdateEdge(E,aLine,tmpF,0.); - B.Range(E,tmpF,0.,aVec.Modulus()); - Handle(Geom_Curve) C3d; - B.UpdateEdge(E,C3d,0.); - B.Degenerated(E,Standard_True); - TopoDS_Wire aW; - B.MakeWire(aW); - B.Add(aW,E); - B.Add(aResult,aW); - } - } - - // perform substitution of face - aContext->Replace(aContext->Apply(aFace),aResult); - - ShapeFix_Face sff (aResult); - //Intializing by tolerances - sff.SetPrecision(myTolerance); - sff.SetMinTolerance(tol); - sff.SetMaxTolerance(Max(1.,myTolerance*1000.)); - //Setting modes - sff.FixOrientationMode() = 0; - //sff.FixWireMode() = 0; - sff.SetContext(aContext); - // Applying the fixes - sff.Perform(); - if(sff.Status(ShapeExtend_FAIL)) - hasFailed = Standard_True; - - // breaking down to several faces - TopoDS_Shape theResult = aContext->Apply(aResult); - for (TopExp_Explorer aFaceExp (theResult,TopAbs_FACE); aFaceExp.More(); aFaceExp.Next()) { - TopoDS_Face aCurrent = TopoDS::Face(aFaceExp.Current().Oriented(TopAbs_FORWARD)); - Handle(TColGeom_HArray2OfSurface) grid = new TColGeom_HArray2OfSurface ( 1, 1, 1, 1 ); - grid->SetValue ( 1, 1, aBaseSurface ); - Handle(ShapeExtend_CompositeSurface) G = new ShapeExtend_CompositeSurface ( grid ); - ShapeFix_ComposeShell CompShell; - CompShell.Init ( G, aBaseLocation, aCurrent, ::Precision::Confusion() );//myPrecision - CompShell.SetContext( aContext ); - - TopTools_SequenceOfShape parts; - ShapeFix_SequenceOfWireSegment wires; - for(TopExp_Explorer W_Exp(aCurrent,TopAbs_WIRE);W_Exp.More();W_Exp.Next()) { - Handle(ShapeExtend_WireData) sbwd = - new ShapeExtend_WireData ( TopoDS::Wire(W_Exp.Current() )); - ShapeFix_WireSegment seg ( sbwd, TopAbs_REVERSED ); - wires.Append(seg); - } - - CompShell.DispatchWires ( parts,wires ); - for (Standard_Integer j=1; j <= parts.Length(); j++ ) { - ShapeFix_Face aFixOrient(TopoDS::Face(parts(j))); - aFixOrient.SetContext(aContext); - aFixOrient.FixOrientation(); - } - - TopoDS_Shape CompRes; - if ( faces.Length() !=1 ) { - TopoDS_Shell S; - B.MakeShell ( S ); - for ( i=1; i <= parts.Length(); i++ ) - B.Add ( S, parts(i) ); - CompRes = S; - } - else CompRes = parts(1); - - aContext->Replace(aCurrent,CompRes); - } - - // remove the remaining faces - for(i = 2; i <= faces.Length(); i++) - aContext->Remove(faces(i)); - } - } // end processing each face - - //TopoDS_Shape aResult = Shape; - if (NbModif > 0 && !hasFailed) { - TopoDS_Shape aResult = aContext->Apply(aSolid); - - ShapeFix_Edge sfe; - for (exp.Init(aResult,TopAbs_EDGE); exp.More(); exp.Next()) { - TopoDS_Edge E = TopoDS::Edge(exp.Current()); - sfe.FixVertexTolerance (E); - // ptv add fix same parameter - sfe.FixSameParameter(E, myTolerance); - } - - myContext->Replace(aSolid, aResult); - } - //else - { - for (exp.Init(aSolid, TopAbs_FACE); exp.More(); exp.Next()) { - TopoDS_Face aFace = TopoDS::Face(exp.Current().Oriented(TopAbs_FORWARD)); - Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire; - sfw->SetContext(myContext); - sfw->SetPrecision(myTolerance); - sfw->SetMinTolerance(myTolerance); - sfw->SetMaxTolerance(Max(1.,myTolerance*1000.)); - sfw->SetFace(aFace); - for (TopoDS_Iterator iter (aFace,Standard_False); iter.More(); iter.Next()) { - TopoDS_Wire wire = TopoDS::Wire(iter.Value()); - sfw->Load(wire); - sfw->FixReorder(); - sfw->FixShifted(); - } - } - } - } // end processing each solid - - aResShape = myContext->Apply(Shape); - return aResShape; -} - - -//======================================================================= -//function : IsSameDomain -//purpose : -//======================================================================= - -bool getCylinder (Handle(Geom_Surface)& theInSurface, gp_Cylinder& theOutCylinder) -{ - bool isCylinder = false; - - if (theInSurface->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) { - Handle(Geom_CylindricalSurface) aGC = Handle(Geom_CylindricalSurface)::DownCast(theInSurface); - - theOutCylinder = aGC->Cylinder(); - isCylinder = true; - } - else if (theInSurface->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution))) { - Handle(Geom_SurfaceOfRevolution) aRS = - Handle(Geom_SurfaceOfRevolution)::DownCast(theInSurface); - Handle(Geom_Curve) aBasis = aRS->BasisCurve(); - if (aBasis->IsKind(STANDARD_TYPE(Geom_Line))) { - Handle(Geom_Line) aBasisLine = Handle(Geom_Line)::DownCast(aBasis); - gp_Dir aDir = aRS->Direction(); - gp_Dir aBasisDir = aBasisLine->Position().Direction(); - if (aBasisDir.IsParallel(aDir, Precision::Confusion())) { - // basis line is parallel to the revolution axis: it is a cylinder - gp_Pnt aLoc = aRS->Location(); - Standard_Real aR = aBasisLine->Lin().Distance(aLoc); - gp_Ax3 aCylAx (aLoc, aDir); - - theOutCylinder = gp_Cylinder(aCylAx, aR); - isCylinder = true; - } - } - } - else if (theInSurface->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion))) { - Handle(Geom_SurfaceOfLinearExtrusion) aLES = - Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(theInSurface); - Handle(Geom_Curve) aBasis = aLES->BasisCurve(); - if (aBasis->IsKind(STANDARD_TYPE(Geom_Circle))) { - Handle(Geom_Circle) aBasisCircle = Handle(Geom_Circle)::DownCast(aBasis); - gp_Dir aDir = aLES->Direction(); - gp_Dir aBasisDir = aBasisCircle->Position().Direction(); - if (aBasisDir.IsParallel(aDir, Precision::Confusion())) { - // basis circle is normal to the extrusion axis: it is a cylinder - gp_Pnt aLoc = aBasisCircle->Location(); - Standard_Real aR = aBasisCircle->Radius(); - gp_Ax3 aCylAx (aLoc, aDir); - - theOutCylinder = gp_Cylinder(aCylAx, aR); - isCylinder = true; - } - } - } - else { - } - - return isCylinder; -} - -Standard_Boolean BlockFix_UnionFaces::IsSameDomain(const TopoDS_Face& aFace, - const TopoDS_Face& aCheckedFace) const -{ - //checking the same handles - TopLoc_Location L1, L2; - Handle(Geom_Surface) S1, S2; - - S1 = BRep_Tool::Surface(aFace,L1); - S2 = BRep_Tool::Surface(aCheckedFace,L2); - - if (S1 == S2 && L1 == L2) - return true; - - // planar and cylindrical cases (IMP 20052) - Standard_Real aPrec = Precision::Confusion(); - - S1 = BRep_Tool::Surface(aFace); - S2 = BRep_Tool::Surface(aCheckedFace); - - S1 = ClearRts(S1); - S2 = ClearRts(S2); - - //Handle(Geom_OffsetSurface) aGOFS1, aGOFS2; - //aGOFS1 = Handle(Geom_OffsetSurface)::DownCast(S1); - //aGOFS2 = Handle(Geom_OffsetSurface)::DownCast(S2); - //if (!aGOFS1.IsNull()) S1 = aGOFS1->BasisSurface(); - //if (!aGOFS2.IsNull()) S2 = aGOFS2->BasisSurface(); - - // case of two elementary surfaces: use OCCT tool - // elementary surfaces: ConicalSurface, CylindricalSurface, - // Plane, SphericalSurface and ToroidalSurface - if (S1->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) && - S2->IsKind(STANDARD_TYPE(Geom_ElementarySurface))) - { - Handle(GeomAdaptor_HSurface) aGA1 = new GeomAdaptor_HSurface(S1); - Handle(GeomAdaptor_HSurface) aGA2 = new GeomAdaptor_HSurface(S2); - - Handle(BRepTopAdaptor_TopolTool) aTT1 = new BRepTopAdaptor_TopolTool(); - Handle(BRepTopAdaptor_TopolTool) aTT2 = new BRepTopAdaptor_TopolTool(); - - try { -#if OCC_VERSION_LARGE > 0x06010000 - OCC_CATCH_SIGNALS; -#endif - -#if OCC_VERSION_LARGE > 0x06040000 // Porting to OCCT6.5.1 - IntPatch_ImpImpIntersection anIIInt (aGA1, aTT1, aGA2, aTT2, aPrec, aPrec); -#else - IntPatch_TheIIIntOfIntersection anIIInt (aGA1, aTT1, aGA2, aTT2, aPrec, aPrec); -#endif - if (!anIIInt.IsDone() || anIIInt.IsEmpty()) - return false; - - return anIIInt.TangentFaces(); - } - catch (Standard_Failure) { - return false; - } - } - - // case of two planar surfaces: - // all kinds of surfaces checked, including b-spline and bezier - GeomLib_IsPlanarSurface aPlanarityChecker1 (S1, aPrec); - if (aPlanarityChecker1.IsPlanar()) { - GeomLib_IsPlanarSurface aPlanarityChecker2 (S2, aPrec); - if (aPlanarityChecker2.IsPlanar()) { - gp_Pln aPln1 = aPlanarityChecker1.Plan(); - gp_Pln aPln2 = aPlanarityChecker2.Plan(); - - if (aPln1.Position().Direction().IsParallel(aPln2.Position().Direction(), aPrec) && - aPln1.Distance(aPln2) < aPrec) { - return true; - } - } - } - - // case of two cylindrical surfaces, at least one of which is a swept surface - // swept surfaces: SurfaceOfLinearExtrusion, SurfaceOfRevolution - if ((S1->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) || - S1->IsKind(STANDARD_TYPE(Geom_SweptSurface))) && - (S2->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) || - S2->IsKind(STANDARD_TYPE(Geom_SweptSurface)))) - { - gp_Cylinder aCyl1, aCyl2; - if (getCylinder(S1, aCyl1) && getCylinder(S2, aCyl2)) { - if (fabs(aCyl1.Radius() - aCyl2.Radius()) < aPrec) { - gp_Dir aDir1 = aCyl1.Position().Direction(); - gp_Dir aDir2 = aCyl2.Position().Direction(); - if (aDir1.IsParallel(aDir2, aPrec)) { - gp_Pnt aLoc1 = aCyl1.Location(); - gp_Pnt aLoc2 = aCyl2.Location(); - gp_Vec aVec12 (aLoc1, aLoc2); - if (aVec12.SquareMagnitude() < aPrec*aPrec || - aVec12.IsParallel(aDir1, aPrec)) { - return true; - } - } - } - } - } - - return false; -} - - -//======================================================================= -//function : MovePCurves -//purpose : -//======================================================================= - -void BlockFix_UnionFaces::MovePCurves(TopoDS_Face& aTarget, - const TopoDS_Face& aSource) const -{ - BRep_Builder B; - for(TopExp_Explorer wexp(aSource,TopAbs_WIRE);wexp.More();wexp.Next()) { - Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire(TopoDS::Wire(wexp.Current()), - aTarget, Precision::Confusion()); - sfw->FixReorder(); - Standard_Boolean isReoredFailed = sfw->StatusReorder ( ShapeExtend_FAIL ); - sfw->FixEdgeCurves(); - if(isReoredFailed) - continue; - - sfw->FixShifted(); - sfw->FixDegenerated(); - - // remove degenerated edges from not degenerated points - ShapeAnalysis_Edge sae; - Handle(ShapeExtend_WireData) sewd = sfw->WireData(); - for(Standard_Integer i = 1; i<=sewd->NbEdges();i++) { - TopoDS_Edge E = sewd->Edge(i); - if(BRep_Tool::Degenerated(E)&&!sae.HasPCurve(E,aTarget)) { - sewd->Remove(i); - i--; - } - } - - TopoDS_Wire ResWire = sfw->Wire(); - B.Add(aTarget,ResWire); - } -} diff --git a/src/GEOMAlgo_NEW/BlockFix_UnionFaces.hxx b/src/GEOMAlgo_NEW/BlockFix_UnionFaces.hxx deleted file mode 100644 index f676d5bcf..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_UnionFaces.hxx +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _BlockFix_UnionFaces_HeaderFile -#define _BlockFix_UnionFaces_HeaderFile - -#ifndef _Standard_Real_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class TopoDS_Shape; -class TopoDS_Face; - -class BlockFix_UnionFaces -{ -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 - // - Standard_EXPORT BlockFix_UnionFaces(); - - Standard_EXPORT Standard_Real& GetTolerance(); - - /* \brief To get/set the OptimumNbFaces parameter - * - * If a being processed solid has less than OptimumNbFaces - * faces, no union will be performed. - * By default this parameter is set to 6 (to correctly - * process blocks - hexahedral solids) - * Special values: 0 - do all possible unions, regardless the faces quantity, - * negative - do not perform any unions, regardless the faces quantity. - * - */ - Standard_EXPORT Standard_Integer& GetOptimumNbFaces(); - - Standard_EXPORT TopoDS_Shape Perform(const TopoDS_Shape& Shape); - - Standard_EXPORT virtual Standard_Boolean IsSameDomain(const TopoDS_Face& aFace, - const TopoDS_Face& aChekedFace) const; - Standard_EXPORT virtual void MovePCurves(TopoDS_Face& aTarget, - const TopoDS_Face& aSource) const; - -private: - // Fields PRIVATE - // - Standard_Real myTolerance; - Standard_Integer myOptimumNbFaces; -}; - -#endif diff --git a/src/GEOMAlgo_NEW/BlockFix_UnionFaces.ixx b/src/GEOMAlgo_NEW/BlockFix_UnionFaces.ixx deleted file mode 100644 index c5299ca40..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_UnionFaces.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/GEOMAlgo_NEW/BlockFix_UnionFaces.jxx b/src/GEOMAlgo_NEW/BlockFix_UnionFaces.jxx deleted file mode 100644 index c89fc31fb..000000000 --- a/src/GEOMAlgo_NEW/BlockFix_UnionFaces.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _BlockFix_UnionFaces_HeaderFile -#include -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo.cdl b/src/GEOMAlgo_NEW/GEOMAlgo.cdl deleted file mode 100644 index d2fbf9770..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo.cdl +++ /dev/null @@ -1,342 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- --- File: GEOMAlgo.cdl --- Created: Sat Dec 04 12:36:22 2004 --- Author: Peter KURNEV - -package GEOMAlgo - - ---Purpose: - -uses - TCollection, - - TColgp, - Geom, - Bnd, - gp, - GeomAdaptor, - TopAbs, - TopoDS, - TopTools, - IntTools, - BOPTools, - BOP, - - TColStd, - BOPTColStd, - BRepAlgo, - NMTDS, - NMTTools - -is - -- Enumerations - imported State from GEOMAlgo; - imported KindOfShape from GEOMAlgo; - imported KindOfName from GEOMAlgo; - imported KindOfBounds from GEOMAlgo; - imported KindOfClosed from GEOMAlgo; - -- - -- Gluer / GetInPlace - imported Gluer2 from GEOMAlgo; - imported GlueDetector from GEOMAlgo; - imported GluerAlgo from GEOMAlgo; - imported GetInPlace from GEOMAlgo; - -- Algos - imported WireSplitter from GEOMAlgo; - imported WESScaler from GEOMAlgo; - imported WESCorrector from GEOMAlgo; - imported WireEdgeSet from GEOMAlgo; - imported GlueAnalyser from GEOMAlgo; - imported Gluer from GEOMAlgo; - imported FinderShapeOn2 from GEOMAlgo; - imported FinderShapeOn1 from GEOMAlgo; - imported FinderShapeOn from GEOMAlgo; - imported ShapeAlgo from GEOMAlgo; - imported SolidSolid from GEOMAlgo; - imported ShellSolid from GEOMAlgo; - imported VertexSolid from GEOMAlgo; - imported WireSolid from GEOMAlgo; - imported ShapeSolid from GEOMAlgo; - imported Splitter from GEOMAlgo; - imported Builder from GEOMAlgo; - imported BuilderShape from GEOMAlgo; - imported BuilderSolid from GEOMAlgo; - imported BuilderFace from GEOMAlgo; - imported BuilderArea from GEOMAlgo; - imported ShapeInfoFiller from GEOMAlgo; - imported Algo from GEOMAlgo; - -- Data / Tools - imported ShapeSet from GEOMAlgo; - imported SurfaceTools from GEOMAlgo; - imported ShapeInfo from GEOMAlgo; - imported CoupleOfShapes from GEOMAlgo; - imported BuilderTools from GEOMAlgo; - imported Tools3D from GEOMAlgo; - imported Tools from GEOMAlgo; - imported PWireEdgeSet from GEOMAlgo; - imported StateCollector from GEOMAlgo; - imported PassKey from GEOMAlgo; - imported PassKeyMapHasher from GEOMAlgo; - imported PassKeyShape from GEOMAlgo; - imported PassKeyShapeMapHasher from GEOMAlgo; - imported ClsfBox from GEOMAlgo; - imported ClsfSurf from GEOMAlgo; - imported ClsfSolid from GEOMAlgo; - imported Clsf from GEOMAlgo; - imported HAlgo from GEOMAlgo; - - imported ListOfCoupleOfShapes from GEOMAlgo; - imported ListIteratorOfListOfCoupleOfShapes from GEOMAlgo; - imported ListOfPnt from GEOMAlgo; - imported ListIteratorOfListOfPnt from GEOMAlgo; - imported DataMapOfShapeShapeSet from GEOMAlgo; - imported DataMapIteratorOfDataMapOfShapeShapeSet from GEOMAlgo; - imported DataMapOfShapeReal from GEOMAlgo; - imported DataMapIteratorOfDataMapOfShapeReal from GEOMAlgo; - imported DataMapOfRealListOfShape from GEOMAlgo; - imported DataMapIteratorOfDataMapOfRealListOfShape from GEOMAlgo; - imported DataMapOfPassKeyInteger from GEOMAlgo; - imported DataMapIteratorOfDataMapOfPassKeyInteger from GEOMAlgo; - imported DataMapOfPassKeyShapeShape from GEOMAlgo; - imported DataMapIteratorOfDataMapOfPassKeyShapeShape from GEOMAlgo; - imported DataMapOfOrientedShapeShape from GEOMAlgo; - imported DataMapIteratorOfDataMapOfOrientedShapeShape from GEOMAlgo; - imported DataMapOfShapeMapOfShape from GEOMAlgo; - imported DataMapIteratorOfDataMapOfShapeMapOfShape from GEOMAlgo; - imported DataMapOfShapePnt from GEOMAlgo; - imported DataMapIteratorOfDataMapOfShapePnt from GEOMAlgo; - imported IndexedDataMapOfShapeBox from GEOMAlgo; - imported IndexedDataMapOfShapeShapeInfo from GEOMAlgo; - imported IndexedDataMapOfShapeState from GEOMAlgo; - imported IndexedDataMapOfIntegerShape from GEOMAlgo; - imported IndexedDataMapOfPassKeyShapeListOfShape from GEOMAlgo; - - - -- Instantiations - - --class ListOfCoupleOfShapes - -- instantiates List from TCollection (CoupleOfShapes from GEOMAlgo); - - --class ListOfPnt - -- instantiates List from TCollection (Pnt from gp); - -- - - --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); - - - --class DataMapOfPassKeyInteger - -- instantiates DataMap from TCollection (PassKey from GEOMAlgo, - -- Integer from Standard, - -- PassKeyMapHasher from GEOMAlgo); - - --class DataMapOfPassKeyShapeShape - -- instantiates DataMap from TCollection (PassKeyShape from GEOMAlgo, - -- Shape from TopoDS, - -- PassKeyShapeMapHasher from GEOMAlgo); - - --class DataMapOfOrientedShapeShape instantiates - -- DataMap from TCollection (Shape from TopoDS, - -- Shape from TopoDS, - -- OrientedShapeMapHasher from TopTools); - - - --class DataMapOfShapeMapOfShape instantiates - -- DataMap from TCollection (Shape from TopoDS, - -- MapOfShape from TopTools, - -- ShapeMapHasher from TopTools); - - --class DataMapOfShapePnt instantiates - -- DataMap from TCollection (Shape from TopoDS, - -- Pnt from gp, - -- ShapeMapHasher from TopTools); - - -- - --class IndexedDataMapOfShapeBox - -- instantiates IndexedDataMap from TCollection (Shape from TopoDS, --- Box from Bnd, --- ShapeMapHasher from TopTools); - --- class IndexedDataMapOfShapeShapeInfo --- instantiates IndexedDataMap from TCollection (Shape from TopoDS, --- ShapeInfo from GEOMAlgo, --- ShapeMapHasher from TopTools); --- class IndexedDataMapOfShapeState --- instantiates IndexedDataMap from TCollection (Shape from TopoDS, --- State from TopAbs, --- ShapeMapHasher from TopTools); - - --- --- class IndexedDataMapOfIntegerShape --- instantiates IndexedDataMap from TCollection (Integer from Standard, --- Shape from TopoDS, --- MapIntegerHasher from TColStd); - - --- class IndexedDataMapOfPassKeyShapeListOfShape --- instantiates IndexedDataMap from TCollection (PassKeyShape from GEOMAlgo, --- ListOfShape from TopTools, --- PassKeyShapeMapHasher from GEOMAlgo); - - - - - - -end GEOMAlgo; - -- - -- enumerations - -- - --enumeration State is - -- ST_UNKNOWN, --- ST_IN, --- ST_OUT, --- ST_ON, --- ST_ONIN, --- ST_ONOUT, --- ST_INOUT --- end State; - -- --- enumeration KindOfShape is --- KS_UNKNOWN, --- KS_SPHERE, --- KS_CYLINDER, --- KS_BOX, --- KS_TORUS, --- KS_CONE, --- KS_ELLIPSE, --- KS_PLANE, --- KS_CIRCLE, --- KS_LINE, --- KS_DEGENERATED --- end KindOfShape; - -- --- enumeration KindOfName is --- KN_UNKNOWN, --- KN_SPHERE, --- KN_CYLINDER, --- KN_TORUS, --- KN_CONE, --- KN_ELLIPSE, --- KN_CIRCLE, --- KN_PLANE, --- KN_LINE, --- KN_BOX, --- KN_SEGMENT, --- KN_ARCCIRCLE, --- KN_POLYGON, --- KN_POLYHEDRON, --- KN_DISKCIRCLE, --- KN_DISKELLIPSE, --- KN_RECTANGLE, --- KN_TRIANGLE, --- KN_QUADRANGLE, --- KN_ARCELLIPSE --- end KindOfName; - -- - -- enumeration KindOfBounds is - -- KB_UNKNOWN, --- KB_TRIMMED, - -- KB_INFINITE --- end KindOfBounds; - -- --- enumeration KindOfClosed is --- KC_UNKNOWN, --- KC_CLOSED, --- KC_NOTCLOSED --- end KindOfClosed; - -- - - --deferred class HAlgo; - --deferred class Clsf; - --class ClsfSurf; - --class ClsfBox; - --class ClsfSolid; - - -- - -- classes - -- - --deferred class Algo; - --deferred class ShapeAlgo; - -- - --class ShapeInfo; - --class ShapeInfoFiller; - --class CoupleOfShapes; - --class SurfaceTools; - --class Tools; - --class PassKey; - --class PassKeyMapHasher; - --class PassKeyShape; - --class PassKeyShapeMapHasher; - -- - -- finder on - --deferred class ShapeSolid; - --class WireSolid; - --class ShellSolid; - --class VertexSolid; - --class SolidSolid; - --class StateCollector; - - -- - --class Gluer; - --class GlueAnalyser; - --class FinderShapeOn; - --class FinderShapeOn1; - --class FinderShapeOn2; - -- - -- 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; - --class WESScaler; - -- - -- Pointers - -- - --pointer PWireEdgeSet to WireEdgeSet from GEOMAlgo; - -- - -- diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Algo.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Algo.cxx deleted file mode 100644 index f159c1a57..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Algo.cxx +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Algo.cxx -// Created: Sat Dec 04 12:39:47 2004 -// Author: Peter KURNEV -// -// -#include - -//======================================================================= -// function: -// purpose: -//======================================================================= - GEOMAlgo_Algo::GEOMAlgo_Algo() -: - myErrorStatus(1), - myWarningStatus(0), - myComputeInternalShapes(Standard_True) -{} -//======================================================================= -// function: ~ -// purpose: -//======================================================================= - GEOMAlgo_Algo::~GEOMAlgo_Algo() -{ -} -//======================================================================= -// function: CheckData -// purpose: -//======================================================================= - void GEOMAlgo_Algo::CheckData() -{ - myErrorStatus=0; -} -//======================================================================= -// function: CheckResult -// purpose: -//======================================================================= - void GEOMAlgo_Algo::CheckResult() -{ - myErrorStatus=0; -} -//======================================================================= -// function: ErrorStatus -// purpose: -//======================================================================= - Standard_Integer GEOMAlgo_Algo::ErrorStatus()const -{ - return myErrorStatus; -} -//======================================================================= -// function: WarningStatus -// purpose: -//======================================================================= - Standard_Integer GEOMAlgo_Algo::WarningStatus()const -{ - return myWarningStatus; -} -// myErrorStatus -// -// 1 - object is just initialized - -//======================================================================= -//function : ComputeInternalShapes -//purpose : -//======================================================================= - void GEOMAlgo_Algo::ComputeInternalShapes(const Standard_Boolean theFlag) -{ - myComputeInternalShapes = theFlag; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Algo.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_Algo.hxx deleted file mode 100644 index b82398fe1..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Algo.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Algo.hxx -// Created: Sat Dec 04 12:39:47 2004 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_Algo_HeaderFile -#define _GEOMAlgo_Algo_HeaderFile - -#include -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_Algo -//purpose : -//======================================================================= -class GEOMAlgo_Algo -{ - public: - Standard_EXPORT - virtual void Perform() = 0; - - Standard_EXPORT - Standard_Integer ErrorStatus() const; - - Standard_EXPORT - Standard_Integer WarningStatus() const; - - //! Allows to omit of creation of internal shapes (manifold topology).
- //! Needed for the SALOME/TRIPOLI module.
- Standard_EXPORT - void ComputeInternalShapes(const Standard_Boolean theFlag) ; - -protected: - Standard_EXPORT - GEOMAlgo_Algo(); - - Standard_EXPORT - virtual ~GEOMAlgo_Algo(); - - Standard_EXPORT - virtual void CheckData() ; - - Standard_EXPORT - virtual void CheckResult() ; - - - Standard_Integer myErrorStatus; - Standard_Integer myWarningStatus; - Standard_Boolean myComputeInternalShapes; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Builder.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Builder.cxx deleted file mode 100644 index 669274cfa..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Builder.cxx +++ /dev/null @@ -1,416 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_Builder.cxx -// Created: -// Author: Peter KURNEV -// -#include - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include - -#include -#include -#include - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_Builder::GEOMAlgo_Builder() -: - GEOMAlgo_BuilderShape() -{ - myNbTypes=9; - myPaveFiller=NULL; - myEntryPoint=0; // Entry point through PerformWithFiller () -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_Builder::~GEOMAlgo_Builder() -{ - if (myEntryPoint==1) { - if (myPaveFiller) { - delete myPaveFiller; - myPaveFiller=NULL; - } - } -} -//======================================================================= -//function : AddCompound -//purpose : -//======================================================================= - void GEOMAlgo_Builder::AddCompound(const TopoDS_Shape& theShape) -{ - TopoDS_Iterator aIt; - // - aIt.Initialize(theShape); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - AddShape(aS); - } -} -//======================================================================= -//function : AddShape -//purpose : -//======================================================================= - void GEOMAlgo_Builder::AddShape(const TopoDS_Shape& theShape) -{ - if (myMapFence.Add(theShape)) { - myShapes.Append(theShape); - } -} -//======================================================================= -//function : Shapes -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes()const -{ - return myShapes; -} -//======================================================================= -//function : Clear -//purpose : -//======================================================================= - void GEOMAlgo_Builder::Clear() -{ - myShapes.Clear(); - ClearInternals(); -} -//======================================================================= -//function : ClearInternals -//purpose : -//======================================================================= - void GEOMAlgo_Builder::ClearInternals() -{ - Standard_Integer i; - // - for (i=0; iSetCompositeShape(aCS); - pPF->Perform(); - // - myEntryPoint=1; - PerformInternal(*pPF); -} -//======================================================================= -//function : PerformWithFiller -//purpose : -//======================================================================= - void GEOMAlgo_Builder::PerformWithFiller(const NMTTools_PaveFiller& theDSF) -{ - myEntryPoint=0; - // - PerformInternal(theDSF); -} -//======================================================================= -//function : PerformInternal -//purpose : -//======================================================================= - void GEOMAlgo_Builder::PerformInternal(const NMTTools_PaveFiller& pPF) -{ - myErrorStatus=0; - // - Standard_Boolean bIsDone; - // - // 0. myPaveFiller - myPaveFiller=(NMTTools_PaveFiller *)&pPF; - // - bIsDone=myPaveFiller->IsDone(); - if (!bIsDone) { - myErrorStatus=2; // PaveFiller is failed - return; - } - // - // 1. Clear Internal fields - ClearInternals(); - // - // 2. Prepare - Prepare(); - if (myErrorStatus) { - return; - } - // - // 3. Fill Images - // - // 3.1 Vertices - FillImagesVertices(); - if (myErrorStatus) { - return; - } - // - BuildResult(TopAbs_VERTEX); - if (myErrorStatus) { - return; - } - // 3.2 Edges - FillImagesEdges(); - if (myErrorStatus) { - return; - } - - BuildResult(TopAbs_EDGE); - if (myErrorStatus) { - return; - } - // 3.3 Wires - FillImagesContainers(TopAbs_WIRE); - if (myErrorStatus) { - return; - } - - BuildResult(TopAbs_WIRE); - if (myErrorStatus) { - return; - } - - // 3.4 Faces - FillImagesFaces(); - if (myErrorStatus) { - return; - } - - BuildResult(TopAbs_FACE); - if (myErrorStatus) { - return; - } - // 3.5 Shells - - FillImagesContainers(TopAbs_SHELL); - if (myErrorStatus) { - return; - } - - BuildResult(TopAbs_SHELL); - if (myErrorStatus) { - return; - } - // 3.6 Solids - FillImagesSolids(); - if (myErrorStatus) { - return; - } - - BuildResult(TopAbs_SOLID); - if (myErrorStatus) { - return; - } - // 3.7 CompSolids - FillImagesContainers(TopAbs_COMPSOLID); - if (myErrorStatus) { - return; - } - - BuildResult(TopAbs_COMPSOLID); - if (myErrorStatus) { - return; - } - // 3.8 Compounds - FillImagesContainers(TopAbs_COMPOUND); - if (myErrorStatus) { - return; - } - - BuildResult(TopAbs_COMPOUND); - if (myErrorStatus) { - return; - } - // - // 4.History - PrepareHistory(); - // - // 5 Post-treatment - PostTreat(); -} -// -// static -// void CorrectWires(const TopoDS_Shape& aS); -// -//======================================================================= -//function : PostTreat -//purpose : -//======================================================================= - void GEOMAlgo_Builder::PostTreat() -{ - Standard_Integer aNbS; - TopoDS_Iterator aIt; - TopTools_ListOfShape aLS; - // - aIt.Initialize(myShape); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - aLS.Append(aS); - } - aNbS=aLS.Extent(); - if (aNbS==1) { - myShape=aLS.First(); - } - - BRepLib::SameParameter(myShape, 1.e-7, Standard_True); - // - GEOMAlgo_Tools::CorrectWires(myShape); -} -// -// myErrorStatus -// -// 0 - Ok -// 1 - The object is just initialized -// 2 - PaveFiller is failed -// 10 - No shapes to process -// 30 - SolidBuilder failed - diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Builder.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_Builder.hxx deleted file mode 100644 index 47d175564..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Builder.hxx +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_Builder.cxx -// Created: -// Author: Peter KURNEV -// -#ifndef _GEOMAlgo_Builder_HeaderFile -#define _GEOMAlgo_Builder_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_Builder -//purpose : -//======================================================================= -class GEOMAlgo_Builder : public GEOMAlgo_BuilderShape -{ - public: - //! Empty constructor
- Standard_EXPORT - GEOMAlgo_Builder(); - - Standard_EXPORT - virtual ~GEOMAlgo_Builder(); - - //! Performs calculations
- Standard_EXPORT - virtual void Perform() ; - - //! Performs calculations using prepared PaveFiller
- //! object theDSF
- Standard_EXPORT - virtual void PerformWithFiller(const NMTTools_PaveFiller& theDSF) ; - - //! Adds argument theShape of the operation
- Standard_EXPORT - virtual void AddShape(const TopoDS_Shape& theShape) ; - - //! Clears internal fields and arguments
- Standard_EXPORT - virtual void Clear() ; - - //! Returns the arguments of the operation
- Standard_EXPORT - const TopTools_ListOfShape& Shapes() const; - - //! Returns the list of shapes generated from the
- //! shape theS.
- Standard_EXPORT - virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ; - - //! Returns the list of shapes modified from the shape
- //! theS.
- Standard_EXPORT - virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ; - - //! Returns true if the shape theS has been deleted.
- Standard_EXPORT - virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ; - - //! Adds arguments of the operation as
- //! shapes of upper level of container shape theShape
- Standard_EXPORT - void AddCompound(const TopoDS_Shape& theShape) ; - - //! Returns list of arguments of type theType
- Standard_EXPORT - const TopTools_ListOfShape& Shapes1(const Standard_Integer theType) const; - - //! Returns image shapes
- Standard_EXPORT - const BRepAlgo_Image& Images() const; - - //! Returns split-parts of shapes that have
- //! state IN for the domain of shape theShape
- Standard_EXPORT - const TopTools_ListOfShape& InParts(const TopoDS_Shape& theShape) const; - -protected: - //! Performs calculations using prepared DSFiller
- //! object theDSF
- Standard_EXPORT - virtual void PerformInternal(const NMTTools_PaveFiller& theDSF) ; - - //! Prepare information for history support
- Standard_EXPORT - virtual void PrepareHistory() ; - - //! Clears internal fields
- Standard_EXPORT - virtual void ClearInternals() ; - - //! Provides preparing actions
- Standard_EXPORT - virtual void Prepare() ; - - //! Provides post-tratment actions
- Standard_EXPORT - virtual void PostTreat() ; - - //! Append the argument theShape to
- //! typified lists of arguments myShapes1
- Standard_EXPORT - void AddShape1(const TopoDS_Shape& theShape) ; - - //! Build the resulting shapes of type theType
- Standard_EXPORT - virtual void BuildResult(const TopAbs_ShapeEnum theType) ; - - //! Fill Images for vertices
- Standard_EXPORT - void FillImagesVertices() ; - - //! Fill Images for edges
- Standard_EXPORT - void FillImagesEdges() ; - - //! Fill Images for faces
- Standard_EXPORT - void FillImagesFaces() ; - - //! For each interferred face find split edges
- //! that are in 2-D domain of the face
- Standard_EXPORT - void FillIn2DParts() ; - - //! Build draft faces
- Standard_EXPORT - void BuildSplitFaces() ; - - //! Among draft faces find same domain faces
- Standard_EXPORT - void FillSameDomainFaces() ; - - //! Fill Images for faces
- //! taking into account same domain faces
- Standard_EXPORT - void FillImagesFaces1() ; - - //! Update Images for faces by
- //! internal vertices
- Standard_EXPORT - void FillInternalVertices() ; - - //! Fill Images for Wires, Shells, Compsolids, Compounds
- Standard_EXPORT - void FillImagesContainers(const TopAbs_ShapeEnum theType) ; - - //! Fill Images for solids
- Standard_EXPORT - void FillImagesSolids() ; - - //! For each interferred solid find split faces
- //! that are in 3-D domain of the solid
- Standard_EXPORT - void FillIn3DParts() ; - - //! Build draft solids
- Standard_EXPORT - void BuildSplitSolids() ; - - //! Update draft solids by
- //! internal shells, edges, vertices
- Standard_EXPORT - void FillInternalShapes() ; - - //! Build solid theDraftSolid that consists of
- //! non-internal split faces of the solid
- //! theSolid.
- //! All splits of internal faces of
- //! theSolid are in the list: theInternalFaces
- Standard_EXPORT - void BuildDraftSolid(const TopoDS_Shape& theSolid, - TopoDS_Shape& theDraftSolid, - TopTools_ListOfShape& theInternalFaces) ; - - - NMTTools_PPaveFiller myPaveFiller; - TopTools_ListOfShape myShapes; - Standard_Integer myNbTypes; - TopTools_MapOfShape myMapFence; - TopTools_ListOfShape myShapes1[9]; - BRepAlgo_Image myImages; - TopTools_IndexedDataMapOfShapeListOfShape myInParts; - BRepAlgo_Image mySplitFaces; - TopTools_IndexedDataMapOfShapeShape mySameDomainShapes; - TopTools_IndexedDataMapOfShapeShape myDraftSolids; - Standard_Integer myEntryPoint; - -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderArea.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_BuilderArea.cxx deleted file mode 100644 index d2dbd991b..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderArea.cxx +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_BuilderArea.cxx -// Created: -// Author: Peter KURNEV -// -#include - -#include -#include -#include - -//======================================================================= -//function : -//purpose : -//======================================================================= -GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea() -: - GEOMAlgo_Algo() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_BuilderArea::~GEOMAlgo_BuilderArea() -{ -} -//======================================================================= -//function : SetContext -//purpose : -//======================================================================= -void GEOMAlgo_BuilderArea::SetContext(const Handle(IntTools_Context)& theContext) -{ - myContext=theContext; -} -//======================================================================= -//function : Context -//purpose : -//======================================================================= -const Handle(IntTools_Context)& GEOMAlgo_BuilderArea::Context()const -{ - return myContext; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_BuilderArea::Perform() -{ - if (myContext.IsNull()) { - myContext=new IntTools_Context; - } -} -//======================================================================= -//function : SetShapes -//purpose : -//======================================================================= -void GEOMAlgo_BuilderArea::SetShapes(const TopTools_ListOfShape& theLF) -{ - TopTools_ListIteratorOfListOfShape aIt; - // - myShapes.Clear(); - aIt.Initialize(theLF); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - myShapes.Append(aF); - } -} -//======================================================================= -//function : Shapes -//purpose : -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Shapes()const -{ - return myShapes; -} -//======================================================================= -//function : Loops -//purpose : -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Loops()const -{ - return myLoops; -} -//======================================================================= -//function : Areas -//purpose : -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Areas()const -{ - return myAreas; -} -//======================================================================= -//function :PerformShapesToAvoid -//purpose : -//======================================================================= -void GEOMAlgo_BuilderArea::PerformShapesToAvoid() -{ -} -//======================================================================= -//function : PerformLoops -//purpose : -//======================================================================= -void GEOMAlgo_BuilderArea::PerformLoops() -{ -} -//======================================================================= -//function : PerformAreas -//purpose : -//======================================================================= -void GEOMAlgo_BuilderArea::PerformAreas() -{ -} -//======================================================================= -//function : PerformInternalShapes -//purpose : -//======================================================================= -void GEOMAlgo_BuilderArea::PerformInternalShapes() -{ -} - diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderArea.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_BuilderArea.hxx deleted file mode 100644 index 670517f32..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderArea.hxx +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_BuilderArea.hxx -// Created: -// Author: Peter KURNEV -// - -#ifndef _GEOMAlgo_BuilderArea_HeaderFile -#define _GEOMAlgo_BuilderArea_HeaderFile - -#include -#include -#include -#include -#include -#include -#include - -//! The root class for algorithms to build
-//! faces/solids from set of edges/faces
-//======================================================================= -//class : GEOMAlgo_BuilderArea -//purpose : -//======================================================================= -class GEOMAlgo_BuilderArea : public GEOMAlgo_Algo -{ - public: - //! Sets cashed geometrical tools
- Standard_EXPORT - void SetContext(const Handle(IntTools_Context)& theContext) ; - - //! Returns cashed geometrical tools
- Standard_EXPORT - const Handle_IntTools_Context& Context() const; - - //! Sets edges/faces to process
- Standard_EXPORT - void SetShapes(const TopTools_ListOfShape& theLS) ; - - //! Returns edges/faces to process
- Standard_EXPORT - const TopTools_ListOfShape& Shapes() const; - - //! Returns wires/shells that have been built
- Standard_EXPORT - const TopTools_ListOfShape& Loops() const; - - //! Returns faces/solids that have been built
- Standard_EXPORT - const TopTools_ListOfShape& Areas() const; - - Standard_EXPORT - virtual void Perform() ; - - protected: - //! Empty constructor
- Standard_EXPORT - GEOMAlgo_BuilderArea(); - - Standard_EXPORT - virtual ~GEOMAlgo_BuilderArea(); - //! Collect the edges/faces that
- //! a) are internal
- //! b) are the same and have different orientation
- - Standard_EXPORT - virtual void PerformShapesToAvoid() ; - - //! Build draft faces/shells
- //! a)myLoops - draft faces/shells that consist of
- //! boundary edges/faces
- //! b)myLoopsInternal - draft faces/shells that contains
- //! inner edges/faces
- Standard_EXPORT - virtual void PerformLoops() ; - //! Build draft faces/solids that contains boundary faces
- - Standard_EXPORT - virtual void PerformAreas() ; - - //! Build finalized faces/solids with internal wires/shells
- Standard_EXPORT - virtual void PerformInternalShapes() ; - - TopTools_ListOfShape myShapes; - TopTools_ListOfShape myLoops; - TopTools_ListOfShape myLoopsInternal; - TopTools_MapOfOrientedShape myShapesToAvoid; - TopTools_ListOfShape myAreas; - Handle_IntTools_Context myContext; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderFace.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_BuilderFace.cxx deleted file mode 100644 index afae9cee4..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderFace.cxx +++ /dev/null @@ -1,711 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_BuilderFace.cxx -// Created: -// Author: Peter KURNEV -// -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -// -static - Standard_Boolean IsGrowthWire(const TopoDS_Shape& , - - const TopTools_IndexedMapOfShape& ); - -static - Standard_Boolean IsInside(const TopoDS_Shape& , - const TopoDS_Shape& , - const Handle(IntTools_Context)& ); -static - void MakeInternalWires(const TopTools_MapOfShape& , - TopTools_ListOfShape& ); - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_BuilderFace::GEOMAlgo_BuilderFace() -: - GEOMAlgo_BuilderArea() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_BuilderFace::~GEOMAlgo_BuilderFace() -{ -} -//======================================================================= -//function : SetFace -//purpose : -//======================================================================= - void GEOMAlgo_BuilderFace::SetFace(const TopoDS_Face& theFace) -{ - myFace=theFace; -} -//======================================================================= -//function : Face -//purpose : -//======================================================================= - const TopoDS_Face& GEOMAlgo_BuilderFace::Face()const -{ - return myFace; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - void GEOMAlgo_BuilderFace::Perform() -{ - myErrorStatus=0; - // - if (myFace.IsNull()) { - myErrorStatus=12;// Null face generix - return; - } - // Initialize the context - GEOMAlgo_BuilderArea::Perform(); - // - PerformShapesToAvoid(); - if (myErrorStatus) { - return; - } - // - PerformLoops(); - if (myErrorStatus) { - return; - } - // - PerformAreas(); - if (myErrorStatus) { - return; - } - // - PerformInternalShapes(); - if (myErrorStatus) { - return; - } -} -//======================================================================= -//function :PerformShapesToAvoid -//purpose : -//======================================================================= - void GEOMAlgo_BuilderFace::PerformShapesToAvoid() -{ - Standard_Boolean bFound; - Standard_Integer i, iCnt, aNbV, aNbE; - TopTools_IndexedDataMapOfShapeListOfShape aMVE; - TopTools_ListIteratorOfListOfShape aIt; - // - myShapesToAvoid.Clear(); - // - iCnt=0; - while (1) { - ++iCnt; - bFound=Standard_False; - // - // 1. MEF - aMVE.Clear(); - aIt.Initialize (myShapes); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE=aIt.Value(); - if (!myShapesToAvoid.Contains(aE)) { - TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE); - } -// else { -// int a=0; -// } - } - aNbV=aMVE.Extent(); - // - // 2. myEdgesToAvoid - for (i=1; i<=aNbV; ++i) { - const TopoDS_Vertex& aV=TopoDS::Vertex(aMVE.FindKey(i)); - // - TopTools_ListOfShape& aLE=aMVE.ChangeFromKey(aV); - aNbE=aLE.Extent(); - if (!aNbE) { - continue; - } - // - const TopoDS_Edge& aE1=TopoDS::Edge(aLE.First()); - if (aNbE==1) { - if (BRep_Tool::Degenerated(aE1)) { - continue; - } - if (aV.Orientation()==TopAbs_INTERNAL) { - continue; - } - bFound=Standard_True; - myShapesToAvoid.Add(aE1); - } - else if (aNbE==2) { - const TopoDS_Edge& aE2=TopoDS::Edge(aLE.Last()); - if (aE2.IsSame(aE1)) { - TopoDS_Vertex aV1x, aV2x; - // - TopExp::Vertices(aE1, aV1x, aV2x); - if (aV1x.IsSame(aV2x)) { - continue; - } - bFound=Standard_True; - myShapesToAvoid.Add(aE1); - myShapesToAvoid.Add(aE2); - } - } - }// for (i=1; i<=aNbE; ++i) { - // - if (!bFound) { - break; - } - // - }//while (1) - //printf(" EdgesToAvoid=%d, iCnt=%d\n", EdgesToAvoid.Extent(), iCnt); -} -//======================================================================= -//function : PerformLoops -//purpose : -//======================================================================= - void GEOMAlgo_BuilderFace::PerformLoops() -{ - myErrorStatus=0; - // - Standard_Boolean bFlag; - Standard_Integer aNbEA; - TopTools_ListIteratorOfListOfShape aIt; - TopTools_MapIteratorOfMapOfOrientedShape aItM; - TopTools_IndexedDataMapOfShapeListOfShape aVEMap; - TopTools_MapOfOrientedShape aMAdded; - TopoDS_Iterator aItW; - BRep_Builder aBB; - GEOMAlgo_WireEdgeSet aWES; - GEOMAlgo_WESCorrector aWESCor; - // - // 1. Usual Wires - myLoops.Clear(); - aWES.SetFace(myFace); - // - aIt.Initialize (myShapes); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE=aIt.Value(); - if (!myShapesToAvoid.Contains(aE)) { - aWES.AddStartElement(aE); - } - } - // - aWESCor.SetWES(aWES); - aWESCor.Perform(); - // - GEOMAlgo_WireEdgeSet& aWESN=aWESCor.NewWES(); - const TopTools_ListOfShape& aLW=aWESN.Shapes(); - // - aIt.Initialize (aLW); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aW=aIt.Value(); - myLoops.Append(aW); - } - //modified by NIZNHY-PKV Tue Aug 5 15:09:29 2008f - // Post Treatment - TopTools_MapOfOrientedShape aMEP; - // - // a. collect all edges that are in loops - aIt.Initialize (myLoops); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aW=aIt.Value(); - aItW.Initialize(aW); - for (; aItW.More(); aItW.Next()) { - const TopoDS_Shape& aE=aItW.Value(); - aMEP.Add(aE); - } - } - // - // b. collect all edges that are to avoid - aItM.Initialize(myShapesToAvoid); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aE=aItM.Key(); - aMEP.Add(aE); - } - // - // c. add all edges that are not processed to myShapesToAvoid - aIt.Initialize (myShapes); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE=aIt.Value(); - if (!aMEP.Contains(aE)) { - myShapesToAvoid.Add(aE); - } - } - //modified by NIZNHY-PKV Tue Aug 5 15:09:35 2008t - // - // 2. Internal Wires - myLoopsInternal.Clear(); - // - aNbEA=myShapesToAvoid.Extent(); - aItM.Initialize(myShapesToAvoid); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aEE=aItM.Key(); - TopExp::MapShapesAndAncestors(aEE, TopAbs_VERTEX, TopAbs_EDGE, aVEMap); - } - // - bFlag=Standard_True; - aItM.Initialize(myShapesToAvoid); - for (; aItM.More()&&bFlag; aItM.Next()) { - const TopoDS_Shape& aEE=aItM.Key(); - if (!aMAdded.Add(aEE)) { - continue; - } - // - // make new wire - TopoDS_Wire aW; - aBB.MakeWire(aW); - aBB.Add(aW, aEE); - // - aItW.Initialize(aW); - for (; aItW.More()&&bFlag; aItW.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value()); - // - TopoDS_Iterator aItE(aE); - for (; aItE.More()&&bFlag; aItE.Next()) { - const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value()); - const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV); - aIt.Initialize(aLE); - for (; aIt.More()&&bFlag; aIt.Next()) { - const TopoDS_Shape& aEx=aIt.Value(); - if (aMAdded.Add(aEx)) { - aBB.Add(aW, aEx); - if(aMAdded.Extent()==aNbEA) { - bFlag=!bFlag; - } - } - }//for (; aIt.More(); aIt.Next()) { - }//for (; aItE.More(); aItE.Next()) { - }//for (; aItW.More(); aItW.Next()) { - myLoopsInternal.Append(aW); - }//for (; aItM.More(); aItM.Next()) { -} -//======================================================================= -//function : PerformAreas -//purpose : -//======================================================================= - void GEOMAlgo_BuilderFace::PerformAreas() -{ - myErrorStatus=0; - // - Standard_Boolean bIsGrowth, bIsHole; - Standard_Real aTol; - TopTools_ListOfShape aNewFaces, aHoleWires; - TopoDS_Shape anInfinitePointShape; - TopTools_DataMapOfShapeShape aInOutMap; - TopTools_DataMapOfShapeListOfShape aMSH; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSH; - TopTools_ListIteratorOfListOfShape aIt1, aIt2; - TopTools_IndexedMapOfShape aMHE; - BRep_Builder aBB; - Handle(Geom_Surface) aS; - TopLoc_Location aLoc; - // - aTol=BRep_Tool::Tolerance(myFace); - aS=BRep_Tool::Surface(myFace, aLoc); - // - myAreas.Clear(); - // - // Draft faces [aNewFaces] - aIt1.Initialize(myLoops); - for ( ; aIt1.More(); aIt1.Next()) { - const TopoDS_Shape& aWire=aIt1.Value(); - // - bIsGrowth=IsGrowthWire(aWire, aMHE); - if (bIsGrowth) { - // make a growth face from a wire - TopoDS_Face aFace; - aBB.MakeFace(aFace, aS, aLoc, aTol); - aBB.Add (aFace, aWire); - // - aNewFaces.Append (aFace); - } - else{ - // check if a wire is a hole - //XX - //bIsHole=IsHole(aWire, myFace, myContext); - bIsHole=GEOMAlgo_BuilderTools::IsHole(aWire, myFace); - //XX - if (bIsHole) { - aHoleWires.Append(aWire); - TopExp::MapShapes(aWire, TopAbs_EDGE, aMHE); - } - else { - // make a growth face from a wire - TopoDS_Face aFace; - aBB.MakeFace(aFace, aS, aLoc, aTol); - aBB.Add (aFace, aWire); - // - aNewFaces.Append (aFace); - } - } - } - // - // 2. Find outer growth shell that is most close to each hole shell - aIt2.Initialize(aHoleWires); - for (; aIt2.More(); aIt2.Next()) { - const TopoDS_Shape& aHole = aIt2.Value(); - // - aIt1.Initialize(aNewFaces); - for ( ; aIt1.More(); aIt1.Next()) { - const TopoDS_Shape& aF=aIt1.Value(); - // - if (!IsInside(aHole, aF, myContext)){ - continue; - } - // - if ( aInOutMap.IsBound (aHole)){ - const TopoDS_Shape& aF2=aInOutMap(aHole); - if (IsInside(aF, aF2, myContext)) { - aInOutMap.UnBind(aHole); - aInOutMap.Bind (aHole, aF); - } - } - else{ - aInOutMap.Bind (aHole, aF); - } - } - // - // Add aHole to a map Face/ListOfHoles [aMSH] - if (aInOutMap.IsBound(aHole)){ - const TopoDS_Shape& aF=aInOutMap(aHole); - if (aMSH.IsBound(aF)) { - TopTools_ListOfShape& aLH=aMSH.ChangeFind(aF); - aLH.Append(aHole); - } - else { - TopTools_ListOfShape aLH; - aLH.Append(aHole); - aMSH.Bind(aF, aLH); - } - } - }// for (; aIt2.More(); aIt2.Next()) - // - // 3. Add aHoles to Faces - aItMSH.Initialize(aMSH); - for (; aItMSH.More(); aItMSH.Next()) { - TopoDS_Face aF=TopoDS::Face(aItMSH.Key()); - // - const TopTools_ListOfShape& aLH=aItMSH.Value(); - aIt2.Initialize(aLH); - for (; aIt2.More(); aIt2.Next()) { - const TopoDS_Shape& aHole = aIt2.Value(); - aBB.Add (aF, aHole); - } - // - // update classifier - aTol=BRep_Tool::Tolerance(aF); - IntTools_FClass2d& aClsf=myContext->FClass2d(aF); - aClsf.Init(aF, aTol); - } - // - // These aNewFaces are draft faces that - // do not contain any internal shapes - // - myAreas.Append(aNewFaces); -} -//======================================================================= -//function : PerformInternalShapes -//purpose : -//======================================================================= - void GEOMAlgo_BuilderFace::PerformInternalShapes() -{ - myErrorStatus=0; - // - Standard_Integer aNbWI=myLoopsInternal.Extent(); - if (!aNbWI) {// nothing to do - return; - } - // - //Standard_Real aTol; - BRep_Builder aBB; - TopTools_ListIteratorOfListOfShape aIt1, aIt2; - TopoDS_Iterator aIt; - TopTools_MapOfShape aME, aMEP; - TopTools_MapIteratorOfMapOfShape aItME; - TopTools_IndexedDataMapOfShapeListOfShape aMVE; - TopTools_ListOfShape aLSI; - // - // 1. All internal edges - aIt1.Initialize(myLoopsInternal); - for (; aIt1.More(); aIt1.Next()) { - const TopoDS_Shape& aWire=aIt1.Value(); - aIt.Initialize(aWire); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE=aIt.Value(); - aME.Add(aE); - } - } - aNbWI=aME.Extent(); - // - // 2 Process faces - aIt2.Initialize(myAreas); - for ( ; aIt2.More(); aIt2.Next()) { - TopoDS_Face& aF=TopoDS::Face(aIt2.Value()); - // - aMVE.Clear(); - TopExp::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE); - // - // 2.1 Separate faces to process aMEP - aMEP.Clear(); - aItME.Initialize(aME); - for (; aItME.More(); aItME.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(aItME.Key()); - if (IsInside(aE, aF, myContext)) { - aMEP.Add(aE); - } - } - // - // 2.2 Make Internal Wires - aLSI.Clear(); - MakeInternalWires(aMEP, aLSI); - // - // 2.3 Add them to aF - aIt1.Initialize(aLSI); - for (; aIt1.More(); aIt1.Next()) { - const TopoDS_Shape& aSI=aIt1.Value(); - aBB.Add (aF, aSI); - } - // - // 2.4 Remove faces aMFP from aMF - aItME.Initialize(aMEP); - for (; aItME.More(); aItME.Next()) { - const TopoDS_Shape& aE=aItME.Key(); - aME.Remove(aE); - } - // - aNbWI=aME.Extent(); - if (!aNbWI) { - break; - } - } //for ( ; aIt2.More(); aIt2.Next()) { -} -//======================================================================= -//function : MakeInternalWires -//purpose : -//======================================================================= -void MakeInternalWires(const TopTools_MapOfShape& theME, - TopTools_ListOfShape& theWires) -{ - TopTools_MapIteratorOfMapOfShape aItM; - TopTools_MapOfShape aAddedMap; - TopTools_ListIteratorOfListOfShape aItE; - TopTools_IndexedDataMapOfShapeListOfShape aMVE; - BRep_Builder aBB; - // - aItM.Initialize(theME); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aE=aItM.Key(); - TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE); - } - // - aItM.Initialize(theME); - for (; aItM.More(); aItM.Next()) { - TopoDS_Shape aEE=aItM.Key(); - if (!aAddedMap.Add(aEE)) { - continue; - } - // - // make a new shell - TopoDS_Wire aW; - aBB.MakeWire(aW); - aEE.Orientation(TopAbs_INTERNAL); - aBB.Add(aW, aEE); - // - TopoDS_Iterator aItAdded (aW); - for (; aItAdded.More(); aItAdded.Next()) { - const TopoDS_Shape& aE =aItAdded.Value(); - // - TopExp_Explorer aExp(aE, TopAbs_VERTEX); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aV =aExp.Current(); - const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV); - aItE.Initialize(aLE); - for (; aItE.More(); aItE.Next()) { - TopoDS_Shape aEL=aItE.Value(); - if (aAddedMap.Add(aEL)){ - aEL.Orientation(TopAbs_INTERNAL); - aBB.Add(aW, aEL); - } - } - } - } - theWires.Append(aW); - } -} -//======================================================================= -//function : IsInside -//purpose : -//======================================================================= -Standard_Boolean IsInside(const TopoDS_Shape& theHole, - const TopoDS_Shape& theF2, - const Handle(IntTools_Context)& theContext) -{ - Standard_Boolean bRet; - Standard_Real aT, aU, aV; - - TopAbs_State aState; - TopExp_Explorer aExp; - TopTools_IndexedMapOfShape aME2; - gp_Pnt2d aP2D; - // - bRet=Standard_False; - aState=TopAbs_UNKNOWN; - const TopoDS_Face& aF2=TopoDS::Face(theF2); - // - TopExp::MapShapes(aF2, TopAbs_EDGE, aME2); - // - aExp.Init(theHole, TopAbs_EDGE); - if (aExp.More()) { - const TopoDS_Edge& aE = TopoDS::Edge(aExp.Current()); - if (aME2.Contains(aE)) { - return bRet; - } - // - aT=BOPTools_Tools2D::IntermediatePoint(aE); - BOPTools_Tools2D::PointOnSurface(aE, aF2, aT, aU, aV); - aP2D.SetCoord(aU, aV); - // - IntTools_FClass2d& aClsf=theContext->FClass2d(aF2); - aState=aClsf.Perform(aP2D); - bRet=(aState==TopAbs_IN); - } - // - return bRet; -} - -//======================================================================= -//function : IsGrowthWire -//purpose : -//======================================================================= -Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire, - const TopTools_IndexedMapOfShape& theMHE) -{ - Standard_Boolean bRet; - TopoDS_Iterator aIt; - // - bRet=Standard_False; - if (theMHE.Extent()) { - aIt.Initialize(theWire); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE=aIt.Value(); - if (theMHE.Contains(aE)) { - return !bRet; - } - } - } - return bRet; -} - -//BRepTools::Write(aFF, "ff"); -// -// ErrorStatus : -// 11 - Null Context -// 12 - Null face generix - -/* -//======================================================================= -//function : IsInside -//purpose : -//======================================================================= -Standard_Boolean IsInside(const TopoDS_Shape& theHole, - const TopoDS_Shape& theF2, - IntTools_PContext& theContext) -{ - Standard_Real aT, aU, aV; - TopExp_Explorer aExp; - TopAbs_State aState=TopAbs_UNKNOWN; - gp_Pnt2d aP2D; - // - const TopoDS_Face& aF2=TopoDS::Face(theF2); - // - aExp.Init(theHole, TopAbs_EDGE); - if (aExp.More()){ - const TopoDS_Edge& aE = TopoDS::Edge(aExp.Current()); - aT=BOPTools_Tools2D::IntermediatePoint(aE); - BOPTools_Tools2D::PointOnSurface(aE, aF2, aT, aU, aV); - aP2D.SetCoord(aU, aV); - // - IntTools_FClass2d& aClsf=theContext->FClass2d(aF2); - aState=aClsf.Perform(aP2D); - } - return (aState==TopAbs_IN); -} -*/ diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderFace.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_BuilderFace.hxx deleted file mode 100644 index 595436cda..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderFace.hxx +++ /dev/null @@ -1,91 +0,0 @@ - -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_BuilderFace.hxx -// Created: -// Author: Peter KURNEV -// -#ifndef _GEOMAlgo_BuilderFace_HeaderFile -#define _GEOMAlgo_BuilderFace_HeaderFile - -#include -#include -#include -#include - -//! The algorithm to build faces from set of edges
-//======================================================================= -//class : GEOMAlgo_BuilderFace -//purpose : -//======================================================================= -class GEOMAlgo_BuilderFace : public GEOMAlgo_BuilderArea -{ - public: - - //! Empty constructor
- Standard_EXPORT - GEOMAlgo_BuilderFace(); - - Standard_EXPORT - virtual ~GEOMAlgo_BuilderFace(); - - //! Sets the face generatix
- Standard_EXPORT - void SetFace(const TopoDS_Face& theFace) ; - - //! Returns the face generatix
- Standard_EXPORT - const TopoDS_Face& Face() const; - - //! Performs the algorithm
- Standard_EXPORT - virtual void Perform() ; - - protected: - //! Collect the edges that
- //! a) are internal
- //! b) are the same and have different orientation
- Standard_EXPORT - virtual void PerformShapesToAvoid() ; - - //! Build draft wires
- //! a)myLoops - draft wires that consist of
- //! boundary edges
- //! b)myLoopsInternal - draft wires that contains
- //! inner edges
- Standard_EXPORT - virtual void PerformLoops() ; - - //! Build draft faces that contains boundary edges
- Standard_EXPORT - virtual void PerformAreas() ; - - //! Build finalized faces with internals
- Standard_EXPORT - virtual void PerformInternalShapes() ; - - - TopoDS_Face myFace; -}; - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderShape.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_BuilderShape.cxx deleted file mode 100644 index 5abac4efc..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderShape.cxx +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_BuilderShape.cxx -// Created: -// Author: Peter KURNEV -// -#include -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_BuilderShape::GEOMAlgo_BuilderShape() -: - GEOMAlgo_Algo() -{ - myHasDeleted=Standard_False; - myHasGenerated=Standard_False; - myHasModified=Standard_False; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_BuilderShape::~GEOMAlgo_BuilderShape() -{ -} -//======================================================================= -//function : Shape -//purpose : -//======================================================================= - const TopoDS_Shape& GEOMAlgo_BuilderShape::Shape() const -{ - return myShape; -} -// -//======================================================================= -//function : Generated -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Generated(const TopoDS_Shape& ) -{ - myHistShapes.Clear(); - return myHistShapes; -} -//======================================================================= -//function : Modified -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_BuilderShape::Modified(const TopoDS_Shape& ) -{ - myHistShapes.Clear(); - return myHistShapes; -} -//======================================================================= -//function : IsDeleted -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_BuilderShape::IsDeleted(const TopoDS_Shape& theS) -{ - Standard_Boolean bRet; - // - bRet=!myMapShape.Contains(theS); - return bRet; -} -//======================================================================= -//function : HasDeleted -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_BuilderShape::HasDeleted()const -{ - return myHasDeleted; -} -//======================================================================= -//function : HasGenerated -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_BuilderShape::HasGenerated()const -{ - return myHasGenerated; -} -//======================================================================= -//function : HasModified -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_BuilderShape::HasModified()const -{ - return myHasModified; -} -//======================================================================= -//function : PrepareHistory -//purpose : -//======================================================================= - void GEOMAlgo_BuilderShape::PrepareHistory() -{ - myHistShapes.Clear(); - myMapShape.Clear(); - myHasDeleted=Standard_False; - myHasGenerated=Standard_False; - myHasModified=Standard_False; - //modified by NIZNHY-PKV Thu Dec 7 11:14:15 2006 - myImagesResult.Clear(); - //modified by NIZNHY-PKV Thu Dec 7 11:14:17 2006t -} -//modified by NIZNHY-PKV Thu Dec 7 11:57:00 2006f -//======================================================================= -//function : ImagesResult -//purpose : -//======================================================================= - const TopTools_IndexedDataMapOfShapeListOfShape& GEOMAlgo_BuilderShape::ImagesResult()const -{ - return myImagesResult; -} -//modified by NIZNHY-PKV Thu Dec 7 11:57:04 2006t diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_BuilderShape.hxx deleted file mode 100644 index 2ae67470c..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderShape.hxx +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_BuilderShape.hxx -// Created: -// Author: Peter KURNEV -// -#ifndef _GEOMAlgo_BuilderShape_HeaderFile -#define _GEOMAlgo_BuilderShape_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include - - -//! Root class for algorithms that has shape as result
-//======================================================================= -//class : GEOMAlgo_BuilderShape -//purpose : -//======================================================================= -class GEOMAlgo_BuilderShape : public GEOMAlgo_Algo -{ - public: - //! Returns the result of algorithm
- Standard_EXPORT - const TopoDS_Shape& Shape() const; - - //! Returns the list of shapes generated from the
- //! shape theS.
- Standard_EXPORT - virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ; - - //! Returns the list of shapes modified from the
- //! shape theS.
- Standard_EXPORT - virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ; - - //! Returns true if the shape theS has been deleted.
- Standard_EXPORT - virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ; - - //! Returns true if the at least one shape(or sub-shape)
- //! of arguments has been deleted.
- Standard_EXPORT - Standard_Boolean HasDeleted() const; - - //! Returns true if the at least one shape(or sub-shape)
- //! of arguments has generated shapes.
- Standard_EXPORT - Standard_Boolean HasGenerated() const; - - //! Returns true if the at least one shape(or sub-shape)
- //! of arguments has modified shapes.
- Standard_EXPORT - Standard_Boolean HasModified() const; - - Standard_EXPORT - const TopTools_IndexedDataMapOfShapeListOfShape& ImagesResult() const; - -protected: - //! Empty constructor
- Standard_EXPORT - GEOMAlgo_BuilderShape(); - - Standard_EXPORT - virtual ~GEOMAlgo_BuilderShape(); - - //! Prepare information for history support
- Standard_EXPORT - virtual void PrepareHistory() ; - - - TopoDS_Shape myShape; - TopTools_ListOfShape myHistShapes; - TopTools_MapOfShape myMapShape; - Standard_Boolean myHasDeleted; - Standard_Boolean myHasGenerated; - Standard_Boolean myHasModified; - TopTools_IndexedDataMapOfShapeListOfShape myImagesResult; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderSolid.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_BuilderSolid.cxx deleted file mode 100644 index cd8c54625..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderSolid.cxx +++ /dev/null @@ -1,931 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_BuilderSolid.cxx -// Created: -// Author: Peter KURNEV -// -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include - -#include -#include - -// -static - Standard_Boolean IsGrowthShell(const TopoDS_Shape& , - const TopTools_IndexedMapOfShape& ); -static - Standard_Boolean IsHole(const TopoDS_Shape& , - const Handle(IntTools_Context)& ); -static - Standard_Boolean IsInside(const TopoDS_Shape& , - const TopoDS_Shape& , - const Handle(IntTools_Context)& ); -static - void MakeInternalShells(const TopTools_MapOfShape& , - TopTools_ListOfShape& ); - -static - Standard_Boolean IsClosedShell(const TopoDS_Shell& ); - -static - Standard_Boolean RefineShell(const TopoDS_Shell& , - TopoDS_Shell& ); - -//======================================================================= -//function : -//purpose : -//======================================================================= -GEOMAlgo_BuilderSolid::GEOMAlgo_BuilderSolid() -: - GEOMAlgo_BuilderArea() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_BuilderSolid::~GEOMAlgo_BuilderSolid() -{ -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_BuilderSolid::Perform() -{ - myErrorStatus=0; - // - // Initialize the context - GEOMAlgo_BuilderArea::Perform(); - // - TopoDS_Compound aC; - BRep_Builder aBB; - TopTools_ListIteratorOfListOfShape aIt; - - aBB.MakeCompound(aC); - aIt.Initialize(myShapes); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - aBB.Add(aC, aF); - } - // - PerformShapesToAvoid(); - if (myErrorStatus) { - return; - } - // - PerformLoops(); - if (myErrorStatus) { - return; - } - PerformAreas(); - if (myErrorStatus) { - return; - } - if (myComputeInternalShapes) { - PerformInternalShapes(); - if (myErrorStatus) { - return; - } - } -} -//======================================================================= -//function :PerformShapesToAvoid -//purpose : -//======================================================================= -void GEOMAlgo_BuilderSolid::PerformShapesToAvoid() -{ - Standard_Boolean bFound; - Standard_Integer i, iCnt, aNbE, aNbF; - TopAbs_Orientation aOrE; - TopTools_IndexedDataMapOfShapeListOfShape aMEF; - TopTools_ListIteratorOfListOfShape aIt; - // - myShapesToAvoid.Clear(); - // - iCnt=0; - while (1) { - ++iCnt; - bFound=Standard_False; - // - // 1. MEF - aMEF.Clear(); - aIt.Initialize (myShapes); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - if (!myShapesToAvoid.Contains(aF)) { - TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF); - } - /* - else { - int a=0; - } - */ - } - aNbE=aMEF.Extent(); - // - // 2. myFacesToAvoid - for (i=1; i<=aNbE; ++i) { - const TopoDS_Edge& aE=*((TopoDS_Edge*)(&aMEF.FindKey(i))); - if (BRep_Tool::Degenerated(aE)) { - continue; - } - // - TopTools_ListOfShape& aLF=aMEF.ChangeFromKey(aE); - // - aNbF=aLF.Extent(); - if (!aNbF) { - continue; - } - // - aOrE=aE.Orientation(); - // - const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First())); - if (aNbF==1) { - if (aOrE==TopAbs_INTERNAL) { - continue; - } - bFound=Standard_True; - myShapesToAvoid.Add(aF1); - } - else if (aNbF==2) { - const TopoDS_Face& aF2=*((TopoDS_Face*)(&aLF.Last())); - if (aF2.IsSame(aF1)) { - if (BRep_Tool::IsClosed(aE, aF1)) { - continue; - } - // - if (aOrE==TopAbs_INTERNAL) { - continue; - } - // - bFound=Standard_True; - myShapesToAvoid.Add(aF1); - myShapesToAvoid.Add(aF2); - } - } - /*//DEB - else { - TopTools_ListIteratorOfListOfShape aItLF; - // - aItLF.Initialize (aLF); - for (; aItLF.More(); aItLF.Next()) { - const TopoDS_Shape& aFx=aItLF.Value(); - int a=0; - } - } - *///DEB - }// for (i=1; i<=aNbE; ++i) { - // - if (!bFound) { - break; - } - // - }//while (1) -} -//======================================================================= -//function : PerformLoops -//purpose : -//======================================================================= -void GEOMAlgo_BuilderSolid::PerformLoops() -{ - myErrorStatus=0; - // - myLoops.Clear(); - // - Standard_Integer aNbLF, aNbOff, aNbFP; - TopAbs_Orientation anOr; - TopoDS_Edge aEL; - BRep_Builder aBB; - NMTTools_CoupleOfShape aCSOff; - TopTools_MapOfOrientedShape AddedFacesMap; - TopTools_IndexedDataMapOfShapeListOfShape aEFMap, aMEFP; - TopTools_ListIteratorOfListOfShape aItF, aIt; - TopTools_MapIteratorOfMapOfOrientedShape aItM; - TopoDS_Iterator aItS; - // - //================================================= - // - // 1. Shells Usual - // - aItF.Initialize (myShapes); - for (; aItF.More(); aItF.Next()) { - const TopoDS_Shape& aFF = aItF.Value(); - TopExp::MapShapesAndAncestors(aFF, TopAbs_EDGE, TopAbs_FACE, aEFMap); - } - // - aItF.Initialize (myShapes); - for (; aItF.More(); aItF.Next()) { - const TopoDS_Shape& aFF = aItF.Value(); - if (myShapesToAvoid.Contains(aFF)) { - continue; - } - if (!AddedFacesMap.Add(aFF)) { - continue; - } - // - // make a new shell - TopoDS_Shell aShell; - aBB.MakeShell(aShell); - aBB.Add(aShell, aFF); - // - aMEFP.Clear(); - TopExp::MapShapesAndAncestors(aFF, TopAbs_EDGE, TopAbs_FACE, aMEFP); - // - // loop on faces added to Shell; add their neighbor faces to Shell and so on - TopoDS_Iterator aItAddedF (aShell); - for (; aItAddedF.More(); aItAddedF.Next()) { - const TopoDS_Face& aF = *((TopoDS_Face*)(&aItAddedF.Value())); - // - // loop on edges of aF; find a good neighbor face of aF by aE - TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE); - for (; aEdgeExp.More(); aEdgeExp.Next()) { - const TopoDS_Edge& aE=*((TopoDS_Edge*)(&aEdgeExp.Current())); - // - //1 - if (aMEFP.Contains(aE)) { - const TopTools_ListOfShape& aLFP=aMEFP.FindFromKey(aE); - aNbFP=aLFP.Extent(); - if (aNbFP>1) { - continue; - } - } - //2 - anOr=aE.Orientation(); - if (anOr==TopAbs_INTERNAL) { - continue; - } - //3 - if (BRep_Tool::Degenerated(aE)) { - continue; - } - // - // candidate faces list - const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE); - aNbLF=aLF.Extent(); - if (!aNbLF) { - continue; - } - // - // try to select one of neighbors - // check if a face already added to Shell shares E - Standard_Boolean bFound; - TopTools_ListIteratorOfListOfShape aItLF; - NMTTools_ListOfCoupleOfShape aLCSOff; - // - aItLF.Initialize(aLF); - for (; aItLF.More(); aItLF.Next()) { - const TopoDS_Face& aFL=*((TopoDS_Face*)(&aItLF.Value())); - if (myShapesToAvoid.Contains(aFL)) { - continue; - } - if (aF.IsSame(aFL)) { - continue; - } - if (AddedFacesMap.Contains(aFL)){ - continue; - } - // - bFound=GEOMAlgo_Tools3D::GetEdgeOff(aE, aFL, aEL); - if (!bFound) { - continue; - } - // - aCSOff.SetShape1(aEL); - aCSOff.SetShape2(aFL); - aLCSOff.Append(aCSOff); - }//for (; aItLF.More(); aItLF.Next()) { - // - aNbOff=aLCSOff.Extent(); - if (!aNbOff){ - continue; - } - // - TopoDS_Face aSelF; - if (aNbOff==1) { - aSelF=*((TopoDS_Face*)(&aLCSOff.First().Shape2())); - } - else if (aNbOff>1){ - GEOMAlgo_Tools3D::GetFaceOff(aE, aF, aLCSOff, aSelF); - } - // - if (!aSelF.IsNull() && AddedFacesMap.Add(aSelF)) { - aBB.Add(aShell, aSelF); - TopExp::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP); - } - } // for (; aEdgeExp.More(); aEdgeExp.Next()) { - } //for (; aItAddedF.More(); aItAddedF.Next()) { - // - if (IsClosedShell(aShell)) { - myLoops.Append(aShell); - } - else { - Standard_Boolean bRefine; - TopoDS_Shell aShx; - // - bRefine=RefineShell(aShell, aShx); - if (bRefine) { - myLoops.Append(aShx); - } - } - } // for (; aItF.More(); aItF.Next()) { - // - // Post Treatment - TopTools_MapOfOrientedShape aMP; - // - // a. collect all edges that are in loops - aIt.Initialize (myLoops); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - aItS.Initialize(aS); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aF=aItS.Value(); - aMP.Add(aF); - } - } - // - // b. collect all faces that are to avoid - aItM.Initialize(myShapesToAvoid); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aF=aItM.Key(); - aMP.Add(aF); - } - // - // c. add all faces that are not processed to myShapesToAvoid - aIt.Initialize (myShapes); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - if (!aMP.Contains(aF)) { - myShapesToAvoid.Add(aF); - } - } - //================================================= - // - // 2.Internal Shells - // - myLoopsInternal.Clear(); - // - aEFMap.Clear(); - AddedFacesMap.Clear(); - // - if (myComputeInternalShapes) { - aItM.Initialize(myShapesToAvoid); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aFF=aItM.Key(); - TopExp::MapShapesAndAncestors(aFF, TopAbs_EDGE, TopAbs_FACE, aEFMap); - } - // - aItM.Initialize(myShapesToAvoid); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aFF=aItM.Key(); - if (!AddedFacesMap.Add(aFF)) { - continue; - } - // - // make a new shell - TopoDS_Shell aShell; - aBB.MakeShell(aShell); - aBB.Add(aShell, aFF); - // - TopoDS_Iterator aItAddedF (aShell); - for (; aItAddedF.More(); aItAddedF.Next()) { - const TopoDS_Face& aF = *((TopoDS_Face*)(&aItAddedF.Value())); - // - TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE); - for (; aEdgeExp.More(); aEdgeExp.Next()) { - const TopoDS_Edge& aE = *((TopoDS_Edge*)(&aEdgeExp.Current())); - const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE); - aItF.Initialize(aLF); - for (; aItF.More(); aItF.Next()) { - const TopoDS_Face& aFL=*((TopoDS_Face*)(&aItF.Value())); - if (AddedFacesMap.Add(aFL)){ - aBB.Add(aShell, aFL); - } - } - } - } - myLoopsInternal.Append(aShell); - } - } -} -//======================================================================= -//function : PerformAreas -//purpose : -//======================================================================= -void GEOMAlgo_BuilderSolid::PerformAreas() -{ - myErrorStatus=0; - // - Standard_Boolean bIsGrowthShell, bIsHole; - TopTools_ListOfShape aNewSolids, aHoleShells; - TopoDS_Shape anInfinitePointShape; - TopTools_DataMapOfShapeShape aInOutMap; - TopTools_DataMapOfShapeListOfShape aMSH; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSH; - TopTools_ListIteratorOfListOfShape aShellIt, aSolidIt; - TopTools_IndexedMapOfShape aMHF; - BRep_Builder aBB; - // - myAreas.Clear(); - // - // Draft solids [aNewSolids] - aShellIt.Initialize(myLoops); - for ( ; aShellIt.More(); aShellIt.Next()) { - const TopoDS_Shape& aShell = aShellIt.Value(); - // - bIsGrowthShell=IsGrowthShell(aShell, aMHF); - if (bIsGrowthShell) { - // make a growth solid from a shell - TopoDS_Solid Solid; - aBB.MakeSolid(Solid); - aBB.Add (Solid, aShell); - // - aNewSolids.Append (Solid); - } - else{ - // check if a shell is a hole - bIsHole=IsHole(aShell, myContext); - // - if (bIsHole) { - aHoleShells.Append(aShell); - TopExp::MapShapes(aShell, TopAbs_FACE, aMHF); - } - else { - // make a growth solid from a shell - TopoDS_Solid Solid; - aBB.MakeSolid(Solid); - aBB.Add (Solid, aShell); - // - aNewSolids.Append (Solid); - } - } - } - // - // 2. Find outer growth shell that is most close to each hole shell - aShellIt.Initialize(aHoleShells); - for (; aShellIt.More(); aShellIt.Next()) { - const TopoDS_Shape& aHole = aShellIt.Value(); - // - aSolidIt.Initialize(aNewSolids); - for ( ; aSolidIt.More(); aSolidIt.Next()) { - const TopoDS_Shape& aSolid = aSolidIt.Value(); - // - if (!IsInside(aHole, aSolid, myContext)){ - continue; - } - // - if ( aInOutMap.IsBound (aHole)){ - const TopoDS_Shape& aSolid2 = aInOutMap(aHole); - if (IsInside(aSolid, aSolid2, myContext)) { - aInOutMap.UnBind(aHole); - aInOutMap.Bind (aHole, aSolid); - } - } - else{ - aInOutMap.Bind (aHole, aSolid); - } - } - // - // Add aHole to a map Solid/ListOfHoles [aMSH] - if (aInOutMap.IsBound(aHole)){ - const TopoDS_Shape& aSolid=aInOutMap(aHole); - if (aMSH.IsBound(aSolid)) { - TopTools_ListOfShape& aLH=aMSH.ChangeFind(aSolid); - aLH.Append(aHole); - } - else { - TopTools_ListOfShape aLH; - aLH.Append(aHole); - aMSH.Bind(aSolid, aLH); - } - //aBB.Add (aSolid, aHole); - } - }// for (; aShellIt.More(); aShellIt.Next()) { - // - // 3. Add aHoles to Solids - aItMSH.Initialize(aMSH); - for (; aItMSH.More(); aItMSH.Next()) { - TopoDS_Solid aSolid=*((TopoDS_Solid*)(&aItMSH.Key())); - // - const TopTools_ListOfShape& aLH=aItMSH.Value(); - aShellIt.Initialize(aLH); - for (; aShellIt.More(); aShellIt.Next()) { - const TopoDS_Shape& aHole = aShellIt.Value(); - aBB.Add (aSolid, aHole); - } - // - // update classifier - BRepClass3d_SolidClassifier& aSC=myContext->SolidClassifier(aSolid); - aSC.Load(aSolid); - // - } - // - // These aNewSolids are draft solids that - // do not contain any internal shapes - // - myAreas.Append(aNewSolids); -} -//======================================================================= -//function : PerformInternalShapes -//purpose : -//======================================================================= -void GEOMAlgo_BuilderSolid::PerformInternalShapes() -{ - myErrorStatus=0; - // - Standard_Integer aNbFI=myLoopsInternal.Extent(); - if (!aNbFI) {// nothing to do - return; - } - // - Standard_Integer bFlag; - BRep_Builder aBB; - TopTools_ListIteratorOfListOfShape aShellIt, aSolidIt; - TopoDS_Iterator aIt; - TopTools_MapOfShape aMF, aMFP, aMFS; - TopTools_MapIteratorOfMapOfShape aItMF; - TopTools_IndexedDataMapOfShapeListOfShape aMEF; - TopTools_ListOfShape aLSI; - // - // 1. All internal faces - aShellIt.Initialize(myLoopsInternal); - for (; aShellIt.More(); aShellIt.Next()) { - const TopoDS_Shape& aShell=aShellIt.Value(); - aIt.Initialize(aShell); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - aMF.Add(aF); - } - } - aNbFI=aMF.Extent(); - // - // 2 Process solids - aSolidIt.Initialize(myAreas); - for ( ; aSolidIt.More(); aSolidIt.Next()) { - TopoDS_Solid& aSolid=*((TopoDS_Solid*)(&aSolidIt.Value())); - // - //modified by NIZNHY-PKV Wed Mar 07 08:52:18 2012f - aMFS.Clear(); - { - TopExp_Explorer aExp(aSolid, TopAbs_FACE); - while (aExp.More()) { - aMFS.Add(aExp.Current()); - aExp.Next(); - } - } - //modified by NIZNHY-PKV Wed Mar 07 08:52:20 2012t - aMEF.Clear(); - TopExp::MapShapesAndAncestors(aSolid, TopAbs_EDGE, TopAbs_FACE, aMEF); - // - // 2.1 Separate faces to process aMFP - aMFP.Clear(); - aItMF.Initialize(aMF); - for (; aItMF.More(); aItMF.Next()) { - const TopoDS_Face& aF=*((TopoDS_Face*)(&aItMF.Key())); - //modified by NIZNHY-PKV Wed Mar 07 08:54:56 2012f - if (!aMFS.Contains(aF)) { - bFlag=GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext); - if (bFlag) { - aMFP.Add(aF); - } - } - //if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, myContext)) { - // aMFP.Add(aF); - //} - //modified by NIZNHY-PKV Wed Mar 07 08:56:07 2012t - } - // - // 2.2 Make Internal Shells - aLSI.Clear(); - MakeInternalShells(aMFP, aLSI); - // - // 2.3 Add them to aSolid - aShellIt.Initialize(aLSI); - for (; aShellIt.More(); aShellIt.Next()) { - const TopoDS_Shape& aSI=aShellIt.Value(); - aBB.Add (aSolid, aSI); - } - // - // 2.4 Remove faces aMFP from aMF - aItMF.Initialize(aMFP); - for (; aItMF.More(); aItMF.Next()) { - const TopoDS_Shape& aF=aItMF.Key(); - aMF.Remove(aF); - } - // - aNbFI=aMF.Extent(); - if (!aNbFI) { - break; - } - } //for ( ; aSolidIt.More(); aSolidIt.Next()) { -} - -//======================================================================= -//function : MakeInternalShells -//purpose : -//======================================================================= -void MakeInternalShells(const TopTools_MapOfShape& theMF, - TopTools_ListOfShape& theShells) -{ - TopTools_MapIteratorOfMapOfShape aItM; - TopTools_MapOfShape aAddedFacesMap; - TopTools_ListIteratorOfListOfShape aItF; - TopTools_IndexedDataMapOfShapeListOfShape aMEF; - BRep_Builder aBB; - // - aItM.Initialize(theMF); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aF=aItM.Key(); - TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF); - } - // - aItM.Initialize(theMF); - for (; aItM.More(); aItM.Next()) { - TopoDS_Shape aFF=aItM.Key(); - if (!aAddedFacesMap.Add(aFF)) { - continue; - } - // - // make a new shell - TopoDS_Shell aShell; - aBB.MakeShell(aShell); - aFF.Orientation(TopAbs_INTERNAL); - aBB.Add(aShell, aFF); - // - TopoDS_Iterator aItAddedF (aShell); - for (; aItAddedF.More(); aItAddedF.Next()) { - const TopoDS_Shape& aF =aItAddedF.Value(); - // - TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE); - for (; aEdgeExp.More(); aEdgeExp.Next()) { - const TopoDS_Shape& aE =aEdgeExp.Current(); - const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE); - aItF.Initialize(aLF); - for (; aItF.More(); aItF.Next()) { - TopoDS_Shape aFL=aItF.Value(); - if (aAddedFacesMap.Add(aFL)){ - aFL.Orientation(TopAbs_INTERNAL); - aBB.Add(aShell, aFL); - } - } - } - } - theShells.Append(aShell); - } -} -//======================================================================= -//function : IsHole -//purpose : -//======================================================================= -Standard_Boolean IsHole(const TopoDS_Shape& theS2, - const Handle(IntTools_Context)& theContext) -{ - TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2; - BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2); - // - aClsf.PerformInfinitePoint(::RealSmall()); - // - return (aClsf.State()==TopAbs_IN); -} -//======================================================================= -//function : IsInside -//purpose : -//======================================================================= -Standard_Boolean IsInside(const TopoDS_Shape& theS1, - const TopoDS_Shape& theS2, - const Handle(IntTools_Context)& theContext) -{ - TopExp_Explorer aExp; - TopAbs_State aState; - // - TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2; - // - aExp.Init(theS1, TopAbs_FACE); - if (!aExp.More()){ - BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2); - aClsf.PerformInfinitePoint(::RealSmall()); - aState=aClsf.State(); - } - else { - TopTools_IndexedMapOfShape aBounds; - const TopoDS_Face& aF = TopoDS::Face(aExp.Current()); - aState=GEOMAlgo_Tools3D::ComputeState(aF, *pS2, 1.e-14, aBounds, theContext); - } - return (aState==TopAbs_IN); -} -//======================================================================= -//function : IsGrowthShell -//purpose : -//======================================================================= -Standard_Boolean IsGrowthShell(const TopoDS_Shape& theShell, - const TopTools_IndexedMapOfShape& theMHF) -{ - Standard_Boolean bRet; - TopoDS_Iterator aIt; - // - bRet=Standard_False; - if (theMHF.Extent()) { - aIt.Initialize(theShell); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - if (theMHF.Contains(aF)) { - return !bRet; - } - } - } - return bRet; -} -//======================================================================= -//function : IsClosedShell -//purpose : -//======================================================================= -Standard_Boolean IsClosedShell(const TopoDS_Shell& theShell) -{ - Standard_Integer aNbE; - Standard_Boolean bRet; - TopoDS_Iterator aIt; - TopExp_Explorer aExp; - TopTools_MapOfShape aM; - // - bRet=Standard_False; - aIt.Initialize(theShell); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Face& aF=TopoDS::Face(aIt.Value()); - aExp.Init(aF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Edge& aE=*((TopoDS_Edge*)(&aExp.Current())); - if (BRep_Tool::Degenerated(aE)) { - continue; - } - // - if (aE.Orientation()==TopAbs_INTERNAL) { - continue; - } - // - if (!aM.Add(aE)) { - aM.Remove(aE); - } - } - } - // - aNbE=aM.Extent(); - if (!aNbE) { - bRet=!bRet; - } - return bRet; -} -//======================================================================= -//function : RefineShell -//purpose : -//======================================================================= -Standard_Boolean RefineShell(const TopoDS_Shell& aShell, - TopoDS_Shell& aShx) - -{ - Standard_Boolean bRet; - Standard_Integer i, aNbE, aNbF; - TopAbs_Orientation aOrE; - TopTools_IndexedDataMapOfShapeListOfShape aMEF; - TopTools_MapOfOrientedShape aMFx; - // - bRet=Standard_False; - // - TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF); - aNbE=aMEF.Extent(); - for (i=1; i<=aNbE; ++i) { - const TopoDS_Edge &aE=*((TopoDS_Edge*)(&aMEF.FindKey(i))); - // - if (BRep_Tool::Degenerated(aE)) { - continue; - } - // - aOrE=aE.Orientation(); - // - const TopTools_ListOfShape& aLF=aMEF(i); - aNbF=aLF.Extent(); - if (!aNbF) { - continue; - } - // - const TopoDS_Face& aF1=*((TopoDS_Face*)(&aLF.First())); - if (aNbF==1) { - if (aOrE==TopAbs_INTERNAL) { - continue; - } - aMFx.Add(aF1); - } - // - else if (aNbF==2) { - const TopoDS_Face& aF2=*((TopoDS_Face*)(&aLF.Last())); - if (aF2.IsSame(aF1)) { - if (BRep_Tool::IsClosed(aE, aF1)) { - continue; - } - if (aOrE==TopAbs_INTERNAL) { - continue; - } - aMFx.Add(aF1); - aMFx.Add(aF2); - } - } - } - // - aNbF=aMFx.Extent(); - if (!aNbF) { - return bRet; - } - // - BRep_Builder aBB; - TopoDS_Iterator aIt; - // - aNbF=0; - aBB.MakeShell(aShx); - aIt.Initialize(aShell); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - if (!aMFx.Contains(aF)) { - aBB.Add(aShx, aF); - ++aNbF; - } - } - // - if (aNbF) { - bRet=IsClosedShell(aShx); - } - // - return bRet; -} -// -// ErrorStatus : -// 11 - Null Context diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderSolid.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_BuilderSolid.hxx deleted file mode 100644 index 650528fa7..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderSolid.hxx +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_BuilderSolid.hxx -// Created: -// Author: Peter KURNEV -// -#ifndef _GEOMAlgo_BuilderSolid_HeaderFile -#define _GEOMAlgo_BuilderSolid_HeaderFile - -#include -#include -#include - -//! The algorithm to build solids from set of faces
-//======================================================================= -//function : GEOMAlgo_BuilderSolid -//purpose : -//======================================================================= -class GEOMAlgo_BuilderSolid : public GEOMAlgo_BuilderArea -{ - public: - //! Empty constructor
- Standard_EXPORT - GEOMAlgo_BuilderSolid(); - - Standard_EXPORT - virtual ~GEOMAlgo_BuilderSolid(); - - //! Performs the algorithm
- Standard_EXPORT - virtual void Perform() ; - - protected: - //! Collect the faces that
- //! a) are internal
- //! b) are the same and have different orientation
- Standard_EXPORT - virtual void PerformShapesToAvoid() ; - - //! Build draft shells
- //! a)myLoops - draft shells that consist of
- //! boundary faces
- //! b)myLoopsInternal - draft shells that contains
- //! inner faces
- Standard_EXPORT - virtual void PerformLoops() ; - - //! Build draft solids that contains boundary faces
- Standard_EXPORT - virtual void PerformAreas() ; - - //! Build finalized solids with internal shells
- Standard_EXPORT - virtual void PerformInternalShapes() ; - -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderTools.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_BuilderTools.cxx deleted file mode 100644 index a40c07a37..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderTools.cxx +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_BuilderTools.cxx -// Author: Peter KURNEV - -#include - -#include - -#include - -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version -#include -#include -#endif - -#include -#include -#include -#include -#include - -static - Standard_Integer ComputeProps(const TopoDS_Face& aF, - Standard_Real& aA, - Standard_Real& aV); -static - void BuildTriangulation(const TopoDS_Face& aF); - -//======================================================================= -//function : IsHole -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aW, - const TopoDS_Shape& aFace) -{ - Standard_Boolean bIsHole; - Standard_Integer i, aNbS; - Standard_Real aT1, aT2, aS; - Standard_Real aU1, aU2, aU, dU; - Standard_Real aX1, aY1, aX0, aY0; - TopAbs_Orientation aOr; - - gp_Pnt2d aP2D0, aP2D1; - Handle(Geom2d_Curve) aC2D; - TopoDS_Face aF, aFF; - TopoDS_Iterator aItW; - // - bIsHole=Standard_False; - // - aF=TopoDS::Face(aFace); - aFF=aF; - aFF.Orientation(TopAbs_FORWARD); - // - aS=0.; - aItW.Initialize(aW); - for (; aItW.More(); aItW.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value()); - aOr=aE.Orientation(); - if (!(aOr==TopAbs_FORWARD || - aOr==TopAbs_REVERSED)) { - continue; - } - // - aC2D=BRep_Tool::CurveOnSurface(aE, aFF, aT1, aT2); - if (aC2D.IsNull()) { - break; //xx - } - // - BRepAdaptor_Curve2d aBAC2D(aE, aFF); - aNbS=Geom2dInt_Geom2dCurveTool::NbSamples(aBAC2D); - if (aNbS>2) { - aNbS*=4; - } - // - dU=(aT2-aT1)/(Standard_Real)(aNbS-1); - aU =aT1; - aU1=aT1; - aU2=aT2; - if (aOr==TopAbs_REVERSED) { - aU =aT2; - aU1=aT2; - aU2=aT1; - dU=-dU; - } - // - aC2D->D0(aU, aP2D0); - for(i=2; i<=aNbS; i++) { - aU=aU1+(i-1)*dU; - aC2D->D0(aU, aP2D1); - aP2D0.Coord(aX0, aY0); - aP2D1.Coord(aX1, aY1); - // - aS=aS+(aY0+aY1)*(aX1-aX0); - // - aP2D0=aP2D1; - } - }//for (; aItW.More(); aItW.Next()) { - bIsHole=(aS>0.); - return bIsHole; -} -//======================================================================= -//function : IsHole -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aShell) -{ - Standard_Boolean bIsHole; - Standard_Integer iRet; - Standard_Real aAi, aA, aV, aVi; - TopExp_Explorer aExp; - // - aA=0.; - aV=0.; - aExp.Init(aShell, TopAbs_FACE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Face& aF=TopoDS::Face(aExp.Current()); - iRet=ComputeProps(aF, aAi, aVi); - if (!iRet) { - aA+=aAi; - aV+=aVi; - } - } - // - bIsHole=aV<0.; - return bIsHole; -} -//======================================================================= -//function : ComputeProps -//purpose : -//======================================================================= -Standard_Integer ComputeProps(const TopoDS_Face& aF, - Standard_Real& aA, - Standard_Real& aV) -{ - Standard_Integer j, i, i1, i2, aNbNodes, aNbTrigs, n[3]; - Standard_Real aAi, aVi; - gp_Pnt aP[3], aGC, aGC1; - TopLoc_Location aLoc; - TopAbs_Orientation aOr; - Handle(Poly_Triangulation) aTri; - // - aA=0.; - aV=0.; - // - aTri=BRep_Tool::Triangulation(aF, aLoc); - if(aTri.IsNull()) { - BuildTriangulation(aF); - aTri=BRep_Tool::Triangulation(aF, aLoc); - if(aTri.IsNull()) { - return 1;// a face is without triangulation - } - } - // - aNbNodes=aTri->NbNodes(); - aNbTrigs=aTri->NbTriangles(); - if (!aNbTrigs){ - return 2;//no triangles - } - // - aOr=aF.Orientation(); - // - const TColgp_Array1OfPnt& aNodes=aTri->Nodes(); - const Poly_Array1OfTriangle& aTriangles=aTri->Triangles(); - // - i1=aTriangles.Lower(); - i2=aTriangles.Upper(); - // - for (i=i1; i<=i2; ++i){ - const Poly_Triangle& aTriangle=aTriangles.Value(i); - aTriangle.Get(n[0], n[1], n[2]); - aGC.SetCoord(0.,0.,0.); - for (j=0; j<3; ++j) { - aP[j]=aNodes.Value(n[j]); - aGC.ChangeCoord()+=aP[j].XYZ(); - } - aGC.ChangeCoord()*=0.333333333333; - // - // Normal - gp_Vec aV01(aP[0], aP[1]); - gp_Vec aV12(aP[1], aP[2]); - gp_Vec aVN=aV01^aV12; - aAi=aVN.Magnitude(); - aA=aA+aAi; - // - if (aAi>0.0000001) { - Standard_Real aSx, aZx; - gp_Dir aDN(aVN); - if (aOr==TopAbs_REVERSED) { - aDN.Reverse(); - } - // - aSx=aAi*aDN.Z(); - aZx=aGC.Z(); - aVi=aZx*aSx; - aV=aV+aVi; - } - } - return 0; -} -//======================================================================= -//function : BuildTriangulation -//purpose : -//======================================================================= -void BuildTriangulation(const TopoDS_Face& aF) -{ - Standard_Boolean bWithShare; - Standard_Real aDiscret, aXmin, aYmin, aZmin, aXmax, aYmax, aZmax; - Standard_Real dX, dY, dZ, dMax, aCoeff, aAngle; - Bnd_Box aBox; - // - bWithShare=Standard_False; - aAngle=0.5; - // - BRepBndLib::Add(aF, aBox); - // - // aDiscret - aBox.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax); - dX=aXmax-aXmin; - dY=aYmax-aYmin; - dZ=aZmax-aZmin; - dMax=dX; - if (dY>dMax) { - dMax=dY; - } - if (dZ>dMax) { - dMax=dZ; - } - // - aCoeff=0.1; - aDiscret=aCoeff*dMax; - // - BRepMesh_FastDiscret aMesher(aDiscret, - aAngle, - aBox, - bWithShare, - Standard_True, - Standard_False, - Standard_True); - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - TopTools_IndexedDataMapOfShapeListOfShape anAncestors; - TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, anAncestors); - aMesher.Add(aF, anAncestors); -#else - aMesher.Add(aF); -#endif -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderTools.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_BuilderTools.hxx deleted file mode 100644 index b0d13c9fe..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_BuilderTools.hxx +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_BuilderTools.hxx -// Author: Peter KURNEV - -#ifndef _GEOMAlgo_BuilderTools_HeaderFile -#define _GEOMAlgo_BuilderTools_HeaderFile - -#include -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_BuilderTools -//purpose : -//======================================================================= -class GEOMAlgo_BuilderTools -{ - public: - Standard_EXPORT - static Standard_Boolean IsHole(const TopoDS_Shape& aW, - const TopoDS_Shape& aF) ; - - Standard_EXPORT - static Standard_Boolean IsHole(const TopoDS_Shape& aShell) ; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Builder_0.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Builder_0.cxx deleted file mode 100644 index b0fe28966..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Builder_0.cxx +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#include -//#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : Shapes1 -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_Builder::Shapes1(const Standard_Integer theType)const -{ - return myShapes1[theType]; -} -//======================================================================= -//function : Images -//purpose : -//======================================================================= - const BRepAlgo_Image& GEOMAlgo_Builder::Images()const -{ - return myImages; -} -//======================================================================= -//function : InParts -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_Builder::InParts(const TopoDS_Shape& theS)const -{ - static TopTools_ListOfShape sLS; - // - if (myInParts.Contains(theS)) { - return myInParts.FindFromKey(theS); - } - return sLS; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Builder_1.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Builder_1.cxx deleted file mode 100644 index aa4f7ef53..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Builder_1.cxx +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Builder_1.cxx -// Created: -// Author: Peter KURNEV -// -#include -// -#include - -#include -#include -#include -#include -#include -#include -// -#include -#include -#include -#include -// -#include -#include -// -#include -#include -#include -#include -// -#include -// -#include -#include -#include -#include -#include -#include -#include -// -#include -#include - - - -static - void FillImagesCompounds(const TopTools_MapOfShape& , - BRepAlgo_Image& ); - -static - void FillImagesCompound(const TopoDS_Shape& , - BRepAlgo_Image& , - TopTools_MapOfShape& ); - -//======================================================================= -//function : FillImagesVertices -//purpose : -//======================================================================= - void GEOMAlgo_Builder::FillImagesVertices() -{ - myErrorStatus=0; - // - const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); - NMTTools_PaveFiller* pPF=myPaveFiller; - // - Standard_Integer i, aNb, iV; - // - aNb=aDS.NumberOfShapesOfTheObject(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aV=aDS.Shape(i); - if (aV.ShapeType()==TopAbs_VERTEX) { - iV=pPF->FindSDVertex(i); - if (iV) { - const TopoDS_Shape& aVSD=aDS.Shape(iV); - if (!myImages.HasImage(aV)) { - myImages.Bind(aV, aVSD); - // - mySameDomainShapes.Add(aV, aVSD); - } - } - } - } -} -//======================================================================= -// function: FillImagesEdges -// purpose: -//======================================================================= - void GEOMAlgo_Builder::FillImagesEdges() -{ - myErrorStatus=0; - // - const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); - NMTTools_PaveFiller* pPF=myPaveFiller; - const BOPTools_SplitShapesPool& aSSP=pPF->SplitShapesPool(); - const Handle(IntTools_Context)& aCtx=pPF->Context(); - // - Standard_Boolean bToReverse; - Standard_Integer i, aNb, aNbSp, nSp, nSpR, nSpx, aIsCB, aNbLB; - TColStd_ListIteratorOfListOfInteger aItLB; - TColStd_ListOfInteger aLB; - TopoDS_Edge aEE, aESpR; - TopTools_MapOfShape aMFence; - TopTools_ListOfShape aLSp; - TopTools_ListIteratorOfListOfShape aIt1; - BOPTools_ListIteratorOfListOfPaveBlock aIt; - // - aNb=aDS.NumberOfShapesOfTheObject(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aE=aDS.Shape(i); - if (aE.ShapeType()!=TopAbs_EDGE) { - continue; - } - // - if (!aMFence.Add(aE)) { - continue; - } - // - const BOPTools_ListOfPaveBlock& aLPB=aSSP(aDS.RefEdge(i)); - aNbSp=aLPB.Extent(); - if (!aNbSp) { - continue; - } - // - aEE=TopoDS::Edge(aE); - aLSp.Clear(); - // - if (aNbSp==1) { - const BOPTools_PaveBlock& aPB=aLPB.First(); - nSp=aPB.Edge(); - const TopoDS_Shape& aSp=aDS.Shape(nSp); - // - const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB, aIsCB); - //modified by NIZNHY-PKV Wed Oct 27 11:19:30 2010f - aNbLB=aLB.Extent(); - if (aIsCB && aNbLB<2) { - aIsCB=0; - } - //modified by NIZNHY-PKV Wed Oct 27 11:19:34 2010t - // - nSpR=aPBR.Edge(); - const TopoDS_Shape& aSpR=aDS.Shape(nSpR); - if (aSpR.IsSame(aSp) && aSpR.IsSame(aE) && !aIsCB) { - continue; - } - // - aESpR=TopoDS::Edge(aSpR); - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx); - if (bToReverse) { - aESpR.Reverse(); - } - aLSp.Append(aESpR); - // - aItLB.Initialize(aLB); - for (; aItLB.More(); aItLB.Next()) { - nSpx=aItLB.Value(); - const TopoDS_Shape& aSpx=aDS.Shape(nSpx); - mySameDomainShapes.Add(aSpx ,aSpR); - } - // - // - }// if (aNbSp==1) { - else { - aIt.Initialize(aLPB); - for (; aIt.More(); aIt.Next()) { - const BOPTools_PaveBlock& aPB=aIt.Value(); - const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB, aIsCB); - nSpR=aPBR.Edge(); - const TopoDS_Shape& aSpR=aDS.Shape(nSpR); - // - aESpR=TopoDS::Edge(aSpR); - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx); - if (bToReverse) { - aESpR.Reverse(); - } - aLSp.Append(aESpR); - // - aItLB.Initialize(aLB); - for (; aItLB.More(); aItLB.Next()) { - nSpx=aItLB.Value(); - const TopoDS_Shape& aSpx=aDS.Shape(nSpx); - mySameDomainShapes.Add(aSpx ,aSpR); - } - } - } - // - myImages.Bind(aE, aLSp); - - }//for (i=1; i<=aNb; ++i) -} -//======================================================================= -// function: FillImagesContainers -// purpose: -//======================================================================= - void GEOMAlgo_Builder::FillImagesContainers(const TopAbs_ShapeEnum theType) -{ - myErrorStatus=0; - // - Standard_Boolean bInterferred, bToReverse; - Standard_Integer i, aNbS; - TopAbs_ShapeEnum aType; - BRep_Builder aBB; - TopoDS_Iterator aIt; - TopTools_ListIteratorOfListOfShape aItIm; - TopTools_MapOfShape aMS; - TopTools_MapIteratorOfMapOfShape aItS; - // - const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); - NMTTools_PaveFiller* pPF=myPaveFiller; - const Handle(IntTools_Context)& aCtx= pPF->Context(); - // - aNbS=aDS.NumberOfShapesOfTheObject(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aC=aDS.Shape(i); - aType=aC.ShapeType(); - if (aType==theType) { - aMS.Add(aC); - } - } - // - if (theType==TopAbs_COMPOUND) { - FillImagesCompounds(aMS, myImages); - return; - } - // - aItS.Initialize(aMS); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aC=aItS.Key(); - // whether the shape has image - bInterferred=Standard_False; - aIt.Initialize(aC); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - if (myImages.HasImage(aF)) { - bInterferred=!bInterferred; - break; - } - } - if (!bInterferred){ - continue; - } - // - TopoDS_Shape aCIm; - GEOMAlgo_Tools3D::MakeContainer(theType, aCIm); - // - aIt.Initialize(aC); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - if (myImages.HasImage(aF)) { - const TopTools_ListOfShape& aLFIm=myImages.Image(aF); - aItIm.Initialize(aLFIm); - for (; aItIm.More(); aItIm.Next()) { - TopoDS_Shape aFIm=aItIm.Value(); - // - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFIm, aF, aCtx); - if (bToReverse) { - aFIm.Reverse(); - } - aBB.Add(aCIm, aFIm); - } - } - else { - aBB.Add(aCIm, aF); - } - } - myImages.Bind(aC, aCIm); - }// for (; aItS.More(); aItS.Next()) { -} -//======================================================================= -// function: FillImagesCompounds -// purpose: -//======================================================================= -void FillImagesCompounds(const TopTools_MapOfShape& theMS, - BRepAlgo_Image& theImages) -{ - TopTools_MapOfShape aMFP; - TopTools_MapIteratorOfMapOfShape aItS; - // - aItS.Initialize(theMS); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aC=aItS.Key(); - FillImagesCompound(aC, theImages, aMFP); - } -} -//======================================================================= -//function : FillImagesCompound -//purpose : -//======================================================================= -void FillImagesCompound(const TopoDS_Shape& theS, - BRepAlgo_Image& theImages, - TopTools_MapOfShape& theMFP) -{ - Standard_Boolean bInterferred; - TopAbs_ShapeEnum aTypeX; - TopAbs_Orientation aOrX; - TopoDS_Iterator aIt; - BRep_Builder aBB; - TopTools_ListIteratorOfListOfShape aItIm; - // - if (!theMFP.Add(theS)) { - return; - } - // - bInterferred=Standard_False; - aIt.Initialize(theS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSX=aIt.Value(); - aTypeX=aSX.ShapeType(); - if (aTypeX==TopAbs_COMPOUND) { - FillImagesCompound(aSX, theImages, theMFP); - } - if (theImages.HasImage(aSX)) { - bInterferred=Standard_True; - } - } - if (!bInterferred){ - return; - } - // - TopoDS_Shape aCIm; - GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCIm); - // - aIt.Initialize(theS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSX=aIt.Value(); - aOrX=aSX.Orientation(); - if (theImages.HasImage(aSX)) { - const TopTools_ListOfShape& aLFIm=theImages.Image(aSX); - aItIm.Initialize(aLFIm); - for (; aItIm.More(); aItIm.Next()) { - TopoDS_Shape aSXIm=aItIm.Value(); - aSXIm.Orientation(aOrX); - aBB.Add(aCIm, aSXIm); - } - } - else { - aBB.Add(aCIm, aSX); - } - } - theImages.Bind(theS, aCIm); -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Builder_2.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Builder_2.cxx deleted file mode 100644 index 888ee3ec9..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Builder_2.cxx +++ /dev/null @@ -1,984 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_Builder_2.cxx -// Author: Peter KURNEV - -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// -#include -#include -#include - -#include -// -#include -#include -#include -#include -#include -#include -#include -#include - -static - void UpdateCandidates(const Standard_Integer , - const Standard_Integer , - NMTTools_IndexedDataMapOfIndexedMapOfInteger& ); - -//modified by NIZNHY-PKV Thu Feb 16 12:24:52 2012f -static - Standard_Boolean IsClosed(const TopoDS_Edge& , - const TopoDS_Face& ); -//modified by NIZNHY-PKV Thu Feb 16 12:24:56 2012t - -//======================================================================= -//function : FillImagesFaces -//purpose : -//======================================================================= -void GEOMAlgo_Builder::FillImagesFaces() -{ - myErrorStatus=0; - // - FillIn2DParts(); - BuildSplitFaces(); - FillSameDomainFaces(); - FillImagesFaces1(); - FillInternalVertices(); -} - -//======================================================================= -// function: FillIn2DParts -// purpose: -//======================================================================= -void GEOMAlgo_Builder::FillIn2DParts() -{ - const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); - NMTTools_PaveFiller* pPF=myPaveFiller; - NMTDS_InterfPool* pIP=pPF->IP(); - BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences(); - NMTTools_CommonBlockPool& aCBP=pPF->ChangeCommonBlockPool(); - // - Standard_Integer j, nSpIn, nSpSc, aNbCurves; - Standard_Integer aNbS, nF, aNbCBP, n1, n2, aNbFFs, aNbSpIn; - TopTools_MapOfShape aMFence; - TopTools_ListOfShape aLSpIn; - TopoDS_Face aF; - NMTTools_ListIteratorOfListOfCommonBlock aItCB; - BOPTools_ListIteratorOfListOfPaveBlock aItPB; - // - myInParts.Clear(); - // - aNbFFs=aFFs.Extent(); - aNbCBP=aCBP.Extent(); - // - aNbS=aDS.NumberOfShapesOfTheObject(); - for (nF=1; nF<=aNbS; ++nF) { - if (aDS.GetShapeType(nF)!=TopAbs_FACE) { - continue; - } - // - aF=TopoDS::Face(aDS.Shape(nF)); - // - aMFence.Clear(); - aLSpIn.Clear(); - // - // 1. In Parts - BOPTools_ListOfPaveBlock aLPBIn; - // - pPF->RealSplitsInFace(nF, aLPBIn); - // - aItPB.Initialize(aLPBIn); - for (; aItPB.More(); aItPB.Next()) { - const BOPTools_PaveBlock& aPB1=aItPB.Value(); - nSpIn=aPB1.Edge(); - const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn); - aLSpIn.Append(aSpIn); - } - // - // 2. Section Parts - for (j=1; j<=aNbFFs; ++j) { - BOPTools_SSInterference& aFF=aFFs(j); - aFF.Indices(n1, n2); - if (!(n1==nF || n2==nF)) { - continue; - } - BOPTools_SequenceOfCurves& aSC=aFF.Curves(); - aNbCurves=aSC.Length(); - if (!aNbCurves) { - continue; - } - // - const BOPTools_Curve& aBC=aSC(1); - const BOPTools_ListOfPaveBlock& aLPB=aBC.NewPaveBlocks(); - aItPB.Initialize(aLPB); - for (; aItPB.More(); aItPB.Next()) { - const BOPTools_PaveBlock& aPBSc=aItPB.Value(); - nSpSc=aPBSc.Edge(); - const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc); - if (aMFence.Add(aSpSc)){ - aLSpIn.Append(aSpSc); - } - } - } - aNbSpIn=aLSpIn.Extent(); - if (aNbSpIn) { - myInParts.Add(aF, aLSpIn); - } - }//for (nF=1; nF<=aNbS; ++nF) { -} - -//======================================================================= -// function: BuildSplitFaces -// purpose: -//======================================================================= -void GEOMAlgo_Builder::BuildSplitFaces() -{ - const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); - NMTTools_PaveFiller* pPF=myPaveFiller; - NMTDS_InterfPool* pIP=pPF->IP(); - BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences(); - const Handle(IntTools_Context)& aCtx= pPF->Context(); - // - Standard_Boolean bToReverse, bIsClosed, bIsDegenerated; - Standard_Integer i, aNb, aNbF, nF; - TopTools_MapOfShape aMFence; - TColStd_IndexedMapOfInteger aMFP; - TopExp_Explorer anExp; - TopoDS_Face aFF; - TopoDS_Edge aSp, aEE; - TopTools_ListIteratorOfListOfShape aIt; - TopAbs_Orientation anOriF, anOriE; - // - mySplitFaces.Clear(); - // - // 1. Select Faces to process (MFP) - aNb=aDS.NumberOfShapesOfTheObject(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aF=aDS.Shape(i); - if (aF.ShapeType()!=TopAbs_FACE) { - continue; - } - if (!aMFence.Add(aF)) { - continue; - } - // - if (myInParts.Contains(aF)) { - aMFP.Add(i); - continue; - } - // - anExp.Init(aF, TopAbs_EDGE); - for (; anExp.More(); anExp.Next()) { - const TopoDS_Shape& aE=anExp.Current(); - if (myImages.HasImage(aE)) { - aMFP.Add(i); - break; - } - } - // - //=== - { - Standard_Integer aNbFFs, aNbSE, j, n1, n2; - // - aNbFFs=aFFs.Extent(); - for (j=1; j<=aNbFFs; ++j) { - BOPTools_SSInterference& aFFj=aFFs(j); - aFFj.Indices(n1, n2); - if (!(n1==i || n2==i)) { - continue; - } - // - const TColStd_ListOfInteger& aLSE=aFFj.SharedEdges(); - aNbSE=aLSE.Extent(); - if (aNbSE) { - aMFP.Add(i); - break; - } - } - } - //=== - // - }// for (i=1; i<=aNb; ++i) - // - // 2. ProcessFaces - aNbF=aMFP.Extent(); - for (i=1; i<=aNbF; ++i) { - nF=aMFP(i); - const TopoDS_Face& aF=TopoDS::Face(aDS.Shape(nF)); - anOriF=aF.Orientation(); - aFF=aF; - aFF.Orientation(TopAbs_FORWARD); - // - aMFence.Clear(); - // - // 2.1. Fill WES - GEOMAlgo_WireEdgeSet aWES; - aWES.SetFace(aFF); - // - // 2.1.1. Add Split parts - anExp.Init(aFF, TopAbs_EDGE); - for (; anExp.More(); anExp.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(anExp.Current()); - anOriE=aE.Orientation(); - // - if (!myImages.HasImage(aE)) { - if (anOriE==TopAbs_INTERNAL) { - aEE=aE; - aEE.Orientation(TopAbs_FORWARD); - aWES.AddStartElement(aEE); - aEE.Orientation(TopAbs_REVERSED); - aWES.AddStartElement(aEE); - } - else { - aWES.AddStartElement(aE); - } - continue; - } - // - bIsDegenerated=BRep_Tool::Degenerated(aE); - //modified by NIZNHY-PKV Wed Mar 07 07:46:09 2012f - bIsClosed=IsClosed(aE, aF); - //bIsClosed=BRep_Tool::IsClosed(aE, aF); - //modified by NIZNHY-PKV Wed Mar 07 07:46:13 2012t - // - const TopTools_ListOfShape& aLIE=myImages.Image(aE); - aIt.Initialize(aLIE); - for (; aIt.More(); aIt.Next()) { - aSp=TopoDS::Edge(aIt.Value()); - // - if (bIsDegenerated) { - aSp.Orientation(anOriE); - aWES.AddStartElement(aSp); - continue; - } - // - if (anOriE==TopAbs_INTERNAL) { - aSp.Orientation(TopAbs_FORWARD); - aWES.AddStartElement(aSp); - aSp.Orientation(TopAbs_REVERSED); - aWES.AddStartElement(aSp); - continue; - } - // - if (bIsClosed){ - if (aMFence.Add(aSp)) { - // - if (!BRep_Tool::IsClosed(aSp, aF)){ - BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF); - } - // - aSp.Orientation(TopAbs_FORWARD); - aWES.AddStartElement(aSp); - aSp.Orientation(TopAbs_REVERSED); - aWES.AddStartElement(aSp); - } - continue; - }// if (aMFence.Add(aSp)) - // - aSp.Orientation(anOriE); - bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx); - if (bToReverse) { - aSp.Reverse(); - } - aWES.AddStartElement(aSp); - }// for (; aIt.More(); aIt.Next()) { - }// for (; anExp.More(); anExp.Next()) { - // - // 2.1.2. Add In2D Parts - if (myInParts.Contains(aF)) { - const TopTools_ListOfShape& aLE=myInParts.FindFromKey(aF); - aIt.Initialize(aLE); - for (; aIt.More(); aIt.Next()) { - aSp=TopoDS::Edge(aIt.Value()); - // - aSp.Orientation(TopAbs_FORWARD); - aWES.AddStartElement(aSp); - // - aSp.Orientation(TopAbs_REVERSED); - aWES.AddStartElement(aSp); - } - } - // - // 2.2. Build images Faces - TopTools_ListOfShape aLFR; - GEOMAlgo_ShapeSet aS1, aS2; - // - const TopTools_ListOfShape& aSE=aWES.StartElements(); - aS1.Add(aSE); - aS2.Add(aFF, TopAbs_EDGE); - if (aS1.IsEqual(aS2)) { - aLFR.Append(aF); - } - else { - GEOMAlgo_BuilderFace aBF; - // - aBF.SetFace(aFF); - aBF.SetContext(aCtx); - aBF.SetShapes(aSE); - // <-DEB - aBF.Perform(); - // - const TopTools_ListOfShape& aLF=aBF.Areas(); - aIt.Initialize(aLF); - for (; aIt.More(); aIt.Next()) { - TopoDS_Shape& aFR=aIt.Value(); - if (anOriF==TopAbs_REVERSED) { - aFR.Orientation(TopAbs_REVERSED); - } - aLFR.Append(aFR); - } - } - // - // 2.3. Collect draft images Faces - mySplitFaces.Bind(aF, aLFR); - }//for (i=1; i<=aNbF; ++i) -} - -//======================================================================= -// function: FillSameDomainFaces -// purpose: -//======================================================================= -void GEOMAlgo_Builder::FillSameDomainFaces() -{ - Standard_Boolean bIsSDF, bHasImage1, bHasImage2, bForward; - Standard_Integer i, j, aNbFF, nF1, nF2, aNbPBInOn, aNbC, aNbSE; - Standard_Integer aNbF1, aNbF2, i2s, aNbSD; - TopTools_MapOfShape aMFence; - TopTools_ListOfShape aLX1, aLX2; - TopTools_ListIteratorOfListOfShape aItF1, aItF2; - NMTTools_ListOfCoupleOfShape aLCS; - // - const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); - NMTTools_PaveFiller* pPF=myPaveFiller; - NMTDS_InterfPool* pIP=pPF->IP(); - BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences(); - const Handle(IntTools_Context)& aCtx= pPF->Context(); - // - // - //mySameDomainShapes.Clear(); - // - // 1. For each FF find among images of faces - // all pairs of same domain faces (SDF) [=> aLCS] - aNbFF=aFFs.Extent(); - for (i=1; i<=aNbFF; ++i) { - BOPTools_SSInterference& aFF=aFFs(i); - aFF.Indices(nF1, nF2); - // - const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF1)); - const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape(nF2)); - // - // if there are no in/on 2D split parts the faces nF1, nF2 - // can not be SDF - const BOPTools_ListOfPaveBlock& aLPBInOn=aFF.PaveBlocks(); - aNbPBInOn=aLPBInOn.Extent(); - // - //=== - const TColStd_ListOfInteger& aLSE=aFF.SharedEdges(); - aNbSE=aLSE.Extent(); - if (!aNbPBInOn && !aNbSE) { - continue; - } - //=== - // - // if there is at least one section edge between faces nF1, nF2 - // they can not be SDF - BOPTools_SequenceOfCurves& aSC=aFF.Curves(); - aNbC=aSC.Length(); - if (aNbC) { - continue; - } - // - // the faces are suspected to be SDF. - // Try to find SDF among images of nF1, nF2 - aMFence.Clear(); - // - //-------------------------------------------------------- - bHasImage1=mySplitFaces.HasImage(aF1); - bHasImage2=mySplitFaces.HasImage(aF2); - // - aLX1.Clear(); - if (!bHasImage1) { - aLX1.Append(aF1); - } - // - aLX2.Clear(); - if (!bHasImage2) { - aLX2.Append(aF2); - } - // - const TopTools_ListOfShape& aLF1r=(bHasImage1)? mySplitFaces.Image(aF1) : aLX1; - const TopTools_ListOfShape& aLF2r=(bHasImage2)? mySplitFaces.Image(aF2) : aLX2; - // - TopTools_DataMapOfIntegerShape aMIS; - TColStd_ListIteratorOfListOfInteger aItLI; - NMTDS_BoxBndTreeSelector aSelector; - NMTDS_BoxBndTree aBBTree; - NCollection_UBTreeFiller aTreeFiller(aBBTree); - // - aNbF1=aLF1r.Extent(); - aNbF2=aLF2r.Extent(); - bForward=(aNbF1DS(); - // - aNb=aDS.NumberOfShapesOfTheObject(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aS=aDS.Shape(i); - if (aS.ShapeType()!=TopAbs_FACE) { - continue; - } - // - if (!mySplitFaces.HasImage(aS)) { - continue; - } - // - aF=*((TopoDS_Face*)&aS); - // - aLFx.Clear(); - const TopTools_ListOfShape& aLF=mySplitFaces.Image(aF); - aIt.Initialize(aLF); - for (; aIt.More(); aIt.Next()) { - aFSp=*((TopoDS_Face*)(&aIt.Value())); - if (!mySameDomainShapes.Contains(aFSp)) { - aLFx.Append(aFSp); - } - else { - const TopoDS_Shape& aSx=mySameDomainShapes.FindFromKey(aFSp); - aFSD=*((TopoDS_Face*)(&aSx)); - iSense=GEOMAlgo_Tools3D::Sense(aFSp, aFSD); - if (iSense<0) { - aFSD.Reverse(); - } - aLFx.Append(aFSD); - } - } - // - if (!myImages.HasImage(aF)) { - aNbLFx=aLFx.Extent(); - if (aNbLFx==1) { - const TopoDS_Shape& aFx=aLFx.First(); - if (aF.IsSame(aFx)) { - continue; - } - } - myImages.Bind(aF, aLFx); - } - } -} - -//======================================================================= -// function: FillInternalVertices -// purpose: -//======================================================================= -void GEOMAlgo_Builder::FillInternalVertices() -{ - const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); - NMTTools_PaveFiller* pPF=myPaveFiller; - NMTDS_InterfPool* pIP=pPF->IP(); - const Handle(IntTools_Context)& aCtx= pPF->Context(); - // - BOPTools_CArray1OfVSInterference& aVFs=pIP->VSInterferences(); - BOPTools_CArray1OfESInterference& aEFs=pIP->ESInterferences(); - const NMTTools_IndexedDataMapOfIndexedMapOfInteger& aMAV=pPF->AloneVertices(); - // - Standard_Boolean bHasImage; - Standard_Integer i, j, nF, aNbS, nV, nVSD, n1, n2, iFlag; - Standard_Integer aNbVFs, aNbAVF, aNbEFs, aNbVC, aNbE, aNbV; - Standard_Real aU1, aU2, aTol; - NMTTools_IndexedDataMapOfIndexedMapOfInteger aMFMV; - TopTools_MapOfShape aMFence; - TopTools_ListIteratorOfListOfShape aIt, aItV; - BRep_Builder aBB; - // - // 1. Collect face-vertex candidates [aMFMV] - // - // 1.1. VFs - aNbVFs=aVFs.Extent(); - for (i=1; i<=aNbVFs; ++i) { - const BOPTools_VSInterference& aVS=aVFs(i); - aVS.Indices(n1, n2); - nF=n2; - nV=n1; - if (aDS.Shape(n1).ShapeType()==TopAbs_FACE) { - nF=n1; - nV=n2; - } - nVSD=pPF->FindSDVertex(nV); - if (nVSD) { - nV=nVSD; - } - // - UpdateCandidates(nF, nV, aMFMV); - } - // - // 1.2 EFs - aNbEFs=aEFs.Extent(); - for (i=1; i<=aNbEFs; ++i) { - const BOPTools_ESInterference& aEF=aEFs(i); - aEF.Indices(n1, n2); - nV=aEF.NewShape(); - if (!nV) { - continue; - } - const TopoDS_Shape& aSnew=aDS.Shape(nV); - if (aSnew.ShapeType()!=TopAbs_VERTEX) { - continue; - } - // - nF=(aDS.Shape(n1).ShapeType()==TopAbs_FACE) ? n1 : n2; - nVSD=pPF->FindSDVertex(nV); - if (nVSD) { - nV=nVSD; - } - UpdateCandidates(nF, nV, aMFMV); - } - // - aNbS=aDS.NumberOfShapesOfTheObject(); - for (nF=1; nF<=aNbS; ++nF) { - const TopoDS_Shape& aF=aDS.Shape(nF); - // - if (aF.ShapeType()!=TopAbs_FACE) { - continue; - } - if (!aMFence.Add(aF)) { - continue; - } - // - const TopoDS_Face& aFF=TopoDS::Face(aF); - aTol=BRep_Tool::Tolerance(aFF); - // - // 1.3 FFs - if (aMAV.Contains(nF)) { - const TColStd_IndexedMapOfInteger& aMAVF=aMAV.FindFromKey(nF); - aNbAVF=aMAVF.Extent(); - for (j=1; j<=aNbAVF; ++j) { - nV=aMAVF(j); - nVSD=pPF->FindSDVertex(nV); - if (nVSD) { - nV=nVSD; - } - // - UpdateCandidates(nF, nV, aMFMV); - } - } - // - // 1.4 Internal vertices of the face nF - BooleanOperations_OnceExplorer aExp(aDS); - aExp.Init(nF, TopAbs_VERTEX); - for (; aExp.More(); aExp.Next()) { - nV=aExp.Current(); - const TopoDS_Shape& aV=aDS.Shape(nV); - if (aV.Orientation()==TopAbs_INTERNAL) { - nVSD=pPF->FindSDVertex(nV); - if (nVSD) { - nV=nVSD; - } - // - UpdateCandidates(nF, nV, aMFMV); - } - } - // - // 2. Process face nF - if (!aMFMV.Contains(nF)) { - continue; - } - // - const TColStd_IndexedMapOfInteger& aMVC=aMFMV.FindFromKey(nF); - aNbVC=aMVC.Extent(); - if (!aNbVC) { - continue; - } - // - // 2.1 Refine candidates - TopTools_IndexedDataMapOfShapeListOfShape aMVE; - TopTools_ListOfShape aLV; - // - bHasImage=myImages.HasImage(aF); - if (bHasImage) { - const TopTools_ListOfShape& aLFx=myImages.Image(aF); - aIt.Initialize(aLFx); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aFx=aIt.Value(); - TopExp::MapShapesAndAncestors(aFx, TopAbs_VERTEX, TopAbs_EDGE, aMVE); - } - } - else { - Standard_Boolean bFaceToProcess; - // - TopExp::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE); - bFaceToProcess=Standard_False; - for (j=1; j<=aNbVC; ++j) { - nV=aMVC(j); - const TopoDS_Shape& aV=aDS.Shape(nV); - if (!aMVE.Contains(aV)) { - bFaceToProcess=!bFaceToProcess; - break; - } - } - if (!bFaceToProcess) { - continue; - } - }// else - // - for (j=1; j<=aNbVC; ++j) { - nV=aMVC(j); - const TopoDS_Shape& aV=aDS.Shape(nV); - if (aMVE.Contains(aV)) { - const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV); - aNbE=aLE.Extent(); - if (aNbE) { - continue; - } - } - aLV.Append(aV); - } - // - aNbV=aLV.Extent(); - if (aNbV) { - // 3. Try to put vertices into the face(s) - aItV.Initialize(aLV); - for (; aItV.More(); aItV.Next()) { - TopoDS_Vertex aV=TopoDS::Vertex(aItV.Value()); - aV.Orientation(TopAbs_INTERNAL); - // - bHasImage=myImages.HasImage(aF); - if (bHasImage) { - const TopTools_ListOfShape& aLFx=myImages.Image(aF); - aIt.Initialize(aLFx); - for (; aIt.More(); aIt.Next()) { - TopoDS_Face aFx=TopoDS::Face(aIt.Value()); - // update classifier - IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx); - aClsf.Init(aFx, aTol); - // - iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2); - if (!iFlag) { - aBB.Add(aFx, aV); - break; - } - } - } - else { - const TopoDS_Face& aFx=TopoDS::Face(aF); - // update classifier - IntTools_FClass2d& aClsf=aCtx->FClass2d(aFx); - aClsf.Init(aFx, aTol); - // - iFlag=aCtx->ComputeVS (aV, aFx, aU1, aU2); - if (!iFlag) { - TopoDS_Face aFz; - // - GEOMAlgo_Tools3D::CopyFace(aFx, aFz); - aBB.Add(aFz, aV); - myImages.Bind(aF, aFz); - } - } - }// for (; aItV.More(); aItV.Next()) { - }// if (aNbV) { - }// for (nF=1; nF<=aNb; ++nF) { -} - -//======================================================================= -// function: UpdateCandidates -// purpose: -//======================================================================= -void UpdateCandidates(const Standard_Integer theNF, - const Standard_Integer theNV, - NMTTools_IndexedDataMapOfIndexedMapOfInteger& theMFMV) -{ - if (theMFMV.Contains(theNF)) { - TColStd_IndexedMapOfInteger& aMV=theMFMV.ChangeFromKey(theNF); - aMV.Add(theNV); - } - else { - TColStd_IndexedMapOfInteger aMV; - aMV.Add(theNV); - theMFMV.Add(theNF, aMV); - } -} - -//modified by NIZNHY-PKV Thu Feb 16 12:25:16 2012f -//======================================================================= -//function : IsClosed -//purpose : -//======================================================================= -Standard_Boolean IsClosed(const TopoDS_Edge& aE, - const TopoDS_Face& aF) -{ - Standard_Boolean bRet; - // - bRet=BRep_Tool::IsClosed(aE, aF); - if (bRet) { - TopTools_MapOfShape aM; - TopExp_Explorer aExp(aF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aEx=aExp.Current(); - // - if (aM.Add(aEx)) { - bRet=aEx.IsSame(aE); - if (bRet) { - break; - } - } - } - } - return bRet; -} -//modified by NIZNHY-PKV Thu Feb 16 12:25:25 2012t - -/* - { - TopoDS_Compound aCx; - BRep_Builder aBBx; - TopTools_ListIteratorOfListOfShape aItx; - // - aBBx.MakeCompound(aCx); - aBBx.Add(aCx, aFF); - aItx.Initialize(aSE); - for (; aItx.More(); aItx.Next()) { - TopoDS_Shape& aEx=aItx.Value(); - aBBx.Add(aCx, aEx); - } - int a=0; - } - */ diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Builder_3.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Builder_3.cxx deleted file mode 100644 index 066cc9c7d..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Builder_3.cxx +++ /dev/null @@ -1,768 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : GEOMAlgo_Builder_3.cxx -// Created : -// Author : Peter KURNEV - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include - - - -static - void OwnInternalShapes(const TopoDS_Shape& , - TopTools_IndexedMapOfShape& ); - -//======================================================================= -//function : FillImagesSolids -//purpose : -//======================================================================= - void GEOMAlgo_Builder::FillImagesSolids() -{ - myErrorStatus=0; - // - FillIn3DParts(); - BuildSplitSolids(); - FillInternalShapes(); -} -//======================================================================= -//function : BuildDraftSolid -//purpose : -//======================================================================= -void GEOMAlgo_Builder::BuildDraftSolid (const TopoDS_Shape& theSolid, - TopoDS_Shape& theDraftSolid, - TopTools_ListOfShape& theLIF) -{ - myErrorStatus=0; - // - NMTTools_PaveFiller* pPF=myPaveFiller; - const Handle(IntTools_Context)& aCtx= pPF->Context(); - // - Standard_Boolean bToReverse; - Standard_Integer iFlag; - TopAbs_Orientation aOrF, aOrSh, aOrSd; - TopoDS_Iterator aIt1, aIt2; - TopTools_ListIteratorOfListOfShape aItS; - BRep_Builder aBB; - TopoDS_Shell aShD; - TopoDS_Shape aFSDx, aFx; - // - aOrSd=theSolid.Orientation(); - theDraftSolid.Orientation(aOrSd); - // - aIt1.Initialize(theSolid); - for (; aIt1.More(); aIt1.Next()) { - const TopoDS_Shape& aSh=aIt1.Value(); - if(aSh.ShapeType()!=TopAbs_SHELL) { - continue; // mb internal edges,vertices - } - // - aOrSh=aSh.Orientation(); - aBB.MakeShell(aShD); - aShD.Orientation(aOrSh); - iFlag=0; - // - aIt2.Initialize(aSh); - for (; aIt2.More(); aIt2.Next()) { - const TopoDS_Shape& aF=aIt2.Value(); - aOrF=aF.Orientation(); - // - if (myImages.HasImage(aF)) { - const TopTools_ListOfShape& aLSp=myImages.Image(aF); - aItS.Initialize(aLSp); - for (; aItS.More(); aItS.Next()) { - aFx=aItS.Value(); - // - if (mySameDomainShapes.Contains(aFx)) { - aFSDx=mySameDomainShapes.FindFromKey(aFx); - // - if (aOrF==TopAbs_INTERNAL) { - aFSDx.Orientation(aOrF); - theLIF.Append(aFSDx); - } - else { - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFSDx, aF, aCtx); - if (bToReverse) { - aFSDx.Reverse(); - } - // - iFlag=1; - aBB.Add(aShD, aFSDx); - } - }// if (mySameDomainShapes.Contains(aFx)) { - else { - aFx.Orientation(aOrF); - if (aOrF==TopAbs_INTERNAL) { - theLIF.Append(aFx); - } - else{ - iFlag=1; - aBB.Add(aShD, aFx); - } - } - } - } //if (myImages.HasImage(aF)) { - // - else { - if (aOrF==TopAbs_INTERNAL) { - theLIF.Append(aF); - } - else{ - iFlag=1; - aBB.Add(aShD, aF); - } - } - } //for (; aIt2.More(); aIt2.Next()) { - // - if (iFlag) { - aBB.Add(theDraftSolid, aShD); - } - } //for (; aIt1.More(); aIt1.Next()) { -} -//======================================================================= -//function : FillIn3DParts -//purpose : -//======================================================================= - void GEOMAlgo_Builder::FillIn3DParts() -{ - myErrorStatus=0; - // - const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); - NMTTools_PaveFiller* pPF=myPaveFiller; - const Handle(IntTools_Context)& aCtx= pPF->Context(); - // - Standard_Boolean bIsIN, bHasImage; - Standard_Integer aNbS, aNbSolids, i, j, aNbFaces, aNbFP, aNbFPx, aNbFIN, aNbLIF; - TopAbs_ShapeEnum aType; - TopAbs_State aState; - TopTools_IndexedMapOfShape aMSolids, aMS, aMFaces, aMFIN; - TopTools_MapOfShape aMFDone; - TopTools_IndexedDataMapOfShapeListOfShape aMEF; - TopTools_ListIteratorOfListOfShape aItS; - TopoDS_Iterator aIt, aItF; - BRep_Builder aBB; - TopoDS_Solid aSolidSp; - TopoDS_Face aFP; - // - myDraftSolids.Clear(); - // - aNbS=aDS.NumberOfShapesOfTheObject(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aS=aDS.Shape(i); - // - aType=aS.ShapeType(); - if (aType==TopAbs_SOLID) { - // all solids from DS - aMSolids.Add(aS); - } - else if (aType==TopAbs_FACE) { - // all faces (originals from DS or theirs images) - if (myImages.HasImage(aS)) { - const TopTools_ListOfShape& aLS=myImages.Image(aS); - aItS.Initialize(aLS); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aFx=aItS.Value(); - // - if (mySameDomainShapes.Contains(aFx)) { - const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aFx); - aMFaces.Add(aFSDx); - } - else { - aMFaces.Add(aFx); - } - } - } - else { - if (mySameDomainShapes.Contains(aS)) { - const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aS); - aMFaces.Add(aFSDx); - } - else { - aMFaces.Add(aS); - } - } - } - } - // - aNbFaces=aMFaces.Extent(); - aNbSolids=aMSolids.Extent(); - // - for (i=1; i<=aNbSolids; ++i) { - const TopoDS_Solid& aSolid=TopoDS::Solid(aMSolids(i)); - aMFDone.Clear(); - aMFIN.Clear(); - aMEF.Clear(); - // - aBB.MakeSolid(aSolidSp); - // - TopTools_ListOfShape aLIF; - // - BuildDraftSolid(aSolid, aSolidSp, aLIF); - aNbLIF=aLIF.Extent(); - // - // 1 all faces/edges from aSolid [ aMS ] - bHasImage=Standard_False; - aMS.Clear(); - aIt.Initialize(aSolid); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aShell=aIt.Value(); - // - if (myImages.HasImage(aShell)) { - bHasImage=Standard_True; - // - const TopTools_ListOfShape& aLS=myImages.Image(aShell); - aItS.Initialize(aLS); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aSx=aItS.Value(); - aMS.Add(aSx); - TopExp::MapShapes(aSx, TopAbs_FACE, aMS); - TopExp::MapShapes(aSx, TopAbs_EDGE, aMS); - TopExp::MapShapesAndAncestors(aSx, TopAbs_EDGE, TopAbs_FACE, aMEF); - } - } - else { - //aMS.Add(aShell); - TopExp::MapShapes(aShell, TopAbs_FACE, aMS); - //modified by NIZNHY-PKV Fri Dec 03 11:18:45 2010f - TopExp::MapShapes(aShell, TopAbs_EDGE, aMS); - //modified by NIZNHY-PKV Fri Dec 03 11:18:51 2010t - TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF); - } - } - // - // 2 all faces that are not from aSolid [ aLFP1 ] - Standard_Integer aNbEFP; - TopTools_IndexedDataMapOfShapeListOfShape aMEFP; - TopTools_ListIteratorOfListOfShape aItFP, aItEx; - TopTools_MapOfShape aMFence; - TopTools_ListOfShape aLFP1, aLFP2, aLFP, aLCBF, aLFIN, aLEx;//*pLFP, - // - // for all non-solid faces build EF map [ aMEFP ] - for (j=1; j<=aNbFaces; ++j) { - const TopoDS_Shape& aFace=aMFaces(j); - if (!aMS.Contains(aFace)) { - TopExp::MapShapesAndAncestors(aFace, TopAbs_EDGE, TopAbs_FACE, aMEFP); - } - } - // - // among all faces from aMEFP select these that have same edges - // with the solid (i.e aMEF). These faces will be treated first - // to prevent the usage of 3D classifier. - // The full list of faces to process is aLFP1. - aNbEFP=aMEFP.Extent(); - for (j=1; j<=aNbEFP; ++j) { - const TopoDS_Shape& aE=aMEFP.FindKey(j); - // - if (aMEF.Contains(aE)) { // !! - const TopTools_ListOfShape& aLF=aMEFP(j); - aItFP.Initialize(aLF); - for (; aItFP.More(); aItFP.Next()) { - const TopoDS_Shape& aF=aItFP.Value(); - if (aMFence.Add(aF)) { - aLFP1.Append(aF); - } - } - } - else { - aLEx.Append(aE); - } - } - // - aItEx.Initialize(aLEx); - for (; aItEx.More(); aItEx.Next()) { - const TopoDS_Shape& aE=aItEx.Value(); - const TopTools_ListOfShape& aLF=aMEFP.FindFromKey(aE); - aItFP.Initialize(aLF); - for (; aItFP.More(); aItFP.Next()) { - const TopoDS_Shape& aF=aItFP.Value(); - if (aMFence.Add(aF)) { - aLFP2.Append(aF); - } - } - } - aLFP1.Append(aLFP2); - //========== - // - // 3 Process faces aLFP1 - aNbFP=aLFP1.Extent(); - aItFP.Initialize(aLFP1); - for (; aItFP.More(); aItFP.Next()) { - const TopoDS_Shape& aSP=aItFP.Value(); - if (!aMFDone.Add(aSP)) { - continue; - } - - // - // first face to process - aFP=TopoDS::Face(aSP); - bIsIN= GEOMAlgo_Tools3D::IsInternalFace(aFP, aSolidSp, aMEF, 1.e-14, aCtx); - aState=(bIsIN) ? TopAbs_IN : TopAbs_OUT; - // - // collect faces to process [ aFP is the first ] - aLFP.Clear(); - aLFP.Append(aFP); - aItS.Initialize(aLFP1); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aSk=aItS.Value(); - if (!aMFDone.Contains(aSk)) { - aLFP.Append(aSk); - } - } - // - // Connexity Block that spreads from aFP the Bound - // or till the end of the block itself - aLCBF.Clear(); - GEOMAlgo_Tools3D::MakeConnexityBlock(aLFP, aMS, aLCBF); - // - // fill states for the Connexity Block - aItS.Initialize(aLCBF); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aSx=aItS.Value(); - aMFDone.Add(aSx); - if (aState==TopAbs_IN) { - aMFIN.Add(aSx); - } - } - // - aNbFPx=aMFDone.Extent(); - if (aNbFPx==aNbFP) { - break; - } - }//for (; aItFP.More(); aItFP.Next()) - // - // faces Inside aSolid - aLFIN.Clear(); - aNbFIN=aMFIN.Extent(); - if (aNbFIN || aNbLIF) { - for (j=1; j<=aNbFIN; ++j) { - const TopoDS_Shape& aFIN=aMFIN(j); - aLFIN.Append(aFIN); - } - // - aItS.Initialize(aLIF); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aFIN=aItS.Value(); - aLFIN.Append(aFIN); - } - // - myInParts.Add(aSolid, aLFIN); - } - if (aNbFIN || bHasImage) { - myDraftSolids.Add(aSolid, aSolidSp); - } - }//for (i=1; i<=aNbSolids; ++i) { // next solid -} -//======================================================================= -//function : BuildSplitSolids -//purpose : -//======================================================================= - void GEOMAlgo_Builder::BuildSplitSolids() -{ - myErrorStatus=0; - // - const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); - NMTTools_PaveFiller* pPF=myPaveFiller; - const Handle(IntTools_Context)& aCtx= pPF->Context(); - // - Standard_Integer i, aNbS, iErr; - TopExp_Explorer aExp; - TopTools_ListOfShape aSFS, aLSEmpty; - TopTools_MapOfShape aMFence; - TopTools_ListIteratorOfListOfShape aIt; - GEOMAlgo_BuilderSolid aSB; - GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet aItSS; - GEOMAlgo_DataMapOfShapeShapeSet aMSS; - GEOMAlgo_ShapeSet aSSi; - // - // 0. Find same domain solids for non-interferred solids - aNbS=aDS.NumberOfShapesOfTheObject(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aS=aDS.Shape(i); - if (aS.ShapeType()!=TopAbs_SOLID) { - continue; - } - if (!aMFence.Add(aS)) { - continue; - } - if(myDraftSolids.Contains(aS)) { - continue; - } - // - aSSi.Clear(); - aSSi.Add(aS, TopAbs_FACE); - // - aMSS.Bind(aS, aSSi); - } //for (i=1; i<=aNbS; ++i) - // - // 1. Build solids for interferred source solids - aSB.SetContext(aCtx); - aSB.ComputeInternalShapes(myComputeInternalShapes); - aNbS=myDraftSolids.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aS =myDraftSolids.FindKey(i); - const TopoDS_Shape& aSD=myDraftSolids.FindFromIndex(i); - const TopTools_ListOfShape& aLFIN= - (myInParts.Contains(aS)) ? myInParts.FindFromKey(aS) : aLSEmpty; - // - // 1.1 Fill Shell Faces Set - aSFS.Clear(); - - aExp.Init(aSD, TopAbs_FACE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aF=aExp.Current(); - aSFS.Append(aF); - } - // - aIt.Initialize(aLFIN); - for (; aIt.More(); aIt.Next()) { - TopoDS_Shape aF=aIt.Value(); - // - aF.Orientation(TopAbs_FORWARD); - aSFS.Append(aF); - aF.Orientation(TopAbs_REVERSED); - aSFS.Append(aF); - } - // - Standard_Integer aNbSFS; - aNbSFS=aSFS.Extent(); - // - // 1.2 - // Check whether aSFS contains a subsets of faces - // of solids that have been already built. - // If yes, shrink aSFS by these subsets. - aSSi.Clear(); - aSSi.Add(aSFS); - // - aItSS.Initialize(aMSS); - for (; aItSS.More(); aItSS.Next()) { - const TopoDS_Shape& aSR=aItSS.Key(); - const GEOMAlgo_ShapeSet& aSSR=aItSS.Value(); - if (aSSi.Contains(aSSR)) { - // the aSR is SD solid for aS - aSSi.Subtract(aSSR); - // update images - if(myImages.HasImage(aS)) { - myImages.Add(aS, aSR); - } - else { - myImages.Bind(aS, aSR); - } - // - // update SD Shapes - mySameDomainShapes.Add(aSR, aSR); - } - } - const TopTools_ListOfShape& aSFS1=aSSi.GetSet(); - aNbSFS=aSFS1.Extent(); - //modified by NIZNHY-PKV Wed Oct 27 09:53:15 2010f - if (!aNbSFS) { - continue; - } - //modified by NIZNHY-PKV Wed Oct 27 09:53:18 2010t - // - // 1.3 Build new solids - aSB.SetContext(aCtx); - aSB.SetShapes(aSFS1); - aSB.Perform(); - iErr=aSB.ErrorStatus(); - if (iErr) { - myErrorStatus=30; // SolidBuilder failed - return; - } - // - const TopTools_ListOfShape& aLSR=aSB.Areas(); - // - // 1.4 Collect resulting solids and theirs set of faces - aIt.Initialize(aLSR); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSR=aIt.Value(); - // - aSSi.Clear(); - aExp.Init(aSR, TopAbs_FACE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aF=aExp.Current(); - aSSi.Add(aF); - } - aMSS.Bind(aSR, aSSi); - } - // - // Update images - if (myImages.HasImage(aS)) { - myImages.Add(aS, aLSR); - } - else { - myImages.Bind(aS, aLSR); - } - } // for (i=1; i<=aNbS; ++i) { -} -//======================================================================= -//function :FillInternalShapes -//purpose : -//======================================================================= - void GEOMAlgo_Builder::FillInternalShapes() -{ - myErrorStatus=0; - // - const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS(); - NMTTools_PaveFiller* pPF=myPaveFiller; - const Handle(IntTools_Context)& aCtx= pPF->Context(); - // - //Standard_Boolean bHasImage; - Standard_Integer i, j, jT, aNbS, aNbSI, aNbSx, aNbSd; - TopAbs_ShapeEnum aType, aT[]={ TopAbs_VERTEX, TopAbs_EDGE }; - TopAbs_State aState; - TopTools_ListIteratorOfListOfShape aIt, aIt1; - TopTools_IndexedDataMapOfShapeListOfShape aMSx; - TopTools_IndexedMapOfShape aMx; - TopTools_MapOfShape aMSI, aMFence, aMSOr; - TopTools_MapIteratorOfMapOfShape aItM; - TopTools_ListOfShape aLSI, aLSd; - TopoDS_Iterator aItS; - BRep_Builder aBB; - // - // 1. Shapes to process - // - // 1.1 Shapes from pure arguments aMSI - // 1.1.1 vertex, edge - for (i=0; i<2; ++i) { - jT=(Standard_Integer)aT[i]; - const TopTools_ListOfShape &aLS=myShapes1[jT]; - aIt.Initialize(aLS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - if (aMFence.Add(aS)) { - aLSI.Append(aS); - } - } - } - // 1.1.2 wire - { - jT=(Standard_Integer)TopAbs_WIRE; - const TopTools_ListOfShape &aLW=myShapes1[jT]; - aIt.Initialize(aLW); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aW=aIt.Value(); - aItS.Initialize(aW); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aE=aItS.Value(); - if (aMFence.Add(aE)) { - aLSI.Append(aE); - } - } - } - } - // 1.1.3 theirs images/sources - aIt1.Initialize(aLSI); - for (; aIt1.More(); aIt1.Next()) { - const TopoDS_Shape& aS=aIt1.Value(); - if (myImages.HasImage(aS)) { - const TopTools_ListOfShape &aLSp=myImages.Image(aS); - aIt.Initialize(aLSp); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSI=aIt.Value(); - aMSI.Add(aSI); - } - } - else { - aMSI.Add(aS); - } - } - aLSI.Clear(); - aNbSI=aMSI.Extent(); - // - // 2. Internal vertices, edges from source solids - aMFence.Clear(); - aLSd.Clear(); - // - aNbS=aDS.NumberOfShapesOfTheObject(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aS=aDS.Shape(i); - aType=aS.ShapeType(); - if (aType==TopAbs_SOLID) { - // - aMx.Clear(); - OwnInternalShapes(aS, aMx); - // - aNbSx=aMx.Extent(); - for (j=1; j<=aNbSx; ++j) { - const TopoDS_Shape& aSI=aMx(j); - if (myImages.HasImage(aSI)) { - const TopTools_ListOfShape &aLSp=myImages.Image(aSI); - aIt.Initialize(aLSp); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSp=aIt.Value(); - aMSI.Add(aSp); - } - } - else { - aMSI.Add(aSI); - } - } - // - // build aux map from splits of solids - if (myImages.HasImage(aS)) { - const TopTools_ListOfShape &aLSp=myImages.Image(aS); - aIt.Initialize(aLSp); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSp=aIt.Value(); - if (aMFence.Add(aSp)) { - TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_EDGE, aMSx); - TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_FACE, aMSx); - TopExp::MapShapesAndAncestors(aSp, TopAbs_EDGE , TopAbs_FACE, aMSx); - aLSd.Append(aSp); - } - } - } - else { - if (aMFence.Add(aS)) { - TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_EDGE, aMSx); - TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_FACE, aMSx); - TopExp::MapShapesAndAncestors(aS, TopAbs_EDGE , TopAbs_FACE, aMSx); - aLSd.Append(aS); - aMSOr.Add(aS); - } - } - }//if (aType==TopAbs_SOLID) - } - // - aNbSd=aLSd.Extent(); - // - // 3. Some shapes of aMSI can be already tied with faces of - // split solids - aItM.Initialize(aMSI); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aSI=aItM.Key(); - if (aMSx.Contains(aSI)) { - const TopTools_ListOfShape &aLSx=aMSx.FindFromKey(aSI); - aNbSx=aLSx.Extent(); - if (aNbSx) { - aMSI.Remove(aSI); - } - } - } - // - // 4. Just check it - aNbSI=aMSI.Extent(); - if (!aNbSI) { - return; - } - // - // 5 Settle internal vertices and edges into solids - aMx.Clear(); - aIt.Initialize(aLSd); - for (; aIt.More(); aIt.Next()) { - TopoDS_Solid aSd=TopoDS::Solid(aIt.Value()); - // - aItM.Initialize(aMSI); - for (; aItM.More(); aItM.Next()) { - TopoDS_Shape aSI=aItM.Key(); - aSI.Orientation(TopAbs_INTERNAL); - // - aState=GEOMAlgo_Tools3D::ComputeStateByOnePoint(aSI, aSd, 1.e-11, aCtx); - if (aState==TopAbs_IN) { - // - if(aMSOr.Contains(aSd)) { - // - TopoDS_Solid aSdx; - // - aBB.MakeSolid(aSdx); - aItS.Initialize(aSd); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aSh=aItS.Value(); - aBB.Add(aSdx, aSh); - } - // - aBB.Add(aSdx, aSI); - // - myImages.Bind(aSd, aSdx); - aMSOr.Remove(aSd); - aSd=aSdx; - } - else { - aBB.Add(aSd, aSI); - } - // - aMSI.Remove(aSI); - } //if (aState==TopAbs_IN) { - }// for (; aItM.More(); aItM.Next()) { - }//for (; aIt1.More(); aIt1.Next()) { -} -//======================================================================= -//function : OwnInternalShapes -//purpose : -//======================================================================= - void OwnInternalShapes(const TopoDS_Shape& theS, - TopTools_IndexedMapOfShape& theMx) -{ - TopoDS_Iterator aIt; - // - aIt.Initialize(theS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSx=aIt.Value(); - if (aSx.ShapeType()!=TopAbs_SHELL) { - theMx.Add(aSx); - } - } -} -// -// ErrorStatus -// 30 - SolidBuilder failed diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Builder_4.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Builder_4.cxx deleted file mode 100644 index 5672fe1fd..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Builder_4.cxx +++ /dev/null @@ -1,316 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Builder_4.cxx -// Created: -// Author: Peter KURNEV -// -#include - -#include - -#include -#include -#include -#include - -#include - -#include - -#include - -#include - -static - void MapShapes(const TopoDS_Shape& aS, - TopTools_MapOfShape& aM); - -//======================================================================= -//function : Generated -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_Builder::Generated(const TopoDS_Shape& theS) -{ - NMTTools_PaveFiller* pPF=myPaveFiller; - const Handle(IntTools_Context)& aCtx=pPF->Context(); - // - Standard_Boolean bHasImage, bToReverse; - TopAbs_ShapeEnum aType; - TopTools_ListIteratorOfListOfShape aIt; - // - myHistShapes.Clear(); - // - if (theS.IsNull()) { - return myHistShapes; - } - // - bHasImage=myImages.HasImage(theS); - if (!bHasImage) { - return myHistShapes; - } - // - aType=theS.ShapeType(); - // - if (aType==TopAbs_EDGE || aType==TopAbs_FACE || - aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { - const TopTools_ListOfShape& aLSp=myImages.Image(theS); - aIt.Initialize(aLSp); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSp=aIt.Value(); - if (mySameDomainShapes.Contains(aSp)) { - if (myMapShape.Contains(aSp)) { - TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp); - // - if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { - aSpR.Orientation(theS.Orientation()); - } - else { - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSpR, theS, aCtx); - if (bToReverse) { - aSpR.Reverse(); - } - } - // - myHistShapes.Append(aSpR); - } - } - } - } - // - return myHistShapes; -} -//======================================================================= -//function : Modified -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_Builder::Modified(const TopoDS_Shape& theS) -{ - NMTTools_PaveFiller* pPF=myPaveFiller; - const Handle(IntTools_Context)& aCtx=pPF->Context(); - // - Standard_Boolean bHasImage, bToReverse; - TopAbs_ShapeEnum aType; - TopTools_ListIteratorOfListOfShape aIt; - // - myHistShapes.Clear(); - // - if (theS.IsNull()) { - return myHistShapes; - } - // - bHasImage=myImages.HasImage(theS); - if (!bHasImage) { - return myHistShapes; - } - // - aType=theS.ShapeType(); - // - if (aType==TopAbs_EDGE || aType==TopAbs_FACE || - aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { - const TopTools_ListOfShape& aLSp=myImages.Image(theS); - aIt.Initialize(aLSp); - for (; aIt.More(); aIt.Next()) { - TopoDS_Shape aSp=aIt.Value(); - if (!mySameDomainShapes.Contains(aSp)) { - if (myMapShape.Contains(aSp)) { - // - if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { - aSp.Orientation(theS.Orientation()); - } - else { - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSp, theS, aCtx); - if (bToReverse) { - aSp.Reverse(); - } - } - // - myHistShapes.Append(aSp); - } - } - } - } - // - return myHistShapes; -} -//======================================================================= -//function : IsDeleted -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_Builder::IsDeleted(const TopoDS_Shape& theS) -{ - Standard_Boolean bRet, bHasImage, bContains; - TopAbs_ShapeEnum aType; - TopTools_ListIteratorOfListOfShape aIt; - // - bRet=Standard_False; - // - if (theS.IsNull()) { - return !bRet; //true - } - // - bContains=myMapShape.Contains(theS); - if (bContains) { - return bRet; //false - } - // - bHasImage=myImages.HasImage(theS); - if (!bHasImage) { - return !bRet; //true - } - // - aType=theS.ShapeType(); - if (aType==TopAbs_EDGE || aType==TopAbs_FACE || - aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { - const TopTools_ListOfShape& aLSp=myImages.Image(theS); - aIt.Initialize(aLSp); - for (; aIt.More(); aIt.Next()) { - TopoDS_Shape aSp=aIt.Value(); - // - if (!mySameDomainShapes.Contains(aSp)) { - if (myMapShape.Contains(aSp)) { - return bRet; //false - } - } - else { - TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp); - if (myMapShape.Contains(aSpR)) { - return bRet; //false - } - } - } - } - return !bRet; // true -} -//======================================================================= -//function : PrepareHistory -//purpose : -//======================================================================= - void GEOMAlgo_Builder::PrepareHistory() -{ - if(myShape.IsNull()) { - return; - } - // - Standard_Boolean bHasImage, bContainsSD; - TopAbs_ShapeEnum aType; - TopTools_MapOfShape aMS; - TopTools_ListIteratorOfListOfShape aIt; - TopTools_MapIteratorOfMapOfShape aItM; - // - // 1. Clearing - GEOMAlgo_BuilderShape::PrepareHistory(); - // - // 2. myMapShape - all shapes of result with theirs sub-shapes - MapShapes(myShape, myMapShape); - // - // 3. MS - all argument shapes with theirs sub-shapes - aIt.Initialize(myShapes); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSx=aIt.Value(); - MapShapes(aSx, aMS); - } - // - // 4. Treatment - aItM.Initialize(aMS); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aSx=aItM.Key(); - aType=aSx.ShapeType(); - //modified by NIZNHY-PKV Thu Dec 7 11:34:05 2006f - // - // 4.1 .myImagesResult - TopTools_ListOfShape aLSx; - // - bHasImage=myImages.HasImage(aSx); - if (!bHasImage) { - if (myMapShape.Contains(aSx)) { - aLSx.Append(aSx); - myImagesResult.Add(aSx, aLSx); - } - } - else { - const TopTools_ListOfShape& aLSp=myImages.Image(aSx); - aIt.Initialize(aLSp); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSp=aIt.Value(); - if (myMapShape.Contains(aSp)) { - aLSx.Append(aSp); - } - } - myImagesResult.Add(aSx, aLSx); - } - // - //modified by NIZNHY-PKV Thu Dec 7 11:34:10 2006t - // - // 4.2 As it was - if (!myHasDeleted) { - myHasDeleted=IsDeleted(aSx);//xx - } - // - if (!myHasGenerated || !myHasModified) { - if (aType==TopAbs_EDGE || aType==TopAbs_FACE || - aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { - //modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f - //bHasImage=myImages.HasImage(aSx); - //modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t - if (bHasImage) { - const TopTools_ListOfShape& aLSp=myImages.Image(aSx); - aIt.Initialize(aLSp); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSp=aIt.Value(); - // - if (myMapShape.Contains(aSp)) { - bContainsSD=mySameDomainShapes.Contains(aSp); - // - if (!myHasGenerated) { - if (bContainsSD) { - myHasGenerated=Standard_True; - } - } - if (!myHasModified) { - if (!bContainsSD) { - myHasModified=Standard_True; - } - } - } // if (myMapShape.Contains(aSp)) - } - } - } - } - } - -} -//======================================================================= -//function : MapShapes -//purpose : -//======================================================================= - void MapShapes(const TopoDS_Shape& theS, - TopTools_MapOfShape& theM) -{ - theM.Add(theS); - TopoDS_Iterator anIt; - anIt.Initialize(theS); - for (; anIt.More(); anIt.Next()) { - const TopoDS_Shape& aSx=anIt.Value(); - MapShapes(aSx, theM); - } -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Clsf.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Clsf.cxx deleted file mode 100644 index 9f3fe0acb..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Clsf.cxx +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Clsf.cxx -// Created: Wed Nov 22 10:23:04 2006 -// Author: Peter KURNEV -// -// -#include - -IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_Clsf, GEOMAlgo_HAlgo); -IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_Clsf, GEOMAlgo_HAlgo); - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_Clsf::GEOMAlgo_Clsf() -: - GEOMAlgo_HAlgo() -{ - myState=TopAbs_UNKNOWN; - myPnt.SetCoord(99.,99.,99.); - myTolerance=0.0001; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_Clsf::~GEOMAlgo_Clsf() -{ -} -//======================================================================= -//function : SetTolerance -//purpose : -//======================================================================= - void GEOMAlgo_Clsf::SetTolerance(const Standard_Real aT) -{ - myTolerance=aT; -} -//======================================================================= -//function : Tolerance -//purpose : -//======================================================================= - Standard_Real GEOMAlgo_Clsf::Tolerance()const -{ - return myTolerance; -} -//======================================================================= -//function : SetPnt -//purpose : -//======================================================================= - void GEOMAlgo_Clsf::SetPnt(const gp_Pnt& aP) -{ - myPnt=aP; -} -//======================================================================= -//function : Pnt -//purpose : -//======================================================================= - const gp_Pnt& GEOMAlgo_Clsf::Pnt()const -{ - return myPnt; -} -//======================================================================= -//function : State -//purpose : -//======================================================================= - TopAbs_State GEOMAlgo_Clsf::State() const -{ - return myState; -} -//======================================================================= -//function : CanBeON -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Curve)& ) const -{ - return Standard_True; -} -//======================================================================= -//function : CanBeON -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_Clsf::CanBeON(const Handle(Geom_Surface)& ) const -{ - return Standard_True; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Clsf.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_Clsf.hxx deleted file mode 100644 index 017578386..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Clsf.hxx +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Clsf.hxx -// Created: Wed Nov 22 10:23:04 2006 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_Clsf_HeaderFile -#define _GEOMAlgo_Clsf_HeaderFile - -#include -#include -//#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -DEFINE_STANDARD_HANDLE(GEOMAlgo_Clsf, GEOMAlgo_HAlgo); - -//======================================================================= -//class : GEOMAlgo_Clsf -//purpose : -//======================================================================= -class GEOMAlgo_Clsf : public GEOMAlgo_HAlgo -{ - public: - Standard_EXPORT - void SetPnt(const gp_Pnt& aP) ; - - Standard_EXPORT - const gp_Pnt& Pnt() const; - - Standard_EXPORT - void SetTolerance(const Standard_Real aT) ; - - Standard_EXPORT - Standard_Real Tolerance() const; - - Standard_EXPORT - TopAbs_State State() const; - - Standard_EXPORT - virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aCT) const; - - Standard_EXPORT - virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_Clsf); - - protected: - Standard_EXPORT - GEOMAlgo_Clsf(); - - Standard_EXPORT - virtual ~GEOMAlgo_Clsf(); - - TopAbs_State myState; - gp_Pnt myPnt; - Standard_Real myTolerance; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ClsfBox.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_ClsfBox.cxx deleted file mode 100644 index dbc3eec1c..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ClsfBox.cxx +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_ClsfBox.cxx -// Created: Wed Nov 22 10:41:47 2006 -// Author: Peter KURNEV -// -// -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf) -IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf) - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_ClsfBox::GEOMAlgo_ClsfBox() -: - GEOMAlgo_Clsf() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_ClsfBox::~GEOMAlgo_ClsfBox() -{ -} -//======================================================================= -//function : SetBox -//purpose : -//======================================================================= - void GEOMAlgo_ClsfBox::SetBox(const TopoDS_Shape& aBox) -{ - myBox=aBox; -} -//======================================================================= -//function : Box -//purpose : -//======================================================================= - const TopoDS_Shape& GEOMAlgo_ClsfBox::Box() const -{ - return myBox; -} -//======================================================================= -//function : CheckData -//purpose : -//======================================================================= - void GEOMAlgo_ClsfBox::CheckData() -{ - Standard_Integer i, aNbF; - TopAbs_ShapeEnum aTypeShape; - TopAbs_Orientation aOr; - GeomAbs_SurfaceType aType; - Handle(Geom_Surface) aS; - TopTools_IndexedMapOfShape aMF; - // - myErrorStatus=0; - // - if(myBox.IsNull()) { - myErrorStatus=10; // myBox=NULL - return; - } - // - aTypeShape=myBox.ShapeType(); - if (aTypeShape!=TopAbs_SOLID) { - myErrorStatus=11; // unallowed shape type - return; - } - // - TopExp::MapShapes(myBox, TopAbs_FACE, aMF); - aNbF=aMF.Extent(); - if (aNbF!=6) { - myErrorStatus=12; // wrong number of faces - return; - } - // - for (i=1; i<=aNbF; ++i) { - const TopoDS_Face& aF=TopoDS::Face(aMF(i)); - aOr=aF.Orientation(); - if (!(aOr==TopAbs_FORWARD || aOr==TopAbs_REVERSED)) { - myErrorStatus=12; // unallowed orientation of face - return; - } - // - aS=BRep_Tool::Surface(aF); - myGAS[i-1].Load(aS); - aType=myGAS[i-1].GetType(); - if (!aType==GeomAbs_Plane) { - myErrorStatus=13; // unallowed surface type - return; - } - // - if(aOr==TopAbs_REVERSED) { - gp_Ax1 aAx1; - gp_Pln aPln; - gp_Pnt aP; - gp_Dir aD; - Handle(Geom_Plane) aSR; - // - aPln=myGAS[i-1].Plane(); - aAx1=aPln.Axis(); - aP=aAx1.Location(); - aD=aAx1.Direction(); - aD.Reverse(); - aSR=new Geom_Plane(aP, aD); - myGAS[i-1].Load(aSR); - } - } -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - void GEOMAlgo_ClsfBox::Perform() -{ - myErrorStatus=0; - // - const Standard_Integer aNbS=6; - Standard_Integer i, aNbON, aNbIN, iNext; - TopAbs_State aSt; - /* - CheckData(); - if(myErrorStatus) { - return; - } - */ - iNext=1; - aNbON=0; - aNbIN=0; - for(i=0; i -// -#ifndef _GEOMAlgo_ClsfBox_HeaderFile -#define _GEOMAlgo_ClsfBox_HeaderFile - -#include -#include -//#include -#include -#include -#include -#include -#include -#include -#include -#include - -DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfBox, GEOMAlgo_Clsf) - -//======================================================================= -//function : GEOMAlgo_ClsfBox -//purpose : -//======================================================================= -class GEOMAlgo_ClsfBox : public GEOMAlgo_Clsf -{ - public: - Standard_EXPORT - GEOMAlgo_ClsfBox(); - - Standard_EXPORT - virtual ~GEOMAlgo_ClsfBox(); - - Standard_EXPORT - void SetBox(const TopoDS_Shape& aS) ; - - Standard_EXPORT - const TopoDS_Shape& Box() const; - - Standard_EXPORT - virtual void Perform() ; - - Standard_EXPORT - virtual void CheckData() ; - - Standard_EXPORT - virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const; - - Standard_EXPORT - virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfBox) - - protected: - TopoDS_Shape myBox; - GeomAdaptor_Surface myGAS[6]; - - -private: - - - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSolid.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSolid.cxx deleted file mode 100644 index 35bb725ef..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSolid.cxx +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ClsfSolid.cxx -// Created: Mon Jan 29 10:35:46 2007 -// Author: Peter KURNEV -// -// -#include - -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf) -IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf) - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_ClsfSolid::GEOMAlgo_ClsfSolid() -: - GEOMAlgo_Clsf() -{ - myPClsf=NULL; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_ClsfSolid::~GEOMAlgo_ClsfSolid() -{ - if (myPClsf) { - BRepClass3d_SolidClassifier* pSC; - // - pSC=(BRepClass3d_SolidClassifier*)myPClsf; - delete pSC; - } -} -//======================================================================= -//function : SetShape -//purpose : -//======================================================================= - void GEOMAlgo_ClsfSolid::SetShape(const TopoDS_Shape& aS) -{ - myShape=aS; -} -//======================================================================= -//function : Shape -//purpose : -//======================================================================= - const TopoDS_Shape& GEOMAlgo_ClsfSolid::Shape()const -{ - return myShape; -} -//======================================================================= -//function : CheckData -//purpose : -//======================================================================= - void GEOMAlgo_ClsfSolid::CheckData() -{ - myErrorStatus=0; - // - BRepClass3d_SolidClassifier* pSC; - TopAbs_ShapeEnum aType; - BRep_Builder aBB; - TopoDS_Solid aS; - // - if (myShape.IsNull()) { - myErrorStatus=10; // mySolid=NULL - return; - } - // - aType=myShape.ShapeType(); - if (!(aType==TopAbs_SOLID || aType==TopAbs_SHELL)) { - myErrorStatus=12; - return; - } - // - //=== - if (aType==TopAbs_SOLID) { - aS=TopoDS::Solid(myShape); - } - else { - aBB.MakeSolid(aS); - aBB.Add(aS, myShape); - } - // - if (myPClsf) { - pSC=(BRepClass3d_SolidClassifier*)myPClsf; - delete pSC; - } - // - pSC=new BRepClass3d_SolidClassifier(aS); - myPClsf=pSC; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - void GEOMAlgo_ClsfSolid::Perform() -{ - myErrorStatus=0; - // - if (!myPClsf) { - myErrorStatus=11; - return; - } - // - BRepClass3d_SolidClassifier* pSC; - // - pSC=(BRepClass3d_SolidClassifier*)myPClsf; - pSC->Perform(myPnt, myTolerance); - myState=pSC->State(); -} -// -// myErrorStatus : -// -// 10 - mySolid=NULL -// 11 - myPClsf=NULL -// 12 - unallowed type of myShape - diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSolid.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSolid.hxx deleted file mode 100644 index 1715d88db..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSolid.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ClsfSolid.hxx -// Created: Mon Jan 29 10:35:46 2007 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_ClsfSolid_HeaderFile -#define _GEOMAlgo_ClsfSolid_HeaderFile - -#include -#include -//#include -#include -#include -#include - -DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfSolid, GEOMAlgo_Clsf) - -//======================================================================= -//class : GEOMAlgo_ClsfSolid -//purpose : -//======================================================================= -class GEOMAlgo_ClsfSolid : public GEOMAlgo_Clsf -{ - public: - Standard_EXPORT - GEOMAlgo_ClsfSolid(); - - Standard_EXPORT - virtual ~GEOMAlgo_ClsfSolid(); - - Standard_EXPORT - void SetShape(const TopoDS_Shape& aS) ; - - Standard_EXPORT - const TopoDS_Shape& Shape() const; - - Standard_EXPORT - virtual void Perform() ; - - Standard_EXPORT - virtual void CheckData() ; - - DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfSolid) - - protected: - TopoDS_Shape myShape; - Standard_Address myPClsf; - -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSurf.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSurf.cxx deleted file mode 100644 index cdc66dd14..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSurf.cxx +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_ClsfSurf.cxx -// Created: Wed Nov 22 10:41:47 2006 -// Author: Peter KURNEV -// -// -#include -#include -#include -#include - -IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf); -IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf); - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_ClsfSurf::GEOMAlgo_ClsfSurf() -: - GEOMAlgo_Clsf() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_ClsfSurf::~GEOMAlgo_ClsfSurf() -{ -} -//======================================================================= -//function : SetSurface -//purpose : -//======================================================================= - void GEOMAlgo_ClsfSurf::SetSurface(const Handle(Geom_Surface)& aS) -{ - myS=aS; -} -//======================================================================= -//function : Surface -//purpose : -//======================================================================= - const Handle(Geom_Surface)& GEOMAlgo_ClsfSurf::Surface() const -{ - return myS; -} -//======================================================================= -//function : CheckData -//purpose : -//======================================================================= - void GEOMAlgo_ClsfSurf::CheckData() -{ - GeomAbs_SurfaceType aType; - // - myErrorStatus=0; - // - if(myS.IsNull()) { - myErrorStatus=10; // mySurface=NULL - return; - } - // - myGAS.Load(myS); - aType=myGAS.GetType(); - if (!(aType==GeomAbs_Plane || - aType==GeomAbs_Cylinder || - aType==GeomAbs_Sphere)) { - myErrorStatus=11; // unallowed surface type - } -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - void GEOMAlgo_ClsfSurf::Perform() -{ - myErrorStatus=0; - /* - CheckData(); - if(myErrorStatus) { - return; - } - */ - GEOMAlgo_SurfaceTools::GetState(myPnt, myGAS, myTolerance, myState); -} -//======================================================================= -//function : CanBeON -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Curve)& aC) const -{ - GeomAbs_SurfaceType aST; - GeomAbs_CurveType aCT; - GeomAdaptor_Curve aGAC; - // - aGAC.Load(aC); - aCT=aGAC.GetType(); - // - aST=myGAS.GetType(); - if (aCT==GeomAbs_Line && aST==GeomAbs_Sphere) { - return Standard_False; - } - return Standard_True; -} -//======================================================================= -//function : CanBeON -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_ClsfSurf::CanBeON(const Handle(Geom_Surface)& aS1) const -{ - Standard_Boolean bRet; - GeomAbs_SurfaceType aST, aST1; - GeomAdaptor_Surface aGAS1; - // - aST=myGAS.GetType(); - aGAS1.Load(aS1); - aST1=aGAS1.GetType(); - bRet=(aST1==aST); - // - return bRet; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSurf.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSurf.hxx deleted file mode 100644 index e0dd97395..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ClsfSurf.hxx +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_ClsfSurf.hxx -// Created: Wed Nov 22 10:41:47 2006 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_ClsfSurf_HeaderFile -#define _GEOMAlgo_ClsfSurf_HeaderFile - -#include -#include -//#include -#include -#include -#include -#include -#include -#include -#include - -DEFINE_STANDARD_HANDLE(GEOMAlgo_ClsfSurf, GEOMAlgo_Clsf) - -//======================================================================= -// class : GEOMAlgo_ClsfSurf -//purpose : -//======================================================================= -class GEOMAlgo_ClsfSurf : public GEOMAlgo_Clsf -{ - public: - Standard_EXPORT - GEOMAlgo_ClsfSurf(); - - Standard_EXPORT - virtual ~GEOMAlgo_ClsfSurf(); - - Standard_EXPORT - void SetSurface(const Handle(Geom_Surface)& aS) ; - - Standard_EXPORT - const Handle_Geom_Surface& Surface() const; - - Standard_EXPORT - virtual void Perform() ; - - Standard_EXPORT - virtual void CheckData() ; - - Standard_EXPORT - virtual Standard_Boolean CanBeON(const Handle(Geom_Curve)& aC) const; - - Standard_EXPORT - virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aST) const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_ClsfSurf); - - protected: - Handle_Geom_Surface myS; - GeomAdaptor_Surface myGAS; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_CoupleOfShapes.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_CoupleOfShapes.cxx deleted file mode 100644 index 0055a8228..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_CoupleOfShapes.cxx +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_CoupleOfShapes.cxx -// Created: Wed Dec 15 13:03:52 2004 -// Author: Peter KURNEV -// -// -#include -//======================================================================= -//function : GEOMAlgo_CoupleOfShapes -//purpose : -//======================================================================= -GEOMAlgo_CoupleOfShapes::GEOMAlgo_CoupleOfShapes() -{} -//======================================================================= -//function : SetShapes -//purpose : -//======================================================================= -void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) -{ - myShape1=aS1; - myShape2=aS2; -} -//======================================================================= -//function : Shapes -//purpose : -//======================================================================= -void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1, - TopoDS_Shape& aS2)const -{ - aS1=myShape1; - aS2=myShape2; -} -//======================================================================= -//function : SetShape1 -//purpose : -//======================================================================= -void GEOMAlgo_CoupleOfShapes::SetShape1(const TopoDS_Shape& aS1) -{ - myShape1=aS1; -} -//======================================================================= -//function : SetShape2 -//purpose : -//======================================================================= -void GEOMAlgo_CoupleOfShapes::SetShape2(const TopoDS_Shape& aS2) -{ - myShape2=aS2; -} -//======================================================================= -//function : Shape1 -//purpose : -//======================================================================= -const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape1()const -{ - return myShape1; -} -//======================================================================= -//function : Shape2 -//purpose : -//======================================================================= -const TopoDS_Shape& GEOMAlgo_CoupleOfShapes::Shape2()const -{ - return myShape2; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_CoupleOfShapes.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_CoupleOfShapes.hxx deleted file mode 100644 index 7e346aa8d..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_CoupleOfShapes.hxx +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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.hxx -// Created: Wed Dec 15 13:03:52 2004 -// Author: Peter KURNEV -// -// - -#ifndef _GEOMAlgo_CoupleOfShapes_HeaderFile -#define _GEOMAlgo_CoupleOfShapes_HeaderFile - -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_CoupleOfShapes -//purpose : -//======================================================================= -class GEOMAlgo_CoupleOfShapes -{ - 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; - -protected: - TopoDS_Shape myShape1; - TopoDS_Shape myShape2; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx deleted file mode 100644 index ed169e1c5..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx -// Created: Wed Feb 22 11:05:01 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile -#define GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape_HeaderFile - -#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile -#include -#endif - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx deleted file mode 100644 index 2ea6a30ad..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapIteratorOfDataMapOfPassKeyInteger.hxx -// Created: Wed Feb 22 10:58:14 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile -#define GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger_HeaderFile - -#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile -#include -#endif -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx deleted file mode 100644 index bda2348e2..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx -// Created: Wed Feb 22 11:01:34 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile -#define GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape_HeaderFile - -#ifndef GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile -#include -#endif -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx deleted file mode 100644 index 9bce78862..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapIteratorOfDataMapOfRealListOfShape.hxx -// Created: Wed Feb 22 10:53:47 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile -#define GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape_HeaderFile - -#ifndef GEOMAlgo_DataMapOfRealListOfShape_HeaderFile -#include -#endif -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx deleted file mode 100644 index 5b19a5aeb..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx -// Created: Wed Feb 22 11:08:26 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile -#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape_HeaderFile - -#ifndef GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile -#include -#endif -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx deleted file mode 100644 index 0eed7b26d..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapIteratorOfDataMapOfShapePnt.hxx -// Created: Wed Feb 22 11:11:09 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile -#define GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt_HeaderFile - -#ifndef GEOMAlgo_DataMapOfShapePnt_HeaderFile -#include -#endif -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx deleted file mode 100644 index 4fa86a84f..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapIteratorOfDataMapOfShapeReal.hxx -// Created: Wed Feb 22 10:49:11 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile -#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal_HeaderFile - -#ifndef GEOMAlgo_DataMapOfShapeReal_HeaderFile -#include -#endif - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx deleted file mode 100644 index fad39a60b..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapIteratorOfDataMapOfShapeShapeSet.hxx -// Created: Wed Feb 22 08:39:02 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile -#define GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet_HeaderFile - -#ifndef GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile -#include -#endif - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfOrientedShapeShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfOrientedShapeShape.hxx deleted file mode 100644 index 3126d0e4a..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfOrientedShapeShape.hxx +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapOfOrientedShapeShape.hxx -// Created: Wed Feb 22 11:03:36 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile -#define GEOMAlgo_DataMapOfOrientedShapeShape_HeaderFile - -#include -#include - -#define _NCollection_MapHasher -#include - - -typedef NCollection_DataMap GEOMAlgo_DataMapOfOrientedShapeShape; -typedef GEOMAlgo_DataMapOfOrientedShapeShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape; - -#undef _NCollection_MapHasher - - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfPassKeyInteger.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfPassKeyInteger.hxx deleted file mode 100644 index 6ba58447b..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfPassKeyInteger.hxx +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapOfPassKeyInteger.hxx -// Created: Wed Feb 22 10:55:55 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile -#define GEOMAlgo_DataMapOfPassKeyInteger_HeaderFile - -#include -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_DataMap GEOMAlgo_DataMapOfPassKeyInteger; -typedef GEOMAlgo_DataMapOfPassKeyInteger::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger; - -#undef _NCollection_MapHasher - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfPassKeyShapeShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfPassKeyShapeShape.hxx deleted file mode 100644 index c9a030daa..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfPassKeyShapeShape.hxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapOfPassKeyShapeShape.hxx -// Created: Wed Feb 22 11:00:16 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile -#define GEOMAlgo_DataMapOfPassKeyShapeShape_HeaderFile - -#include -#include -#include - -#define _NCollection_MapHasher -#include - - -typedef NCollection_DataMap GEOMAlgo_DataMapOfPassKeyShapeShape; -typedef GEOMAlgo_DataMapOfPassKeyShapeShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape; - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfRealListOfShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfRealListOfShape.hxx deleted file mode 100644 index 179402f9e..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfRealListOfShape.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapOfRealListOfShape.hxx -// Created: Wed Feb 22 10:51:48 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapOfRealListOfShape_HeaderFile -#define GEOMAlgo_DataMapOfRealListOfShape_HeaderFile - -#include -#include -#include - - -#define _NCollection_MapHasher -#include - -typedef NCollection_DataMap GEOMAlgo_DataMapOfRealListOfShape; -typedef GEOMAlgo_DataMapOfRealListOfShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape; - -#undef _NCollection_MapHasher - - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeMapOfShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeMapOfShape.hxx deleted file mode 100644 index 510f4373c..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeMapOfShape.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapOfShapeMapOfShape.hxx -// Created: Wed Feb 22 11:07:16 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile -#define GEOMAlgo_DataMapOfShapeMapOfShape_HeaderFile - - -#include -#include -#include - -#define _NCollection_MapHasher -#include - - -typedef NCollection_DataMap GEOMAlgo_DataMapOfShapeMapOfShape; -typedef GEOMAlgo_DataMapOfShapeMapOfShape::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape; - -#undef _NCollection_MapHasher - - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapePnt.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapePnt.hxx deleted file mode 100644 index c552d1c81..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapePnt.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapOfShapePnt.hxx -// Created: Wed Feb 22 11:10:15 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapOfShapePnt_HeaderFile -#define GEOMAlgo_DataMapOfShapePnt_HeaderFile - - -#include -#include -#include - -#define _NCollection_MapHasher -#include -#include - -typedef NCollection_DataMap GEOMAlgo_DataMapOfShapePnt; -typedef GEOMAlgo_DataMapOfShapePnt::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt; - -#undef _NCollection_MapHasher - - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeReal.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeReal.hxx deleted file mode 100644 index cc20d7e16..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeReal.hxx +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapOfShapeReal.hxx -// Created: Wed Feb 22 10:47:23 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapOfShapeReal_HeaderFile -#define GEOMAlgo_DataMapOfShapeReal_HeaderFile - -#include -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_DataMap GEOMAlgo_DataMapOfShapeReal; -typedef GEOMAlgo_DataMapOfShapeReal::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal; - -#undef _NCollection_MapHasher - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeShapeSet.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeShapeSet.hxx deleted file mode 100644 index 4430717c3..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_DataMapOfShapeShapeSet.hxx +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapOfShapeShapeSet.hxx -// Created: Wed Feb 22 08:36:15 2012 -// Author: -// - - -#ifndef GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile -#define GEOMAlgo_DataMapOfShapeShapeSet_HeaderFile - -#include -#include -#include - -#define _NCollection_MapHasher -#include - - -typedef NCollection_DataMap GEOMAlgo_DataMapOfShapeShapeSet; -typedef GEOMAlgo_DataMapOfShapeShapeSet::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet; - -#undef _NCollection_MapHasher - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn.cxx deleted file mode 100644 index 4708ce554..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn.cxx +++ /dev/null @@ -1,617 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_FinderShapeOn.cxx -// Created: Tue Jan 11 14:44:31 2005 -// Author: Peter KURNEV - -#include - -#include - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version -#include -#endif - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_FinderShapeOn -//purpose : -//======================================================================= -GEOMAlgo_FinderShapeOn::GEOMAlgo_FinderShapeOn() -: - GEOMAlgo_ShapeAlgo() -{ - myTolerance=0.0001; - myShapeType=TopAbs_VERTEX; - myState=GEOMAlgo_ST_UNKNOWN; - myIsAnalytic=Standard_True; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_FinderShapeOn::~GEOMAlgo_FinderShapeOn() -{ -} -//======================================================================= -//function : SetSurface -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::SetSurface(const Handle(Geom_Surface)& aS) -{ - mySurface=aS; -} -//======================================================================= -//function : Surface -//purpose : -//======================================================================= -const Handle(Geom_Surface)& GEOMAlgo_FinderShapeOn::Surface() const -{ - return mySurface; -} -//======================================================================= -//function : SetShapeType -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::SetShapeType(const TopAbs_ShapeEnum aType) -{ - myShapeType=aType; -} -//======================================================================= -//function : ShapeType -//purpose : -//======================================================================= -TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn::ShapeType()const -{ - return myShapeType; -} -//======================================================================= -//function : SetState -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::SetState(const GEOMAlgo_State aState) -{ - myState=aState; -} -//======================================================================= -//function : State -//purpose : -//======================================================================= -GEOMAlgo_State GEOMAlgo_FinderShapeOn::State() const -{ - return myState; -} -//======================================================================= -// function: Shapes -// purpose: -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn::Shapes() const -{ - Standard_Boolean bIsConformState; - Standard_Integer i, aNb; - TopAbs_State aSt; - TopTools_ListOfShape* pL; - // - pL=(TopTools_ListOfShape*) &myLS; - pL->Clear(); - // - aNb=myMSS.Extent(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aS=myMSS.FindKey(i); - aSt=myMSS.FindFromIndex(i); - // - bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); - if (bIsConformState) { - pL->Append(aS); - } - } - return myLS; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::Perform() -{ - myErrorStatus=0; - myWarningStatus=0; - myLS.Clear(); - myMSS.Clear(); - // - if (!myResult.IsNull()){ - myResult.Nullify(); - } - // - CheckData(); - if(myErrorStatus) { - return; - } - // - // Initialize the context - GEOMAlgo_ShapeAlgo::Perform(); - // - myIsAnalytic=GEOMAlgo_SurfaceTools::IsAnalytic(mySurface); - // - MakeArgument1(); - if(myErrorStatus) { - return; - } - // - if (myIsAnalytic && myShapeType==TopAbs_VERTEX) { - FindVertices(); - return; - } - // - MakeArgument2(); - if(myErrorStatus) { - return; - } - // - Find(); - if(myErrorStatus || myWarningStatus) { - return; - } - // -} -//======================================================================= -//function : FindVertices -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::FindVertices() -{ - Standard_Integer i, aNb, iErr; - TopAbs_State aSt; - TopAbs_Orientation aOr; - gp_Pnt aP; - TopTools_IndexedMapOfShape aM; - // - TopExp::MapShapes(myArg1, TopAbs_FACE, aM); - const TopoDS_Face& aF=TopoDS::Face(aM(1)); - aOr=aF.Orientation(); - // - aM.Clear(); - TopExp::MapShapes(myShape, myShapeType, aM); - aNb=aM.Extent(); - if (!aNb) { - myWarningStatus=10; // No found sub-shapes of type myShapeType - return; - } - // - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aS=aM(i); - const TopoDS_Vertex& aV=TopoDS::Vertex(aS); - aP=BRep_Tool::Pnt(aV); - iErr=GEOMAlgo_SurfaceTools::GetState(aP, mySurface, myTolerance, aSt); - if (aOr==TopAbs_REVERSED) { - aSt=GEOMAlgo_SurfaceTools::ReverseState(aSt); - } - myMSS.Add(aS, aSt); - } -} -//======================================================================= -//function : Find -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::Find() -{ - Standard_Integer i, aNb; - Standard_Boolean bICS; - TopTools_IndexedMapOfShape aM; - // - TopExp::MapShapes(myArg2, myShapeType, aM); - // - aNb=aM.Extent(); - if (!aNb) { - myWarningStatus=10; // No found sub-shapes of type myShapeType - return; - } - // - bICS=GEOMAlgo_Tools::IsCompositeShape(myArg2); - if (!bICS || myIsAnalytic) { - TopoDS_Compound aCmp; - BRep_Builder aBB; - // - aBB.MakeCompound(aCmp); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aSi=aM(i); - aBB.Add(aCmp, aSi); - } - // - aM.Clear(); - aM.Add(aCmp); - aNb=1; - } - // - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aS=aM(i); - Find(aS); - if (myErrorStatus) { - return; - } - } -} -//======================================================================= -//function : Find -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS) -{ - myErrorStatus=0; - // - Standard_Boolean bIsDone; - Standard_Integer i, iErr; - TopAbs_State aSts[]={TopAbs_IN, TopAbs_OUT, TopAbs_ON}; - TopTools_ListIteratorOfListOfShape aIt; - BOPTools_DSFiller aDF; - // - // 1. Prepare DSFiller - aDF.SetShapes (myArg1, aS); - bIsDone=aDF.IsDone(); - if (!bIsDone) { - myErrorStatus=30; // wrong args are used for DSFiller - return; - } - aDF.Perform(); - bIsDone=aDF.IsDone(); - if (!bIsDone) { - myErrorStatus=31; // DSFiller failed - return; - } - // - // 2. Find shapes - GEOMAlgo_ShapeSolid* pSS; - GEOMAlgo_VertexSolid aVXS; - GEOMAlgo_WireSolid aWRS; - GEOMAlgo_ShellSolid aSHS; - GEOMAlgo_SolidSolid aSLS; - // - pSS=NULL; - // - switch (myShapeType) { - case TopAbs_VERTEX: - pSS=&aVXS; - break; - case TopAbs_EDGE: - pSS=&aWRS; - break; - case TopAbs_FACE: - pSS=&aSHS; - break; - case TopAbs_SOLID: - aSLS.SetShape2(myArg2); - pSS=&aSLS; - break; - default: - myErrorStatus=12; // unallowed sub-shape type - return; - } - // - pSS->SetFiller(aDF); - pSS->Perform(); - iErr=pSS->ErrorStatus(); - if (iErr) { - myErrorStatus=32; // builder ShapeSolid failed - return; - } - // - for (i=0; i<3; ++i) { - const TopTools_ListOfShape& aLS=pSS->Shapes(aSts[i]); - aIt.Initialize(aLS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSImage=aIt.Value(); - if (myImages.IsBound(aSImage)) { - const TopoDS_Shape& aSx=myImages.Find(aSImage); - myMSS.Add(aSx, aSts[i]); - } - else { - myErrorStatus=33;// can not find original shape - return; - } - } - } -} -//======================================================================= -//function : MakeArgument1 -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::MakeArgument1() -{ - myErrorStatus=0; - // - Standard_Integer i, aNb; - TopAbs_ShapeEnum aType; - BRepLib_FaceError aFErr; - BRepLib_MakeFace aMF; - TopTools_IndexedMapOfShape aM; - BRep_Builder aBB; - TopoDS_Face aFace; - TopoDS_Shell aSh; - TopoDS_Solid aSd; - // - // Argument 1 - if (!myIsAnalytic) { -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - aMF.Init(mySurface, Standard_True, Precision::Confusion()); -#else - aMF.Init(mySurface, Standard_True); -#endif - aFErr=aMF.Error(); - if (aFErr!=BRepLib_FaceDone) { - myErrorStatus=20; // can not build the face - return; - } - // - const TopoDS_Shape& aF=aMF.Shape(); - aFace=TopoDS::Face(aF); - // - // update tolerances - aM.Add(aF); - TopExp::MapShapes(aF, TopAbs_VERTEX, aM); - TopExp::MapShapes(aF, TopAbs_EDGE, aM); - aNb=aM.Extent(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aS=aM(i); - aType=aS.ShapeType(); - switch (aType) { - case TopAbs_VERTEX: { - const TopoDS_Vertex& aVx=TopoDS::Vertex(aS); - aBB.UpdateVertex(aVx, myTolerance); - } - break; - case TopAbs_EDGE: { - const TopoDS_Edge& aEx=TopoDS::Edge(aS); - aBB.UpdateEdge(aEx, myTolerance); - } - break; - case TopAbs_FACE: { - const TopoDS_Face& aFx=TopoDS::Face(aS); - aBB.UpdateFace(aFx, myTolerance); - } - break; - default: - break; - } - } - } // - else { - aBB.MakeFace(aFace, mySurface, myTolerance); - } - // - // make solid - aBB.MakeShell(aSh); - aBB.Add(aSh, aFace); - aBB.MakeSolid(aSd); - aBB.Add(aSd, aSh); - myArg1=aSd; -} -//======================================================================= -//function : MakeArgument2 -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::MakeArgument2() -{ - myErrorStatus=0; - // - TopoDS_Shape aSC; - TopTools_DataMapOfShapeShape aOriginals; - // - myImages.Clear(); - // - GEOMAlgo_FinderShapeOn::CopySource(myShape, myImages, aOriginals, aSC); - // - myArg2=aSC; -} -//======================================================================= -//function : CheckData -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::CheckData() -{ - myErrorStatus=0; - // - if(mySurface.IsNull()) { - myErrorStatus=10; // mySurface=NULL - return; - } - // - if (myShape.IsNull()) { - myErrorStatus=11; // myShape=NULL - return; - } - // - if (!(myShapeType==TopAbs_VERTEX || - myShapeType==TopAbs_EDGE || - myShapeType==TopAbs_FACE || - myShapeType==TopAbs_SOLID)) { - myErrorStatus=12; // unallowed sub-shape type - return; - } - // - if (myState==GEOMAlgo_ST_UNKNOWN || - myState==GEOMAlgo_ST_INOUT) { - myErrorStatus=13; // unallowed state type - return; - } -} -// -//======================================================================= -//function : CopySource -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE, - TopTools_DataMapOfShapeShape& aImages, - TopTools_DataMapOfShapeShape& aOriginals, - TopoDS_Shape& aEx) -{ - Standard_Boolean bFree; - TopAbs_ShapeEnum aType; - Standard_Integer aR; - BRep_Builder BB; - TopoDS_Iterator aIt; - // - aType=aE.ShapeType(); - // - if (aOriginals.IsBound(aE)) { - aEx=aOriginals.ChangeFind(aE); - return; - } - else { - aEx=aE.EmptyCopied(); - aOriginals.Bind(aE, aEx); - aImages.Bind(aEx, aE); - } - // - aR=(Standard_Integer)aType+1; - if (aR>TopAbs_VERTEX) { - return; - } - // - bFree=aEx.Free(); - aEx.Free(Standard_True); - // - aType=(TopAbs_ShapeEnum) aR; - // - aIt.Initialize(aE);//, Standard_False); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aV=aIt.Value(); - TopoDS_Shape aVx; - // - CopySource (aV, aImages, aOriginals, aVx); - // - aVx.Orientation(aV.Orientation()); - BB.Add(aEx, aVx); - } - // - aEx.Free(bFree); -} -// -//======================================================================= -//function : BuildTriangulation -//purpose : -//======================================================================= -Standard_Boolean - GEOMAlgo_FinderShapeOn::BuildTriangulation (const TopoDS_Shape& theShape) -{ - // calculate deflection - Standard_Real aDeviationCoefficient = 0.001; - - Bnd_Box B; - BRepBndLib::Add(theShape, B); - Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax; - B.Get(aXmin, aYmin, aZmin, aXmax, aYmax, aZmax); - - Standard_Real dx = aXmax - aXmin, dy = aYmax - aYmin, dz = aZmax - aZmin; - Standard_Real aDeflection = Max(Max(dx, dy), dz) * aDeviationCoefficient * 4; - Standard_Real aHLRAngle = 0.349066; - - // build triangulation - BRepMesh_IncrementalMesh Inc (theShape, aDeflection, Standard_False, aHLRAngle); - - // check triangulation - bool isTriangulation = true; - - TopExp_Explorer exp (theShape, TopAbs_FACE); - if (exp.More()) - { - TopLoc_Location aTopLoc; - Handle(Poly_Triangulation) aTRF; - aTRF = BRep_Tool::Triangulation(TopoDS::Face(exp.Current()), aTopLoc); - if (aTRF.IsNull()) { - isTriangulation = false; - } - } - else // no faces, try edges - { - TopExp_Explorer expe (theShape, TopAbs_EDGE); - if (!expe.More()) { - isTriangulation = false; - } - else { - TopLoc_Location aLoc; - Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(TopoDS::Edge(expe.Current()), aLoc); - if (aPE.IsNull()) { - isTriangulation = false; - } - } - } - - return isTriangulation; -} - -// -// myErrorStatus : -// -// 10 -mySurface=NULL -// 11 -myShape=NULL -// 12 -unallowed type of sub-shapes -// 13 -unallowed state -// 20 -can not build the face -// 30 -wrong args are used for DSFiller -// 31 -DSFiller failed -// 32 -builder ShapeSolid failed -// 33 -can not find original shape -// -// myWarningStatus -// -// 10 - sub-shapes of type myShapeType can not be fond in myShape diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn.hxx deleted file mode 100644 index a05b902b9..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn.hxx +++ /dev/null @@ -1,121 +0,0 @@ - -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_FinderShapeOn.hxx -// Created: Tue Jan 11 14:44:31 2005 -// Author: Peter KURNEV - -#ifndef _GEOMAlgo_FinderShapeOn_HeaderFile -#define _GEOMAlgo_FinderShapeOn_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_FinderShapeOn -//purpose : -//======================================================================= -class GEOMAlgo_FinderShapeOn : public GEOMAlgo_ShapeAlgo -{ - 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) ; - - Standard_EXPORT - static Standard_Boolean BuildTriangulation(const TopoDS_Shape& aS) ; - -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() ; - - - Handle_Geom_Surface mySurface; - TopAbs_ShapeEnum myShapeType; - GEOMAlgo_State myState; - TopoDS_Shape myArg1; - TopoDS_Shape myArg2; - TopTools_ListOfShape myLS; - TopTools_DataMapOfShapeShape myImages; - GEOMAlgo_IndexedDataMapOfShapeState myMSS; - Standard_Boolean myIsAnalytic; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn1.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn1.cxx deleted file mode 100644 index 9c943ac43..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn1.cxx +++ /dev/null @@ -1,855 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_FinderShapeOn1.cxx -// Created: Fri Mar 4 10:31:06 2005 -// Author: Peter KURNEV - -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_FinderShapeOn1 -//purpose : -//======================================================================= -GEOMAlgo_FinderShapeOn1::GEOMAlgo_FinderShapeOn1() -: - GEOMAlgo_ShapeAlgo() -{ - myTolerance=0.0001; - myShapeType=TopAbs_VERTEX; - myState=GEOMAlgo_ST_UNKNOWN; - myNbPntsMin=3; - myNbPntsMax=0; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_FinderShapeOn1::~GEOMAlgo_FinderShapeOn1() -{ -} -//======================================================================= -//function : SetSurface -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::SetSurface(const Handle(Geom_Surface)& aS) -{ - mySurface=aS; -} -//======================================================================= -//function : Surface -//purpose : -//======================================================================= -const Handle(Geom_Surface)& GEOMAlgo_FinderShapeOn1::Surface() const -{ - return mySurface; -} -//======================================================================= -//function : SetShapeType -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::SetShapeType(const TopAbs_ShapeEnum aType) -{ - myShapeType=aType; -} -//======================================================================= -//function : ShapeType -//purpose : -//======================================================================= -TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn1::ShapeType()const -{ - return myShapeType; -} -//======================================================================= -//function : SetState -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::SetState(const GEOMAlgo_State aState) -{ - myState=aState; -} -//======================================================================= -//function : State -//purpose : -//======================================================================= -GEOMAlgo_State GEOMAlgo_FinderShapeOn1::State() const -{ - return myState; -} -//======================================================================= -//function : SetNbPntsMin -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::SetNbPntsMin(const Standard_Integer aNb) -{ - myNbPntsMin=aNb; -} -//======================================================================= -//function : NbPntsMin -//purpose : -//======================================================================= -Standard_Integer GEOMAlgo_FinderShapeOn1::NbPntsMin()const -{ - return myNbPntsMin; -} -//======================================================================= -//function : SetNbPntsMax -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::SetNbPntsMax(const Standard_Integer aNb) -{ - myNbPntsMax=aNb; -} -//======================================================================= -//function : NbPntsMax -//purpose : -//======================================================================= -Standard_Integer GEOMAlgo_FinderShapeOn1::NbPntsMax()const -{ - return myNbPntsMax; -} -//======================================================================= -// function: MSS -// purpose: -//======================================================================= -const GEOMAlgo_IndexedDataMapOfShapeState& GEOMAlgo_FinderShapeOn1::MSS() const -{ - return myMSS; -} -//======================================================================= -// function: Shapes -// purpose: -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn1::Shapes() const -{ - Standard_Integer i, aNb; - TopTools_ListOfShape* pL; - // - pL=(TopTools_ListOfShape*) &myLS; - pL->Clear(); - // - aNb=myMSS.Extent(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aS=myMSS.FindKey(i); - if (aS.ShapeType()==myShapeType) { - pL->Append(aS); - } - } - return myLS; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::Perform() -{ - myErrorStatus=0; - myWarningStatus=0; - myLS.Clear(); - myMSS.Clear(); - // - CheckData(); - if(myErrorStatus) { - return; - } - // - // Initialize the context - GEOMAlgo_ShapeAlgo::Perform(); - // - // 1 - ProcessVertices(); - if(myErrorStatus) { - return; - } - if (myShapeType==TopAbs_VERTEX) { - return; - } - // - // 2 - ProcessEdges(); - if(myErrorStatus) { - return; - } - if (myShapeType==TopAbs_EDGE) { - return; - } - // - // 3 - ProcessFaces(); - if(myErrorStatus) { - return; - } - if (myShapeType==TopAbs_FACE) { - return; - } - // - // 4 - ProcessSolids(); - // -} -//======================================================================= -//function : ProcessVertices -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::ProcessVertices() -{ - myErrorStatus=0; - // - Standard_Boolean bIsConformState; - Standard_Integer i, aNb; - gp_Pnt aP; - TopTools_IndexedMapOfShape aM; - TopAbs_State aSt; - // - TopExp::MapShapes(myShape, TopAbs_VERTEX, aM); - aNb=aM.Extent(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Vertex& aV=TopoDS::Vertex(aM(i)); - aP=BRep_Tool::Pnt(aV); - // - aSt = GetPointState( aP ); - bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); - // - if (myShapeType==TopAbs_VERTEX){ - if (bIsConformState) { - myMSS.Add(aV, aSt); - } - } - else if (bIsConformState || aSt==TopAbs_ON) { - myMSS.Add(aV, aSt); - } - } -} -//======================================================================= -//function : ProcessEdges -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::ProcessEdges() -{ - myErrorStatus=0; - // - Standard_Boolean bIsConformState, bIsToBreak; - Standard_Integer i, aNb, iCnt; - TopAbs_State aSt; - TopTools_IndexedMapOfShape aM; - TopExp_Explorer aExp; - GEOMAlgo_ListIteratorOfListOfPnt aIt; - GeomAbs_SurfaceType aType1; - // - aType1=myGAS.GetType(); - // - TopExp::MapShapes(myShape, TopAbs_EDGE, aM); - aNb=aM.Extent(); - for (i=1; i<=aNb; ++i) { - GEOMAlgo_ListOfPnt aLP; - GEOMAlgo_StateCollector aSC; - // - const TopoDS_Edge& aE=TopoDS::Edge(aM(i)); - // - aExp.Init(aE, TopAbs_VERTEX); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aV=aExp.Current(); - // - bIsConformState=myMSS.Contains(aV); - if (!bIsConformState) { - break;// vertex has non-conformed state - } - else { - aSt=myMSS.FindFromKey(aV); - aSC.AppendState(aSt); - } - } - // - if (!bIsConformState) { - continue; // vertex has non-conformed state,skip edge - } - // - if (BRep_Tool::Degenerated(aE)) { - myMSS.Add(aE, aSt); - continue; - } - // - if (myState==GEOMAlgo_ST_ON && aType1==GeomAbs_Sphere) { - Standard_Real aT1, aT2; - Handle(Geom_Curve) aC; - GeomAdaptor_Curve aGAC; - GeomAbs_CurveType aType2; - // - aC=BRep_Tool::Curve(aE, aT1, aT2); - aGAC.Load(aC); - // - aType2=aGAC.GetType(); - if (aType2==GeomAbs_Line) { - continue; - } - } - // - InnerPoints(aE, aLP); - if (myErrorStatus) { - return; - } - // - bIsConformState=Standard_True; - aIt.Initialize(aLP); - for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { - if (myNbPntsMax) { - if (iCnt > myNbPntsMax) { - break; - } - } - // - const gp_Pnt& aP=aIt.Value(); - aSt = GetPointState( aP ); - bIsToBreak=aSC.AppendState(aSt); - if (bIsToBreak) { - break; - } - } - // - aSt=aSC.State(); - // - bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); - if (myShapeType==TopAbs_EDGE) { - if (bIsConformState) { - myMSS.Add(aE, aSt); - } - } - else if (bIsConformState || aSt==TopAbs_ON) { - myMSS.Add(aE, aSt); - } - } // for (i=1; i<=aNb; ++i) next edge -} -//======================================================================= -//function : ProcessFaces -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::ProcessFaces() -{ - myErrorStatus=0; - // - Standard_Boolean bIsConformState, bIsToBreak; - Standard_Integer i, aNbF, iCnt; - TopAbs_State aSt; - TopTools_IndexedMapOfShape aM; - TopExp_Explorer aExp; - GEOMAlgo_ListIteratorOfListOfPnt aIt; - GeomAbs_SurfaceType aType1, aType2; - // - aType1=myGAS.GetType(); - // - TopExp::MapShapes(myShape, TopAbs_FACE, aM); - aNbF=aM.Extent(); - for (i=1; i<=aNbF; ++i) { - GEOMAlgo_StateCollector aSC; - GEOMAlgo_ListOfPnt aLP; - // - const TopoDS_Face& aF=TopoDS::Face(aM(i)); - // - if (myState==GEOMAlgo_ST_ON) { - Handle(Geom_Surface) aS; - GeomAdaptor_Surface aGAS; - // - aS=BRep_Tool::Surface(aF); - aGAS.Load(aS); - aType2=aGAS.GetType(); - if (aType2!=aType1) { - continue; - } - } - // - aExp.Init(aF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aE=aExp.Current(); - bIsConformState=myMSS.Contains(aE); - if (!bIsConformState) { - break;// edge has non-conformed state - } - else { - aSt=myMSS.FindFromKey(aE); - aSC.AppendState(aSt); - } - } - // - if (!bIsConformState) { - continue; // edge has non-conformed state,skip face - } - // - InnerPoints(aF, aLP); - if (myErrorStatus) { - return; - } - // - bIsConformState=Standard_True; - aIt.Initialize(aLP); - for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { - if (myNbPntsMax) { - if (iCnt > myNbPntsMax) { - break; - } - } - // - const gp_Pnt& aP=aIt.Value(); - aSt = GetPointState( aP ); - bIsToBreak=aSC.AppendState(aSt); - if (bIsToBreak) { - break; - } - } - // - aSt=aSC.State(); - // - bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); - if (myShapeType==TopAbs_FACE) { - if (bIsConformState) { - myMSS.Add(aF, aSt); - } - } - else if (bIsConformState || aSt==TopAbs_ON) { - myMSS.Add(aF, aSt); - } - }// for (i=1; i<=aNb; ++i) next face -} -//======================================================================= -//function : ProcessSolids -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::ProcessSolids() -{ - myErrorStatus=0; - // - Standard_Boolean bIsConformState; - Standard_Integer i, aNbS, j, aNbF; - TopTools_IndexedMapOfShape aM, aMF; - TopAbs_State aSt; - // - TopExp::MapShapes(myShape, TopAbs_SOLID, aM); - aNbS=aM.Extent(); - for (i=1; i<=aNbS; ++i) { - GEOMAlgo_StateCollector aSC; - // - const TopoDS_Shape& aSd=aM(i); - aMF.Clear(); - TopExp::MapShapes(aSd, TopAbs_FACE, aMF); - aNbF=aMF.Extent(); - for (j=1; j<=aNbF; ++j) { - const TopoDS_Shape& aF=aMF(j); - bIsConformState=myMSS.Contains(aF); - if (!bIsConformState) { - break;// face has non-conformed state - } - else { - aSt=myMSS.FindFromKey(aF); - aSC.AppendState(aSt); - } - } - // - if (!bIsConformState) { - continue; // face has non-conformed state,skip solid - } - // - aSt=aSC.State(); - // - bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); - if (bIsConformState) { - myMSS.Add(aSd, aSt); - } - } -} -// -//======================================================================= -//function : InnerPoints -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, - GEOMAlgo_ListOfPnt& aLP) -{ - myErrorStatus=0; - // - Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds; - TopLoc_Location aLoc; - Handle(Poly_Triangulation) aTRF; - TColStd_MapOfInteger aMBN; - GEOMAlgo_DataMapOfPassKeyInteger aMPKI; - GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger aIt; - gp_Pnt aP, aP1, aP2; - // - aLP.Clear(); - // - aTRF=BRep_Tool::Triangulation(aF, aLoc); - if (aTRF.IsNull()) { - if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aF)) { - myWarningStatus=20; // no triangulation found - return; - } - aTRF=BRep_Tool::Triangulation(aF, aLoc); - } - // - const gp_Trsf& aTrsf=aLoc.Transformation(); - const Poly_Array1OfTriangle& aTrs=aTRF->Triangles(); - const TColgp_Array1OfPnt& aNodes=aTRF->Nodes(); - // - // map link/nbtriangles - j1=aTrs.Lower(); - j2=aTrs.Upper(); - for (j=j1; j<=j2; ++j) { - const Poly_Triangle& aTr=aTrs(j); - aTr.Get(n[0], n[1], n[2]); - n[3]=n[0]; - for (k=0; k<3; ++k) { - GEOMAlgo_PassKey aPK; - // - aPK.SetIds(n[k], n[k+1]); - if (aMPKI.IsBound(aPK)) { - Standard_Integer& iCntX=aMPKI.ChangeFind(aPK); - ++iCntX; - } - else { - aMPKI.Bind(aPK, 1); - } - } - } - // - // boundary nodes aMBN - aNbLinks=aMPKI.Extent(); - aIt.Initialize(aMPKI); - for (; aIt.More(); aIt.Next()) { - iCnt=aIt.Value(); - if (iCnt==1) { - const GEOMAlgo_PassKey& aPK=aIt.Key(); - // - aNx=(Standard_Integer)aPK.Id(1); - aMBN.Add(aNx); - aNx=(Standard_Integer)aPK.Id(2); - aMBN.Add(aNx); - } - } - // - // inner nodes=all_nodes - boundary_nodes - j1=aNodes.Lower(); - j2=aNodes.Upper(); - for (j=j1; j<=j2; ++j) { - if (!aMBN.Contains(j)) { - aP=aNodes(j).Transformed(aTrsf); - aLP.Append(aP); - } - } - // - aNb=aLP.Extent(); - // - if (!aNb && myNbPntsMin) { - // try to fill it yourself - Standard_Boolean bIsDone; - Standard_Integer aN1, aN2; - Handle(Geom_Surface) aS; - GeomAdaptor_Surface aGAS; - GeomAbs_SurfaceType aType; - // - aS=BRep_Tool::Surface(aF); - aGAS.Load(aS); - aType=aGAS.GetType(); - if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) { - // inner links - aNbLinks=aMPKI.Extent(); - aIt.Initialize(aMPKI); - for (; aIt.More(); aIt.Next()) { - iCnt=aIt.Value(); - if (iCnt>1) { - // take the first having occured inner link - // and discretize it - const GEOMAlgo_PassKey& aPK=aIt.Key(); - // - aN1=(Standard_Integer)aPK.Id(1); - aN2=(Standard_Integer)aPK.Id(2); - // - aP1=aNodes(aN1).Transformed(aTrsf); - aP2=aNodes(aN2).Transformed(aTrsf); - // - if (aType==GeomAbs_Cylinder) { - Standard_Real aTolSM; - gp_Cylinder aCyl; - // - aTolSM=1.523e-6;//~1.-cos(0.1 deg) - aCyl=aGAS.Cylinder(); - if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) { - continue; - } - } - // - BRepLib_MakeEdge aBME(aP1, aP2); - bIsDone=aBME.IsDone(); - if (!bIsDone) { - myErrorStatus=30; //can not obtain the line fron the link - return; - } - // - const TopoDS_Shape& aSx=aBME.Shape(); - const TopoDS_Edge& aE=TopoDS::Edge(aSx); - // - InnerPoints(aE, myNbPntsMin, aLP); - break; - }// if (iCnt>1) - }// for (; aIt.More(); aIt.Next()) - }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) - }// if (!aNb && myNbPntsMin) { -} -//modified by NIZNHY-PKV Thu Jan 26 09:56:20 2012f -//======================================================================= -//function : InnerPoints -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE, - GEOMAlgo_ListOfPnt& aLP) -{ - Standard_Integer aNbPntsMin; - // - myErrorStatus=0; - aNbPntsMin=21; - // - aLP.Clear(); - InnerPoints(aE, aNbPntsMin, aLP); -} -//modified by NIZNHY-PKV Thu Jan 26 09:56:32 2012t -//======================================================================= -//function : InnerPoints -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE, - const Standard_Integer aNbPntsMin, - GEOMAlgo_ListOfPnt& aLP) -{ - Standard_Boolean bInf1, bInf2; - Standard_Integer j, aNbT; - Standard_Real dT, aT, aT1, aT2; - gp_Pnt aP; - Handle(Geom_Curve) aC3D; - // - aC3D=BRep_Tool::Curve(aE, aT1, aT2); - if (aC3D.IsNull()) { - return; - } - // - bInf1=Precision::IsNegativeInfinite(aT1); - bInf2=Precision::IsPositiveInfinite(aT2); - if (bInf1 || bInf2) { - return; - } - // - //modified by NIZNHY-PKV Thu Jan 26 09:51:20 2012f - /* - aNbT=myNbPntsMin+1; - dT=(aT2-aT1)/aNbT; - for (j=1; j<=aNbPntsMin; ++j) { - aT=aT1+j*dT; - aC3D->D0(aT, aP); - aLP.Append(aP); - } - */ - aNbT=aNbPntsMin+1; - dT=(aT2-aT1)/aNbT; - for (j=1; jD0(aT, aP); - aLP.Append(aP); - } - //modified by NIZNHY-PKV Thu Jan 26 09:51:24 2012t -} - -//======================================================================= -//function : CheckData -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::CheckData() -{ - myErrorStatus=0; - // - if(mySurface.IsNull()) { - myErrorStatus=10; // mySurface=NULL - return; - } - // - if (myShape.IsNull()) { - myErrorStatus=11; // myShape=NULL - return; - } - // - if (!(myShapeType==TopAbs_VERTEX || - myShapeType==TopAbs_EDGE || - myShapeType==TopAbs_FACE || - myShapeType==TopAbs_SOLID)) { - myErrorStatus=12; // unallowed subshape type - return; - } - // - if (myState==GEOMAlgo_ST_UNKNOWN || - myState==GEOMAlgo_ST_INOUT) { - myErrorStatus=13; // unallowed state type - return; - } - // - GeomAbs_SurfaceType aType; - // - myGAS.Load(mySurface); - aType=myGAS.GetType(); - if (!(aType==GeomAbs_Plane || - aType==GeomAbs_Cylinder || - aType==GeomAbs_Sphere)) { - myErrorStatus=14; // unallowed surface type - } -} - -//======================================================================= -//function : GetPointState -//purpose : -//======================================================================= - -TopAbs_State GEOMAlgo_FinderShapeOn1::GetPointState(const gp_Pnt& aP) -{ - TopAbs_State aSt; - GEOMAlgo_SurfaceTools::GetState(aP, myGAS, myTolerance, aSt); - return aSt; -} - - -// -// myErrorStatus : -// -// 10 -mySurface=NULL -// 11 -myShape=NULL -// 12 -unallowed type of subshapes -// 13 -unallowed state -// 14 -unallowed surface type -// 15 -unallowed surface type -// 20- no triangulation found -// 30- can not obtain the line from the link - -//modified by NIZNHY-PKV Thu Jan 26 10:01:14 2012f -/* -//======================================================================= -//function : InnerPoints -//purpose : -//======================================================================= -void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE, - GEOMAlgo_ListOfPnt& aLP) -{ - myErrorStatus=0; - // - Standard_Integer j, aNbNodes, aIndex, aNb; - Handle(Poly_PolygonOnTriangulation) aPTE; - Handle(Poly_Triangulation) aTRE; - TopLoc_Location aLoc; - gp_Pnt aP; - // - aLP.Clear(); - BRep_Tool::PolygonOnTriangulation(aE, aPTE, aTRE, aLoc); - if (aTRE.IsNull() || aPTE.IsNull()) { - Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(aE, aLoc); - if (aPE.IsNull()) { - if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aE)) { - myErrorStatus=20; // no triangulation found - return; - } - aPE = BRep_Tool::Polygon3D(aE, aLoc); - } - const gp_Trsf& aTrsf=aLoc.Transformation(); - const TColgp_Array1OfPnt& aNodes=aPE->Nodes(); - // - aNbNodes=aPE->NbNodes(); - Standard_Integer low = aNodes.Lower(), up = aNodes.Upper(); - for (j=low+1; jNodes(); - // - aNbNodes=aPTE->NbNodes(); - const TColStd_Array1OfInteger& aInds=aPTE->Nodes(); - for (j=2; j -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_FinderShapeOn1 -//purpose : -//======================================================================= -class GEOMAlgo_FinderShapeOn1 : public GEOMAlgo_ShapeAlgo -{ - 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; - - 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) ; - - - Handle_Geom_Surface mySurface; - TopAbs_ShapeEnum myShapeType; - GEOMAlgo_State myState; - Standard_Integer myNbPntsMin; - Standard_Integer myNbPntsMax; - GeomAdaptor_Surface myGAS; - TopTools_ListOfShape myLS; - GEOMAlgo_IndexedDataMapOfShapeState myMSS; -}; - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn2.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn2.cxx deleted file mode 100644 index 020703409..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn2.cxx +++ /dev/null @@ -1,845 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_FinderShapeOn2.cxx -// Created: Fri Mar 4 10:31:06 2005 -// Author: Peter KURNEV -// -// -#include -#include - - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_FinderShapeOn1 -//purpose : -//======================================================================= - GEOMAlgo_FinderShapeOn2::GEOMAlgo_FinderShapeOn2() -: - GEOMAlgo_ShapeAlgo() -{ - myTolerance=0.0001; - myShapeType=TopAbs_VERTEX; - myState=GEOMAlgo_ST_UNKNOWN; - myNbPntsMin=3; - myNbPntsMax=0; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_FinderShapeOn2::~GEOMAlgo_FinderShapeOn2() -{ -} -//======================================================================= -//function : SetClsf -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf) -{ - myClsf=aClsf; -} -//======================================================================= -//function : Clsf -//purpose : -//======================================================================= - const Handle(GEOMAlgo_Clsf)& GEOMAlgo_FinderShapeOn2::Clsf() const -{ - return myClsf; -} -//======================================================================= -//function : SetShapeType -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::SetShapeType(const TopAbs_ShapeEnum aType) -{ - myShapeType=aType; -} -//======================================================================= -//function : ShapeType -//purpose : -//======================================================================= - TopAbs_ShapeEnum GEOMAlgo_FinderShapeOn2::ShapeType()const -{ - return myShapeType; -} -//======================================================================= -//function : SetState -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::SetState(const GEOMAlgo_State aState) -{ - myState=aState; -} -//======================================================================= -//function : State -//purpose : -//======================================================================= - GEOMAlgo_State GEOMAlgo_FinderShapeOn2::State() const -{ - return myState; -} -//======================================================================= -//function : SetNbPntsMin -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::SetNbPntsMin(const Standard_Integer aNb) -{ - myNbPntsMin=aNb; -} -//======================================================================= -//function : NbPntsMin -//purpose : -//======================================================================= - Standard_Integer GEOMAlgo_FinderShapeOn2::NbPntsMin()const -{ - return myNbPntsMin; -} -//======================================================================= -//function : SetNbPntsMax -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::SetNbPntsMax(const Standard_Integer aNb) -{ - myNbPntsMax=aNb; -} -//======================================================================= -//function : NbPntsMax -//purpose : -//======================================================================= - Standard_Integer GEOMAlgo_FinderShapeOn2::NbPntsMax()const -{ - return myNbPntsMax; -} -//======================================================================= -// function: MSS -// purpose: -//======================================================================= - const GEOMAlgo_IndexedDataMapOfShapeState& GEOMAlgo_FinderShapeOn2::MSS() const -{ - return myMSS; -} -//======================================================================= -// function: Shapes -// purpose: -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_FinderShapeOn2::Shapes() const -{ - Standard_Integer i, aNb; - TopTools_ListOfShape* pL; - // - pL=(TopTools_ListOfShape*) &myLS; - pL->Clear(); - // - aNb=myMSS.Extent(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aS=myMSS.FindKey(i); - if (aS.ShapeType()==myShapeType) { - pL->Append(aS); - } - } - return myLS; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::Perform() -{ - myErrorStatus=0; - myWarningStatus=0; - myLS.Clear(); - myMSS.Clear(); - // - CheckData(); - if(myErrorStatus) { - return; - } - // - // Initialize the context - GEOMAlgo_ShapeAlgo::Perform(); - // - myClsf->SetTolerance(myTolerance); - // - // 1 - ProcessVertices(); - if(myErrorStatus) { - return; - } - if (myShapeType==TopAbs_VERTEX) { - return; - } - // - // 2 - ProcessEdges(); - if(myErrorStatus) { - return; - } - if (myShapeType==TopAbs_EDGE) { - return; - } - // - // 3 - ProcessFaces(); - if(myErrorStatus) { - return; - } - if (myShapeType==TopAbs_FACE) { - return; - } - // - // 4 - ProcessSolids(); - // -} -//======================================================================= -//function : CheckData -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::CheckData() -{ - Standard_Integer iErr; - // - myErrorStatus=0; - // - if(myClsf.IsNull()) { - myErrorStatus=10; // myClsf=NULL - return; - } - // - myClsf->CheckData(); - iErr=myClsf->ErrorStatus(); - if (iErr) { - myErrorStatus=41; // invalid data for classifier - return; - } - // - if (myShape.IsNull()) { - myErrorStatus=11; // myShape=NULL - return; - } - // - if (!(myShapeType==TopAbs_VERTEX || - myShapeType==TopAbs_EDGE || - myShapeType==TopAbs_FACE || - myShapeType==TopAbs_SOLID)) { - myErrorStatus=12; // unallowed sub-shape type - return; - } - // - if (myState==GEOMAlgo_ST_UNKNOWN || - myState==GEOMAlgo_ST_INOUT) { - myErrorStatus=13; // unallowed state type - return; - } -} -//======================================================================= -//function : ProcessVertices -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::ProcessVertices() -{ - myErrorStatus=0; - // - Standard_Boolean bIsConformState; - Standard_Integer i, aNb, iErr; - gp_Pnt aP; - TopTools_IndexedMapOfShape aM; - TopAbs_State aSt; - // - TopExp::MapShapes(myShape, TopAbs_VERTEX, aM); - aNb=aM.Extent(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Vertex& aV=TopoDS::Vertex(aM(i)); - aP=BRep_Tool::Pnt(aV); - // - myClsf->SetPnt(aP); - myClsf->Perform(); - iErr=myClsf->ErrorStatus(); - if (iErr) { - myErrorStatus=40; // point can not be classified - return; - } - // - aSt=myClsf->State(); - bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); - // - if (myShapeType==TopAbs_VERTEX){ - if (bIsConformState) { - myMSS.Add(aV, aSt); - } - } - else if (bIsConformState || aSt==TopAbs_ON) { - myMSS.Add(aV, aSt); - } - } -} -//======================================================================= -//function : ProcessEdges -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::ProcessEdges() -{ - myErrorStatus=0; - // - Standard_Boolean bIsConformState, bIsToBreak; - Standard_Integer i, aNb, iCnt, iErr; - TopAbs_State aSt; - TopTools_IndexedMapOfShape aM; - TopExp_Explorer aExp; - GEOMAlgo_ListIteratorOfListOfPnt aIt; - // - TopExp::MapShapes(myShape, TopAbs_EDGE, aM); - aNb=aM.Extent(); - for (i=1; i<=aNb; ++i) { - GEOMAlgo_ListOfPnt aLP; - GEOMAlgo_StateCollector aSC; - // - const TopoDS_Edge& aE=TopoDS::Edge(aM(i)); - // - aExp.Init(aE, TopAbs_VERTEX); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aV=aExp.Current(); - // - bIsConformState=myMSS.Contains(aV); - if (!bIsConformState) { - break;// vertex has non-conformed state - } - else { - aSt=myMSS.FindFromKey(aV); - aSC.AppendState(aSt); - } - } - // - if (!bIsConformState) { - continue; // vertex has non-conformed state,skip edge - } - // - if (BRep_Tool::Degenerated(aE)) { - myMSS.Add(aE, aSt); - continue; - } - // - if (myState==GEOMAlgo_ST_ON) { - Standard_Boolean bCanBeON; - Standard_Real aT1, aT2; - Handle(Geom_Curve) aC; - // - aC=BRep_Tool::Curve(aE, aT1, aT2); - bCanBeON=myClsf->CanBeON(aC); - if(!bCanBeON) { - continue; - } - } - // - InnerPoints(aE, aLP); - if (myErrorStatus) { - return; - } - // - bIsConformState=Standard_True; - aIt.Initialize(aLP); - for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { - if (myNbPntsMax) { - if (iCnt > myNbPntsMax) { - break; - } - } - // - const gp_Pnt& aP=aIt.Value(); - // - myClsf->SetPnt(aP); - myClsf->Perform(); - iErr=myClsf->ErrorStatus(); - if (iErr) { - myErrorStatus=40; // point can not be classified - return; - } - // - aSt=myClsf->State(); - // - bIsToBreak=aSC.AppendState(aSt); - if (bIsToBreak) { - break; - } - } - // - aSt=aSC.State(); - // - bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); - if (myShapeType==TopAbs_EDGE) { - if (bIsConformState) { - myMSS.Add(aE, aSt); - } - } - else if (bIsConformState || aSt==TopAbs_ON) { - myMSS.Add(aE, aSt); - } - } // for (i=1; i<=aNb; ++i) next edge -} -//======================================================================= -//function : ProcessFaces -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::ProcessFaces() -{ - myErrorStatus=0; - // - Standard_Boolean bIsConformState, bIsToBreak, bCanBeON; - Standard_Integer i, aNbF, iCnt, iErr; - TopAbs_State aSt; - TopTools_IndexedMapOfShape aM; - TopExp_Explorer aExp; - GEOMAlgo_ListIteratorOfListOfPnt aIt; - // - TopExp::MapShapes(myShape, TopAbs_FACE, aM); - aNbF=aM.Extent(); - for (i=1; i<=aNbF; ++i) { - GEOMAlgo_StateCollector aSC; - GEOMAlgo_ListOfPnt aLP; - // - const TopoDS_Face& aF=TopoDS::Face(aM(i)); - // - if (myState==GEOMAlgo_ST_ON) { - Handle(Geom_Surface) aS; - // - aS=BRep_Tool::Surface(aF); - bCanBeON=myClsf->CanBeON(aS); - if(!bCanBeON) { - continue; - } - } - // - aExp.Init(aF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aE=aExp.Current(); - bIsConformState=myMSS.Contains(aE); - if (!bIsConformState) { - break;// edge has non-conformed state - } - else { - aSt=myMSS.FindFromKey(aE); - aSC.AppendState(aSt); - } - } - // - if (!bIsConformState) { - continue; // edge has non-conformed state,skip face - } - // - InnerPoints(aF, aLP); - if (myErrorStatus) { - return; - } - // - bIsConformState=Standard_True; - aIt.Initialize(aLP); - for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { - if (myNbPntsMax) { - if (iCnt > myNbPntsMax) { - break; - } - } - // - const gp_Pnt& aP=aIt.Value(); - // - myClsf->SetPnt(aP); - myClsf->Perform(); - iErr=myClsf->ErrorStatus(); - if (iErr) { - myErrorStatus=40; // point can not be classified - return; - } - // - aSt=myClsf->State(); - // - bIsToBreak=aSC.AppendState(aSt); - if (bIsToBreak) { - break; - } - } - // - aSt=aSC.State(); - // - bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); - if (myShapeType==TopAbs_FACE) { - if (bIsConformState) { - myMSS.Add(aF, aSt); - } - } - else if (bIsConformState || aSt==TopAbs_ON) { - myMSS.Add(aF, aSt); - } - }// for (i=1; i<=aNb; ++i) next face -} -//======================================================================= -//function : ProcessSolids -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::ProcessSolids() -{ - myErrorStatus=0; - // - Standard_Boolean bIsConformState; - Standard_Integer i, aNbS, j, aNbF; - TopTools_IndexedMapOfShape aM, aMF; - TopAbs_State aSt; - // - TopExp::MapShapes(myShape, TopAbs_SOLID, aM); - aNbS=aM.Extent(); - for (i=1; i<=aNbS; ++i) { - GEOMAlgo_StateCollector aSC; - // - const TopoDS_Shape& aSd=aM(i); - aMF.Clear(); - TopExp::MapShapes(aSd, TopAbs_FACE, aMF); - aNbF=aMF.Extent(); - for (j=1; j<=aNbF; ++j) { - const TopoDS_Shape& aF=aMF(j); - bIsConformState=myMSS.Contains(aF); - if (!bIsConformState) { - break;// face has non-conformed state - } - else { - aSt=myMSS.FindFromKey(aF); - aSC.AppendState(aSt); - } - } - // - if (!bIsConformState) { - continue; // face has non-conformed state,skip solid - } - // - aSt=aSC.State(); - // - bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); - if (bIsConformState) { - myMSS.Add(aSd, aSt); - } - } -} -// -//======================================================================= -//function : InnerPoints -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF, - GEOMAlgo_ListOfPnt& aLP) -{ - myErrorStatus=0; - // - Standard_Integer j, j1, j2, k, n[4], aNbLinks, aNx, aNb, iCnt;//, aNbMax, *pIds; - TopLoc_Location aLoc; - Handle(Poly_Triangulation) aTRF; - TColStd_MapOfInteger aMBN; - GEOMAlgo_DataMapOfPassKeyInteger aMPKI; - GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger aIt; - gp_Pnt aP, aP1, aP2; - // - aLP.Clear(); - // - aTRF=BRep_Tool::Triangulation(aF, aLoc); - if (aTRF.IsNull()) { - if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aF)) { - myWarningStatus=20; // no triangulation found - return; - } - aTRF=BRep_Tool::Triangulation(aF, aLoc); - } - // - const gp_Trsf& aTrsf=aLoc.Transformation(); - const Poly_Array1OfTriangle& aTrs=aTRF->Triangles(); - const TColgp_Array1OfPnt& aNodes=aTRF->Nodes(); - // - // map link/nbtriangles - j1=aTrs.Lower(); - j2=aTrs.Upper(); - for (j=j1; j<=j2; ++j) { - const Poly_Triangle& aTr=aTrs(j); - aTr.Get(n[0], n[1], n[2]); - n[3]=n[0]; - for (k=0; k<3; ++k) { - GEOMAlgo_PassKey aPK; - // - aPK.SetIds(n[k], n[k+1]); - if (aMPKI.IsBound(aPK)) { - Standard_Integer& iCntX=aMPKI.ChangeFind(aPK); - ++iCntX; - } - else { - aMPKI.Bind(aPK, 1); - } - } - } - // - // boundary nodes aMBN - aNbLinks=aMPKI.Extent(); - aIt.Initialize(aMPKI); - for (; aIt.More(); aIt.Next()) { - 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 - } - } - // - // inner nodes=all_nodes - boundary_nodes - j1=aNodes.Lower(); - j2=aNodes.Upper(); - for (j=j1; j<=j2; ++j) { - if (!aMBN.Contains(j)) { - aP=aNodes(j).Transformed(aTrsf); - aLP.Append(aP); - } - } - // - aNb=aLP.Extent(); - // - if (!aNb && myNbPntsMin) { - // try to fill it yourself - Standard_Boolean bIsDone; - Standard_Integer aN1, aN2; - Handle(Geom_Surface) aS; - GeomAdaptor_Surface aGAS; - GeomAbs_SurfaceType aType; - // - aS=BRep_Tool::Surface(aF); - aGAS.Load(aS); - aType=aGAS.GetType(); - if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) { - // inner links - aNbLinks=aMPKI.Extent(); - aIt.Initialize(aMPKI); - for (; aIt.More(); aIt.Next()) { - iCnt=aIt.Value(); - if (iCnt>1) { - // 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); - // - if (aType==GeomAbs_Cylinder) { - Standard_Real aTolSM; - gp_Cylinder aCyl; - // - aTolSM=1.523e-6;//~1.-cos(0.1 deg) - aCyl=aGAS.Cylinder(); - if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) { - continue; - } - } - // - BRepLib_MakeEdge aBME(aP1, aP2); - bIsDone=aBME.IsDone(); - if (!bIsDone) { - myErrorStatus=30; //can not obtain the line fron the link - return; - } - // - const TopoDS_Shape& aSx=aBME.Shape(); - const TopoDS_Edge& aE=TopoDS::Edge(aSx); - // - InnerPoints(aE, myNbPntsMin, aLP); - break; - }// if (iCnt>1) - }// for (; aIt.More(); aIt.Next()) - }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) - }// if (!aNb && myNbPntsMin) { -} -//======================================================================= -//function : InnerPoints -//purpose : -//======================================================================= - void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE, - GEOMAlgo_ListOfPnt& aLP) -{ - myErrorStatus=0; - // - Standard_Integer j, aNbNodes, aIndex, aNb; - Handle(Poly_PolygonOnTriangulation) aPTE; - Handle(Poly_Triangulation) aTRE; - TopLoc_Location aLoc; - gp_Pnt aP; - // - aLP.Clear(); - BRep_Tool::PolygonOnTriangulation(aE, aPTE, aTRE, aLoc); - if (aTRE.IsNull() || aPTE.IsNull()) { - Handle(Poly_Polygon3D) aPE = BRep_Tool::Polygon3D(aE, aLoc); - if (aPE.IsNull()) { - if (!GEOMAlgo_FinderShapeOn::BuildTriangulation(aE)) { - myErrorStatus=20; // no triangulation found - return; - } - aPE = BRep_Tool::Polygon3D(aE, aLoc); - } - const gp_Trsf& aTrsf=aLoc.Transformation(); - const TColgp_Array1OfPnt& aNodes=aPE->Nodes(); - // - aNbNodes=aPE->NbNodes(); - Standard_Integer low = aNodes.Lower(), up = aNodes.Upper(); - for (j=low+1; jNodes(); - // - aNbNodes=aPTE->NbNodes(); - const TColStd_Array1OfInteger& aInds=aPTE->Nodes(); - for (j=2; jD0(aT, aP); - aLP.Append(aP); - } -} - -// -// myErrorStatus : -// -// 10 -myClsf=NULL -// 11 -myShape=NULL -// 12 -unallowed type of sub-shapes -// 13 -unallowed state -// 15 -unallowed surface type -// 20- no triangulation found -// 30- can not obtain the line from the link -// 40- point can not be classified -// 41- invalid data for classifier diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn2.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn2.hxx deleted file mode 100644 index a70d04e2c..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOn2.hxx +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_FinderShapeOn2.hxx -// Created: Fri Mar 4 10:31:06 2005 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_FinderShapeOn2_HeaderFile -#define _GEOMAlgo_FinderShapeOn2_HeaderFile - -#include -#include -#include -#include -#include -//#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_FinderShapeOn2 -//purpose : -//======================================================================= -class GEOMAlgo_FinderShapeOn2 : public GEOMAlgo_ShapeAlgo -{ - public: - Standard_EXPORT - GEOMAlgo_FinderShapeOn2(); - - Standard_EXPORT - virtual ~GEOMAlgo_FinderShapeOn2(); - - Standard_EXPORT - void SetClsf(const Handle(GEOMAlgo_Clsf)& aClsf) ; - - Standard_EXPORT - const Handle_GEOMAlgo_Clsf& Clsf() const; - - Standard_EXPORT - void SetShapeType(const TopAbs_ShapeEnum aST) ; - - Standard_EXPORT - TopAbs_ShapeEnum ShapeType() const; - - Standard_EXPORT - void SetState(const GEOMAlgo_State aSF) ; - - Standard_EXPORT - GEOMAlgo_State State() const; - - 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 - virtual void Perform() ; - - Standard_EXPORT - const TopTools_ListOfShape& Shapes() const; - - Standard_EXPORT - const GEOMAlgo_IndexedDataMapOfShapeState& MSS() const; - -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) ; - - - TopAbs_ShapeEnum myShapeType; - GEOMAlgo_State myState; - Standard_Integer myNbPntsMin; - Standard_Integer myNbPntsMax; - Handle_GEOMAlgo_Clsf myClsf; - TopTools_ListOfShape myLS; - GEOMAlgo_IndexedDataMapOfShapeState myMSS; -}; - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOnQuad.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOnQuad.cxx deleted file mode 100644 index 2c4d0afea..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOnQuad.cxx +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File : GEOMAlgo_FinderShapeOnQuad.cxx -// Created : Mon Oct 17 17:31:45 2005 -// Author : Edward AGAPOV (eap) -// -#include "GEOMAlgo_FinderShapeOnQuad.hxx" -#include "GEOMAlgo_SurfaceTools.hxx" - -#include -#include -#include - - -GEOMAlgo_FinderShapeOnQuad::GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint, - const gp_Pnt & theTopRigthPoint, - const gp_Pnt & theBottomLeftPoint, - const gp_Pnt & theBottomRigthPoint) -{ - myPoints.resize(6); - myPoints[0] = theTopLeftPoint ; - myPoints[1] = theTopRigthPoint ; - myPoints[2] = theBottomRigthPoint; - myPoints[3] = theBottomLeftPoint ; - myPoints[4] = myPoints[0]; - myPoints[5] = myPoints[1]; - - // Find plane normal defined by corner points, it will be used to define a plane - // for each quadrangle side. - myQuadNormal.SetCoord (0,0,0); - for ( int i = 1; i <= 4; ++i ) - myQuadNormal += gp_Vec( myPoints[i], myPoints[i+1] ) ^ gp_Vec( myPoints[i], myPoints[i-1] ); - //std::cout< point2 vector - gp_Vec aSideVec( myPoints[ i ], myPoints[ i + 1 ]); - //std::cout<<" Y Vec : "<Axis().Direction(); - gp_Vec aSideVec = myQuadNormal ^ aSideNorm; - gp_Vec c1p ( myPoints[i], aP ); - gp_Vec pc2 ( aP, myPoints[i+1] ); - if ( aSideVec * c1p >= 0. && aSideVec * pc2 >= 0. ) - return TopAbs_ON; - // consider to be IN (???????????) - //nbIn += myConcaveSide[i] ? 0.5 : 1.0; - } - } - Standard_Real inThreshold = myPlanes.size(); // usually 4.0 - if ( myConcaveQuad ) - inThreshold = 2.5; // 1.0 + 1.0 + 0.5 - - if ( nbIn >= inThreshold ) - return TopAbs_IN; - - return TopAbs_OUT; -} - diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOnQuad.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOnQuad.hxx deleted file mode 100644 index e2239123b..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_FinderShapeOnQuad.hxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File : GEOMAlgo_FinderShapeOnQuad.hxx -// Created : Mon Oct 17 17:15:59 2005 -// Author : Edward AGAPOV (eap) -// -#ifndef GEOMAlgo_FinderShapeOnQuad_HeaderFile -#define GEOMAlgo_FinderShapeOnQuad_HeaderFile - -#include "GEOMAlgo_FinderShapeOn1.hxx" - -#include - -#include - - -class GEOMAlgo_FinderShapeOnQuad: public GEOMAlgo_FinderShapeOn1 -{ -public: - - Standard_EXPORT - GEOMAlgo_FinderShapeOnQuad(const gp_Pnt & theTopLeftPoint, - const gp_Pnt & theTopRigthPoint, - const gp_Pnt & theBottomLeftPoint, - const gp_Pnt & theBottomRigthPoint); - -protected: - - virtual void CheckData() ; - - virtual TopAbs_State GetPointState(const gp_Pnt& aP) ; - -private: - - bool myConcaveQuad; - std::vector myConcaveSide; - std::vector myPoints; - std::vector myPlanes; - gp_Vec myQuadNormal; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace.cxx deleted file mode 100644 index 852f600e5..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace.cxx +++ /dev/null @@ -1,1151 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_GetInPlace.cxx -// Created: -// Author: Peter KURNEV - -#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 - - -static - void MapBRepShapes(const TopoDS_Shape& aS, - TopTools_IndexedMapOfShape& aM); - - -//======================================================================= -//function : GEOMAlgo_GetInPlace -//purpose : -//======================================================================= -GEOMAlgo_GetInPlace::GEOMAlgo_GetInPlace() -: - GEOMAlgo_GluerAlgo(), - GEOMAlgo_Algo() -{ - myTolerance=0.0001; - myTolMass=0.0001; - myTolCG=0.0001; - myFound=Standard_False; - myCheckGeometry=Standard_True; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_GetInPlace::~GEOMAlgo_GetInPlace() -{ -} -//======================================================================= -//function : SetTolMass -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::SetTolMass(const Standard_Real theTol) -{ - myTolMass=theTol; -} -//======================================================================= -//function : TolMass -//purpose : -//======================================================================= -Standard_Real GEOMAlgo_GetInPlace::TolMass()const -{ - return myTolMass; -} -//======================================================================= -//function : SetTolCG -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::SetTolCG(const Standard_Real theTol) -{ - myTolCG=theTol; -} -//======================================================================= -//function : TolCG -//purpose : -//======================================================================= -Standard_Real GEOMAlgo_GetInPlace::TolCG()const -{ - return myTolCG; -} -//======================================================================= -//function : IsFound -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_GetInPlace::IsFound()const -{ - return myFound; -} -//======================================================================= -//function : SetShapeWhere -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::SetShapeWhere(const TopoDS_Shape& theShape) -{ - myShapeWhere=theShape; -} -//======================================================================= -//function : ShapeWhere -//purpose : -//======================================================================= -const TopoDS_Shape& GEOMAlgo_GetInPlace::ShapeWhere()const -{ - return myShapeWhere; -} -//======================================================================= -//function : ShapesIn -//purpose : -//======================================================================= -const GEOMAlgo_DataMapOfShapeMapOfShape& GEOMAlgo_GetInPlace::ShapesIn()const -{ - return myShapesIn; -} -//======================================================================= -//function : ShapesOn -//purpose : -//======================================================================= -const GEOMAlgo_DataMapOfShapeMapOfShape& GEOMAlgo_GetInPlace::ShapesOn()const -{ - return myShapesOn; -} -//======================================================================= -//function : Clear -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::Clear() -{ - myErrorStatus=0; - myWarningStatus=0; - // - GEOMAlgo_GluerAlgo::Clear(); - myIterator.Clear(); - myShapesIn.Clear(); - myShapesOn.Clear(); - myMapShapePnt.Clear(); -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::Perform() -{ - myFound=Standard_False; - myErrorStatus=0; - myWarningStatus=0; - // - Clear(); - if (myErrorStatus) { - return; - } - // - CheckData(); - if (myErrorStatus) { - return; - } - // - // Initialize the context - GEOMAlgo_GluerAlgo::Perform(); - // - Intersect(); - if (myErrorStatus) { - return; - } - // - PerformVV(); - if (myErrorStatus) { - return; - } - // - FillEdgesOn(); - if (myErrorStatus) { - return; - } - // - PerformVE(); - if (myErrorStatus) { - return; - } - // - PerformEE(); - if (myErrorStatus) { - return; - } - // - PerformVF(); - if (myErrorStatus) { - return; - } - // - FillFacesOn(); - if (myErrorStatus) { - return; - } - // - PerformEF(); - if (myErrorStatus) { - return; - } - // - PerformFF(); - if (myErrorStatus) { - return; - } - // - FillSolidsOn(); - if (myErrorStatus) { - return; - } - // - PerformZF(); - if (myErrorStatus) { - return; - } - // - PerformZZ(); - if (myErrorStatus) { - return; - } - // - FillImages(); - if (myErrorStatus) { - return; - } - // - CheckGProps(); - if (myErrorStatus) { - return; - } -} -//======================================================================= -//function : CheckData -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::CheckData() -{ - myErrorStatus=0; - myWarningStatus=0; - // - if (myArgument.IsNull()) { - myErrorStatus=2; - return; - } - // - if (myShapeWhere.IsNull()) { - myErrorStatus=3; - return; - } -} -//======================================================================= -//function : Intersect -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::Intersect() -{ - Standard_Integer i, j, aNbS1, aNbS2, aNbSD; - TColStd_ListIteratorOfListOfInteger aItLI; - TopTools_IndexedMapOfShape aMS1, aMS2; - TopTools_DataMapOfShapeListOfShape aDMSLS; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS; - TopTools_ListIteratorOfListOfShape aItLS; - NMTTools_CoupleOfShape aCS; - // - NMTDS_BoxBndTreeSelector aSelector; - NMTDS_BoxBndTree aBBTree; - NCollection_UBTreeFiller aTreeFiller(aBBTree); - // - myErrorStatus=0; - myWarningStatus=0; - // - myIterator.Clear(); - // - MapBRepShapes(myArgument, aMS1); - aNbS1=aMS1.Extent(); - for (i=1; i<=aNbS1; ++i) { - Bnd_Box aBox1; - // - const TopoDS_Shape& aS1=aMS1(i); - BRepBndLib::Add(aS1, aBox1); - //modified by NIZNHY-PKV Fri Jun 10 08:20:03 2011f - //aBox1.SetGap(myTolerance); - aBox1.Enlarge(myTolerance); - //modified by NIZNHY-PKV Fri Jun 10 08:20:06 2011t - // - aTreeFiller.Add(i, aBox1); - } - // - aTreeFiller.Fill(); - // - MapBRepShapes(myShapeWhere, aMS2); - aNbS2=aMS2.Extent(); - for (j=1; j<=aNbS2; ++j) { - Bnd_Box aBox2; - // - const TopoDS_Shape& aS2=aMS2(j); - BRepBndLib::Add(aS2, aBox2); - //modified by NIZNHY-PKV Fri Jun 10 08:20:23 2011f - //aBox2.SetGap(myTolerance); - aBox2.Enlarge(myTolerance); - //modified by NIZNHY-PKV Fri Jun 10 08:20:25 2011t - // - aSelector.Clear(); - aSelector.SetBox(aBox2); - aNbSD=aBBTree.Select(aSelector); - if (!aNbSD) { - continue; // it should not be - } - // - const TColStd_ListOfInteger& aLI=aSelector.Indices(); - aItLI.Initialize(aLI); - for (; aItLI.More(); aItLI.Next()) { - i=aItLI.Value(); - const TopoDS_Shape& aS1=aMS1(i); - // - if (aDMSLS.IsBound(aS1)) { - TopTools_ListOfShape& aLS=aDMSLS.ChangeFind(aS1); - aLS.Append(aS2); - } - else { - TopTools_ListOfShape aLS; - // - aLS.Append(aS2); - aDMSLS.Bind(aS1, aLS); - } - } - }// for (j=1; j<=aNbS2; ++j) { - // - aItDMSLS.Initialize(aDMSLS); - for (; aItDMSLS.More(); aItDMSLS.Next()) { - const TopoDS_Shape& aS1=aItDMSLS.Key(); - const TopTools_ListOfShape& aLS2=aItDMSLS.Value(); - aCS.SetShape1(aS1); - aItLS.Initialize(aLS2); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aS2=aItLS.Value(); - aCS.SetShape2(aS2); - myIterator.AppendPair(aCS); - } - } -} -//======================================================================= -//function : PerformVV -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::PerformVV() -{ - myErrorStatus=0; - myWarningStatus=0; - // - myIterator.Initialize(TopAbs_VERTEX, TopAbs_VERTEX); - for (; myIterator.More(); myIterator.Next()) { - const NMTTools_CoupleOfShape& aCS=myIterator.Value(); - const TopoDS_Shape& aV1=aCS.Shape1(); - const TopoDS_Shape& aV2=aCS.Shape2(); - // - FillShapesOn(aV1, aV2); - } -} -//======================================================================= -//function : FillEdgesOn -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::FillEdgesOn() -{ - Standard_Integer i, aNbE; - TopoDS_Iterator aIt; - TopTools_IndexedMapOfShape aME; - TopTools_MapIteratorOfMapOfShape aItMS; - // - TopExp::MapShapes(myArgument, TopAbs_EDGE, aME); - aNbE=aME.Extent(); - for (i=1; i<=aNbE; ++i) { - const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aME(i)); - if (BRep_Tool::Degenerated(aE1)) { - continue; - } - // - aIt.Initialize(aE1); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aV1=aIt.Value(); - if (myShapesOn.IsBound(aV1)) { - const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aV1); - //aNbSOn=aMSOn.Extent(); - aItMS.Initialize(aMSOn); - for (; aItMS.More(); aItMS.Next()) { - const TopoDS_Shape& aV2=aItMS.Key(); - FillShapesOn(aE1, aV2); - } - } - } - } -} -//======================================================================= -//function : PerformVE -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::PerformVE() -{ - Standard_Boolean bFound; - // - myErrorStatus=0; - myWarningStatus=0; - // - // 2. Fill Shapes In - myIterator.Initialize(TopAbs_EDGE, TopAbs_VERTEX); - for (; myIterator.More(); myIterator.Next()) { - const NMTTools_CoupleOfShape& aCS=myIterator.Value(); - const TopoDS_Shape& aE1=aCS.Shape1(); - const TopoDS_Shape& aV2=aCS.Shape2(); - // - if (myShapesOn.IsBound(aE1)) { - const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aE1); - if (aMSOn.Contains(aV2)) { - continue; - } - } - // - bFound=CheckCoincidence(aE1, aV2); - if (myErrorStatus) { - return; - } - if (bFound) { - FillShapesIn(aE1, aV2); - } - } -} -//======================================================================= -//function : PerformEE -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::PerformEE() -{ - Standard_Boolean bHasOn, bHasIn, bFound; - TopoDS_Iterator aIt; - TopTools_MapOfShape aMSX; - // - myErrorStatus=0; - myWarningStatus=0; - // - myIterator.Initialize(TopAbs_EDGE, TopAbs_EDGE); - for (; myIterator.More(); myIterator.Next()) { - const NMTTools_CoupleOfShape& aCS=myIterator.Value(); - const TopoDS_Shape& aE1=aCS.Shape1(); - const TopoDS_Shape& aE2=aCS.Shape2(); - // - bHasOn=myShapesOn.IsBound(aE1); - bHasIn=myShapesIn.IsBound(aE1); - const TopTools_MapOfShape& aMSOn=(bHasOn) ? myShapesOn.Find(aE1) : aMSX; - const TopTools_MapOfShape& aMSIn=(bHasIn) ? myShapesIn.Find(aE1) : aMSX; - // - bFound=Standard_True; - aIt.Initialize(aE2); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aV2=aIt.Value(); - if (!(aMSOn.Contains(aV2) || aMSIn.Contains(aV2))) { - bFound=!bFound; - break; - } - } - if (!bFound) { - continue; - } - // - bFound=CheckCoincidence(aE1, aE2); - if (myErrorStatus) { - return; - } - if (bFound) { - FillShapesIn(aE1, aE2); - } - } -} -//======================================================================= -//function : PerformVF -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::PerformVF() -{ - Standard_Boolean bHasOn, bHasIn, bFound; - Standard_Integer i, aNbE; - TopTools_MapOfShape aMSX; - TopTools_IndexedMapOfShape aME; - // - myErrorStatus=0; - myWarningStatus=0; - // - myIterator.Initialize(TopAbs_FACE, TopAbs_VERTEX); - for (; myIterator.More(); myIterator.Next()) { - const NMTTools_CoupleOfShape& aCS=myIterator.Value(); - const TopoDS_Shape& aF1=aCS.Shape1(); - const TopoDS_Shape& aV2=aCS.Shape2(); - // - aME.Clear(); - TopExp::MapShapes(aF1, TopAbs_EDGE, aME); - // - bFound=Standard_False; - aNbE=aME.Extent(); - for (i=1; i<=aNbE; ++i) { - const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aME(i)); - if (BRep_Tool::Degenerated(aE1)) { - continue; - } - // - bHasOn=myShapesOn.IsBound(aE1); - bHasIn=myShapesIn.IsBound(aE1); - const TopTools_MapOfShape& aMSOn=(bHasOn) ? myShapesOn.Find(aE1) : aMSX; - const TopTools_MapOfShape& aMSIn=(bHasIn) ? myShapesIn.Find(aE1) : aMSX; - bFound= (aMSOn.Contains(aV2) || aMSIn.Contains(aV2)); - if (bFound) { - break; - } - } - // - if (bFound) { - continue; - } - // - bFound=CheckCoincidence(aF1, aV2); - if (myErrorStatus) { - return; - } - if (bFound) { - FillShapesIn(aF1, aV2); - } - } -} -//======================================================================= -//function : FillFacesOn -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::FillFacesOn() -{ - Standard_Integer i, j, aNbF, aNbE; - TopoDS_Iterator aIt; - TopTools_IndexedMapOfShape aMF, aME; - TopTools_MapIteratorOfMapOfShape aItMS; - // - TopExp::MapShapes(myArgument, TopAbs_FACE, aMF); - aNbF=aMF.Extent(); - for (i=1; i<=aNbF; ++i) { - const TopoDS_Face& aF1=*((TopoDS_Face*)&aMF(i)); - // - aME.Clear(); - TopExp::MapShapes(aF1, TopAbs_EDGE, aME); - aNbE=aME.Extent(); - for (j=1; j<=aNbE; ++j) { - const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aME(j)); - if (BRep_Tool::Degenerated(aE1)) { - continue; - } - // - if (myShapesOn.IsBound(aE1)) { - const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aE1); - aItMS.Initialize(aMSOn); - for (; aItMS.More(); aItMS.Next()) { - const TopoDS_Shape& aS2=aItMS.Key(); - FillShapesOn(aF1, aS2); - } - } - // - if (myShapesIn.IsBound(aE1)) { - const TopTools_MapOfShape& aMSIn=myShapesIn.Find(aE1); - aItMS.Initialize(aMSIn); - for (; aItMS.More(); aItMS.Next()) { - const TopoDS_Shape& aS2=aItMS.Key(); - FillShapesOn(aF1, aS2); - } - } - }//for (j=1; j<=aNbE; ++j) { - }//for (i=1; i<=aNbF; ++i) { -} -//======================================================================= -//function : PerformEF -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::PerformEF() -{ - Standard_Boolean bFound, bHasOnF, bHasInF; - TopoDS_Iterator aIt; - TopTools_MapOfShape aMSX; - // - myErrorStatus=0; - myWarningStatus=0; - // - myIterator.Initialize(TopAbs_FACE, TopAbs_EDGE); - for (; myIterator.More(); myIterator.Next()) { - const NMTTools_CoupleOfShape& aCS=myIterator.Value(); - const TopoDS_Shape& aF1=aCS.Shape1(); - const TopoDS_Shape& aE2=aCS.Shape2(); - // - // 1. - bHasOnF=myShapesOn.IsBound(aF1); - const TopTools_MapOfShape& aMSOnF=(bHasOnF) ? myShapesOn.Find(aF1) : aMSX; - bFound=aMSOnF.Contains(aE2); - if (bFound) { - continue; - } - // - // 2. - bHasInF=myShapesIn.IsBound(aF1); - const TopTools_MapOfShape& aMSInF=(bHasInF) ? myShapesIn.Find(aF1) : aMSX; - // - aIt.Initialize(aE2); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aV2=aIt.Value(); - bFound=(aMSOnF.Contains(aV2) || aMSInF.Contains(aV2)); - if (!bFound) { - break; - } - } - if (!bFound) { - continue; - } - //------------------------------ - bFound=CheckCoincidence(aF1, aE2); - if (myErrorStatus) { - return; - } - if (bFound) { - FillShapesIn(aF1, aE2); - } - } -} -//======================================================================= -//function : PerformFF -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::PerformFF() -{ - Standard_Boolean bFound, bHasOnF, bHasInF; - Standard_Integer i, aNbS2; - TopTools_MapOfShape aMSX; - TopTools_IndexedMapOfShape aMS2; - // - myErrorStatus=0; - myWarningStatus=0; - // - myIterator.Initialize(TopAbs_FACE, TopAbs_FACE); - for (; myIterator.More(); myIterator.Next()) { - const NMTTools_CoupleOfShape& aCS=myIterator.Value(); - const TopoDS_Shape& aF1=aCS.Shape1(); - const TopoDS_Shape& aF2=aCS.Shape2(); - // - bHasOnF=myShapesOn.IsBound(aF1); - const TopTools_MapOfShape& aMSOnF=(bHasOnF) ? myShapesOn.Find(aF1) : aMSX; - // - bHasInF=myShapesIn.IsBound(aF1); - const TopTools_MapOfShape& aMSInF=(bHasInF) ? myShapesIn.Find(aF1) : aMSX; - // - aMS2.Clear(); - MapBRepShapes(aF2, aMS2); - // - bFound=Standard_False; - aNbS2=aMS2.Extent(); - for (i=1; i<=aNbS2; ++i) { - const TopoDS_Shape& aS2=aMS2(i); - if (aS2.IsSame(aF2)) { - continue; - } - bFound=(aMSOnF.Contains(aS2) || aMSInF.Contains(aS2)); - if (!bFound) { - break; - } - } - if (!bFound) { - continue; - } - // - bFound=CheckCoincidence(aF1, aF2); - if (myErrorStatus) { - return; - } - if (bFound) { - FillShapesIn(aF1, aF2); - } - } -} -//======================================================================= -//function : FillSolidsOn -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::FillSolidsOn() -{ - Standard_Integer i, j, aNbS, aNbF; - TopTools_IndexedMapOfShape aMS, aMF; - TopTools_MapIteratorOfMapOfShape aItMS; - // - TopExp::MapShapes(myArgument, TopAbs_SOLID, aMS); - // - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aSD1=aMS(i); - // - aMF.Clear(); - TopExp::MapShapes(aSD1, TopAbs_FACE, aMF); - aNbF=aMF.Extent(); - for (j=1; j<=aNbF; ++j) { - const TopoDS_Shape& aF1=aMF(j); - // - if (myShapesOn.IsBound(aF1)) { - const TopTools_MapOfShape& aMSOn=myShapesOn.Find(aF1); - aItMS.Initialize(aMSOn); - for (; aItMS.More(); aItMS.Next()) { - const TopoDS_Shape& aS2=aItMS.Key(); - FillShapesOn(aSD1, aS2); - } - } - // - if (myShapesIn.IsBound(aF1)) { - const TopTools_MapOfShape& aMSIn=myShapesIn.Find(aF1); - aItMS.Initialize(aMSIn); - for (; aItMS.More(); aItMS.Next()) { - const TopoDS_Shape& aS2=aItMS.Key(); - FillShapesOn(aSD1, aS2); - } - } - }//for (j=1; j<=aNbF; ++j) { - }//for (i=1; i<=aNbS; ++i) { -} -//======================================================================= -//function : PerformZF -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::PerformZF() -{ - Standard_Boolean bFound, bHasOnF; - TopTools_MapOfShape aMSX; - // - myErrorStatus=0; - myWarningStatus=0; - // - myIterator.Initialize(TopAbs_SOLID, TopAbs_FACE); - for (; myIterator.More(); myIterator.Next()) { - const NMTTools_CoupleOfShape& aCS=myIterator.Value(); - const TopoDS_Shape& aSo1=aCS.Shape1(); - const TopoDS_Shape& aF2=aCS.Shape2(); - // - bHasOnF=myShapesOn.IsBound(aSo1); - const TopTools_MapOfShape& aMSOnF=(bHasOnF) ? myShapesOn.Find(aSo1) : aMSX; - bFound=aMSOnF.Contains(aF2); - if (bFound) { - continue; - } - //------------------------------ - bFound=CheckCoincidence(aSo1, aF2); - if (myErrorStatus) { - return; - } - if (bFound) { - FillShapesIn(aSo1, aF2); - } - } -} -//======================================================================= -//function : PerformZZ -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::PerformZZ() -{ - Standard_Boolean bFound, bHasOn, bHasIn; - Standard_Integer i, aNbS2, iCntOn, iCntIn, iCntOut; - TopTools_MapOfShape aMSX; - TopTools_IndexedMapOfShape aMS2; - // - myErrorStatus=0; - myWarningStatus=0; - // - myIterator.Initialize(TopAbs_SOLID, TopAbs_SOLID); - for (; myIterator.More(); myIterator.Next()) { - const NMTTools_CoupleOfShape& aCS=myIterator.Value(); - const TopoDS_Shape& aSo1=aCS.Shape1(); - const TopoDS_Shape& aSo2=aCS.Shape2(); - // - bHasOn=myShapesOn.IsBound(aSo1); - const TopTools_MapOfShape& aMSOn=(bHasOn) ? myShapesOn.Find(aSo1) : aMSX; - // - bHasIn=myShapesIn.IsBound(aSo1); - const TopTools_MapOfShape& aMSIn=(bHasIn) ? myShapesIn.Find(aSo1) : aMSX; - // - aMS2.Clear(); - TopExp::MapShapes(aSo2, TopAbs_FACE, aMS2); - // - iCntIn=0; - iCntOn=0; - iCntOut=0; - bFound=Standard_False; - aNbS2=aMS2.Extent(); - for (i=1; i<=aNbS2; ++i) { - const TopoDS_Shape& aF2=aMS2(i); - // - if (aMSIn.Contains(aF2)) { - ++iCntIn; - bFound=Standard_True; - break; - } - else if (!aMSOn.Contains(aF2)) { - ++iCntOut; - bFound=Standard_False;// out - break; - } - else { - ++iCntOn; //on - } - } - // - if (!bFound && iCntOut) { - continue; - } - // - if (!iCntIn) { - bFound=CheckCoincidence(aSo1, aSo2); - if (myErrorStatus) { - return; - } - } - if (bFound) { - FillShapesIn(aSo1, aSo2); - } - }// for (; myIterator.More(); myIterator.Next()) { -} -//======================================================================= -//function : FillImages -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::FillImages() -{ - Standard_Integer i, aNbS, aNbSx, aNbSi; - TopAbs_ShapeEnum aType; - TopoDS_Iterator aIt; - TopTools_ListOfShape aLSx; - TopTools_ListIteratorOfListOfShape aItLS; - TopTools_IndexedMapOfShape aMS; - TopTools_MapIteratorOfMapOfShape aItMS; - // - myErrorStatus=0; - myWarningStatus=0; - // - myImages.Clear(); - // - // 1. Vertices - aMS.Clear(); - TopExp::MapShapes(myArgument, TopAbs_VERTEX, aMS); - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aV=aMS(i); - if (myShapesOn.IsBound(aV)) { - const TopTools_MapOfShape& aMSx=myShapesOn.Find(aV); - aNbSx=aMSx.Extent(); - // - aLSx.Clear(); - aItMS.Initialize(aMSx); - for (; aItMS.More(); aItMS.Next()) { - const TopoDS_Shape& aVx=aItMS.Key(); - aLSx.Append(aVx); - } - // - myImages.Bind(aV, aLSx); - } - } - // - // 2. Edges - aMS.Clear(); - TopExp::MapShapes(myArgument, TopAbs_EDGE, aMS); - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aE=aMS(i); - if (myShapesIn.IsBound(aE)) { - const TopTools_MapOfShape& aMSx=myShapesIn.Find(aE); - aNbSx=aMSx.Extent(); - // - aLSx.Clear(); - aItMS.Initialize(aMSx); - for (; aItMS.More(); aItMS.Next()) { - const TopoDS_Shape& aEx=aItMS.Key(); - aType=aEx.ShapeType(); - if (aType==TopAbs_EDGE){ - aLSx.Append(aEx); - } - } - // - myImages.Bind(aE, aLSx); - } - } - // - // 3. Wires - aMS.Clear(); - TopExp::MapShapes(myArgument, TopAbs_WIRE, aMS); - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aW=aMS(i); - aLSx.Clear(); - aIt.Initialize(aW); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE=aIt.Value(); - if (myImages.IsBound(aE)) { - const TopTools_ListOfShape& aLSi=myImages.Find(aE); - aNbSi=aLSi.Extent(); - // - aItLS.Initialize(aLSi); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aEi=aItLS.Value(); - aLSx.Append(aEi); - } - } - } - myImages.Bind(aW, aLSx); - } - // - // 4. Faces - aMS.Clear(); - TopExp::MapShapes(myArgument, TopAbs_FACE, aMS); - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aF=aMS(i); - if (myShapesIn.IsBound(aF)) { - const TopTools_MapOfShape& aMSx=myShapesIn.Find(aF); - aNbSx=aMSx.Extent(); - // - aLSx.Clear(); - aItMS.Initialize(aMSx); - for (; aItMS.More(); aItMS.Next()) { - const TopoDS_Shape& aFx=aItMS.Key(); - aType=aFx.ShapeType(); - if (aType==TopAbs_FACE){ - aLSx.Append(aFx); - } - } - // - myImages.Bind(aF, aLSx); - } - } - // - // 5. Shells - aMS.Clear(); - TopExp::MapShapes(myArgument, TopAbs_SHELL, aMS); - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aSh=aMS(i); - aLSx.Clear(); - aIt.Initialize(aSh); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - if (myImages.IsBound(aF)) { - const TopTools_ListOfShape& aLSi=myImages.Find(aF); - aNbSi=aLSi.Extent(); - // - aItLS.Initialize(aLSi); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aFi=aItLS.Value(); - aLSx.Append(aFi); - } - } - } - myImages.Bind(aSh, aLSx); - } - // - // 6. Solids - aMS.Clear(); - TopExp::MapShapes(myArgument, TopAbs_SOLID, aMS); - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aZ=aMS(i); - if (myShapesIn.IsBound(aZ)) { - const TopTools_MapOfShape& aMSx=myShapesIn.Find(aZ); - aNbSx=aMSx.Extent(); - // - aLSx.Clear(); - aItMS.Initialize(aMSx); - for (; aItMS.More(); aItMS.Next()) { - const TopoDS_Shape& aZx=aItMS.Key(); - aType=aZx.ShapeType(); - if (aType==TopAbs_SOLID){ - aLSx.Append(aZx); - } - } - // - myImages.Bind(aZ, aLSx); - } - } - // - // 7. CompSolids - aMS.Clear(); - TopExp::MapShapes(myArgument, TopAbs_COMPSOLID, aMS); - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aCs=aMS(i); - aLSx.Clear(); - aIt.Initialize(aCs); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aZ=aIt.Value(); - if (myImages.IsBound(aZ)) { - const TopTools_ListOfShape& aLSi=myImages.Find(aZ); - aNbSi=aLSi.Extent(); - // - aItLS.Initialize(aLSi); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aZi=aItLS.Value(); - aLSx.Append(aZi); - } - } - } - myImages.Bind(aCs, aLSx); - } - // - // 8. Compounds - aType=myArgument.ShapeType(); - if (aType==TopAbs_COMPOUND) { - FillImagesCompound(myArgument); - } -} -//======================================================================= -//function : FillImagesCompound -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::FillImagesCompound(const TopoDS_Shape& aS) -{ - TopAbs_ShapeEnum aType; - TopoDS_Iterator aIt; - TopTools_ListOfShape aLSx; - TopTools_ListIteratorOfListOfShape aItLS; - // - aIt.Initialize(aS); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSx=aIt.Value(); - aType=aSx.ShapeType(); - // - if (aType==TopAbs_COMPOUND) { - FillImagesCompound(aSx); - } - // - if (myImages.IsBound(aSx)) { - const TopTools_ListOfShape& aLSi=myImages.Find(aSx); - aItLS.Initialize(aLSi); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aSi=aItLS.Value(); - aLSx.Append(aSi); - } - } - } - myImages.Bind(aS, aLSx); -} - -//======================================================================= -//function : FillShapesIn -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::FillShapesIn(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) -{ - if (myShapesIn.IsBound(aS1)) { - TopTools_MapOfShape& aMS=myShapesIn.ChangeFind(aS1); - aMS.Add(aS2); - } - else { - TopTools_MapOfShape aMS; - // - aMS.Add(aS2); - myShapesIn.Bind(aS1, aMS); - } -} -//======================================================================= -//function : FillShapesOn -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::FillShapesOn(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) -{ - if (myShapesOn.IsBound(aS1)) { - TopTools_MapOfShape& aMS=myShapesOn.ChangeFind(aS1); - aMS.Add(aS2); - } - else { - TopTools_MapOfShape aMS; - // - aMS.Add(aS2); - myShapesOn.Bind(aS1, aMS); - } -} -//======================================================================= -//function : MapBRepShapes -//purpose : -//======================================================================= -void MapBRepShapes(const TopoDS_Shape& aS, - TopTools_IndexedMapOfShape& aM) -{ - Standard_Boolean bDegenerated; - TopAbs_ShapeEnum aType; - TopoDS_Iterator aIt; - // - aType=aS.ShapeType(); - if (aType==TopAbs_VERTEX || aType==TopAbs_EDGE || - aType==TopAbs_FACE || aType==TopAbs_SOLID) { - bDegenerated=Standard_False; - if (aType==TopAbs_EDGE) { - TopoDS_Edge *pE=(TopoDS_Edge*)&aS; - bDegenerated=BRep_Tool::Degenerated(*pE); - } - if (!bDegenerated) { - aM.Add(aS); - } - } - // - aIt.Initialize(aS); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSx=aIt.Value(); - aType=aSx.ShapeType(); - MapBRepShapes(aSx, aM); - } -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace.hxx deleted file mode 100644 index a8ff2a558..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace.hxx +++ /dev/null @@ -1,324 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_GetInPlace.hxx -// Created: -// Author: Peter KURNEV - -#ifndef _GEOMAlgo_GetInPlace_HeaderFile -#define _GEOMAlgo_GetInPlace_HeaderFile - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - - -//======================================================================= -/** - * The implementation of iterator of intersected shapes - * for Get In Place Algorithm. - * The intersection is in terms of 3D bounding boxes. - */ -//======================================================================= -//class : GEOMAlgo_GetInPlaceIterator -//purpose : -//======================================================================= -class GEOMAlgo_GetInPlaceIterator { - public: - /** - * Constructor. - */ - //Standard_EXPORT - GEOMAlgo_GetInPlaceIterator(); - - /** - * Destructor. - */ - //Standard_EXPORT - virtual ~GEOMAlgo_GetInPlaceIterator(); - - /** - * Clear the internal content. - */ - //Standard_EXPORT - void Clear() ; - - /** - * Append the pair of intersected shapes. - * @param theCS - * The pair of intersected shapes. - */ - //Standard_EXPORT - void AppendPair(const NMTTools_CoupleOfShape& theCS) ; - - /** - * Initialize the iterator. - * @param theT1 - * The type of (sub)shape What. - * @param theT2 - * The type of (sub)shape Where. - */ - //Standard_EXPORT - void Initialize(const TopAbs_ShapeEnum theT1, - const TopAbs_ShapeEnum theT2) ; - /** - * Check the existence of pairs to iterare. - * @return - * Standard_True if there are pairs to iterare. - */ - //Standard_EXPORT - Standard_Boolean More() const; - - /** - * Shift to the next pair. - */ - //Standard_EXPORT - void Next() ; - - /** - * Returns the pair of intersected shapes. - * @return - * The pair of intersected shapes. - */ - //Standard_EXPORT - const NMTTools_CoupleOfShape& Value() const; - -protected: - Standard_Integer myDim; - NMTTools_ListOfCoupleOfShape myLists[10]; - NMTTools_ListOfCoupleOfShape myEmptyList; - NMTTools_ListIteratorOfListOfCoupleOfShape myIterator; - -private: -}; - - -//======================================================================= -/** - * The implementation of Get In Place Algorithm. - * The algorithm provides the search the argument [What] - * in the shape [Where]. - */ -//======================================================================= -//class : GEOMAlgo_GetInPlace -//purpose : -//======================================================================= -class GEOMAlgo_GetInPlace : public GEOMAlgo_GluerAlgo, - public GEOMAlgo_Algo -{ - public: - /** - * Constructor. - */ - Standard_EXPORT - GEOMAlgo_GetInPlace(); - /** - * Destructor. - */ - Standard_EXPORT - virtual ~GEOMAlgo_GetInPlace(); - /** - * Modifier. Sets the shape where the search is intended. - * @param theShape - * The shape where the search is intended. - */ - Standard_EXPORT - virtual void SetShapeWhere(const TopoDS_Shape& theShape) ; - - /** - * Selector. Returns the shape where the search is intended. - * @return - * The shape where the search is intended. - */ - Standard_EXPORT - const TopoDS_Shape& ShapeWhere() const; - - /** - * Modifier. Sets the tolerance of mass. - * @param theTol - * The value tolerance of mass. - */ - Standard_EXPORT - void SetTolMass(const Standard_Real theTol) ; - - /** - * Selector. Returns the value tolerance of mass. - * @return - * The value tolerance of mass. - */ - Standard_EXPORT - Standard_Real TolMass() const; - - /** - * Modifier. Sets the tolerance of center of gravily. - * @param theTol - * The value tolerance of center of gravily. - */ - Standard_EXPORT - void SetTolCG(const Standard_Real theTol) ; - - /** - * Selector. Returns the tolerance of center of gravily. - * @return - * The value tolerance of center of gravily. - */ - Standard_EXPORT - Standard_Real TolCG() const; - - /** - * Perform the algorithm. - */ - Standard_EXPORT - virtual void Perform() ; - - /** - * Returns state of the search. - * @return - * Standard_True if the argument is found. - */ - Standard_EXPORT - Standard_Boolean IsFound() const; - - /** - * Checks data - */ - Standard_EXPORT - virtual void CheckData() ; - - /** - * Clear the internal content. - */ - Standard_EXPORT - virtual void Clear() ; - - /** - * Returns the map of shapes IN. - * @return - ** Returns the map of shapes IN. - * The Key - the (sub)shape of the argument [What]. - * The Item- the (sub)shapes of the shape [Where] that have - * the state IN in respect of [What]. - */ - Standard_EXPORT - const GEOMAlgo_DataMapOfShapeMapOfShape& ShapesIn() const; - - /** - * Returns the map of shapes ON. - * @return - * Returns the map of shapes ON. - * The Key - the (sub)shape of the argument [What]. - * The Item- the (sub)shapes of the shape [Where] that have - * the state ON in respect of [What]. - */ - Standard_EXPORT - const GEOMAlgo_DataMapOfShapeMapOfShape& ShapesOn() const; - -protected: - Standard_EXPORT - void Intersect() ; - - Standard_EXPORT - void PerformVV() ; - - Standard_EXPORT - void PerformVE() ; - - Standard_EXPORT - void PerformEE() ; - - Standard_EXPORT - void PerformVF() ; - - Standard_EXPORT - void PerformEF() ; - - Standard_EXPORT - void PerformFF() ; - - Standard_EXPORT - void FillEdgesOn() ; - - Standard_EXPORT - void FillFacesOn() ; - - Standard_EXPORT - void FillSolidsOn() ; - - Standard_EXPORT - void PerformZF() ; - - Standard_EXPORT - void PerformZZ() ; - - Standard_EXPORT - void FillImages() ; - - Standard_EXPORT - void FillImagesCompound(const TopoDS_Shape& theS) ; - - Standard_EXPORT - void CheckGProps() ; - - Standard_EXPORT - void CheckGProps(const TopoDS_Shape& theS) ; - - Standard_EXPORT - void FillShapesIn(const TopoDS_Shape& theS1, - const TopoDS_Shape& theS2) ; - - Standard_EXPORT - void FillShapesOn(const TopoDS_Shape& theS1, - const TopoDS_Shape& theS2) ; - - Standard_EXPORT - Standard_Boolean CheckCoincidence(const TopoDS_Shape& theS1, - const TopoDS_Shape& theS2); - - - TopoDS_Shape myShapeWhere; - GEOMAlgo_GetInPlaceIterator myIterator; - GEOMAlgo_DataMapOfShapeMapOfShape myShapesIn; - GEOMAlgo_DataMapOfShapeMapOfShape myShapesOn; - Standard_Real myTolMass; - Standard_Real myTolCG; - Standard_Boolean myFound; - GEOMAlgo_DataMapOfShapePnt myMapShapePnt; - -private: -}; - - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_1.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_1.cxx deleted file mode 100644 index 25f418db4..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_1.cxx +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_GetInPlace_1.cxx -// Author: Peter KURNEV - -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include - -#include -#include - - - -static - Standard_Integer PntInEdge(const TopoDS_Edge& aF, - gp_Pnt& aP); -static - Standard_Integer PntInEdge(const TopoDS_Edge& aF, - gp_Pnt& aP, - Standard_Real& aT); -static - Standard_Integer PntInFace(const TopoDS_Face& aF, - gp_Pnt& aP); -static - Standard_Integer PntInFace(const TopoDS_Face& aF, - gp_Pnt& aP, - gp_Pnt2d& theP2D); -static - Standard_Integer PntInSolid(const TopoDS_Solid& aZ, - const Standard_Real aTol, - gp_Pnt& aP); - - -//======================================================================= -//function : CheckCoincidence -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_GetInPlace::CheckCoincidence(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) -{ - Standard_Boolean bOk; - Standard_Integer iErr; - Standard_Real aTol2; - TopAbs_ShapeEnum aType1, aType2; - TopAbs_State aState; - gp_Pnt aP1, aP2; - // - myErrorStatus=0; - // - iErr=0; - bOk=Standard_False; - aTol2=myTolerance*myTolerance; - aType1=aS1.ShapeType(); - aType2=aS2.ShapeType(); - // - // 1. A point on shape #2 -> aP2 - if (myMapShapePnt.IsBound(aS2)) { - aP2=myMapShapePnt.Find(aS2); - } - else {//else 1 - if (aType2==TopAbs_VERTEX) { - const TopoDS_Vertex& aV2=*((TopoDS_Vertex*)&aS2); - aP2=BRep_Tool::Pnt(aV2); - } - // - else if (aType2==TopAbs_EDGE) { - const TopoDS_Edge& aE2=*((TopoDS_Edge*)&aS2); - iErr=PntInEdge(aE2, aP2); - } - // - else if (aType2==TopAbs_FACE) { - const TopoDS_Face& aF2=*((TopoDS_Face*)&aS2); - iErr=PntInFace(aF2, aP2); - } - // - else if (aType2==TopAbs_SOLID) { - const TopoDS_Solid& aZ2=*((TopoDS_Solid*)&aS2); - iErr=PntInSolid(aZ2, myTolerance, aP2); - } - // - else { - iErr=1; - } - // - if (iErr) { - myErrorStatus=50; - return bOk; - } - // - myMapShapePnt.Bind(aS2, aP2); - } //else 1 - // - // 2. Project the point aP2 on shape #1 and check - if (aType1==TopAbs_EDGE) { - Standard_Integer aNbPoints; - Standard_Real aDmin, aT, aT1, aT2, dT; - // - const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aS1); - // - GeomAPI_ProjectPointOnCurve& aPPC=myContext->ProjPC(aE1); - aPPC.Perform(aP2); - aNbPoints=aPPC.NbPoints(); - if (aNbPoints) { - aDmin=aPPC.LowerDistance(); - aT=aPPC.LowerDistanceParameter(); - if (aDmin < myTolerance) { - dT=1.e-12; - BRep_Tool::Curve(aE1, aT1, aT2); - if(aT > (aT1-dT) && aT < (aT2+dT)) { - bOk=Standard_True; - } - } - } - //else { - // iErr=2; - //} - }//if (aType1==TopAbs_EDGE) { - // - else if (aType1==TopAbs_FACE) { - const TopoDS_Face& aF1=*((TopoDS_Face*)&aS1); - // - bOk=myContext->IsValidPointForFace(aP2, aF1, myTolerance); - } - // - else if (aType1==TopAbs_SOLID) { - const TopoDS_Solid& aZ1=*((TopoDS_Solid*)&aS1); - // - BRepClass3d_SolidClassifier& aSC=myContext->SolidClassifier(aZ1); - aSC.Perform(aP2, myTolerance); - aState=aSC.State(); - bOk=(aState==TopAbs_IN); - } - // - if (iErr) { - myErrorStatus=50; - } - // - return bOk; -} -//======================================================================= -// -//======================================================================= -//function : PntInEdge -//purpose : -//======================================================================= -Standard_Integer PntInEdge(const TopoDS_Edge& aE, - gp_Pnt& aP) - -{ - Standard_Integer iErr; - Standard_Real aT; - // - iErr=PntInEdge(aE, aP, aT); - // - return iErr; -} -//======================================================================= -//function : PntInEdge -//purpose : -//======================================================================= -Standard_Integer PntInEdge(const TopoDS_Edge& aE, - gp_Pnt& aP, - Standard_Real& aT) -{ - Standard_Integer iErr; - Standard_Real aT1, aT2; - Handle(Geom_Curve) aC3D; - // - iErr=0; - // - aC3D=BRep_Tool::Curve(aE, aT1, aT2); - aT=IntTools_Tools::IntermediatePoint(aT1, aT2); - aC3D->D0(aT, aP); - // - return iErr; -} -//======================================================================= -//function : PntInSolid -//purpose : -//======================================================================= -Standard_Integer PntInSolid(const TopoDS_Solid& aZ, - const Standard_Real aTol, - gp_Pnt& aP) -{ - Standard_Integer iErr; - Standard_Real aUx, aVx, aCoef; - gp_Pnt aPx; - gp_Pnt2d aP2Dx; - gp_Vec aDNx; - - TopoDS_Face aF; - TopExp_Explorer aExp; - // - iErr=0; - aCoef=10.; - // - aExp.Init (aZ, TopAbs_FACE); - for (; aExp.More() ; aExp.Next()) { - aF=*((TopoDS_Face*)&aExp.Current()); - break; - } - // - iErr=PntInFace(aF, aPx, aP2Dx); - if (iErr) { - return iErr; - } - // - aP2Dx.Coord(aUx, aVx); - BOPTools_Tools2D::FaceNormal(aF, aUx, aVx, aDNx); - aDNx.Reverse(); - // - aP.SetXYZ(aPx.XYZ()+aCoef*aTol*aDNx.XYZ()); - // - return iErr; -} -//======================================================================= -//function : PntInFace -//purpose : -//======================================================================= -Standard_Integer PntInFace(const TopoDS_Face& aF, - gp_Pnt& aP) -{ - Standard_Integer iErr; - // - gp_Pnt2d aP2Dx; - // - iErr=PntInFace(aF, aP, aP2Dx); - // - return iErr; -} -//======================================================================= -//function : PntInFace -//purpose : -//======================================================================= -Standard_Integer PntInFace(const TopoDS_Face& aF, - gp_Pnt& theP, - gp_Pnt2d& theP2D) -{ - Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint; - Standard_Integer iErr, aIx, aNbDomains, i; - Standard_Real aUMin, aUMax, aVMin, aVMax; - Standard_Real aVx, aUx, aV1, aV2, aU1, aU2, aEpsT; - Standard_Real aTotArcIntr, aTolTangfIntr, aTolHatch2D, aTolHatch3D; - gp_Dir2d aD2D (0., 1.); - gp_Pnt2d aP2D; - gp_Pnt aPx; - Handle(Geom2d_Curve) aC2D; - Handle(Geom2d_TrimmedCurve) aCT2D; - Handle(Geom2d_Line) aL2D; - Handle(Geom_Surface) aS; - TopAbs_Orientation aOrE; - TopoDS_Face aFF; - TopExp_Explorer aExp; - // - aTolHatch2D=1.e-8; - aTolHatch3D=1.e-8; - aTotArcIntr=1.e-10; - aTolTangfIntr=1.e-10; - // - Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr); - Geom2dHatch_Hatcher aHatcher(aIntr, - aTolHatch2D, aTolHatch3D, - Standard_True, Standard_False); - // - iErr=0; - aEpsT=1.e-12; - // - aFF=aF; - aFF.Orientation (TopAbs_FORWARD); - // - aS=BRep_Tool::Surface(aFF); - BRepTools::UVBounds(aFF, aUMin, aUMax, aVMin, aVMax); - // - // 1 - aExp.Init (aFF, TopAbs_EDGE); - for (; aExp.More() ; aExp.Next()) { - const TopoDS_Edge& aE=*((TopoDS_Edge*)&aExp.Current()); - aOrE=aE.Orientation(); - // - aC2D=BRep_Tool::CurveOnSurface (aE, aFF, aU1, aU2); - if (aC2D.IsNull() ) { - iErr=1; - return iErr; - } - if (fabs(aU1-aU2) < aEpsT) { - iErr=2; - return iErr; - } - // - aCT2D=new Geom2d_TrimmedCurve(aC2D, aU1, aU2); - aHatcher.AddElement(aCT2D, aOrE); - }// for (; aExp.More() ; aExp.Next()) { - // - // 2 - aUx=IntTools_Tools::IntermediatePoint(aUMin, aUMax); - aP2D.SetCoord(aUx, 0.); - aL2D=new Geom2d_Line (aP2D, aD2D); - Geom2dAdaptor_Curve aHCur(aL2D); - // - aIx=aHatcher.AddHatching(aHCur) ; - // - // 3. - aHatcher.Trim(); - bIsDone=aHatcher.TrimDone(aIx); - if (!bIsDone) { - iErr=3; - return iErr; - } - // - aHatcher.ComputeDomains(aIx); - bIsDone=aHatcher.IsDone(aIx); - if (!bIsDone) { - iErr=4; - return iErr; - } - // - // 4. - aNbDomains=aHatcher.NbDomains(aIx); - for (i=1; i<=aNbDomains; ++i) { - const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, i) ; - bHasFirstPoint=aDomain.HasFirstPoint(); - if (!bHasFirstPoint) { - iErr=5; - return iErr; - } - // - aV1=aDomain.FirstPoint().Parameter(); - // - bHasSecondPoint=aDomain.HasSecondPoint(); - if (!bHasSecondPoint) { - iErr=6; - return iErr; - } - // - aV2=aDomain.SecondPoint().Parameter(); - // - aVx=IntTools_Tools::IntermediatePoint(aV1, aV2); - // - break; - } - // - aS->D0(aUx, aVx, aPx); - // - theP2D.SetCoord(aUx, aVx); - theP=aPx; - // - return iErr; -} - diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_2.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_2.cxx deleted file mode 100644 index 3114f3688..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_2.cxx +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_GetInPlace_2.cxx -// Created: -// Author: Peter KURNEV - -#include - -#include - -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include - -#include -#include - - -static - Standard_Integer Dimension(const TopAbs_ShapeEnum aType); -static - void PointProperties(const TopoDS_Shape& aS, - GProp_GProps& aGProps); - -//======================================================================= -//function : CheckGProps -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::CheckGProps() -{ - myFound=Standard_False; - CheckGProps(myArgument); -} -//======================================================================= -//function : CheckGProps -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlace::CheckGProps(const TopoDS_Shape& aS1) -{ - Standard_Boolean bOnlyClosed; - Standard_Integer iDim, aNbS2; - Standard_Real aMass1, aMass2, aD2, aTolCG2, dM; - TopAbs_ShapeEnum aType1; - gp_Pnt aCG1, aCG2; - TopoDS_Iterator aIt; - TopoDS_Compound aC2; - BRep_Builder aBB; - TopTools_ListIteratorOfListOfShape aItLS; - // - myErrorStatus=0; - // - aType1=aS1.ShapeType(); - if (aType1==TopAbs_COMPOUND) { - aIt.Initialize(aS1); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS1x=aIt.Value(); - CheckGProps(aS1x); - if (!myFound) { - return; - } - } - } - // - iDim=Dimension(aType1); - // - if (!myImages.IsBound(aS1)) { - // it should not be. - return; - } - const TopTools_ListOfShape& aLS2=myImages.Find(aS1); - aNbS2=aLS2.Extent(); - if (!aNbS2) { - // it should not be. - return; - } - // - aBB.MakeCompound(aC2); - aItLS.Initialize(aLS2); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aS2x=aItLS.Value(); - aBB.Add(aC2, aS2x); - } - //------------------------- - GProp_GProps aG1, aG2; - // - aTolCG2=myTolCG*myTolCG; - bOnlyClosed=Standard_False; - // - if (iDim==0) { - PointProperties(aS1, aG1); - PointProperties(aC2, aG2); - } - else if (iDim==1) { - BRepGProp::LinearProperties(aS1, aG1); - BRepGProp::LinearProperties(aC2, aG2); - } - else if (iDim==2) { - BRepGProp::SurfaceProperties(aS1, aG1); - BRepGProp::SurfaceProperties(aC2, aG2); - } - else if (iDim==3) { - BRepGProp::VolumeProperties(aS1, aG1, bOnlyClosed); - BRepGProp::VolumeProperties(aC2, aG2, bOnlyClosed); - } - // - aMass1=aG1.Mass(); - aMass2=aG2.Mass(); - aCG1=aG1.CentreOfMass(); - aCG2=aG2.CentreOfMass(); - // - dM=fabs(aMass1-aMass2); - if (aMass1 > myTolMass) { - dM=dM/aMass1; - } - // - aD2=aCG1.SquareDistance(aCG2); - // - if ((dM > myTolMass) || (aD2 > aTolCG2)) { - myFound=Standard_False; - return; - } - myFound=Standard_True; -} -//======================================================================= -//function : Dimension -//purpose : -//======================================================================= -Standard_Integer Dimension(const TopAbs_ShapeEnum aType) -{ - Standard_Integer iDim; - // - iDim=-1; - switch (aType) { - case TopAbs_VERTEX: - iDim=0; - break; - case TopAbs_EDGE: - case TopAbs_WIRE: - iDim=1; - break; - case TopAbs_FACE: - case TopAbs_SHELL: - iDim=2; - break; - case TopAbs_SOLID: - case TopAbs_COMPSOLID: - iDim=3; - break; - default: - break; - } - return iDim; -} -//======================================================================= -//class : GEOMAlgo_GProps -//purpose : -//======================================================================= -class GEOMAlgo_GProps : public GProp_GProps { - public: - GEOMAlgo_GProps() : GProp_GProps() { - }; - // - GEOMAlgo_GProps(const gp_Pnt& aPLoc) : GProp_GProps(aPLoc) { - }; - // - ~GEOMAlgo_GProps() { - }; - // - void SetMass(const Standard_Real aMass) { - dim=aMass; - } - // - void SetCG(const gp_Pnt& aPCG) { - g=aPCG; - } -}; -//======================================================================= -//function : PointProperties -//purpose : -//======================================================================= -void PointProperties(const TopoDS_Shape& aS, GProp_GProps& aGProps) -{ - Standard_Integer i, aNbS; - Standard_Real aDensity; - gp_Pnt aPX; - TopTools_IndexedMapOfShape aMS; - // - aDensity=1.; - // - TopExp::MapShapes(aS, TopAbs_VERTEX, aMS); - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - GEOMAlgo_GProps aGPropsX; - // - const TopoDS_Vertex& aVX=*((TopoDS_Vertex*)&aMS(i)); - aPX=BRep_Tool::Pnt(aVX); - aGPropsX.SetMass(1.); - aGPropsX.SetCG(aPX); - aGProps.Add(aGPropsX, aDensity); - } -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_3.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_3.cxx deleted file mode 100644 index 3cc870da4..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_GetInPlace_3.cxx +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_GetInPlaceIterator.cxx -// Created: -// Author: Peter KURNEV - -#include - -#include - -static - Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2); - -//======================================================================= -//function : -//purpose : -//======================================================================= -GEOMAlgo_GetInPlaceIterator::GEOMAlgo_GetInPlaceIterator() -{ - myDim=10; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_GetInPlaceIterator::~GEOMAlgo_GetInPlaceIterator() -{ -} -//======================================================================= -//function : Clear -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlaceIterator::Clear() -{ - Standard_Integer i; - // - for (i=0; i=0) { - myLists[iX].Append(theCS); - } -} -//======================================================================= -//function : ShapeWhere -//purpose : -//======================================================================= -void GEOMAlgo_GetInPlaceIterator::Initialize(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) -{ - Standard_Integer iX; - // - iX=TypeToInteger(aType1, aType2); - if (iX>=0) { - myIterator.Initialize(myLists[iX]); - } - else { - myIterator.Initialize(myEmptyList); - } -} -//======================================================================= -// function: More -// purpose: -//======================================================================= -Standard_Boolean GEOMAlgo_GetInPlaceIterator::More()const -{ - return myIterator.More(); -} -//======================================================================= -// function: Next -// purpose: -//======================================================================= -void GEOMAlgo_GetInPlaceIterator::Next() -{ - myIterator.Next(); -} -//======================================================================= -// function: Value -// purpose: -//======================================================================= -const NMTTools_CoupleOfShape& GEOMAlgo_GetInPlaceIterator::Value()const -{ - return myIterator.Value(); -} -//======================================================================= -//function : TypeToInteger -//purpose : -//======================================================================= -Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) -{ - Standard_Integer iRet, iT1, iT2, iX; - // - iRet=-1; - // - if (aType1==TopAbs_VERTEX) { - if (aType2==TopAbs_VERTEX) { - iRet=0; - } - } - else if (aType1==TopAbs_EDGE) { - if (aType2==TopAbs_VERTEX) { - iRet=1; - } - else if (aType2==TopAbs_EDGE) { - iRet=2; - } - } - else if (aType1==TopAbs_FACE) { - if (aType2==TopAbs_VERTEX) { - iRet=3; - } - else if (aType2==TopAbs_EDGE) { - iRet=4; - } - else if (aType2==TopAbs_FACE) { - iRet=5; - } - } - // So_1,*_2 - else if (aType1==TopAbs_SOLID) { - if (aType2==TopAbs_VERTEX) { - iRet=6; - } - else if (aType2==TopAbs_EDGE) { - iRet=7; - } - else if (aType2==TopAbs_FACE) { - iRet=8; - } - else if (aType2==TopAbs_SOLID) { - iRet=9; - } - } - return iRet; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_GlueAnalyser.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_GlueAnalyser.cxx deleted file mode 100644 index 1d5b99e36..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_GlueAnalyser.cxx +++ /dev/null @@ -1,467 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_GlueDetector.cxx -// Created: Wed Dec 15 11:08:09 2004 -// Author: Peter KURNEV - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_GlueAnalyser::GEOMAlgo_GlueAnalyser() -: - GEOMAlgo_Gluer() -{} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_GlueAnalyser::~GEOMAlgo_GlueAnalyser() -{} -//======================================================================= -//function : HasSolidsToGlue -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsToGlue()const -{ - return !mySolidsToGlue.IsEmpty(); -} -//======================================================================= -//function : HasSolidsAlone -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_GlueAnalyser::HasSolidsAlone()const -{ - return !mySolidsAlone.IsEmpty(); -} -//======================================================================= -//function : SolidsToGlue -//purpose : -//======================================================================= - const GEOMAlgo_ListOfCoupleOfShapes& GEOMAlgo_GlueAnalyser::SolidsToGlue()const -{ - return mySolidsToGlue; -} -//======================================================================= -//function : SolidsAlone -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_GlueAnalyser::SolidsAlone()const -{ - return mySolidsAlone; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - void GEOMAlgo_GlueAnalyser::Perform() -{ - myErrorStatus=0; - myWarningStatus=0; - // - mySolidsToGlue.Clear(); - mySolidsAlone.Clear(); - // - CheckData(); - if (myErrorStatus) { - return; - } - // - // Initialize the context - GEOMAlgo_ShapeAlgo::Perform(); - // - InnerTolerance(); - if (myErrorStatus) { - return; - } - // - DetectVertices(); - if (myErrorStatus) { - return; - } - // - DetectEdges(); - if (myErrorStatus) { - return; - } - // - DetectFaces(); - if (myErrorStatus) { - return; - } - // - DetectSolids(); - if (myErrorStatus) { - return; - } -} -//======================================================================= -//function : DetectVertices -//purpose : -//======================================================================= - void GEOMAlgo_GlueAnalyser::DetectVertices() -{ - myErrorStatus=0; - // - Standard_Integer j, i, aNbV, aIndex, aNbVSD; - TColStd_ListIteratorOfListOfInteger aIt; - Handle(Bnd_HArray1OfBox) aHAB; - Bnd_BoundSortBox aBSB; - TopoDS_Shape aSTmp, aVF; - TopoDS_Vertex aVnew; - TopTools_IndexedMapOfShape aMV, aMVProcessed; - TopTools_ListIteratorOfListOfShape aItS; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; - GEOMAlgo_IndexedDataMapOfIntegerShape aMIS; - GEOMAlgo_IndexedDataMapOfShapeBox aMSB; - // - TopExp::MapShapes(myShape, TopAbs_VERTEX, aMV); - aNbV=aMV.Extent(); - if (!aNbV) { - myErrorStatus=2; // no vertices in source shape - return; - } - // - aHAB=new Bnd_HArray1OfBox(1, aNbV); - // - for (i=1; i<=aNbV; ++i) { - const TopoDS_Shape& aV=aMV(i); - Bnd_Box aBox; - // - aBox.SetGap(myTol); - BRepBndLib::Add(aV, aBox); - aHAB->SetValue(i, aBox); - aMIS.Add(i, aV); - aMSB.Add(aV, aBox); - } - // - aBSB.Initialize(aHAB); - // - for (i=1; i<=aNbV; ++i) { - const TopoDS_Shape& aV=aMV(i); - // - if (aMVProcessed.Contains(aV)) { - continue; - } - // - const Bnd_Box& aBoxV=aMSB.FindFromKey(aV); - const TColStd_ListOfInteger& aLI=aBSB.Compare(aBoxV); - aNbVSD=aLI.Extent(); - if (!aNbVSD) { - myErrorStatus=3; // it must not be - return; - } - // - // Images - TopTools_ListOfShape aLVSD; - // - 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); - } - // 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); - } - } - } -} -//======================================================================= -//function : DetectFaces -//purpose : -//======================================================================= - void GEOMAlgo_GlueAnalyser::DetectFaces() -{ - DetectShapes(TopAbs_FACE); -} -//======================================================================= -//function : DetectEdges -//purpose : -//======================================================================= - void GEOMAlgo_GlueAnalyser::DetectEdges() -{ - DetectShapes(TopAbs_EDGE); -} -//======================================================================= -//function : DetectShapes -//purpose : -//======================================================================= - void GEOMAlgo_GlueAnalyser::DetectShapes(const TopAbs_ShapeEnum aType) -{ - myErrorStatus=0; - // - Standard_Integer i, aNbF, aNbSDF, iErr; - TopoDS_Shape aNewShape; - TopTools_IndexedMapOfShape aMF; - TopTools_ListIteratorOfListOfShape aItS; - GEOMAlgo_PassKeyShape aPKF; - GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF; - // - TopExp::MapShapes(myShape, aType, aMF); - // - aNbF=aMF.Extent(); - for (i=1; i<=aNbF; ++i) { - const TopoDS_Shape& aS=aMF(i); - // - //aPKF.Clear();//qft - if (aType==TopAbs_FACE) { - const TopoDS_Face& aF=TopoDS::Face(aS); - FacePassKey(aF, aPKF); - } - else if (aType==TopAbs_EDGE) { - const TopoDS_Edge& aE=TopoDS::Edge(aS); - EdgePassKey(aE, aPKF); - } - // - if (myErrorStatus) { - return; - } - // - if (aMPKLF.Contains(aPKF)) { - TopTools_ListOfShape& aLSDF=aMPKLF.ChangeFromKey(aPKF); - aLSDF.Append(aS); - } - else { - TopTools_ListOfShape aLSDF; - // - aLSDF.Append(aS); - aMPKLF.Add(aPKF, aLSDF); - } - } - // check geometric coincidence - if (myCheckGeometry) { - iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTol, myContext); //XX - if (iErr) { - myErrorStatus=200; - return; - } - } - // - // Images/Origins - aNbF=aMPKLF.Extent(); - for (i=1; i<=aNbF; ++i) { - const TopTools_ListOfShape& aLSDF=aMPKLF(i); - aNbSDF=aLSDF.Extent(); - if (!aNbSDF) { - myErrorStatus=4; // it must not be - } - // - const TopoDS_Shape& aS1=aLSDF.First(); - aNewShape=aS1; - // - myImages.Bind(aNewShape, aLSDF); - // origins - aItS.Initialize(aLSDF); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aFSD=aItS.Value(); - if (!myOrigins.IsBound(aFSD)) { - myOrigins.Bind(aFSD, aNewShape); - } - } - } -} -//======================================================================= -//function : DetectSolids -//purpose : -//======================================================================= - void GEOMAlgo_GlueAnalyser::DetectSolids() -{ - myErrorStatus=0; - // - Standard_Integer i, aNbF, aNbS, aNbC, aNbX; - TopoDS_Compound aCmp; - BRep_Builder aBB; - TopTools_IndexedDataMapOfShapeListOfShape aMFS; - TopTools_IndexedMapOfShape aMx, aMS; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; - GEOMAlgo_CoupleOfShapes aCS; - // - GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLS; - GEOMAlgo_PassKeyShape aPKSx; - // - aBB.MakeCompound(aCmp); - // - TopExp::MapShapesAndAncestors(myShape, TopAbs_FACE, TopAbs_SOLID, aMFS); - // - aItIm.Initialize(myImages); - for (; aItIm.More(); aItIm.Next()) { - const TopoDS_Shape& aIm=aItIm.Key(); - if (aIm.ShapeType()!=TopAbs_FACE) { - continue; - } - // - const TopTools_ListOfShape& aLF=aItIm.Value(); - aNbF=aLF.Extent(); - if (aNbF!=2) { - continue; - } - // - TopoDS_Shape aSx[2], aFx[2]; - // - aFx[0]=aLF.First(); - aFx[1]=aLF.Last(); - for (i=0; i<2; ++i) { - if (!aMFS.Contains(aFx[i])) { - continue;// it must not be so - } - // - const TopTools_ListOfShape& aLS=aMFS.FindFromKey(aFx[i]); - aNbS=aLS.Extent(); - if (aNbS!=1) { - continue; - } - aSx[i]=aLS.First(); - } - // - if (aSx[0].IsNull() || aSx[1].IsNull()) { - continue; - } - // - //aPKSx.Clear();//qft - //qf - //aPKSx.SetIds(aSx[0], aSx[1]); - aPKSx.SetShapes(aSx[0], aSx[1]); - //qt - // - if (!aMPKLS.Contains(aPKSx)) { - TopTools_ListOfShape aLSx; - // - aLSx.Append(aSx[0]); - aLSx.Append(aSx[1]); - // - aMPKLS.Add(aPKSx, aLSx); - } - } - // - mySolidsToGlue.Clear(); - mySolidsAlone.Clear(); - - // - aNbC=aMPKLS.Extent(); - if (!aNbC) { - return; - } - // - for (i=1; i<=aNbC; ++i) { - const TopTools_ListOfShape& aLSx=aMPKLS(i); - const TopoDS_Shape& aSx1=aLSx.First(); - const TopoDS_Shape& aSx2=aLSx.Last(); - aCS.SetShape1(aSx1); - aCS.SetShape2(aSx2); - mySolidsToGlue.Append(aCS); - // - if (!aMx.Contains(aSx1)) { - aBB.Add(aCmp, aSx1); - aMx.Add(aSx1); - } - if (!aMx.Contains(aSx2)) { - aBB.Add(aCmp, aSx2); - aMx.Add(aSx2); - } - } - myResult=aCmp; - // - // check alone solids - TopExp::MapShapes(myShape, TopAbs_SOLID, aMS); - // - aNbX=aMx.Extent(); - for (i=1; i<=aNbX; ++i) { - const TopoDS_Shape& aSx=aMx(i); - if (!aMS.Contains(aSx)) { - mySolidsAlone.Append(aSx); - } - } -} - -/* -// A - // Make vertices - aMV.Clear(); - aItIm.Initialize(myImages); - for (; aItIm.More(); aItIm.Next()) { - const TopoDS_Shape& aV=aItIm.Key(); - aMV.Add(aV); - const TopTools_ListOfShape& aLVSD=aItIm.Value(); - MakeVertex(aLVSD, aVnew);//ZZ - myImages.Bind(aVnew, aLVSD); - } - // - aNbV=aMV.Extent(); - for (i=1; i<=aNbV; ++i) { - const TopoDS_Shape& aV=aMV(i); - myImages.UnBind(aV); - } - // - */ diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_GlueAnalyser.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_GlueAnalyser.hxx deleted file mode 100644 index 359407edb..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_GlueAnalyser.hxx +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_GlueDetector.hxx -// Created: Wed Dec 15 11:08:09 2004 -// Author: Peter KURNEV - -#ifndef _GEOMAlgo_GlueAnalyser_HeaderFile -#define _GEOMAlgo_GlueAnalyser_HeaderFile - -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_GlueAnalyser -//purpose : -//======================================================================= -class GEOMAlgo_GlueAnalyser : public GEOMAlgo_Gluer -{ - 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; - - 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() ; - - - GEOMAlgo_ListOfCoupleOfShapes mySolidsToGlue; - TopTools_ListOfShape mySolidsAlone; -}; - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_GlueDetector.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_GlueDetector.cxx deleted file mode 100644 index fb8d5dfdc..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_GlueDetector.cxx +++ /dev/null @@ -1,612 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_GlueDetector.cxx -// Author: Peter KURNEV - -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -// -#include -#include -#include -#include - -//modified by NIZNHY-PKV Tue Mar 13 10:25:47 2012f -static - Standard_Integer CheckAncesstors - (const TopoDS_Shape& aVSD, - const TopTools_MapOfShape& aMVSD, - const TopTools_IndexedDataMapOfShapeListOfShape& aMVE, - const TopTools_IndexedDataMapOfShapeListOfShape& aMEV, - TopTools_IndexedDataMapOfShapeListOfShape& aMEVZ); -//modified by NIZNHY-PKV Tue Mar 13 10:25:50 2012t - -//======================================================================= -//function : -//purpose : -//======================================================================= -GEOMAlgo_GlueDetector::GEOMAlgo_GlueDetector() -: - GEOMAlgo_GluerAlgo(), - GEOMAlgo_Algo() -{} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_GlueDetector::~GEOMAlgo_GlueDetector() -{} -//modified by NIZNHY-PKV Tue Mar 13 12:26:50 2012f -//======================================================================= -//function : StickedShapes -//purpose : -//======================================================================= -const TopTools_IndexedDataMapOfShapeListOfShape& - GEOMAlgo_GlueDetector::StickedShapes() -{ - return myStickedShapes; -} -//modified by NIZNHY-PKV Tue Mar 13 12:26:54 2012t -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_GlueDetector::Perform() -{ - myErrorStatus=0; - myWarningStatus=0; - myStickedShapes.Clear(); - // - CheckData(); - if (myErrorStatus) { - return; - } - // - // Initialize the context - GEOMAlgo_GluerAlgo::Perform(); - // - DetectVertices(); - if (myErrorStatus) { - return; - } - // - //modified by NIZNHY-PKV Wed Mar 14 08:00:09 2012f - CheckDetected(); - if (myErrorStatus) { - return; - } - //modified by NIZNHY-PKV Wed Mar 14 08:00:12 2012t - // - DetectEdges(); - if (myErrorStatus) { - return; - } - // - DetectFaces(); - if (myErrorStatus) { - return; - } -} -//======================================================================= -//function : DetectVertices -//purpose : -//======================================================================= -void GEOMAlgo_GlueDetector::DetectVertices() -{ - Standard_Integer j, i, aNbV, aNbVSD; - Standard_Real aTolV; - gp_Pnt aPV; - TColStd_ListIteratorOfListOfInteger aIt; - TopoDS_Shape aVF; - TopTools_IndexedMapOfShape aMV; - TopTools_MapOfShape aMVProcessed; - TopTools_ListIteratorOfListOfShape aItS; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; - TopTools_DataMapOfShapeListOfShape aMVV; - GEOMAlgo_IndexedDataMapOfIntegerShape aMIS; - NMTDS_IndexedDataMapOfShapeBndSphere aMSB; - NMTDS_BndSphereTreeSelector aSelector; - NMTDS_BndSphereTree aBBTree; - NCollection_UBTreeFiller aTreeFiller(aBBTree); - // - myErrorStatus=0; - // - TopExp::MapShapes(myArgument, TopAbs_VERTEX, aMV); - aNbV=aMV.Extent(); - if (!aNbV) { - myErrorStatus=2; // no vertices in source shape - return; - } - // - for (i=1; i<=aNbV; ++i) { - NMTDS_BndSphere aBox; - // - const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aMV(i)); - aPV=BRep_Tool::Pnt(aV); - aTolV=BRep_Tool::Tolerance(aV); - // - aBox.SetGap(myTolerance); - aBox.SetCenter(aPV); - aBox.SetRadius(aTolV); - // - aTreeFiller.Add(i, aBox); - // - aMIS.Add(i, aV); - aMSB.Add(aV, aBox); - } - // - aTreeFiller.Fill(); - // - //--------------------------------------------------- - // Chains - for (i=1; i<=aNbV; ++i) { - const TopoDS_Shape& aV=aMV(i); - // - if (aMVProcessed.Contains(aV)) { - continue; - } - // - Standard_Integer aNbIP, aIP, aNbIP1, aIP1; - TopTools_ListOfShape aLVSD; - TColStd_MapOfInteger aMIP, aMIP1, aMIPC; - TColStd_MapIteratorOfMapOfInteger aIt1; - // - aMIP.Add(i); - while(1) { - aNbIP=aMIP.Extent(); - aIt1.Initialize(aMIP); - for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - if (aMIPC.Contains(aIP)) { - continue; - } - // - const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); - const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP); - // - aSelector.Clear(); - aSelector.SetBox(aBoxVP); - // - aNbVSD=aBBTree.Select(aSelector); - if (!aNbVSD) { - continue; // it shoild not be so [at least IP itself] - } - // - const TColStd_ListOfInteger& aLI=aSelector.Indices(); - aIt.Initialize(aLI); - for (; aIt.More(); aIt.Next()) { - aIP1=aIt.Value(); - if (aMIP.Contains(aIP1)) { - continue; - } - aMIP1.Add(aIP1); - } //for (; aIt.More(); aIt.Next()) { - }//for(; aIt1.More(); aIt1.Next()) { - // - aNbIP1=aMIP1.Extent(); - if (!aNbIP1) { - break; - } - // - aIt1.Initialize(aMIP); - for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - aMIPC.Add(aIP); - } - // - aMIP.Clear(); - aIt1.Initialize(aMIP1); - for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - aMIP.Add(aIP); - } - aMIP1.Clear(); - }// while(1) - // - // Fill myImages - aNbIP=aMIPC.Extent(); - // - if (!aNbIP) {// no SD vertices is found - aMVProcessed.Add(aV); - continue; - } - //else { // SD vertices founded [ aMIPC ] - aIt1.Initialize(aMIPC); - for(j=0; aIt1.More(); aIt1.Next(), ++j) { - aIP=aIt1.Key(); - const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); - if (!j) { - aVF=aVP; - } - aLVSD.Append(aVP); - aMVProcessed.Add(aVP); - } - //} - myImages.Bind(aVF, aLVSD); - }// for (i=1; i<=aNbV; ++i) { - //------------------------------ - // 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); - } - } - } -} -//======================================================================= -//function : DetectFaces -//purpose : -//======================================================================= -void GEOMAlgo_GlueDetector::DetectFaces() -{ - DetectShapes(TopAbs_FACE); -} -//======================================================================= -//function : DetectEdges -//purpose : -//======================================================================= -void GEOMAlgo_GlueDetector::DetectEdges() -{ - DetectShapes(TopAbs_EDGE); -} -//======================================================================= -//function : DetectShapes -//purpose : -//======================================================================= -void GEOMAlgo_GlueDetector::DetectShapes(const TopAbs_ShapeEnum aType) -{ - Standard_Boolean bDegenerated; - Standard_Integer i, aNbF, aNbSDF, iErr; - TopTools_IndexedMapOfShape aMF; - TopTools_ListIteratorOfListOfShape aItLS; - GEOMAlgo_PassKeyShape aPKF; - GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF; - // - myErrorStatus=0; - // - TopExp::MapShapes(myArgument, aType, aMF); - // - aNbF=aMF.Extent(); - for (i=1; i<=aNbF; ++i) { - const TopoDS_Shape& aS=aMF(i); - // - if (aType==TopAbs_FACE) { - const TopoDS_Face& aF=*((TopoDS_Face*)&aS); - FacePassKey(aF, aPKF); - } - else if (aType==TopAbs_EDGE) { - const TopoDS_Edge& aE=*((TopoDS_Edge*)&aS); - EdgePassKey(aE, aPKF); - } - // - if (myErrorStatus) { - return; - } - // - if (aMPKLF.Contains(aPKF)) { - TopTools_ListOfShape& aLSDF=aMPKLF.ChangeFromKey(aPKF); - aLSDF.Append(aS); - } - else { - TopTools_ListOfShape aLSDF; - // - aLSDF.Append(aS); - aMPKLF.Add(aPKF, aLSDF); - } - } - // check geometric coincidence - if (myCheckGeometry) { - iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTolerance, myContext); - if (iErr) { - myErrorStatus=200; - return; - } - } - // - // Images/Origins - aNbF=aMPKLF.Extent(); - for (i=1; i<=aNbF; ++i) { - const TopTools_ListOfShape& aLSDF=aMPKLF(i); - aNbSDF=aLSDF.Extent(); - if (!aNbSDF) { - myErrorStatus=4; // it must not be - } - // - if (aNbSDF==1) { - continue; - } - // - const TopoDS_Shape& aS1=aLSDF.First(); - // - if (aType==TopAbs_EDGE) { - const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aS1); - bDegenerated=BRep_Tool::Degenerated(aE1); - if (bDegenerated) { - continue; - } - } - // - myImages.Bind(aS1, aLSDF); - // - // origins - aItLS.Initialize(aLSDF); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aFSD=aItLS.Value(); - if (!myOrigins.IsBound(aFSD)) { - myOrigins.Bind(aFSD, aS1); - } - } - }// for (i=1; i<=aNbF; ++i) -} -//======================================================================= -//function : FacePassKey -//purpose : -//======================================================================= -void GEOMAlgo_GlueDetector::FacePassKey(const TopoDS_Face& aF, - GEOMAlgo_PassKeyShape& aPK) -{ - Standard_Integer i, aNbE; - TopoDS_Shape aER; - TopTools_ListOfShape aLE; - TopTools_IndexedMapOfShape aME; - // - TopExp::MapShapes(aF, TopAbs_EDGE, aME); - // - aNbE=aME.Extent(); - for (i=1; i<=aNbE; ++i) { - const TopoDS_Shape& aE=aME(i); - // - const TopoDS_Edge& aEE=*((TopoDS_Edge*)&aE); - if (BRep_Tool::Degenerated(aEE)) { - continue; - } - // - if (myOrigins.IsBound(aE)) { - aER=myOrigins.Find(aE); - } - else { - aER=aE; - } - aLE.Append(aER); - } - aPK.SetShapes(aLE); -} -//======================================================================= -//function : EdgePassKey -//purpose : -//======================================================================= -void GEOMAlgo_GlueDetector::EdgePassKey(const TopoDS_Edge& aE, - GEOMAlgo_PassKeyShape& aPK) -{ - TopAbs_Orientation aOr; - TopoDS_Shape aVR; - TopoDS_Iterator aIt; - TopTools_ListOfShape aLV; - // - aIt.Initialize(aE); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aV=aIt.Value(); - aOr=aV.Orientation(); - if (aOr==TopAbs_FORWARD || aOr==TopAbs_REVERSED) { - if (myOrigins.IsBound(aV)) { - aVR=myOrigins.Find(aV); - } - else { - aVR=aV; - } - aLV.Append(aVR); - } - } - // - aPK.SetShapes(aLV); -} -//modified by NIZNHY-PKV Tue Mar 13 09:54:18 2012f -//======================================================================= -//function : CheckDetected -//purpose : -//======================================================================= -void GEOMAlgo_GlueDetector::CheckDetected() -{ - TopoDS_Iterator aItA; - TopExp_Explorer aExp; - TopTools_ListOfShape aLV; - TopTools_MapOfShape aMFence; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; - TopTools_IndexedDataMapOfShapeListOfShape aMVE, aMEV; - // - // 1. aMVE, aMEV - TopExp::MapShapesAndAncestors(myArgument, TopAbs_VERTEX, TopAbs_EDGE, aMVE); - // - aExp.Init(myArgument, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aE=aExp.Current(); - // - aLV.Clear(); - aMFence.Clear(); - aItA.Initialize(aE); - for (; aItA.More(); aItA.Next()) { - const TopoDS_Shape& aV=aItA.Value(); - if (aMFence.Add(aV)) { - aLV.Append(aV); - } - } - // - aMEV.Add(aE, aLV); - } - // 2. Checking - aItIm.Initialize(myImages); - for (; aItIm.More(); aItIm.Next()) { - //const TopoDS_Shape& aV=aItIm.Key(); - const TopTools_ListOfShape& aLVSD=aItIm.Value(); - CheckDetected(aLVSD, aMVE, aMEV); - } -} -//======================================================================= -//function : CheckDetected -//purpose : -//======================================================================= -void GEOMAlgo_GlueDetector::CheckDetected - (const TopTools_ListOfShape& aLVSD, - const TopTools_IndexedDataMapOfShapeListOfShape& aMVE, - const TopTools_IndexedDataMapOfShapeListOfShape& aMEV) -{ - Standard_Integer i, aNbVSD, aNbA, iRet; - TopAbs_ShapeEnum aTypeS, aTypeA[2]; - TopExp_Explorer aExp, aExpA; - TopTools_MapOfShape aMFence, aMVSD; - TopTools_ListOfShape aLV; - TopTools_ListIteratorOfListOfShape aItLS; - // - myErrorStatus=0; - // - aNbVSD=aLVSD.Extent(); - if (aNbVSD < 2) { - return ; - } - // - aItLS.Initialize(aLVSD); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aVSD=aItLS.Value(); - aMVSD.Add(aVSD); - } - // - aItLS.Initialize(aLVSD); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aVSD=aItLS.Value(); - // - iRet=CheckAncesstors(aVSD, aMVSD, aMVE, aMEV, myStickedShapes); - if (iRet) { - // Sticked shapes detected - myWarningStatus=2; - } - } -} -//======================================================================= -//function : CheckAncesstors -//purpose : -//======================================================================= -Standard_Integer CheckAncesstors - (const TopoDS_Shape& aVSD, - const TopTools_MapOfShape& aMVSD, - const TopTools_IndexedDataMapOfShapeListOfShape& aMVE, - const TopTools_IndexedDataMapOfShapeListOfShape& aMEV, - TopTools_IndexedDataMapOfShapeListOfShape& aMEVZ) -{ - Standard_Address pLE, pLV, pLVZ; - Standard_Integer iRet, aNbVX; - TopTools_ListIteratorOfListOfShape aItLE, aItLV; - TopTools_MapOfShape aMFence; - TopTools_ListOfShape aLVX; - // - iRet=0; - // - pLE=aMVE.FindFromKey1(aVSD); - if (!pLE) { - return iRet; - } - // - const TopTools_ListOfShape& aLE=*((TopTools_ListOfShape*)pLE); - aItLE.Initialize(aLE); - for (; aItLE.More(); aItLE.Next()) { - const TopoDS_Shape& aE=aItLE.Value(); - // - pLV=aMEV.FindFromKey1(aE); - if (!pLV) { - continue; // it should be not so - } - // - aLVX.Clear(); - const TopTools_ListOfShape& aLV=*((TopTools_ListOfShape*)pLV); - aItLV.Initialize(aLV); - for (; aItLV.More(); aItLV.Next()) { - const TopoDS_Shape& aV=aItLV.Value(); - if (!aV.IsSame(aVSD)) { - if (aMVSD.Contains(aV)) { - if (aMFence.Add(aV)) { - aLVX.Append(aV); - } - } - } - } - // - aNbVX=aLVX.Extent(); - if (!aNbVX) { - continue; - } - // - iRet=1; - // - pLVZ=aMEVZ.FindFromKey1(aE); - if (!pLVZ) { - aMEVZ.Add(aE, aLVX); - } - else { - TopTools_ListOfShape& aLVZ=*((TopTools_ListOfShape*)pLVZ); - aLVZ.Append(aLVX); - } - } - // - return iRet; -} -//modified by NIZNHY-PKV Tue Mar 13 09:54:59 2012t diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_GlueDetector.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_GlueDetector.hxx deleted file mode 100644 index dc588eacd..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_GlueDetector.hxx +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_GlueDetector.hxx -// Author: Peter KURNEV - -#ifndef _GEOMAlgo_GlueDetector_HeaderFile -#define _GEOMAlgo_GlueDetector_HeaderFile - -#include -#include - -#include - -#include -#include - -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_GlueDetector -//purpose : -//======================================================================= -class GEOMAlgo_GlueDetector : public GEOMAlgo_GluerAlgo, - public GEOMAlgo_Algo -{ -public: - Standard_EXPORT - GEOMAlgo_GlueDetector(); - - Standard_EXPORT virtual - ~GEOMAlgo_GlueDetector(); - - Standard_EXPORT virtual - void Perform() ; - -//modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f - Standard_EXPORT - const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes(); -//modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t -//------------------------------------------------ -protected: - Standard_EXPORT - void DetectVertices() ; - - Standard_EXPORT - void DetectEdges() ; - - Standard_EXPORT - void DetectFaces() ; - - Standard_EXPORT - void DetectShapes(const TopAbs_ShapeEnum aType) ; - - Standard_EXPORT - void EdgePassKey(const TopoDS_Edge& aE, - GEOMAlgo_PassKeyShape& aPK) ; - - Standard_EXPORT - void FacePassKey(const TopoDS_Face& aF, - GEOMAlgo_PassKeyShape& aPK) ; - - //modified by NIZNHY-PKV Tue Mar 13 09:53:03 2012f - Standard_EXPORT - void CheckDetected(); - // - Standard_EXPORT - void CheckDetected - (const TopTools_ListOfShape& aLVSD, - const TopTools_IndexedDataMapOfShapeListOfShape& aMVE, - const TopTools_IndexedDataMapOfShapeListOfShape& aMEV); - - - protected: - TopTools_IndexedDataMapOfShapeListOfShape myStickedShapes; - //modified by NIZNHY-PKV Tue Mar 13 09:53:08 2012t - -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Gluer.cxx deleted file mode 100644 index 322d1ba31..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer.cxx +++ /dev/null @@ -1,1178 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Gluer.cxx -// Created: Sat Dec 04 12:45:53 2004 -// Author: Peter KURNEV -// -// -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -// - -#include -#include -#include - -// -static - void GetSubShapes(const TopoDS_Shape& aS, - TopTools_IndexedMapOfShape& aMSS); - -//======================================================================= -//function : GEOMAlgo_Gluer -//purpose : -//======================================================================= -GEOMAlgo_Gluer::GEOMAlgo_Gluer() -: - GEOMAlgo_ShapeAlgo() -{ - myTolerance=0.0001; - myTol=myTolerance; - myCheckGeometry=Standard_True; - myKeepNonSolids=Standard_False; - myNbAlone=0; -} -//======================================================================= -//function : ~GEOMAlgo_Gluer -//purpose : -//======================================================================= -GEOMAlgo_Gluer::~GEOMAlgo_Gluer() -{ -} -//======================================================================= -//function : SetCheckGeometry -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::SetCheckGeometry(const Standard_Boolean aFlag) -{ - myCheckGeometry=aFlag; -} -//======================================================================= -//function : CheckGeometry -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_Gluer::CheckGeometry() const -{ - return myCheckGeometry; -} -//======================================================================= -//function : SetKeepNonSolids -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::SetKeepNonSolids(const Standard_Boolean aFlag) -{ - myKeepNonSolids=aFlag; -} -//======================================================================= -//function : KeepNonSolids -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_Gluer::KeepNonSolids()const -{ - return myKeepNonSolids; -} -//======================================================================= -//function : AloneShapes -//purpose : -//======================================================================= -Standard_Integer GEOMAlgo_Gluer::AloneShapes()const -{ - return myNbAlone; -} -//======================================================================= -//function : Images -//purpose : -//======================================================================= -const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer::Images()const -{ - return myImages; -} -//======================================================================= -//function : Origins -//purpose : -//======================================================================= -const TopTools_DataMapOfShapeShape& GEOMAlgo_Gluer::Origins()const -{ - return myOrigins; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::Perform() -{ - const Standard_Integer aNb=8; - Standard_Integer i; - // - myErrorStatus=0; - myWarningStatus=0; - // - // Initialize the context - GEOMAlgo_ShapeAlgo::Perform(); - // - void (GEOMAlgo_Gluer::* pF[aNb])()={ - &GEOMAlgo_Gluer::CheckData, &GEOMAlgo_Gluer::InnerTolerance, - &GEOMAlgo_Gluer::MakeVertices, &GEOMAlgo_Gluer::MakeEdges, - &GEOMAlgo_Gluer::MakeFaces, &GEOMAlgo_Gluer::MakeShells, - &GEOMAlgo_Gluer::MakeSolids, &GEOMAlgo_Gluer::CheckResult - }; - // - for (i=0; i*pF[i])(); - if (myErrorStatus) { - return; - } - } -} - -//======================================================================= -//function : MakeVertices -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::MakeVertices() -{ - myErrorStatus=0; - // - Standard_Integer j, i, aNbV, aNbVSD; - Standard_Real aTolV; - gp_Pnt aPV; - TColStd_ListIteratorOfListOfInteger aIt; - TopoDS_Shape aVF; - TopoDS_Vertex aVnew; - TopTools_IndexedMapOfShape aMV, aMVProcessed; - TopTools_ListIteratorOfListOfShape aItS; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; - TopTools_DataMapOfShapeListOfShape aMVV; - GEOMAlgo_IndexedDataMapOfIntegerShape aMIS; - //modified by NIZNHY-PKV Thu Jan 21 10:03:07 2010f - //GEOMAlgo_IndexedDataMapOfShapeBox aMSB; - NMTDS_IndexedDataMapOfShapeBndSphere aMSB; - //modified by NIZNHY-PKV Thu Jan 21 10:03:10 2010t - // - NMTDS_BndSphereTreeSelector aSelector; - NMTDS_BndSphereTree aBBTree; - NCollection_UBTreeFiller aTreeFiller(aBBTree); - // - TopExp::MapShapes(myShape, TopAbs_VERTEX, aMV); - aNbV=aMV.Extent(); - if (!aNbV) { - myErrorStatus=2; // no vertices in source shape - return; - } - // - for (i=1; i<=aNbV; ++i) { - NMTDS_BndSphere aBox; - // - const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aMV(i)); - aPV=BRep_Tool::Pnt(aV); - aTolV=BRep_Tool::Tolerance(aV); - // - aBox.SetGap(myTol); - aBox.SetCenter(aPV); - aBox.SetRadius(aTolV); - // - aTreeFiller.Add(i, aBox); - // - aMIS.Add(i, aV); - aMSB.Add(aV, aBox); - } - // - aTreeFiller.Fill(); - // - //------------------------------ - // Chains - for (i=1; i<=aNbV; ++i) { - const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aMV(i)); - // - if (aMVProcessed.Contains(aV)) { - continue; - } - // - Standard_Integer aNbIP, aIP, aNbIP1, aIP1; - TopTools_ListOfShape aLVSD; - TColStd_MapOfInteger aMIP, aMIP1, aMIPC; - TColStd_MapIteratorOfMapOfInteger aIt1; - // - aMIP.Add(i); - while(1) { - aNbIP=aMIP.Extent(); - aIt1.Initialize(aMIP); - for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - if (aMIPC.Contains(aIP)) { - continue; - } - // - const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); - //modified by NIZNHY-PKV Thu Jan 21 10:04:09 2010f - const NMTDS_BndSphere& aBoxVP=aMSB.FindFromKey(aVP); - //const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP); - //modified by NIZNHY-PKV Thu Jan 21 10:04:11 2010t - // - aSelector.Clear(); - aSelector.SetBox(aBoxVP); - // - aNbVSD=aBBTree.Select(aSelector); - if (!aNbVSD) { - continue; // it must not be - } - // - const TColStd_ListOfInteger& aLI=aSelector.Indices(); - // - aIt.Initialize(aLI); - for (; aIt.More(); aIt.Next()) { - aIP1=aIt.Value(); - if (aMIP.Contains(aIP1)) { - continue; - } - aMIP1.Add(aIP1); - } //for (; aIt.More(); aIt.Next()) { - }//for(; aIt1.More(); aIt1.Next()) { - // - aNbIP1=aMIP1.Extent(); - if (!aNbIP1) { - break; - } - // - aIt1.Initialize(aMIP); - for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - aMIPC.Add(aIP); - } - // - aMIP.Clear(); - aIt1.Initialize(aMIP1); - for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - aMIP.Add(aIP); - } - aMIP1.Clear(); - }// while(1) - // - // Fill myImages - aNbIP=aMIPC.Extent(); - // - if (!aNbIP) {// no SD vertices founded - aVF=aV; - aLVSD.Append(aV); - aMVProcessed.Add(aV); - } - else { // SD vertices founded [ aMIPC ] - aIt1.Initialize(aMIPC); - for(j=0; aIt1.More(); aIt1.Next(), ++j) { - aIP=aIt1.Key(); - const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); - if (!j) { - aVF=aVP; - } - aLVSD.Append(aVP); - aMVProcessed.Add(aVP); - } - } - myImages.Bind(aVF, aLVSD); - }// for (i=1; i<=aNbV; ++i) { - //------------------------------ - // - // Make new vertices - aMV.Clear(); - aItIm.Initialize(myImages); - for (; aItIm.More(); aItIm.Next()) { - const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aItIm.Key()); - const TopTools_ListOfShape& aLVSD=aItIm.Value(); - aNbVSD=aLVSD.Extent(); - if (aNbVSD>1) { - aMV.Add(aV); - MakeVertex(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); - } - } - } -} -//======================================================================= -//function : MakeSubShapes -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::MakeSubShapes (const TopoDS_Shape& theShape, - TopTools_MapOfShape& theMS, - TopoDS_Compound& theResult) -{ - if (theMS.Contains(theShape)) - return; - // - BRep_Builder aBB; - // - theMS.Add(theShape); - // - if (theShape.ShapeType() == TopAbs_COMPOUND || - theShape.ShapeType() == TopAbs_COMPSOLID) { - TopoDS_Iterator It (theShape, Standard_True, Standard_True); - for (; It.More(); It.Next()) { - MakeSubShapes(It.Value(), theMS, theResult); - } - } - else if (theShape.ShapeType() == TopAbs_SOLID) { - // build a solid - TopoDS_Solid aNewSolid; - TopExp_Explorer aExpS, aExp; - // - const TopoDS_Solid& aSolid = TopoDS::Solid(theShape); - // - TopAbs_Orientation anOr = aSolid.Orientation(); - // - aBB.MakeSolid(aNewSolid); - aNewSolid.Orientation(anOr); - // - aExp.Init(aSolid, TopAbs_SHELL); - for (; aExp.More(); aExp.Next()) - { - const TopoDS_Shape& aShell=aExp.Current(); - const TopoDS_Shape& aShellR=myOrigins.Find(aShell); - aBB.Add(aNewSolid, aShellR); - } - // - TopTools_ListOfShape aLS; - // - aLS.Append(aSolid); - myImages.Bind(aNewSolid, aLS); - myOrigins.Bind(aSolid, aNewSolid); - // - aBB.Add(theResult, aNewSolid); - } - else if (theShape.ShapeType() == TopAbs_WIRE) { - if (myKeepNonSolids) { - // just add image - if (!myOrigins.IsBound(theShape)) { - // build wire - const TopoDS_Wire& aW=TopoDS::Wire(theShape); - // - TopoDS_Wire newWire; - aBB.MakeWire(newWire); - // - TopExp_Explorer aExpE (aW, TopAbs_EDGE); - for (; aExpE.More(); aExpE.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current()); - TopoDS_Edge aER=TopoDS::Edge(myOrigins.Find(aE)); - // - aER.Orientation(TopAbs_FORWARD); - if (!BRep_Tool::Degenerated(aER)) { - // build p-curve - //if (bIsUPeriodic) { - // GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax); - //} - //BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD); - // - // orient image - Standard_Boolean bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext); - if (bIsToReverse) { - aER.Reverse(); - } - } - else { - aER.Orientation(aE.Orientation()); - } - // - aBB.Add(newWire, aER); - } - // xf - TopTools_ListOfShape aLW; - // - aLW.Append(aW); - myImages.Bind(newWire, aLW); - myOrigins.Bind(aW, newWire); - } - const TopoDS_Shape& aShapeR = myOrigins.Find(theShape); - aBB.Add(theResult, aShapeR); - } - } - else - { - if (myKeepNonSolids) { - // just add image - const TopoDS_Shape& aShapeR = myOrigins.Find(theShape); - aBB.Add(theResult, aShapeR); - } - } -} -//======================================================================= -//function : MakeSolids -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::MakeSolids() -{ - myErrorStatus=0; - // - BRep_Builder aBB; - TopoDS_Compound aCmp; - TopTools_MapOfShape aMS; - // - aBB.MakeCompound(aCmp); - // - // Add images of all initial sub-shapes in the result. - // If myKeepNonSolids==false, add only solids images. - MakeSubShapes(myShape, aMS, aCmp); - // - myResult=aCmp; - // - if (aMS.Extent()) { - BOP_CorrectTolerances::CorrectCurveOnSurface(myResult); - } -} -//======================================================================= -//function : MakeShells -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::MakeShells() -{ - myErrorStatus=0; - // - Standard_Boolean bIsToReverse; - Standard_Integer i, aNbS; - TopAbs_Orientation anOr; - TopoDS_Shell aNewShell; - TopoDS_Face aFR; - TopTools_IndexedMapOfShape aMS; - TopExp_Explorer aExp; - BRep_Builder aBB; - // - TopExp::MapShapes(myShape, TopAbs_SHELL, aMS); - // - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shell& aShell=TopoDS::Shell(aMS(i)); - anOr=aShell.Orientation(); - // - aBB.MakeShell(aNewShell); - aNewShell.Orientation(anOr); - aExp.Init(aShell, TopAbs_FACE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Face& aF=TopoDS::Face(aExp.Current()); - aFR=TopoDS::Face(myOrigins.Find(aF)); - if (aFR.IsSame(aF)) { - aBB.Add(aNewShell, aF); - continue; - } - bIsToReverse=IsToReverse(aFR, aF); - if (bIsToReverse) { - aFR.Reverse(); - } - aBB.Add(aNewShell, aFR); - } - // - TopTools_ListOfShape aLS; - // - aLS.Append(aShell); - myImages.Bind(aNewShell, aLS); - myOrigins.Bind(aShell, aNewShell); - } -} -//======================================================================= -//function : MakeFaces -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::MakeFaces() -{ - MakeShapes(TopAbs_FACE); -} -//======================================================================= -//function : MakeEdges -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::MakeEdges() -{ - MakeShapes(TopAbs_EDGE); -} -//======================================================================= -//function : MakeShapes -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) -{ - myErrorStatus=0; - // - Standard_Boolean bHasNewSubShape; - Standard_Integer i, aNbF, aNbSDF, iErr; - TopoDS_Shape aNewShape; - TopTools_IndexedMapOfShape aMF; - TopTools_ListIteratorOfListOfShape aItS; - GEOMAlgo_PassKeyShape aPKF; - GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF; - // - TopExp::MapShapes(myShape, aType, aMF); - // - aNbF=aMF.Extent(); - for (i=1; i<=aNbF; ++i) { - const TopoDS_Shape& aS=aMF(i); - // - if (aType==TopAbs_FACE) { - const TopoDS_Face& aF=TopoDS::Face(aS); - FacePassKey(aF, aPKF); - } - else if (aType==TopAbs_EDGE) { - const TopoDS_Edge& aE=TopoDS::Edge(aS); - EdgePassKey(aE, aPKF); - } - // - if (myErrorStatus) { - return; - } - // - if (aMPKLF.Contains(aPKF)) { - TopTools_ListOfShape& aLSDF=aMPKLF.ChangeFromKey(aPKF); - aLSDF.Append(aS); - } - else { - TopTools_ListOfShape aLSDF; - // - aLSDF.Append(aS); - aMPKLF.Add(aPKF, aLSDF); - } - } - // check geometric coincidence - if (myCheckGeometry) { - iErr=GEOMAlgo_Tools::RefineSDShapes(aMPKLF, myTol, myContext); - if (iErr) { - myErrorStatus=200; - return; - } - } - // - // Images/Origins - // - aNbF=aMPKLF.Extent(); - for (i=1; i<=aNbF; ++i) { - const TopTools_ListOfShape& aLSDF=aMPKLF(i); - aNbSDF=aLSDF.Extent(); - if (!aNbSDF) { - myErrorStatus=4; // it must not be - } - // - const TopoDS_Shape& aS1=aLSDF.First(); - // - bHasNewSubShape=Standard_True; - // prevent creation of a new shape if there are not - // new sub-shapes of aSS among the originals - if (aNbSDF==1) { - bHasNewSubShape=HasNewSubShape(aS1); - if (!bHasNewSubShape) { - aNewShape=aS1; - aNewShape.Orientation(TopAbs_FORWARD); - } - } - // - if (bHasNewSubShape) { - if (aType==TopAbs_FACE) { - TopoDS_Face aNewFace; - // - const TopoDS_Face& aF1=TopoDS::Face(aS1); - MakeFace(aF1, aNewFace); - aNewShape=aNewFace; - } - else if (aType==TopAbs_EDGE) { - TopoDS_Edge aNewEdge; - // - const TopoDS_Edge& aE1=TopoDS::Edge(aS1); - MakeEdge(aE1, aNewEdge); - aNewShape=aNewEdge; - } - } - // - myImages.Bind(aNewShape, aLSDF); - // origins - aItS.Initialize(aLSDF); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aFSD=aItS.Value(); - if (!myOrigins.IsBound(aFSD)) { - myOrigins.Bind(aFSD, aNewShape); - } - } - } -} -//======================================================================= -//function : CheckResult -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::CheckResult() -{ - myErrorStatus=0; - // - if (myResult.IsNull()) { - myErrorStatus=6; - return; - } - // - Standard_Boolean bFound; - Standard_Integer i, j, aNbS, aNbFS, aNbSx; - TopTools_IndexedMapOfShape aMS, aMFS; - TopTools_IndexedDataMapOfShapeListOfShape aMFR; - // - TopExp::MapShapesAndAncestors(myResult, TopAbs_FACE, TopAbs_SOLID, aMFR); - TopExp::MapShapes(myResult, TopAbs_SOLID, aMS); - // - - myNbAlone=0; - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aSolid=aMS(i); - // - aMFS.Clear(); - TopExp::MapShapes(aSolid, TopAbs_FACE, aMFS); - // - bFound=Standard_False; - aNbFS=aMFS.Extent(); - for (j=1; j<=aNbFS; ++j) { - const TopoDS_Shape& aFS=aMFS(j); - if (aMFR.Contains(aFS)) { - const TopTools_ListOfShape& aLSx=aMFR.FindFromKey(aFS); - aNbSx=aLSx.Extent(); - if (aNbSx==2) { - bFound=!bFound; - break; - } - } - } - // - if (!bFound) { - myWarningStatus=1; - ++myNbAlone; - //break; - } - } -} -//======================================================================= -//function : CheckData -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::CheckData() -{ - myErrorStatus=0; - // - if (myShape.IsNull()) { - myErrorStatus=5; - return; - } -} -//======================================================================= -//function : InnerTolerance -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::InnerTolerance() -{ - myErrorStatus=0; - // - /* - Standard_Integer i; - Standard_Real aX[3][2], dH, dHmin, aCoef, aTolTresh; - Bnd_Box aBox; - // - BRepBndLib::Add(myShape, aBox); - aBox.Get(aX[0][0], aX[1][0], aX[2][0], aX[0][1], aX[1][1], aX[2][1]); - // - dHmin=aX[0][1]-aX[0][0]; - for (i=1; i<3; ++i) { - dH=aX[i][1]-aX[i][0]; - if (dHaTolTresh) { - myTol=aTolTresh; - } - */ - myTol=myTolerance; -} -//======================================================================= -//function : FacePassKey -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, - GEOMAlgo_PassKeyShape& aPK) -{ - Standard_Integer i, aNbE; - TopTools_ListOfShape aLE; - TopTools_IndexedMapOfShape aME; - // - TopExp::MapShapes(aF, TopAbs_EDGE, aME); - aNbE=aME.Extent(); - // - for (i=1; i<=aNbE; ++i) { - const TopoDS_Shape& aE=aME(i); - if (!myOrigins.IsBound(aE)) { - myErrorStatus=102; - return; - } - const TopoDS_Shape& aER=myOrigins.Find(aE); - aLE.Append(aER); - } - aPK.SetShapes(aLE); -} -//======================================================================= -//function : EdgePassKey -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE, - GEOMAlgo_PassKeyShape& aPK) -{ - TopoDS_Vertex aV1, aV2; - // - TopExp::Vertices(aE, aV1, aV2); - // - if (!myOrigins.IsBound(aV1) || !myOrigins.IsBound(aV2) ) { - myErrorStatus=100; - return; - } - const TopoDS_Shape& aVR1=myOrigins.Find(aV1); - const TopoDS_Shape& aVR2=myOrigins.Find(aV2); - aPK.SetShapes(aVR1, aVR2); -} -//======================================================================= -//function : MakeVertex -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::MakeVertex(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 : MakeEdge -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE, - TopoDS_Edge& aNewEdge) -{ - myErrorStatus=0; - // - Standard_Boolean bIsDE; - Standard_Real aT1, aT2; - TopoDS_Vertex aV1, aV2, aVR1, aVR2; - TopoDS_Edge aEx; - // - bIsDE=BRep_Tool::Degenerated(aE); - // - aEx=aE; - aEx.Orientation(TopAbs_FORWARD); - // - TopExp::Vertices(aEx, aV1, aV2); - // - aT1=BRep_Tool::Parameter(aV1, aEx); - aT2=BRep_Tool::Parameter(aV2, aEx); - // - aVR1=TopoDS::Vertex(myOrigins.Find(aV1)); - aVR1.Orientation(TopAbs_FORWARD); - aVR2=TopoDS::Vertex(myOrigins.Find(aV2)); - aVR2.Orientation(TopAbs_REVERSED); - // - if (bIsDE) { - Standard_Real aTol; - BRep_Builder aBB; - TopoDS_Edge E; - TopAbs_Orientation anOrE; - // - anOrE=aE.Orientation(); - aTol=BRep_Tool::Tolerance(aE); - // - E=aEx; - E.EmptyCopy(); - // - aBB.Add (E, aVR1); - aBB.Add (E, aVR2); - aBB.Range(E, aT1, aT2); - aBB.Degenerated(E, Standard_True); - aBB.UpdateEdge(E, aTol); - // - aNewEdge=E; - } - // - else { - BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge); - } -} -//======================================================================= -//function : MakeFace -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF, - TopoDS_Face& aNewFace) -{ - myErrorStatus=0; - // - Standard_Boolean bIsToReverse, bIsUPeriodic; - Standard_Real aTol, aUMin, aUMax, aVMin, aVMax; - TopoDS_Edge aER; - TopoDS_Wire newWire; - TopoDS_Face aFFWD, newFace; - TopLoc_Location aLoc; - Handle(Geom_Surface) aS; - Handle(Geom2d_Curve) aC2D; - TopExp_Explorer aExpW, aExpE; - BRep_Builder aBB; - // - aFFWD=aF; - aFFWD.Orientation(TopAbs_FORWARD); - // - aS=BRep_Tool::Surface(aFFWD, aLoc); - bIsUPeriodic=GEOMAlgo_Tools::IsUPeriodic(aS); - aTol=BRep_Tool::Tolerance(aFFWD); - BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax); - // - aBB.MakeFace (newFace, aS, aLoc, aTol); - // - aExpW.Init(aFFWD, TopAbs_WIRE); - for (; aExpW.More(); aExpW.Next()) { - aBB.MakeWire(newWire); - const TopoDS_Wire& aW=TopoDS::Wire(aExpW.Current()); - aExpE.Init(aW, TopAbs_EDGE); - for (; aExpE.More(); aExpE.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current()); - aER=TopoDS::Edge(myOrigins.Find(aE)); - // - aER.Orientation(TopAbs_FORWARD); - if (!BRep_Tool::Degenerated(aER)) { - // build p-curve - if (bIsUPeriodic) { - GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax); - } - BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD); - - // orient image - bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext); - if (bIsToReverse) { - aER.Reverse(); - } - } - else { - aER.Orientation(aE.Orientation()); - } - // - aBB.Add(newWire, aER); - } - // xf - TopTools_ListOfShape aLW; - // - aLW.Append(aW); - myImages.Bind(newWire, aLW); - myOrigins.Bind(aW, newWire); - // xt - aBB.Add(newFace, newWire); - } - aNewFace=newFace; -} -//======================================================================= -//function : IsToReverse -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR, - const TopoDS_Face& aF) -{ - Standard_Boolean bRet; - Standard_Real aT, aT1, aT2, aTR, aScPr; - TopExp_Explorer aExp; - Handle(Geom_Curve)aC3D; - gp_Pnt aP; - gp_Dir aDNF, aDNFR; - // - bRet=Standard_False; - // - aExp.Init(aF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current()); - // - if (BRep_Tool::Degenerated(aE)) { - continue; - } - // - const TopoDS_Edge& aER=TopoDS::Edge(myOrigins.Find(aE)); - // - aC3D=BRep_Tool::Curve(aE, aT1, aT2); - aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2); - aC3D->D0(aT, aP); - myContext->ProjectPointOnEdge(aP, aER, aTR); - // - BOPTools_Tools3D::GetNormalToFaceOnEdge (aE, aF, aT, aDNF); - if (aF.Orientation()==TopAbs_REVERSED) { - aDNF.Reverse(); - } - // - BOPTools_Tools3D::GetNormalToFaceOnEdge (aER, aFR, aTR, aDNFR); - if (aFR.Orientation()==TopAbs_REVERSED) { - aDNFR.Reverse(); - } - // - aScPr=aDNF*aDNFR; - return (aScPr<0.); - } - return bRet; -} -//======================================================================= -//function : HasNewSubShape -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape(const TopoDS_Shape& aS)const -{ - Standard_Boolean bRet; - Standard_Integer i, aNbSS; - TopTools_IndexedMapOfShape aMSS; - // - GetSubShapes(aS, aMSS); - // - bRet=Standard_False; - aNbSS=aMSS.Extent(); - for (i=1; i<=aNbSS; ++i) { - const TopoDS_Shape& aSS=aMSS(i); - if (aSS.ShapeType()==TopAbs_WIRE) { - continue; - } - // - bRet=!myOrigins.IsBound(aSS); - if (bRet) { - return bRet; - } - // - const TopoDS_Shape& aSSIm=myOrigins.Find(aSS); - bRet=!aSSIm.IsSame(aSS); - if (bRet) { - return bRet; - } - } - return bRet; -} -//======================================================================= -//function : GetSubShapes -//purpose : -//======================================================================= -void GetSubShapes(const TopoDS_Shape& aS, - TopTools_IndexedMapOfShape& aMSS) -{ - Standard_Integer aR; - TopAbs_ShapeEnum aType; - TopoDS_Iterator aIt; - // - aType=aS.ShapeType(); - aR=(Standard_Integer)aType+1; - if (aR>TopAbs_VERTEX) { - return; - } - // - aIt.Initialize(aS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSS=aIt.Value(); - aMSS.Add(aSS); - GetSubShapes(aSS, aMSS); - } -} -//======================================================================= -//function : Modified -//purpose : -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS) -{ - TopAbs_ShapeEnum aType; - // - myGenerated.Clear(); - // - aType=aS.ShapeType(); - if (aType==TopAbs_VERTEX || - aType==TopAbs_EDGE || - aType==TopAbs_WIRE || - aType==TopAbs_FACE || - aType==TopAbs_SHELL || - aType==TopAbs_SOLID) { - if(myOrigins.IsBound(aS)) { - const TopoDS_Shape& aSnew=myOrigins.Find(aS); - if (!aSnew.IsSame(aS)) { - myGenerated.Append(aSnew); - } - } - } - // - return myGenerated; -} -//======================================================================= -//function : Generated -//purpose : -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_Gluer::Generated(const TopoDS_Shape& ) -{ - myGenerated.Clear(); - return myGenerated; -} -//======================================================================= -//function : IsDeleted -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_Gluer::IsDeleted (const TopoDS_Shape& aS) -{ - Standard_Boolean bRet=Standard_False; - // - const TopTools_ListOfShape& aL=Modified(aS); - bRet=!aL.IsEmpty(); - // - return bRet; -} - -// -// ErrorStatus -// -// 1 - the object is just initialized -// 2 - no vertices found in source shape -// 3 - nb same domain vertices for the vertex Vi =0 -// 4 - nb same domain edges(faces) for the edge Ei(face Fi) =0 -// 5 - source shape is Null -// 6 - result shape is Null -// 101 - nb edges > PassKey.NbMax() in FacesPassKey() -// 102 - the edge Ei can not be found in myOrigins Map -// 100 - the vertex Vi can not be found in myOrigins Map -// -// WarningStatus -// -// 1 - some shapes can not be glued by faces -// diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_Gluer.hxx deleted file mode 100644 index 406004e7c..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer.hxx +++ /dev/null @@ -1,164 +0,0 @@ - -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Gluer.hxx -// Created: Sat Dec 04 12:45:53 2004 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_Gluer_HeaderFile -#define _GEOMAlgo_Gluer_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_Gluer -//purpose : -//======================================================================= -class GEOMAlgo_Gluer : public GEOMAlgo_ShapeAlgo { -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 - void SetKeepNonSolids(const Standard_Boolean aFlag) ; - - Standard_EXPORT - Standard_Boolean KeepNonSolids() 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; - - 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; - - Standard_EXPORT - void MakeSubShapes(const TopoDS_Shape& aS, - TopTools_MapOfShape& aM, - TopoDS_Compound& aC) ; - - - Standard_Boolean myCheckGeometry; - Standard_Boolean myKeepNonSolids; - Standard_Real myTol; - TopTools_DataMapOfShapeListOfShape myImages; - TopTools_DataMapOfShapeShape myOrigins; - Standard_Integer myNbAlone; - TopTools_ListOfShape myGenerated; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2.cxx deleted file mode 100644 index 0a7b969bf..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2.cxx +++ /dev/null @@ -1,650 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Gluer2.cxx -// Author: Peter KURNEV - -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -//======================================================================= -//function : GEOMAlgo_Gluer2 -//purpose : -//======================================================================= -GEOMAlgo_Gluer2::GEOMAlgo_Gluer2() -: - GEOMAlgo_GluerAlgo(), - GEOMAlgo_BuilderShape() -{ - myTolerance=0.0001; -} -//======================================================================= -//function : ~GEOMAlgo_Gluer2 -//purpose : -//======================================================================= -GEOMAlgo_Gluer2::~GEOMAlgo_Gluer2() -{ -} -//======================================================================= -//function : Clear -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::Clear() -{ - myErrorStatus=0; - myWarningStatus=0; - // - GEOMAlgo_GluerAlgo::Clear(); - // - myImagesDetected.Clear(); - myOriginsDetected.Clear(); - myShapesToGlue.Clear(); - myImagesToWork.Clear(); - myOriginsToWork.Clear(); - myKeepNonSolids=Standard_False; - //modified by NIZNHY-PKV Tue Mar 13 13:38:28 2012f - myDetector.Clear(); - //modified by NIZNHY-PKV Tue Mar 13 13:38:30 2012t -} -//modified by NIZNHY-PKV Tue Mar 13 12:26:50 2012f -//======================================================================= -//function : StickedShapes -//purpose : -//======================================================================= -const TopTools_IndexedDataMapOfShapeListOfShape& - GEOMAlgo_Gluer2::StickedShapes() -{ - return myDetector.StickedShapes(); -} -//modified by NIZNHY-PKV Tue Mar 13 12:26:54 2012t -//======================================================================= -//function : SetShapesToGlue -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) -{ - myShapesToGlue=aM; -} -//======================================================================= -//function : ShapesToGlue -//purpose : -//======================================================================= -const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ShapesToGlue()const -{ - return myShapesToGlue; -} -//======================================================================= -//function : SetKeepNonSolids -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::SetKeepNonSolids(const Standard_Boolean aFlag) -{ - myKeepNonSolids=aFlag; -} -//======================================================================= -//function : KeepNonSolids -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_Gluer2::KeepNonSolids()const -{ - return myKeepNonSolids; -} -//======================================================================= -//function : ShapesDetected -//purpose : -//======================================================================= -const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ShapesDetected()const -{ - return myImagesDetected; -} -//======================================================================= -//function : ImagesToWork -//purpose : -//======================================================================= -const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_Gluer2::ImagesToWork()const -{ - return myImagesToWork; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::Perform() -{ - myErrorStatus=0; - myWarningStatus=0; - // - CheckData(); - if (myErrorStatus) { - return; - } - // - // Initialize the context - GEOMAlgo_GluerAlgo::Perform(); - // - PerformShapesToWork(); - if (myErrorStatus) { - return; - } - if (myWarningStatus==1) { - // no shapes to glue - myShape=myArgument; - return; - } - // - FillVertices(); - if (myErrorStatus) { - return; - } - // - FillEdges(); - if (myErrorStatus) { - return; - } - // - FillWires(); - if (myErrorStatus) { - return; - } - // - FillFaces(); - if (myErrorStatus) { - return; - } - // - FillShells(); - if (myErrorStatus) { - return; - } - // - FillSolids(); - if (myErrorStatus) { - return; - } - // - FillCompSolids(); - if (myErrorStatus) { - return; - } - // - FillCompounds(); - if (myErrorStatus) { - return; - } - // - BuildResult(); - if (myErrorStatus) { - return; - } - // - PrepareHistory(); - if (myErrorStatus) { - return; - } - // - BRepLib::SameParameter(myShape, myTolerance, Standard_True); -} -//======================================================================= -//function : CheckData -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::CheckData() -{ - Standard_Integer aNbSG, i; - TopAbs_ShapeEnum aType, aTypeX; - TopTools_ListIteratorOfListOfShape aItLS; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS; - // - myErrorStatus=0; - myWarningStatus=0; - // - aNbSG=myShapesToGlue.Extent(); - if (aNbSG) { - // Check myShapesToGlue - aItDMSLS.Initialize(myShapesToGlue); - for (; aItDMSLS.More(); aItDMSLS.Next()) { - //const TopoDS_Shape& aSkey=aItDMSLS.Key(); - const TopTools_ListOfShape& aLSG=aItDMSLS.Value(); - aItLS.Initialize(aLSG); - for (i=0; aItLS.More(); aItLS.Next(), ++i) { - const TopoDS_Shape& aSG=aItLS.Value(); - aTypeX=aSG.ShapeType(); - if (!i) { - aType=aTypeX; - if (!(aType==TopAbs_VERTEX || - aType==TopAbs_EDGE || - aType==TopAbs_FACE)) { - myErrorStatus=21;// non-brep shapes - return; - } - continue; - } - if (aTypeX!=aType) { - myErrorStatus=20;// non-homogeneous shapes - return; - } - } - } - }// if (aNbSG) { -} -//======================================================================= -//function : FillEdges -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::FillEdges() -{ - FillBRepShapes(TopAbs_EDGE); -} -//======================================================================= -//function : FillFaces -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::FillFaces() -{ - FillBRepShapes(TopAbs_FACE); -} -//======================================================================= -//function : FillWires -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::FillWires() -{ - FillContainers(TopAbs_WIRE); -} -//======================================================================= -//function : FillShells -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::FillShells() -{ - FillContainers(TopAbs_SHELL); -} -//======================================================================= -//function : FillSolids -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::FillSolids() -{ - FillContainers(TopAbs_SOLID); -} -//======================================================================= -//function : FillCompSolids -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::FillCompSolids() -{ - FillContainers(TopAbs_COMPSOLID); -} -//======================================================================= -//function : FillVertices -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::FillVertices() -{ - TopAbs_ShapeEnum aType; - TopoDS_Vertex aVnew; - TopTools_ListIteratorOfListOfShape aItLS; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS; - // - myErrorStatus=0; - myWarningStatus=0; - // - aItDMSLS.Initialize(myImagesToWork); - for (; aItDMSLS.More(); aItDMSLS.Next()) { - const TopoDS_Shape& aSkey=aItDMSLS.Key(); - aType=aSkey.ShapeType(); - if (aType!=TopAbs_VERTEX) { - continue; - } - // - const TopTools_ListOfShape& aLSD=aItDMSLS.Value(); - // - GEOMAlgo_Gluer2::MakeVertex(aLSD, aVnew); - // - myImages.Bind(aVnew, aLSD); - // - aItLS.Initialize(aLSD); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aV=aItLS.Value(); - myOrigins.Bind(aV, aVnew); - } - } -} -//======================================================================= -//function : FillBRepShapes -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::FillBRepShapes(const TopAbs_ShapeEnum theType) -{ - Standard_Boolean bHasImage, bIsToWork; - Standard_Integer i, aNbE; - TopoDS_Iterator aItS; - TopoDS_Shape aEnew; - TopTools_IndexedMapOfShape aME; - TopTools_MapOfShape aMFence; - TopTools_ListIteratorOfListOfShape aItLS; - // - myErrorStatus=0; - myWarningStatus=0; - // - TopExp::MapShapes(myArgument, theType, aME); - // - aNbE=aME.Extent(); - for (i=1; i<=aNbE; ++i) { - const TopoDS_Shape& aE=aME(i); - // - if (!aMFence.Add(aE)) { - continue; - } - // - bIsToWork=myOriginsToWork.IsBound(aE); - bHasImage=HasImage(aE); - if (!bHasImage && !bIsToWork) { - continue; - } - // - MakeBRepShapes(aE, aEnew); - // - //myImages / myOrigins - if (bIsToWork) { - const TopoDS_Shape& aSkey=myOriginsToWork.Find(aE); - const TopTools_ListOfShape& aLSD=myImagesToWork.Find(aSkey); - // - myImages.Bind(aEnew, aLSD); - // - aItLS.Initialize(aLSD); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aEx=aItLS.Value(); - myOrigins.Bind(aEx, aEnew); - // - aMFence.Add(aEx); - } - } - else { - TopTools_ListOfShape aLSD; - // - aLSD.Append(aE); - myImages.Bind(aEnew, aLSD); - myOrigins.Bind(aE, aEnew); - } - }//for (i=1; i<=aNbF; ++i) { -} -//======================================================================= -//function : FillContainers -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::FillContainers(const TopAbs_ShapeEnum aType) -{ - Standard_Boolean bHasImage, bToReverse; - Standard_Integer i, aNbW; - TopoDS_Shape aWnew, aEnew; - TopoDS_Iterator aItS; - BRep_Builder aBB; - TopTools_IndexedMapOfShape aMW; - TopTools_MapOfShape aMFence; - // - myErrorStatus=0; - myWarningStatus=0; - // - TopExp::MapShapes(myArgument, aType, aMW); - // - aNbW=aMW.Extent(); - for (i=1; i<=aNbW; ++i) { - const TopoDS_Shape& aW=aMW(i); - // - if (!aMFence.Add(aW)) { - continue; - } - // - bHasImage=HasImage(aW); - if (!bHasImage) { - continue; - } - // - GEOMAlgo_Tools3D::MakeContainer(aType, aWnew); - aWnew.Orientation(aW.Orientation()); - // - aItS.Initialize(aW); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aE=aItS.Value(); - if (myOrigins.IsBound(aE)) { - aEnew=myOrigins.Find(aE); - // - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aEnew, aE, myContext); - if (bToReverse) { - aEnew.Reverse(); - } - // - aBB.Add(aWnew, aEnew); - } - else { - aBB.Add(aWnew, aE); - } - } - // - //myImages / myOrigins - TopTools_ListOfShape aLSD; - // - aLSD.Append(aW); - myImages.Bind(aWnew, aLSD); - myOrigins.Bind(aW, aWnew); - // - }//for (i=1; i<=aNbE; ++i) { -} -//======================================================================= -//function : FillCompounds -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::FillCompounds() -{ - TopAbs_ShapeEnum aType; - TopoDS_Iterator aItC; - // - myErrorStatus=0; - myWarningStatus=0; - // - aItC.Initialize(myArgument); - for (; aItC.More(); aItC.Next()) { - const TopoDS_Shape& aCx=aItC.Value(); - aType=aCx.ShapeType(); - if (aType==TopAbs_COMPOUND) { - FillCompound(aCx); - } - } -} -//======================================================================= -//function : FillCompound -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::FillCompound(const TopoDS_Shape& aC) -{ - Standard_Boolean bHasImage; - TopAbs_ShapeEnum aType; - TopoDS_Shape aCnew, aCXnew; - TopoDS_Iterator aItC; - BRep_Builder aBB; - // - bHasImage=HasImage(aC); - if (!bHasImage) { - return; - } - // - GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew); - // - aItC.Initialize(aC); - for (; aItC.More(); aItC.Next()) { - const TopoDS_Shape& aCX=aItC.Value(); - aType=aCX.ShapeType(); - // - if (aType==TopAbs_COMPOUND) { - FillCompound(aCX); - } - // - if (myOrigins.IsBound(aCX)) { - aCXnew=myOrigins.Find(aCX); - aCXnew.Orientation(aCX.Orientation()); - aBB.Add(aCnew, aCXnew); - } - else { - aBB.Add(aCnew, aCX); - } - } - // - //myImages / myOrigins - TopTools_ListOfShape aLSD; - // - aLSD.Append(aC); - myImages.Bind(aCnew, aLSD); - myOrigins.Bind(aC, aCnew); -} -//======================================================================= -//function : HasImage -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_Gluer2::HasImage(const TopoDS_Shape& aC) -{ - Standard_Boolean bRet; - TopAbs_ShapeEnum aType; - TopoDS_Iterator aItC; - // - bRet=Standard_False; - aItC.Initialize(aC); - for (; aItC.More(); aItC.Next()) { - const TopoDS_Shape& aCx=aItC.Value(); - aType=aCx.ShapeType(); - // - if (aType==TopAbs_COMPOUND) { - bRet=HasImage(aCx); - if (bRet) { - return bRet; - } - } - else { - bRet=myOrigins.IsBound(aCx); - if (bRet) { - return bRet; - } - } - } - // - bRet=myOrigins.IsBound(aC); - // - return bRet; -} -//======================================================================= -//function : BuildResult -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::BuildResult() -{ - Standard_Boolean bHasImage; - TopoDS_Shape aCnew, aCXnew; - TopoDS_Iterator aItC; - BRep_Builder aBB; - // - myErrorStatus=0; - myWarningStatus=0; - // - aItC.Initialize(myArgument); - for (; aItC.More(); aItC.Next()) { - const TopoDS_Shape& aCx=aItC.Value(); - bHasImage=HasImage(aCx); - if (bHasImage) { - break; - } - } - // - if (!bHasImage) { - myShape=myArgument; - return; - } - // - GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew); - // - aItC.Initialize(myArgument); - for (; aItC.More(); aItC.Next()) { - const TopoDS_Shape& aCX=aItC.Value(); - if (myOrigins.IsBound(aCX)) { - aCXnew=myOrigins.Find(aCX); - aCXnew.Orientation(aCX.Orientation()); - aBB.Add(aCnew, aCXnew); - } - else { - aBB.Add(aCnew, aCX); - } - } - // - if (!myKeepNonSolids) { - Standard_Integer i, aNb; - TopoDS_Shape aCnew1; - TopTools_IndexedMapOfShape aM; - // - GEOMAlgo_Tools3D::MakeContainer(TopAbs_COMPOUND, aCnew1); - // - TopExp::MapShapes(aCnew, TopAbs_SOLID, aM); - - aNb=aM.Extent(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aS=aM(i); - aBB.Add(aCnew1, aS); - } - aCnew=aCnew1; - } - // - myShape=aCnew; -} -//-------------------------------------------------------- -// -// ErrorStatus -// 11 - GEOMAlgo_GlueDetector failed -// 13 - PerformImagesToWork failed -// 14 - PerformImagesToWork failed -// -// WarningStatus -// 1 - no shapes to glue -// 2 - sticked shapes are detected. -// The value of myTolerance is so large that -// subshapes of a shape becomes intefere -// (e.g. vertices of an edge). -// In the case -// the result is can not be obtained diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2.hxx deleted file mode 100644 index f380802b9..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2.hxx +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Gluer2.hxx -// Author: Peter KURNEV - -#ifndef _GEOMAlgo_Gluer2_HeaderFile -#define _GEOMAlgo_Gluer2_HeaderFile - -#include -#include -#include - -#include - -#include -#include - -#include -#include - -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_Gluer2 -//purpose : -//======================================================================= -class GEOMAlgo_Gluer2 : public GEOMAlgo_GluerAlgo, - public GEOMAlgo_BuilderShape { -public: - - Standard_EXPORT - GEOMAlgo_Gluer2(); - - Standard_EXPORT - virtual ~GEOMAlgo_Gluer2(); - - Standard_EXPORT - void SetShapesToGlue(const TopTools_DataMapOfShapeListOfShape& aM) ; - - Standard_EXPORT - const TopTools_DataMapOfShapeListOfShape& ShapesToGlue() const; - - Standard_EXPORT - void SetKeepNonSolids(const Standard_Boolean theFlag) ; - - Standard_EXPORT - Standard_Boolean KeepNonSolids() const; - - Standard_EXPORT virtual void Clear() ; - - Standard_EXPORT - virtual void Perform() ; - - Standard_EXPORT - virtual void CheckData() ; - - Standard_EXPORT - void Detect() ; - - Standard_EXPORT - const TopTools_DataMapOfShapeListOfShape& ShapesDetected() const; - - Standard_EXPORT - const TopTools_DataMapOfShapeListOfShape& ImagesToWork() const; - - Standard_EXPORT - virtual const TopTools_ListOfShape& Generated(const TopoDS_Shape& theS) ; - - Standard_EXPORT - virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& theS) ; - - Standard_EXPORT - virtual Standard_Boolean IsDeleted(const TopoDS_Shape& theS) ; - - Standard_EXPORT - static void MakeVertex(const TopTools_ListOfShape& theLV, - TopoDS_Vertex& theV) ; - - Standard_EXPORT - static void MapBRepShapes(const TopoDS_Shape& theS, - TopTools_MapOfShape& theM) ; - - Standard_EXPORT - static void MapShapes(const TopoDS_Shape& theS, - TopTools_MapOfShape& theM) ; - -//modified by NIZNHY-PKV Tue Mar 13 12:23:20 2012f - Standard_EXPORT - const TopTools_IndexedDataMapOfShapeListOfShape& StickedShapes(); -//modified by NIZNHY-PKV Tue Mar 13 12:23:26 2012t -//------------------------------------------------ -protected: - Standard_EXPORT - void PerformShapesToWork() ; - - Standard_EXPORT - void FillVertices() ; - - Standard_EXPORT - void FillEdges() ; - - Standard_EXPORT - void FillWires() ; - - Standard_EXPORT - void FillFaces() ; - - Standard_EXPORT - void FillShells() ; - - Standard_EXPORT - void FillSolids() ; - - Standard_EXPORT - void FillCompSolids() ; - - Standard_EXPORT - void FillCompounds() ; - - Standard_EXPORT - void BuildResult() ; - - Standard_EXPORT - void FillBRepShapes(const TopAbs_ShapeEnum theType) ; - - Standard_EXPORT - void FillContainers(const TopAbs_ShapeEnum theType) ; - - Standard_EXPORT - void FillCompound(const TopoDS_Shape& theC) ; - - Standard_EXPORT - virtual void PrepareHistory() ; - - Standard_EXPORT - Standard_Boolean HasImage(const TopoDS_Shape& theC) ; - - Standard_EXPORT - void MakeBRepShapes(const TopoDS_Shape& theS, - TopoDS_Shape& theSnew) ; - - Standard_EXPORT - void MakeEdge(const TopoDS_Edge& theE, - TopoDS_Edge& theEnew) ; - - Standard_EXPORT - void MakeFace(const TopoDS_Face& theF, - TopoDS_Face& theFnew) ; - - Standard_EXPORT - void TreatPair(const NMTTools_CoupleOfShape& theCS, - NMTTools_ListOfCoupleOfShape& theLCS) ; - -protected: - TopTools_DataMapOfShapeListOfShape myShapesToGlue; - TopTools_DataMapOfShapeListOfShape myImagesDetected; - TopTools_DataMapOfShapeShape myOriginsDetected; - TopTools_DataMapOfShapeListOfShape myImagesToWork; - TopTools_DataMapOfShapeShape myOriginsToWork; - Standard_Boolean myKeepNonSolids; - //modified by NIZNHY-PKV Tue Mar 13 13:30:40 2012f - GEOMAlgo_GlueDetector myDetector; - //modified by NIZNHY-PKV Tue Mar 13 13:30:43 2012t -private: -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_1.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_1.cxx deleted file mode 100644 index 400613da7..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_1.cxx +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Gluer2_1.cxx -// Author: Peter KURNEV - -#include - -#include -#include - -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include - -//======================================================================= -//function : MakeBRepShapes -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::MakeBRepShapes(const TopoDS_Shape& theS, - TopoDS_Shape& theSnew) -{ - TopAbs_ShapeEnum aType; - // - aType=theS.ShapeType(); - if (aType==TopAbs_EDGE) { - TopoDS_Edge aEE, aEEnew; - // - aEE=*((TopoDS_Edge*)&theS); - MakeEdge(aEE, aEEnew); - if (myErrorStatus) { - return; - } - // - theSnew=aEEnew; - } - else if (aType==TopAbs_FACE) { - TopoDS_Face aFF, aFFnew; - // - aFF=*((TopoDS_Face*)&theS); - MakeFace(aFF, aFFnew); - if (myErrorStatus) { - return; - } - // - theSnew=aFFnew; - } -} -//======================================================================= -//function : MakeFace -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::MakeFace(const TopoDS_Face& theF, - TopoDS_Face& theFnew) -{ - Standard_Boolean bIsToReverse, bIsUPeriodic; - Standard_Integer iRet; - Standard_Real aTol, aUMin, aUMax, aVMin, aVMax; - TopAbs_Orientation aOrE; - Handle(Geom_Surface) aS; - TopLoc_Location aLoc; - TopoDS_Shape aW, aWr; - TopoDS_Edge aEx; - TopoDS_Face aFF, aFnew; - TopoDS_Iterator aItW, aItE; - BRep_Builder aBB; - TopTools_ListOfShape aLEr; - TopTools_ListIteratorOfListOfShape aItLE; - // - myErrorStatus=0; - // - aFF=theF; - aFF.Orientation(TopAbs_FORWARD); - // - aTol=BRep_Tool::Tolerance(aFF); - aS=BRep_Tool::Surface(aFF, aLoc); - bIsUPeriodic=GEOMAlgo_Tools::IsUPeriodic(aS); - BRepTools::UVBounds(aFF, aUMin, aUMax, aVMin, aVMax); - // - aBB.MakeFace (aFnew, aS, aLoc, aTol); - // - aItW.Initialize(aFF); - for (; aItW.More(); aItW.Next()) { - const TopoDS_Shape& aW=aItW.Value(); - // - if (!myOrigins.IsBound(aW)) { - aBB.Add(aFnew, aW); - continue; - } - // - aWr=myOrigins.Find(aW); - // - // clear contents of Wr - aLEr.Clear(); - aItE.Initialize(aWr); - for (; aItE.More(); aItE.Next()) { - const TopoDS_Shape& aEr=aItE.Value(); - aLEr.Append(aEr); - } - // - aItLE.Initialize(aLEr); - for (; aItLE.More(); aItLE.Next()) { - const TopoDS_Shape& aEr=aItLE.Value(); - aBB.Remove(aWr, aEr); - } - // - // refill contents of Wr - aItE.Initialize(aW); - for (; aItE.More(); aItE.Next()) { - const TopoDS_Edge& aE=*((TopoDS_Edge*)(&aItE.Value())); - // - aEx=aE; - if (myOrigins.IsBound(aE)) { - aEx=*((TopoDS_Edge*)(&myOrigins.Find(aE))); - } - // - if (!BRep_Tool::Degenerated(aEx)) { - aEx.Orientation(TopAbs_FORWARD); - if (bIsUPeriodic) { - GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aEx, aFF, aUMin, aUMax); - } - // - //modified by NIZNHY-PKV Fri Feb 03 11:18:17 2012f - iRet=GEOMAlgo_Tools::BuildPCurveForEdgeOnFace(aE, aEx, aFF, myContext); - if (iRet) { - continue; - } - //BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aEx, aFF); - //modified by NIZNHY-PKV Fri Feb 03 11:18:20 2012t - // - bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aEx, aE, myContext); - if (bIsToReverse) { - aEx.Reverse(); - } - } - else { - aEx.Orientation(aE.Orientation()); - } - aBB.Add(aWr, aEx); - }// for (; aItE.More(); aItE.Next()) { - // - aBB.Add(aFnew, aWr); - }// for (; aItW.More(); aItW.Next()) { - theFnew=aFnew; -} -//======================================================================= -//function : MakeEdge -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::MakeEdge(const TopoDS_Edge& aE, - TopoDS_Edge& aNewEdge) -{ - myErrorStatus=0; - // - Standard_Boolean bIsDE; - Standard_Real aT1, aT2; - TopoDS_Vertex aV1, aV2, aVR1, aVR2; - TopoDS_Edge aEx; - // - bIsDE=BRep_Tool::Degenerated(aE); - // - aEx=aE; - aEx.Orientation(TopAbs_FORWARD); - // - TopExp::Vertices(aEx, aV1, aV2); - // - aT1=BRep_Tool::Parameter(aV1, aEx); - aT2=BRep_Tool::Parameter(aV2, aEx); - // - aVR1=aV1; - if (myOrigins.IsBound(aV1)) { - aVR1=*((TopoDS_Vertex*)&myOrigins.Find(aV1)); - } - aVR1.Orientation(TopAbs_FORWARD); - // - aVR2=aV2; - if (myOrigins.IsBound(aV2)) { - aVR2=*((TopoDS_Vertex*)&myOrigins.Find(aV2)); - } - aVR2.Orientation(TopAbs_REVERSED); - // - if (!bIsDE) { - BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge); - } - else { - Standard_Real aTol; - BRep_Builder aBB; - TopoDS_Edge E; - // - aTol=BRep_Tool::Tolerance(aE); - // - E=aEx; - E.EmptyCopy(); - // - aBB.Add (E, aVR1); - aBB.Add (E, aVR2); - aBB.Range(E, aT1, aT2); - aBB.Degenerated(E, Standard_True); - aBB.UpdateEdge(E, aTol); - // - aNewEdge=E; - } -} -//======================================================================= -//function : MakeVertex -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::MakeVertex(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 : MapBRepShapes -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::MapBRepShapes(const TopoDS_Shape& aS, - TopTools_MapOfShape& aM) -{ - //Standard_Boolean bHasBRep; - TopAbs_ShapeEnum aType; - TopoDS_Iterator aIt; - // - aType=aS.ShapeType(); - if (aType==TopAbs_VERTEX || - aType==TopAbs_EDGE || - aType==TopAbs_FACE) { - aM.Add(aS); - } - // - aIt.Initialize(aS); - for(; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSx=aIt.Value(); - aType=aSx.ShapeType(); - GEOMAlgo_Gluer2::MapBRepShapes(aSx, aM); - } -} - -// -// ErrorStatus -// -// 40 - GEOMAlgo_GlueDetector is failed diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_2.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_2.cxx deleted file mode 100644 index 375036bfc..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_2.cxx +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_Gluer2_2.cxx -// Created: -// Author: Peter KURNEV -// -// -#include - -#include - -#include -#include - -#include -#include - -//======================================================================= -//function : PrepareHistory -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::PrepareHistory() -{ - //Standard_Boolean bHasImage, bContainsSD; - // - // 1. Clearing - GEOMAlgo_BuilderShape::PrepareHistory(); - // - if(myShape.IsNull()) { - return; - } - // - GEOMAlgo_Gluer2::MapShapes(myShape, myMapShape); - // -} -//======================================================================= -//function : Generated -//purpose : -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_Gluer2::Generated(const TopoDS_Shape& ) -{ - myHistShapes.Clear(); - return myHistShapes; -} -//======================================================================= -//function : Modified -//purpose : -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_Gluer2::Modified(const TopoDS_Shape& theS) -{ - Standard_Boolean bIsDeleted, bHasImage, bToReverse; - TopAbs_ShapeEnum aType; - TopoDS_Shape aSim; - // - myHistShapes.Clear(); - // - aType=theS.ShapeType(); - if (!(aType==TopAbs_VERTEX || aType==TopAbs_EDGE || - aType==TopAbs_FACE || aType==TopAbs_SOLID)) { - return myHistShapes; - } - // - bIsDeleted=IsDeleted(theS); - if (bIsDeleted) { - return myHistShapes; - } - // - bHasImage=myOrigins.IsBound(theS); - if (!bHasImage) { - return myHistShapes; - } - // - aSim=myOrigins.Find(theS); - if (aSim.IsSame(theS)){ - return myHistShapes; - } - // - if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { - aSim.Orientation(theS.Orientation()); - } - else { - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSim, theS, myContext); - if (bToReverse) { - aSim.Reverse(); - } - } - // - myHistShapes.Append(aSim); - // - return myHistShapes; -} -//======================================================================= -//function : IsDeleted -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_Gluer2::IsDeleted(const TopoDS_Shape& theS) -{ - Standard_Boolean bRet, bContains, bHasImage; - // - bRet=Standard_False; - // - if (theS.IsNull()) { - return !bRet; //true - } - // - bContains=myMapShape.Contains(theS); - if (bContains) { - return bRet; //false - } - // - bHasImage=myOrigins.IsBound(theS); - if (bHasImage) { - const TopoDS_Shape& aSim=myOrigins.Find(theS); - bContains=myMapShape.Contains(aSim); - if (bContains) { - return bRet; //false - } - } - // - return !bRet; //true -} -//======================================================================= -//function : MapShapes -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::MapShapes(const TopoDS_Shape& theS, - TopTools_MapOfShape& theM) -{ - TopoDS_Iterator aIt; - // - theM.Add(theS); - aIt.Initialize(theS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSx=aIt.Value(); - GEOMAlgo_Gluer2::MapShapes(aSx, theM); - } -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_3.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_3.cxx deleted file mode 100644 index 5ccb17521..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Gluer2_3.cxx +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Gluer2_3.cxx -// Author: Peter KURNEV - -#include - -#include - -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - - -static - void MapShapes1(const TopoDS_Shape& aS, - const TopAbs_ShapeEnum aType, - TopTools_IndexedMapOfShape& aM); - -//======================================================================= -//function : Detect -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::Detect() -{ - Standard_Boolean bCheckGeometry; - Standard_Integer iErr, aNbSD; - TopTools_ListIteratorOfListOfShape aItLS; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS; - //GEOMAlgo_GlueDetector aDetector; - // - myErrorStatus=0; - myWarningStatus=0; - // - myImagesDetected.Clear(); - myOriginsDetected.Clear(); - // - bCheckGeometry=Standard_True; - // - //modified by NIZNHY-PKV Tue Mar 13 13:33:35 2012f - myDetector.Clear(); - myDetector.SetContext(myContext); - //modified by NIZNHY-PKV Tue Mar 13 13:33:38 2012t - myDetector.SetArgument(myArgument); - myDetector.SetTolerance(myTolerance); - myDetector.SetCheckGeometry(bCheckGeometry); - // - myDetector.Perform(); - iErr=myDetector.ErrorStatus(); - if (iErr) { - // Detector is failed - myErrorStatus=11; - return; - } - //modified by NIZNHY-PKV Tue Mar 13 13:40:36 2012f - iErr=myDetector.WarningStatus(); - if (iErr) { - // Sticked shapes are detected - myWarningStatus=2; - } - //modified by NIZNHY-PKV Tue Mar 13 13:40:39 2012t - // - const TopTools_DataMapOfShapeListOfShape& aImages=myDetector.Images(); - aItDMSLS.Initialize(aImages); - for (; aItDMSLS.More(); aItDMSLS.Next()) { - const TopoDS_Shape& aSkey=aItDMSLS.Key(); - const TopTools_ListOfShape& aLSD=aItDMSLS.Value(); - aNbSD=aLSD.Extent(); - myImagesDetected.Bind(aSkey, aLSD); - } - // - aItDMSLS.Initialize(myImagesDetected); - for (; aItDMSLS.More(); aItDMSLS.Next()) { - const TopoDS_Shape& aSkey=aItDMSLS.Key(); - const TopTools_ListOfShape& aLSD=aItDMSLS.Value(); - aItLS.Initialize(aLSD); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aSx=aItLS.Value(); - myOriginsDetected.Bind(aSx, aSkey); - } - } -} -//======================================================================= -//function : PerformShapesToWork -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::PerformShapesToWork() -{ - Standard_Integer aNbSG, i, j, k, aNbC, aNb, aNbSD; - TopTools_ListIteratorOfListOfShape aItLS1, aItLS2; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS; - NMTTools_CoupleOfShape aCS; - NMTTools_ListOfCoupleOfShape aLCS; - NMTTools_ListIteratorOfListOfCoupleOfShape aItCS; - // - myErrorStatus=0; - myWarningStatus=0; - // - myImagesToWork.Clear(); - myOriginsToWork.Clear(); - // - aNbSD=myImagesDetected.Extent(); - if (!aNbSD) {// no shapes to glue detected - myWarningStatus=1; - return; - } - // - aNbSG=myShapesToGlue.Extent(); - if (!aNbSG) { - // glue all possible - myImagesToWork=myImagesDetected; - // - aItDMSLS.Initialize(myImagesToWork); - for (; aItDMSLS.More(); aItDMSLS.Next()) { - const TopoDS_Shape& aSkey=aItDMSLS.Key(); - const TopTools_ListOfShape& aLSD=aItDMSLS.Value(); - aItLS1.Initialize(aLSD); - for (; aItLS1.More(); aItLS1.Next()) { - const TopoDS_Shape& aSx=aItLS1.Value(); - myOriginsToWork.Bind(aSx, aSkey); - } - } - return; - }// if (!aNbSG) { - // - // 1. Make pairs - aItDMSLS.Initialize(myShapesToGlue); - for (k=0; aItDMSLS.More(); aItDMSLS.Next(), ++k) { - //const TopoDS_Shape& aSkey=aItDMSLS.Key(); - const TopTools_ListOfShape& aLSG=aItDMSLS.Value(); - aItLS1.Initialize(aLSG); - for (i=0; aItLS1.More(); aItLS1.Next(), ++i) { - aItLS2.Initialize(aLSG); - for (j=0; aItLS2.More(); aItLS2.Next(), ++j) { - if (j>i) { - const TopoDS_Shape& aSG1=aItLS1.Value(); - const TopoDS_Shape& aSG2=aItLS2.Value(); - aCS.SetShape1(aSG1); - aCS.SetShape2(aSG2); - TreatPair(aCS, aLCS); - } - } - } - } - // - // 2. Find Chains - TopTools_ListOfShape aLSX; - NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC; - // - NMTTools_Tools::FindChains(aLCS, aMC); - // - // 3. myImagesToWork, myOriginsToWork - aNbC=aMC.Extent(); - for (i=1; i<=aNbC; ++i) { - const TopoDS_Shape& aSkey=aMC.FindKey(i); - const TopTools_IndexedMapOfShape& aM=aMC(i); - aLSX.Clear(); - aNb=aM.Extent(); - for (j=1; j<=aNb; ++j) { - const TopoDS_Shape& aS=aM(j); - aLSX.Append(aS); - myOriginsToWork.Bind(aS, aSkey); - } - myImagesToWork.Bind(aSkey, aLSX); - } -} -//======================================================================= -//function : TreatPair -//purpose : -//======================================================================= -void GEOMAlgo_Gluer2::TreatPair(const NMTTools_CoupleOfShape& aCS, - NMTTools_ListOfCoupleOfShape& aLCS) -{ - if (myErrorStatus) { - return; - } - // - Standard_Integer i, aNbS1, aNbS2, aNbS; - TopAbs_ShapeEnum aType, aTypeS; - TopTools_ListIteratorOfListOfShape aItLS; - TopTools_IndexedMapOfShape aMS1, aMS2; - TopTools_DataMapOfShapeListOfShape aDMSLS; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMSLS; - NMTTools_CoupleOfShape aCSS; - // - // 1. Checking the pair on whether it can be glued at all - // 1.1 - const TopoDS_Shape& aS1=aCS.Shape1(); - if (!myOriginsDetected.IsBound(aS1)) { - myErrorStatus=30; - return; - } - const TopoDS_Shape& aSkey1=myOriginsDetected.Find(aS1); - // 1.2 - const TopoDS_Shape& aS2=aCS.Shape2(); - if (!myOriginsDetected.IsBound(aS2)) { - myErrorStatus=30; - return; - } - const TopoDS_Shape& aSkey2=myOriginsDetected.Find(aS2); - // 1.3 - if (!aSkey1.IsSame(aSkey2)) { - myErrorStatus=33; - return; - } - // - // 2. Append the pair to the aLCS - aLCS.Append(aCS); - // - // 3. Treatment the sub-shapes of the pair - aType=aS1.ShapeType(); - if (aType==TopAbs_VERTEX) { - return; - } - aTypeS=TopAbs_EDGE; - if (aType==aTypeS) { - aTypeS=TopAbs_VERTEX; - } - // - MapShapes1(aS1, aTypeS, aMS1); - MapShapes1(aS2, aTypeS, aMS2); - // - aNbS1=aMS1.Extent(); - aNbS2=aMS2.Extent(); - if (aNbS1!=aNbS2) { - myErrorStatus=31; - return; - } - // - // 1. - for (i=1; i<=aNbS1; ++i) { - const TopoDS_Shape& aSS1=aMS1(i); - if (aMS2.Contains(aSS1)) { - continue; - } - // - if (!myOriginsDetected.IsBound(aSS1)) { - myErrorStatus=30; - return; - } - // - const TopoDS_Shape& aSkey=myOriginsDetected.Find(aSS1); - if (aDMSLS.IsBound(aSkey)) { - TopTools_ListOfShape& aLS=aDMSLS.ChangeFind(aSkey); - aLS.Append(aSS1); - } - else { - TopTools_ListOfShape aLS; - // - aLS.Append(aSS1); - aDMSLS.Bind(aSkey, aLS); - } - } - // - // 2. - for (i=1; i<=aNbS2; ++i) { - const TopoDS_Shape& aSS2=aMS2(i); - if (aMS1.Contains(aSS2)) { - continue; - } - // - if (!myOriginsDetected.IsBound(aSS2)) { - myErrorStatus=30; - return; - } - // - const TopoDS_Shape& aSkey=myOriginsDetected.Find(aSS2); - if (aDMSLS.IsBound(aSkey)) { - TopTools_ListOfShape& aLS=aDMSLS.ChangeFind(aSkey); - aLS.Append(aSS2); - } - else { - TopTools_ListOfShape aLS; - // - aLS.Append(aSS2); - aDMSLS.Bind(aSkey, aLS); - } - } - // - // 3. - aItDMSLS.Initialize(aDMSLS); - for (; aItDMSLS.More(); aItDMSLS.Next()) { - //const TopoDS_Shape& aSkey=aItDMSLS.Key(); - const TopTools_ListOfShape& aLS=aItDMSLS.Value(); - aNbS=aLS.Extent(); - if (aNbS!=2) { - myErrorStatus=32; - return; - } - // - const TopoDS_Shape& aSS1=aLS.First(); - const TopoDS_Shape& aSS2=aLS.Last(); - aCSS.SetShape1(aSS1); - aCSS.SetShape2(aSS2); - TreatPair(aCSS, aLCS); - } -} -//======================================================================= -//function : MapShapes1 -//purpose : -//======================================================================= -void MapShapes1(const TopoDS_Shape& aS, - const TopAbs_ShapeEnum aType, - TopTools_IndexedMapOfShape& aM) -{ - TopExp_Explorer aExp; - - aExp.Init (aS, aType); - for ( ;aExp.More(); aExp.Next()) { - const TopoDS_Shape aSx=aExp.Current(); - if (aType==TopAbs_EDGE) { - const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aSx); - if (BRep_Tool::Degenerated(aEx)) { - continue; - } - } - aM.Add(aSx); - } -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_GluerAlgo.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_GluerAlgo.cxx deleted file mode 100644 index fe6f82a2c..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_GluerAlgo.cxx +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_GluerAlgo.cxx -// Created: -// Author: Peter KURNEV -// -// -#include -#include - - -//======================================================================= -//function : GEOMAlgo_GluerAlgo -//purpose : -//======================================================================= -GEOMAlgo_GluerAlgo::GEOMAlgo_GluerAlgo() -{ - myTolerance=0.0001; - myCheckGeometry=Standard_True; -} -//======================================================================= -//function : ~GEOMAlgo_GluerAlgo -//purpose : -//======================================================================= -GEOMAlgo_GluerAlgo::~GEOMAlgo_GluerAlgo() -{ -} -//======================================================================= -//function : SetArgument -//purpose : -//======================================================================= -void GEOMAlgo_GluerAlgo::SetArgument(const TopoDS_Shape& theShape) -{ - myArgument=theShape; -} -//======================================================================= -//function : Argument -//purpose : -//======================================================================= -const TopoDS_Shape& GEOMAlgo_GluerAlgo::Argument()const -{ - return myArgument; -} -//======================================================================= -//function : SetTolerance -//purpose : -//======================================================================= -void GEOMAlgo_GluerAlgo::SetTolerance(const Standard_Real aT) -{ - myTolerance=aT; -} -//======================================================================= -//function : Tolerance -//purpose : -//======================================================================= -Standard_Real GEOMAlgo_GluerAlgo::Tolerance()const -{ - return myTolerance; -} - -//======================================================================= -//function : SetCheckGeometry -//purpose : -//======================================================================= -void GEOMAlgo_GluerAlgo::SetCheckGeometry(const Standard_Boolean aFlag) -{ - myCheckGeometry=aFlag; -} -//======================================================================= -//function : CheckGeometry -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_GluerAlgo::CheckGeometry() const -{ - return myCheckGeometry; -} -//======================================================================= -//function : SetContext -//purpose : -//======================================================================= -void GEOMAlgo_GluerAlgo::SetContext(const Handle(IntTools_Context)& theContext) -{ - myContext=theContext; -} -//======================================================================= -//function : Context -//purpose : -//======================================================================= -const Handle(IntTools_Context)& GEOMAlgo_GluerAlgo::Context() -{ - return myContext; -} -//======================================================================= -//function : Images -//purpose : -//======================================================================= -const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_GluerAlgo::Images()const -{ - return myImages; -} -//======================================================================= -//function : Origins -//purpose : -//======================================================================= -const TopTools_DataMapOfShapeShape& GEOMAlgo_GluerAlgo::Origins()const -{ - return myOrigins; -} -//======================================================================= -//function : Clear -//purpose : -//======================================================================= -void GEOMAlgo_GluerAlgo::Clear() -{ - myImages.Clear(); - myOrigins.Clear(); -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_GluerAlgo::Perform() -{ - if (myContext.IsNull()) { - myContext=new IntTools_Context; - } -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_GluerAlgo.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_GluerAlgo.hxx deleted file mode 100644 index 97f9b9ad1..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_GluerAlgo.hxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_GluerAlgo.hxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_GluerAlgo_HeaderFile -#define _GEOMAlgo_GluerAlgo_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_GluerAlgo -//purpose : -//======================================================================= -class GEOMAlgo_GluerAlgo { -public: - - Standard_EXPORT - GEOMAlgo_GluerAlgo(); - - Standard_EXPORT - virtual ~GEOMAlgo_GluerAlgo(); - - Standard_EXPORT - virtual void SetArgument(const TopoDS_Shape& theShape) ; - - Standard_EXPORT - const TopoDS_Shape& Argument() const; - - Standard_EXPORT - void SetTolerance(const Standard_Real aT) ; - - Standard_EXPORT - Standard_Real Tolerance() const; - - Standard_EXPORT - void SetCheckGeometry(const Standard_Boolean aFlag) ; - - Standard_EXPORT - Standard_Boolean CheckGeometry() const; - - Standard_EXPORT - virtual void Perform() ; - - Standard_EXPORT - virtual void Clear() ; - - Standard_EXPORT - void SetContext(const Handle(IntTools_Context)&) ; - - Standard_EXPORT - const Handle(IntTools_Context)& Context() ; - - Standard_EXPORT - const TopTools_DataMapOfShapeListOfShape& Images() const; - - Standard_EXPORT - const TopTools_DataMapOfShapeShape& Origins() const; - -protected: - TopoDS_Shape myArgument; - Standard_Real myTolerance; - Standard_Boolean myCheckGeometry; - Handle(IntTools_Context) myContext; - TopTools_DataMapOfShapeListOfShape myImages; - TopTools_DataMapOfShapeShape myOrigins; - -private: -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_HAlgo.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_HAlgo.cxx deleted file mode 100644 index b07876a31..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_HAlgo.cxx +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Hlgo.cxx -// Created: Sat Dec 04 12:39:47 2004 -// Author: Peter KURNEV -// -// -#include - -IMPLEMENT_STANDARD_HANDLE(GEOMAlgo_HAlgo, MMgt_TShared); -IMPLEMENT_STANDARD_RTTIEXT(GEOMAlgo_HAlgo, MMgt_TShared); - -//======================================================================= -// function: -// purpose: -//======================================================================= - GEOMAlgo_HAlgo::GEOMAlgo_HAlgo() -: - myErrorStatus(1), - myWarningStatus(0) -{} -//======================================================================= -// function: ~ -// purpose: -//======================================================================= - GEOMAlgo_HAlgo::~GEOMAlgo_HAlgo() -{ -} -//======================================================================= -// function: CheckData -// purpose: -//======================================================================= - void GEOMAlgo_HAlgo::CheckData() -{ - myErrorStatus=0; -} -//======================================================================= -// function: CheckResult -// purpose: -//======================================================================= - void GEOMAlgo_HAlgo::CheckResult() -{ - myErrorStatus=0; -} -//======================================================================= -// function: ErrorStatus -// purpose: -//======================================================================= - Standard_Integer GEOMAlgo_HAlgo::ErrorStatus()const -{ - return myErrorStatus; -} -//======================================================================= -// function: WarningStatus -// purpose: -//======================================================================= - Standard_Integer GEOMAlgo_HAlgo::WarningStatus()const -{ - return myWarningStatus; -} -// myErrorStatus -// -// 1 - object is just initialized diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_HAlgo.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_HAlgo.hxx deleted file mode 100644 index 52340ed2e..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_HAlgo.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_HAlgo.hxx -// Created: Sat Dec 04 12:39:47 2004 -// Author: Peter KURNEV -// -// - -#ifndef _GEOMAlgo_HAlgo_HeaderFile -#define _GEOMAlgo_HAlgo_HeaderFile - -#include -#include -//#include -#include -#include - -DEFINE_STANDARD_HANDLE(GEOMAlgo_HAlgo, MMgt_TShared); - -//======================================================================= -//class : GEOMAlgo_HAlgo -//purpose : -//======================================================================= -class GEOMAlgo_HAlgo : public MMgt_TShared -{ - public: - Standard_EXPORT - virtual void Perform() = 0; - - Standard_EXPORT - virtual void CheckData() ; - - Standard_EXPORT - virtual void CheckResult() ; - - Standard_EXPORT - Standard_Integer ErrorStatus() const; - - Standard_EXPORT - Standard_Integer WarningStatus() const; - - DEFINE_STANDARD_RTTI(GEOMAlgo_HAlgo); - - protected: - Standard_EXPORT - GEOMAlgo_HAlgo(); - - Standard_EXPORT - virtual ~GEOMAlgo_HAlgo(); - - Standard_Integer myErrorStatus; - Standard_Integer myWarningStatus; - -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx deleted file mode 100644 index 125122452..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IndexedDataMapOfIntegerShape.hxx -// Created: Wed Feb 22 11:22:18 2012 -// Author: -// - - -#ifndef GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile -#define GEOMAlgo_IndexedDataMapOfIntegerShape_HeaderFile - - - -#include -#include -#include - -#define _NCollection_MapHasher -#include - - -typedef NCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfIntegerShape; - -#undef _NCollection_MapHasher - - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx deleted file mode 100644 index 5c22084a6..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IndexedDataMapOfPassKeyShapeListOfShape.hxx -// Created: Wed Feb 22 11:24:27 2012 -// Author: -// - - -#ifndef GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile -#define GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape_HeaderFile - -#include -#include -#include - - -#define _NCollection_MapHasher -#include - - -typedef NCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape; - -#undef _NCollection_MapHasher - - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeBox.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeBox.hxx deleted file mode 100644 index 7cd8010fe..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeBox.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IndexedDataMapOfShapeBox.hxx -// Created: Wed Feb 22 11:14:14 2012 -// Author: -// - - -#ifndef GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile -#define GEOMAlgo_IndexedDataMapOfShapeBox_HeaderFile - - -#include -#include -#include - -#define _NCollection_MapHasher -#include - - -typedef NCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeBox; - -#undef _NCollection_MapHasher - - - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx deleted file mode 100644 index 09be03fe8..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IndexedDataMapOfShapeShapeInfo.hxx -// Created: Wed Feb 22 11:16:54 2012 -// Author: -// - - -#ifndef GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile -#define GEOMAlgo_IndexedDataMapOfShapeShapeInfo_HeaderFile - - -#include -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeShapeInfo; - -#undef _NCollection_MapHasher - - - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeState.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeState.hxx deleted file mode 100644 index 35f5d3650..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_IndexedDataMapOfShapeState.hxx +++ /dev/null @@ -1,60 +0,0 @@ -/// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -/// -/// This library is free software; you can redistribute it and/or -/// modify it under the terms of the GNU Lesser General Public -/// License as published by the Free Software Foundation; either -/// version 2.1 of the License. -/// -/// This library is distributed in the hope that it will be useful, -/// but WITHOUT ANY WARRANTY; without even the implied warranty of -/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -/// Lesser General Public License for more details. -/// -/// You should have received a copy of the GNU Lesser General Public -/// License along with this library; if not, write to the Free Software -/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -/// -/// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -/// -// -// This library is free software; you can redistribute it and/or -// modify it 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_IndexedDataMapOfShapeState.hxx -// Created: Wed Feb 22 11:19:56 2012 -// Author: -// - - -#ifndef GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile -#define GEOMAlgo_IndexedDataMapOfShapeState_HeaderFile - - - -#include -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_IndexedDataMap GEOMAlgo_IndexedDataMapOfShapeState; - -#undef _NCollection_MapHasher - - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_KindOfBounds.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_KindOfBounds.hxx deleted file mode 100644 index 83646c9ef..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_KindOfBounds.hxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_KindOfBounds_HeaderFile -#define _GEOMAlgo_KindOfBounds_HeaderFile - - -enum GEOMAlgo_KindOfBounds { -GEOMAlgo_KB_UNKNOWN, -GEOMAlgo_KB_TRIMMED, -GEOMAlgo_KB_INFINITE -}; - -#ifndef _Standard_PrimitiveTypes_HeaderFile -#include -#endif - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_KindOfClosed.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_KindOfClosed.hxx deleted file mode 100644 index fecd41494..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_KindOfClosed.hxx +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef _GEOMAlgo_KindOfClosed_HeaderFile -#define _GEOMAlgo_KindOfClosed_HeaderFile - - -enum GEOMAlgo_KindOfClosed { -GEOMAlgo_KC_UNKNOWN, -GEOMAlgo_KC_CLOSED, -GEOMAlgo_KC_NOTCLOSED -}; - -#ifndef _Standard_PrimitiveTypes_HeaderFile -#include -#endif - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_KindOfName.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_KindOfName.hxx deleted file mode 100644 index 8c4241edd..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_KindOfName.hxx +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _GEOMAlgo_KindOfName_HeaderFile -#define _GEOMAlgo_KindOfName_HeaderFile - - -enum GEOMAlgo_KindOfName { -GEOMAlgo_KN_UNKNOWN, -GEOMAlgo_KN_SPHERE, -GEOMAlgo_KN_CYLINDER, -GEOMAlgo_KN_TORUS, -GEOMAlgo_KN_CONE, -GEOMAlgo_KN_ELLIPSE, -GEOMAlgo_KN_CIRCLE, -GEOMAlgo_KN_PLANE, -GEOMAlgo_KN_LINE, -GEOMAlgo_KN_BOX, -GEOMAlgo_KN_SEGMENT, -GEOMAlgo_KN_ARCCIRCLE, -GEOMAlgo_KN_POLYGON, -GEOMAlgo_KN_POLYHEDRON, -GEOMAlgo_KN_DISKCIRCLE, -GEOMAlgo_KN_DISKELLIPSE, -GEOMAlgo_KN_RECTANGLE, -GEOMAlgo_KN_TRIANGLE, -GEOMAlgo_KN_QUADRANGLE, -GEOMAlgo_KN_ARCELLIPSE -}; - -#ifndef _Standard_PrimitiveTypes_HeaderFile -#include -#endif - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_KindOfShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_KindOfShape.hxx deleted file mode 100644 index 899598a0b..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_KindOfShape.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef _GEOMAlgo_KindOfShape_HeaderFile -#define _GEOMAlgo_KindOfShape_HeaderFile - - -enum GEOMAlgo_KindOfShape { -GEOMAlgo_KS_UNKNOWN, -GEOMAlgo_KS_SPHERE, -GEOMAlgo_KS_CYLINDER, -GEOMAlgo_KS_BOX, -GEOMAlgo_KS_TORUS, -GEOMAlgo_KS_CONE, -GEOMAlgo_KS_ELLIPSE, -GEOMAlgo_KS_PLANE, -GEOMAlgo_KS_CIRCLE, -GEOMAlgo_KS_LINE, -GEOMAlgo_KS_DEGENERATED -}; - -#ifndef _Standard_PrimitiveTypes_HeaderFile -#include -#endif - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx deleted file mode 100644 index 8c19aa07e..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListIteratorOfListOfCoupleOfShapes.hxx -// Created: Wed Feb 22 08:26:34 2012 -// Author: -// - -#ifndef GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile -#define GEOMAlgo_ListIteratorOfListOfCoupleOfShapes_HeaderFile - -#ifndef GEOMAlgo_ListOfCoupleOfShapes_HeaderFile -#include -#endif - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ListIteratorOfListOfPnt.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_ListIteratorOfListOfPnt.hxx deleted file mode 100644 index ff1f10c7e..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ListIteratorOfListOfPnt.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListIteratorOfListOfPnt.hxx -// Created: Wed Feb 22 08:33:12 2012 -// Author: -// - - -#ifndef GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile -#define GEOMAlgo_ListIteratorOfListOfPnt_HeaderFile - -#ifndef GEOMAlgo_ListOfPnt_HeaderFile -#include -#endif - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ListOfCoupleOfShapes.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_ListOfCoupleOfShapes.hxx deleted file mode 100644 index 53954a6a8..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ListOfCoupleOfShapes.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListOfCoupleOfShapes.hxx -// Created: Wed Feb 22 08:23:27 2012 -// Author: -// - -#ifndef GEOMAlgo_ListOfCoupleOfShapes_HeaderFile -#define GEOMAlgo_ListOfCoupleOfShapes_HeaderFile - -#include -#include - -typedef NCollection_List GEOMAlgo_ListOfCoupleOfShapes; -typedef GEOMAlgo_ListOfCoupleOfShapes::Iterator GEOMAlgo_ListIteratorOfListOfCoupleOfShapes; - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ListOfPnt.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_ListOfPnt.hxx deleted file mode 100644 index 385ebee9d..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ListOfPnt.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListOfPnt.hxx -// Created: Wed Feb 22 08:31:47 2012 -// Author: -// - - -#ifndef GEOMAlgo_ListOfPnt_HeaderFile -#define GEOMAlgo_ListOfPnt_HeaderFile - -#include -#include - -typedef NCollection_List GEOMAlgo_ListOfPnt; -typedef GEOMAlgo_ListOfPnt::Iterator GEOMAlgo_ListIteratorOfListOfPnt; - - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_PWireEdgeSet.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_PWireEdgeSet.hxx deleted file mode 100644 index f803f847f..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_PWireEdgeSet.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_PWireEdgeSet.hxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_PWireEdgeSet_HeaderFile -#define _GEOMAlgo_PWireEdgeSet_HeaderFile - -class GEOMAlgo_WireEdgeSet; - -typedef GEOMAlgo_WireEdgeSet* GEOMAlgo_PWireEdgeSet; - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_PassKey.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_PassKey.cxx deleted file mode 100644 index 8f6f949e4..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_PassKey.cxx +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_PassKey.cxx -// Created: -// Author: Peter KURNEV -// -// -#include - -#include -#include -#include -#include - -#ifdef WNT -#pragma warning( disable : 4101) -#endif - -static - Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv); - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_PassKey::GEOMAlgo_PassKey() -{ - 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& aOther) -{ - myNbIds=aOther.myNbIds; - mySum=aOther.mySum; - myMap=aOther.myMap; - return *this; -} -//======================================================================= -//function :~ -//purpose : -//======================================================================= - GEOMAlgo_PassKey::~GEOMAlgo_PassKey() -{ -} -//======================================================================= -//function :Clear -//purpose : -//======================================================================= - void GEOMAlgo_PassKey::Clear() -{ - myNbIds=0; - mySum=0; - myMap.Clear(); -} -//======================================================================= -//function :SetIds -//purpose : -//======================================================================= - void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1) - -{ - Clear(); - myNbIds=1; - myMap.Add(aId1); - mySum=NormalizedId(aId1, myNbIds); -} -//======================================================================= -//function :SetIds -//purpose : -//======================================================================= - void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2) -{ - TColStd_ListOfInteger aLI; - // - aLI.Append(aId1); - aLI.Append(aId2); - SetIds(aLI); -} -//======================================================================= -//function :SetIds -//purpose : -//======================================================================= - void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2, - const Standard_Integer aId3) -{ - TColStd_ListOfInteger aLI; - // - aLI.Append(aId1); - aLI.Append(aId2); - aLI.Append(aId3); - SetIds(aLI); -} -//======================================================================= -//function :SetIds -//purpose : -//======================================================================= - void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2, - const Standard_Integer aId3, - const Standard_Integer aId4) -{ - TColStd_ListOfInteger aLI; - // - aLI.Append(aId1); - aLI.Append(aId2); - aLI.Append(aId3); - aLI.Append(aId4); - SetIds(aLI); -} -//======================================================================= -//function :SetIds -//purpose : -//======================================================================= - void GEOMAlgo_PassKey::SetIds(const TColStd_ListOfInteger& aLI) -{ - Standard_Integer i, aId, aIdN; - TColStd_ListIteratorOfListOfInteger aIt; - // - Clear(); - aIt.Initialize(aLI); - 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; - } -} -//======================================================================= -//function :NbIds -//purpose : -//======================================================================= - Standard_Integer GEOMAlgo_PassKey::NbIds()const -{ - return myNbIds; -} -//======================================================================= -//function :Id -//purpose : -//======================================================================= - Standard_Integer GEOMAlgo_PassKey::Id(const Standard_Integer aIndex) const -{ - if (aIndex<1 || aIndex>myNbIds) { - return -1; - } - return myMap(aIndex); -} -//======================================================================= -//function :IsEqual -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_PassKey::IsEqual(const GEOMAlgo_PassKey& aOther) const -{ - Standard_Boolean bRet; - Standard_Integer i, aId; - // - bRet=Standard_False; - // - if (myNbIds!=aOther.myNbIds) { - return bRet; - } - 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 aUpper) const -{ - return ::HashCode(mySum, aUpper); -} -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - void GEOMAlgo_PassKey::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_NEW/GEOMAlgo_PassKey.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_PassKey.hxx deleted file mode 100644 index 9a992f205..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_PassKey.hxx +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_PassKey.hxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_PassKey_HeaderFile -#define _GEOMAlgo_PassKey_HeaderFile - -#include -#include -#include -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_PassKey -//purpose : -//======================================================================= -class GEOMAlgo_PassKey { - 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 Clear() ; - - 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_Integer HashCode(const Standard_Integer Upper) const; - - Standard_EXPORT - Standard_Integer Id(const Standard_Integer aIndex) const; - - Standard_EXPORT - void Dump(const Standard_Integer aHex = 0) const; - - protected: - Standard_Integer myNbIds; - Standard_Integer mySum; - TColStd_IndexedMapOfInteger myMap; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyMapHasher.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyMapHasher.cxx deleted file mode 100644 index 32e62875c..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyMapHasher.cxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_PassKeyMapHasher.cxx -// Created: -// Author: Peter KURNEV -// -// -#include - -//======================================================================= -//function : HashCode -//purpose : -//======================================================================= - Standard_Integer GEOMAlgo_PassKeyMapHasher::HashCode(const GEOMAlgo_PassKey& aPK, - const Standard_Integer Upper) -{ - return aPK.HashCode(Upper); -} -//======================================================================= -//function :IsEqual -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_PassKeyMapHasher::IsEqual(const GEOMAlgo_PassKey& aPK1, - const GEOMAlgo_PassKey& aPK2) -{ - return aPK1.IsEqual(aPK2); -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyMapHasher.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyMapHasher.hxx deleted file mode 100644 index 0b3039f1e..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyMapHasher.hxx +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_PassKeyMapHasher.hxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_PassKeyMapHasher_HeaderFile -#define _GEOMAlgo_PassKeyMapHasher_HeaderFile - -#include -#include -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_PassKeyMapHasher -//purpose : -//======================================================================= -class GEOMAlgo_PassKeyMapHasher { - 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) ; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShape.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShape.cxx deleted file mode 100644 index 3aa4f4b04..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShape.cxx +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_PassKeyShape.cxx -// Created: -// Author: Peter KURNEV -// -// -#include - -#include -#include - - -static - Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv); -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_PassKeyShape::GEOMAlgo_PassKeyShape() -{ - myUpper=432123; -} -//======================================================================= -//function : -//purpose : -//======================================================================= - 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 aHC; - // - Clear(); - myNbIds=1; - myMap.Add(aS1); - aHC=aS1.HashCode(myUpper); - mySum=NormalizedId(aHC, myNbIds); -} -//======================================================================= -//function :SetShapes -//purpose : -//======================================================================= - void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) -{ - TopTools_ListOfShape aLS; - // - aLS.Append(aS1); - aLS.Append(aS2); - SetShapes(aLS); -} -//======================================================================= -//function :SetShapes -//purpose : -//======================================================================= - void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2, - const TopoDS_Shape& aS3) -{ - TopTools_ListOfShape aLS; - // - aLS.Append(aS1); - aLS.Append(aS2); - aLS.Append(aS3); - SetShapes(aLS); -} -//======================================================================= -//function :SetShapes -//purpose : -//======================================================================= - void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2, - const TopoDS_Shape& aS3, - const TopoDS_Shape& aS4) -{ - TopTools_ListOfShape aLS; - // - aLS.Append(aS1); - aLS.Append(aS2); - aLS.Append(aS3); - aLS.Append(aS4); - SetShapes(aLS); -} -//======================================================================= -//function :SetShapes -//purpose : -//======================================================================= - void GEOMAlgo_PassKeyShape::SetShapes(const TopTools_ListOfShape& aLS) -{ - Standard_Integer i, aId, aIdN; - TopTools_ListIteratorOfListOfShape aIt; - // - Clear(); - aIt.Initialize(aLS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - 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; - } -} -//======================================================================= -//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_NEW/GEOMAlgo_PassKeyShape.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShape.hxx deleted file mode 100644 index 1f886be33..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShape.hxx +++ /dev/null @@ -1,105 +0,0 @@ - -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_PassKeyShape.hxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_PassKeyShape_HeaderFile -#define _GEOMAlgo_PassKeyShape_HeaderFile - -#include -#include -#include -#include -#include -#include -#include - - -//======================================================================= -//class : GEOMAlgo_PassKeyShape -//purpose : -//======================================================================= -class GEOMAlgo_PassKeyShape { - public: - Standard_EXPORT - GEOMAlgo_PassKeyShape(); - - 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; - -protected: - Standard_Integer myNbIds; - Standard_Integer mySum; - Standard_Integer myUpper; - TopTools_IndexedMapOfShape myMap; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShapeMapHasher.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShapeMapHasher.cxx deleted file mode 100644 index d90110080..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShapeMapHasher.cxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_PassKeyMapHasher.cxx -// Created: -// Author: Peter KURNEV -// -// -#include - -//======================================================================= -//function : HashCode -//purpose : -//======================================================================= - Standard_Integer GEOMAlgo_PassKeyShapeMapHasher::HashCode(const GEOMAlgo_PassKeyShape& aPK, - const Standard_Integer Upper) -{ - return aPK.HashCode(Upper); -} -//======================================================================= -//function :IsEqual -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_PassKeyShapeMapHasher::IsEqual(const GEOMAlgo_PassKeyShape& aPK1, - const GEOMAlgo_PassKeyShape& aPK2) -{ - return aPK1.IsEqual(aPK2); -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShapeMapHasher.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShapeMapHasher.hxx deleted file mode 100644 index 41f15bf3e..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_PassKeyShapeMapHasher.hxx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_PassKeyMapHasher.hxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile -#define _GEOMAlgo_PassKeyShapeMapHasher_HeaderFile - -#include -#include -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_PassKeyShapeMapHasher -//purpose : -//======================================================================= -class GEOMAlgo_PassKeyShapeMapHasher -{ - public: - Standard_EXPORT - static Standard_Integer HashCode(const GEOMAlgo_PassKeyShape& aPKey, - const Standard_Integer Upper) ; - - Standard_EXPORT - static Standard_Boolean IsEqual(const GEOMAlgo_PassKeyShape& aPKey1, - const GEOMAlgo_PassKeyShape& aPKey2) ; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeAlgo.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_ShapeAlgo.cxx deleted file mode 100644 index b24f71b7a..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeAlgo.cxx +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_ShapeAlgo.cxx -// Created: Tue Dec 7 12:06:54 2004 -// Author: Peter KURNEV -// -// -#include -#include - -//======================================================================= -//function : GEOMAlgo_ShapeAlgo -//purpose : -//======================================================================= -GEOMAlgo_ShapeAlgo::GEOMAlgo_ShapeAlgo() -: - GEOMAlgo_Algo() -{ - myTolerance=0.0001; -} - -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_ShapeAlgo::~GEOMAlgo_ShapeAlgo() -{ -} -//======================================================================= -//function : SetContext -//purpose : -//======================================================================= -void GEOMAlgo_ShapeAlgo::SetContext(const Handle(IntTools_Context)& theContext) -{ - myContext=theContext; -} -//======================================================================= -//function : Context -//purpose : -//======================================================================= -const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const -{ - return myContext; -} -//======================================================================= -//function : SetShape -//purpose : -//======================================================================= -void GEOMAlgo_ShapeAlgo::SetShape(const TopoDS_Shape& aS) -{ - myShape=aS; -} -//======================================================================= -//function : Shape -//purpose : -//======================================================================= -const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Shape()const -{ - return myShape; -} -//======================================================================= -//function : SetTolerance -//purpose : -//======================================================================= -void GEOMAlgo_ShapeAlgo::SetTolerance(const Standard_Real aT) -{ - myTolerance=aT; -} -//======================================================================= -//function : Tolerance -//purpose : -//======================================================================= -Standard_Real GEOMAlgo_ShapeAlgo::Tolerance()const -{ - return myTolerance; -} -//======================================================================= -//function : Result -//purpose : -//======================================================================= -const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Result()const -{ - return myResult; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= -void GEOMAlgo_ShapeAlgo::Perform() -{ - if (myContext.IsNull()) { - myContext=new IntTools_Context; - } -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeAlgo.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_ShapeAlgo.hxx deleted file mode 100644 index 98a8c0b3f..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeAlgo.hxx +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_ShapeAlgo.hxx -// Created: Tue Dec 7 12:06:54 2004 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_ShapeAlgo_HeaderFile -#define _GEOMAlgo_ShapeAlgo_HeaderFile - -#include -#include -#include -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_ShapeAlgo -//purpose : -//======================================================================= -class GEOMAlgo_ShapeAlgo : public GEOMAlgo_Algo -{ - public: - - //! Sets cashed geometrical tools
- Standard_EXPORT - void SetContext(const Handle(IntTools_Context)& theContext) ; - - //! Returns cashed geometrical tools
- Standard_EXPORT - const Handle_IntTools_Context& Context() const; - - 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; - - Standard_EXPORT - virtual void Perform() ; - -protected: - Standard_EXPORT - GEOMAlgo_ShapeAlgo(); - - Standard_EXPORT - virtual ~GEOMAlgo_ShapeAlgo(); - - - TopoDS_Shape myShape; - Standard_Real myTolerance; - TopoDS_Shape myResult; - Handle_IntTools_Context myContext; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfo.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfo.cxx deleted file mode 100644 index 63d0ff90d..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfo.cxx +++ /dev/null @@ -1,890 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - - -static - Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType); -static - void DumpKindOfShape(const GEOMAlgo_KindOfShape aKS); -static - void DumpKindOfClosed(const GEOMAlgo_KindOfClosed aKC); -static - void DumpKindOfBounds(const GEOMAlgo_KindOfBounds aKB); -static - void DumpKindOfName(const GEOMAlgo_KindOfName aKS); -static - void DumpPosition(const gp_Ax3& aAx3); -static - void DumpLocation(const gp_Pnt& aP); -static - void DumpDirection(const gp_Dir& aD); -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_ShapeInfo::GEOMAlgo_ShapeInfo() -{ - Reset(); -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_ShapeInfo::~GEOMAlgo_ShapeInfo() -{ -} -//======================================================================= -//function : Reset -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfo::Reset() -{ - Standard_Integer i; - // - myType=TopAbs_SHAPE; - // - myNbTypes=9; - for (i=0; i=0 && iN=0 && iN -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - -//======================================================================= -//class : GEOMAlgo_ShapeInfo -//purpose : -//======================================================================= -class GEOMAlgo_ShapeInfo -{ - public: - Standard_EXPORT - GEOMAlgo_ShapeInfo(); - - Standard_EXPORT - virtual ~GEOMAlgo_ShapeInfo(); - - Standard_EXPORT - void Reset() ; - - Standard_EXPORT - void SetType(const TopAbs_ShapeEnum aType) ; - - Standard_EXPORT - TopAbs_ShapeEnum Type() const; - - Standard_EXPORT - void SetNbSubShapes(const TopAbs_ShapeEnum aType,const Standard_Integer aNb) ; - - Standard_EXPORT - Standard_Integer NbSubShapes(const TopAbs_ShapeEnum aType) const; - - Standard_EXPORT - void SetKindOfShape(const GEOMAlgo_KindOfShape aT) ; - - Standard_EXPORT - GEOMAlgo_KindOfShape KindOfShape() const; - - Standard_EXPORT - void SetKindOfName(const GEOMAlgo_KindOfName aT) ; - - Standard_EXPORT - GEOMAlgo_KindOfName KindOfName() const; - - Standard_EXPORT - void SetKindOfBounds(const GEOMAlgo_KindOfBounds aT) ; - - Standard_EXPORT - GEOMAlgo_KindOfBounds KindOfBounds() const; - - Standard_EXPORT - void SetKindOfClosed(const GEOMAlgo_KindOfClosed aT) ; - - Standard_EXPORT - GEOMAlgo_KindOfClosed KindOfClosed() const; - - Standard_EXPORT - void SetLocation(const gp_Pnt& aP) ; - - Standard_EXPORT - const gp_Pnt& Location() const; - - Standard_EXPORT - void SetDirection(const gp_Dir& aD) ; - - Standard_EXPORT - const gp_Dir& Direction() const; - - Standard_EXPORT - void SetPosition(const gp_Ax2& aAx2) ; - - Standard_EXPORT - void SetPosition(const gp_Ax3& aAx3) ; - - Standard_EXPORT - const gp_Ax3& Position() const; - - Standard_EXPORT - void SetPnt1(const gp_Pnt& aP) ; - - Standard_EXPORT - const gp_Pnt& Pnt1() const; - - Standard_EXPORT - void SetPnt2(const gp_Pnt& aP) ; - - Standard_EXPORT - const gp_Pnt& Pnt2() const; - - Standard_EXPORT - void SetRadius1(const Standard_Real aR) ; - - Standard_EXPORT - Standard_Real Radius1() const; - - Standard_EXPORT - void SetRadius2(const Standard_Real aR) ; - - Standard_EXPORT - Standard_Real Radius2() const; - - Standard_EXPORT - void SetLength(const Standard_Real aL) ; - - Standard_EXPORT - Standard_Real Length() const; - - Standard_EXPORT - void SetWidth(const Standard_Real aW) ; - - Standard_EXPORT - Standard_Real Width() const; - - Standard_EXPORT - void SetHeight(const Standard_Real aH) ; - - Standard_EXPORT - Standard_Real Height() const; - - Standard_EXPORT - void Dump() const; - - protected: - Standard_EXPORT - void DumpVertex() const; - - Standard_EXPORT - void DumpEdge() const; - - Standard_EXPORT - void DumpWire() const; - - Standard_EXPORT - void DumpFace() const; - - Standard_EXPORT - void DumpShell() const; - - Standard_EXPORT - void DumpSolid() const; - - Standard_EXPORT - void DumpCompSolid() const; - - Standard_EXPORT - void DumpCompound() const; - - - TopAbs_ShapeEnum myType; - Standard_Integer myNbSubShapes[9]; - GEOMAlgo_KindOfShape myKindOfShape; - GEOMAlgo_KindOfName myKindOfName; - GEOMAlgo_KindOfBounds myKindOfBounds; - GEOMAlgo_KindOfClosed myKindOfClosed; - gp_Pnt myLocation; - gp_Dir myDirection; - gp_Ax3 myPosition; - Standard_Real myRadius1; - Standard_Real myRadius2; - Standard_Real myLength; - Standard_Real myWidth; - Standard_Real myHeight; - gp_Pnt myPnt1; - gp_Pnt myPnt2; - Standard_Integer myNbTypes; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfoFiller.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfoFiller.cxx deleted file mode 100644 index 614852e72..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfoFiller.cxx +++ /dev/null @@ -1,818 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - - -static - Standard_Boolean IsAllowedType(const GeomAbs_CurveType aCT); -static - Standard_Boolean IsAllowedType(const GeomAbs_SurfaceType aST); -static - Standard_Integer NbWires(const TopoDS_Face& aF); -static - Standard_Integer NbShells(const TopoDS_Solid& aS); - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_ShapeInfoFiller::GEOMAlgo_ShapeInfoFiller() -: - GEOMAlgo_Algo() -{ - myTolerance=0.0001; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_ShapeInfoFiller::~GEOMAlgo_ShapeInfoFiller() -{ -} -//======================================================================= -//function : SetTolerance -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::SetTolerance(const Standard_Real aT) -{ - myTolerance=aT; -} -//======================================================================= -//function : Tolerance -//purpose : -//======================================================================= - Standard_Real GEOMAlgo_ShapeInfoFiller::Tolerance()const -{ - return myTolerance; -} -//======================================================================= -//function : SetShape -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::SetShape(const TopoDS_Shape& aS) -{ - myShape=aS; -} -//======================================================================= -//function : Shape -//purpose : -//======================================================================= - const TopoDS_Shape& GEOMAlgo_ShapeInfoFiller::Shape() const -{ - return myShape; -} -//======================================================================= -//function : Info -//purpose : -//======================================================================= - const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info() const -{ - return Info(myShape); -} -//======================================================================= -//function : Info -//purpose : -//======================================================================= - const GEOMAlgo_ShapeInfo& GEOMAlgo_ShapeInfoFiller::Info(const TopoDS_Shape& aS) const -{ - if (!aS.IsNull()) { - if (myMapInfo.Contains(aS)) { - const GEOMAlgo_ShapeInfo& aInfo=myMapInfo.FindFromKey(aS); - return aInfo; - } - } - return myEmptyInfo; -} - -//======================================================================= -//function : CheckData -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::CheckData() -{ - myErrorStatus=0; - // - if (myShape.IsNull()) { - myErrorStatus=10; - return; - } -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::Perform() -{ - myErrorStatus=0; - // - myMapInfo.Clear(); - // - CheckData(); - if (myErrorStatus) { - return; - } - // - FillShape(myShape); -} -//======================================================================= -//function :FillShape -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillShape(const TopoDS_Shape& aS) -{ - TopAbs_ShapeEnum aType; - // - aType=aS.ShapeType(); - switch(aType) { - // - case TopAbs_VERTEX: - FillVertex(aS); - break; - // - case TopAbs_EDGE: - FillEdge(aS); - break; - // - case TopAbs_FACE: - FillFace(aS); - break; - // - case TopAbs_SOLID: - FillSolid(aS); - break; - // - case TopAbs_WIRE: - case TopAbs_SHELL: - case TopAbs_COMPSOLID: - case TopAbs_COMPOUND: - FillContainer(aS); - break; - // - default: - break; - } -} -//======================================================================= -//function :FillSubShapes -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillSubShapes(const TopoDS_Shape& aS) -{ - TopoDS_Iterator aIt; - // - aIt.Initialize(aS); - for (; aIt.More(); aIt.Next()){ - const TopoDS_Shape& aSx=aIt.Value(); - FillShape(aSx); - } -} -//======================================================================= -//function : FillContainer -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillContainer(const TopoDS_Shape& aS) -{ - myErrorStatus=0; - // - Standard_Boolean bIsClosed; - TopAbs_ShapeEnum aType; - GEOMAlgo_KindOfClosed aKC; - // - aType=aS.ShapeType(); - //---------------------------------------------------- - if (myMapInfo.Contains(aS)) { - return; - } - else { - GEOMAlgo_ShapeInfo aInfoX; - myMapInfo.Add(aS, aInfoX); - } - GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aS); - //---------------------------------------------------- - aInfo.SetType(aType); - FillNbSubShapes(aS, aInfo); - // - if (aType==TopAbs_SHELL) { - bIsClosed=BRep_Tool::IsClosed(aS); - aKC=(bIsClosed) ? GEOMAlgo_KC_CLOSED :GEOMAlgo_KC_NOTCLOSED; - aInfo.SetKindOfClosed(aKC); - } - else if (aType==TopAbs_WIRE) { - TopoDS_Wire aW; - TopoDS_Vertex aV1, aV2; - // - aW=TopoDS::Wire(aS); - TopExp::Vertices(aW, aV1, aV2); - // - bIsClosed=aV1.IsSame(aV2); - aKC=(bIsClosed) ? GEOMAlgo_KC_CLOSED :GEOMAlgo_KC_NOTCLOSED; - aInfo.SetKindOfClosed(aKC); - } - // - FillSubShapes(aS); -} -//======================================================================= -//function : FillSolid -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillSolid(const TopoDS_Shape& aS) -{ - Standard_Integer aNbShells; - TopoDS_Solid aSd; - // - myErrorStatus=0; - //---------------------------------------------------- - if (myMapInfo.Contains(aS)) { - return; - } - else { - GEOMAlgo_ShapeInfo aInfoX; - myMapInfo.Add(aS, aInfoX); - } - GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aS); - //---------------------------------------------------- - aInfo.SetType(TopAbs_SOLID); - FillNbSubShapes(aS, aInfo); - FillSubShapes(aS); - // - aSd=TopoDS::Solid(aS); - // - aNbShells=NbShells(aSd); - if (aNbShells>1) { - return; - } - // - FillDetails(aSd); -} -//======================================================================= -//function :FillFace -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillFace(const TopoDS_Shape& aS) -{ - myErrorStatus=0; - // - Standard_Boolean bIsAllowedType; - Standard_Integer aNbWires;//, iRet - Standard_Boolean bInf, bInfU1, bInfU2, bInfV1, bInfV2; - Standard_Real aUMin, aUMax, aVMin, aVMax, aR1, aR2; - gp_Pnt aP0; - gp_Dir aDN; - gp_Ax3 aAx3; - GeomAbs_SurfaceType aST; - Handle(Geom_Surface) aSurf; - TopoDS_Face aF; - //GEOMAlgo_KindOfName aKindOfName; - //---------------------------------------------------- - if (myMapInfo.Contains(aS)) { - return; - } - else { - GEOMAlgo_ShapeInfo aInfoX; - myMapInfo.Add(aS, aInfoX); - } - GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aS); - //---------------------------------------------------- - aInfo.SetType(TopAbs_FACE); - // - FillNbSubShapes(aS, aInfo); - // - FillSubShapes(aS); - // - aF=TopoDS::Face(aS); - // - aNbWires=NbWires(aF); - // - aSurf=BRep_Tool::Surface(aF); - GeomAdaptor_Surface aGAS(aSurf); - aST=aGAS.GetType(); - bIsAllowedType=IsAllowedType(aST); - if (!bIsAllowedType) { - return; - } - // - // 1. Plane - if (aST==GeomAbs_Plane) { - gp_Pln aPln; - // - aPln=aGAS.Plane(); - aP0=aPln.Location(); - aAx3=aPln.Position(); - // - aInfo.SetKindOfShape(GEOMAlgo_KS_PLANE); - aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED); - aInfo.SetLocation(aP0); - aInfo.SetPosition(aAx3); - // - if (aNbWires>1) return; - // - //aSurf->Bounds(aUMin, aUMax, aVMin, aVMax); - BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax); - bInfU1=Precision::IsNegativeInfinite(aUMin); - bInfU2=Precision::IsPositiveInfinite(aUMax); - bInfV1=Precision::IsNegativeInfinite(aVMin); - bInfV2=Precision::IsPositiveInfinite(aVMax); - // - bInf=(bInfU1 || bInfU2 || bInfV1 || bInfV2); - if (bInf) { - aInfo.SetKindOfBounds(GEOMAlgo_KB_INFINITE); - } - else { - aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED); - } - // - FillDetails(aF, aPln); - }// if (aCT==GeomAbs_Line) { - // - // 2. Sphere - else if (aST==GeomAbs_Sphere) { - gp_Sphere aSphere; - // - aSphere=aGAS.Sphere(); - aP0=aSphere.Location(); - aAx3=aSphere.Position(); - aR1=aSphere.Radius(); - // - aInfo.SetKindOfShape(GEOMAlgo_KS_SPHERE); - aInfo.SetLocation(aP0); - aInfo.SetPosition(aAx3); - aInfo.SetRadius1(aR1); - // - if (aNbWires>1) return; - // - aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED); - aInfo.SetKindOfClosed(GEOMAlgo_KC_CLOSED); - // - FillDetails(aF, aSphere); - }// else if (aST==GeomAbs_Sphere) { - // - // 3. Cylinder - else if (aST==GeomAbs_Cylinder) { - gp_Cylinder aCyl; - // - aCyl=aGAS.Cylinder(); - aP0=aCyl.Location(); - aAx3=aCyl.Position(); - aR1=aCyl.Radius(); - // - aInfo.SetKindOfShape(GEOMAlgo_KS_CYLINDER); - aInfo.SetLocation(aP0); - aInfo.SetPosition(aAx3); - aInfo.SetRadius1(aR1); - // - if (aNbWires>1) return; - // - BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax); - bInfU1=Precision::IsNegativeInfinite(aUMin); - bInfU2=Precision::IsPositiveInfinite(aUMax); - bInfV1=Precision::IsNegativeInfinite(aVMin); - bInfV2=Precision::IsPositiveInfinite(aVMax); - // - bInf=(bInfU1 || bInfU2 || bInfV1 || bInfV2); - if (bInf) { - aInfo.SetKindOfBounds(GEOMAlgo_KB_INFINITE); - } - else { - aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED); - } - FillDetails(aF, aCyl); - } - // - // 4. Cone - else if (aST==GeomAbs_Cone) { - gp_Cone aCone; - // - aCone=aGAS.Cone(); - aP0=aCone.Location(); - aAx3=aCone.Position(); - //aR1=aCyl.Radius(); - // - aInfo.SetKindOfShape(GEOMAlgo_KS_CONE); - aInfo.SetLocation(aP0); - aInfo.SetPosition(aAx3); - //aInfo.SetRadius1(aR1); - // - if (aNbWires>1) return; - // - BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax); - bInfU1=Precision::IsNegativeInfinite(aUMin); - bInfU2=Precision::IsPositiveInfinite(aUMax); - bInfV1=Precision::IsNegativeInfinite(aVMin); - bInfV2=Precision::IsPositiveInfinite(aVMax); - // - bInf=(bInfU1 || bInfU2 || bInfV1 || bInfV2); - if (bInf) { - aInfo.SetKindOfBounds(GEOMAlgo_KB_INFINITE); - } - else { - aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED); - } - FillDetails(aF, aCone); - } - // - // 5. Torus - else if (aST==GeomAbs_Torus) { - gp_Torus aTorus; - // - aTorus=aGAS.Torus(); - aP0=aTorus.Location(); - aAx3=aTorus.Position(); - aR1=aTorus.MajorRadius(); - aR2=aTorus.MinorRadius(); - // - aInfo.SetKindOfShape(GEOMAlgo_KS_TORUS); - aInfo.SetLocation(aP0); - aInfo.SetPosition(aAx3); - aInfo.SetRadius1(aR1); - aInfo.SetRadius2(aR2); - // - if (aNbWires>1) return; - // - aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED); - // - FillDetails(aF, aTorus); - } -} -//======================================================================= -//function :FillEdge -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillEdge(const TopoDS_Shape& aS) -{ - myErrorStatus=0; - // - Standard_Boolean bDegenerated, bIsAllowedType; - Standard_Integer aNbV; - Standard_Real aR1, aR2; - gp_Pnt aP, aP1, aP2, aPc; - gp_Dir aD; - gp_Ax2 aAx2; - Standard_Real aT1, aT2; - GeomAbs_CurveType aCT; - Handle(Geom_Curve) aC3D; - TopoDS_Edge aE; - //---------------------------------------------------- - if (myMapInfo.Contains(aS)) { - return; - } - else { - GEOMAlgo_ShapeInfo aInfoX; - myMapInfo.Add(aS, aInfoX); - } - GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aS); - //---------------------------------------------------- - aInfo.SetType(TopAbs_EDGE); - // - FillNbSubShapes(aS, aInfo); - // - aE=TopoDS::Edge(aS); - // - bDegenerated=BRep_Tool::Degenerated(aE); - if (bDegenerated) { - aInfo.SetKindOfShape(GEOMAlgo_KS_DEGENERATED); - FillSubShapes(aS); - return; - } - // - aC3D=BRep_Tool::Curve(aE, aT1, aT2); - GeomAdaptor_Curve aGAC(aC3D); - aCT=aGAC.GetType(); - bIsAllowedType=IsAllowedType(aCT); - if (!bIsAllowedType) { - FillSubShapes(aS); - return; - } - // Line - if (aCT==GeomAbs_Line) { - Standard_Boolean bInf1, bInf2; - Standard_Real aLength; - gp_Lin aLin; - gp_XYZ aXYZ1, aXYZ2, aXYZc; - // - aLin=aGAC.Line(); - aP=aLin.Location(); - aD=aLin.Direction(); - // - aInfo.SetKindOfShape(GEOMAlgo_KS_LINE); - aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED); - aInfo.SetLocation(aP); - aInfo.SetDirection(aD); - // - bInf1=Precision::IsNegativeInfinite(aT1); - bInf2=Precision::IsPositiveInfinite(aT2); - if (bInf1||bInf2) { - aInfo.SetKindOfBounds(GEOMAlgo_KB_INFINITE); - aInfo.SetKindOfName(GEOMAlgo_KN_LINE); - } - else { - aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED); - aInfo.SetKindOfName(GEOMAlgo_KN_SEGMENT); - aGAC.D0(aT1, aP1); - aGAC.D0(aT2, aP2); - aInfo.SetPnt1(aP1); - aInfo.SetPnt2(aP2); - // - aLength=aP1.Distance(aP2); - aXYZ1=aP1.XYZ(); - aXYZ2=aP2.XYZ(); - aXYZc=aXYZ1+aXYZ2; - aXYZc.Multiply(0.5); - // - aPc.SetXYZ(aXYZc); - gp_Vec aVec(aPc, aP2); - gp_Dir aDir(aVec); - // - aInfo.SetLocation(aPc); - aInfo.SetDirection(aDir); - aInfo.SetLength(aLength); - } - }// if (aCT==GeomAbs_Line) { - // - // Circle - else if (aCT==GeomAbs_Circle) { - gp_Circ aCirc; - // - aCirc=aGAC.Circle(); - aP=aCirc.Location(); - aAx2=aCirc.Position(); - aR1=aCirc.Radius(); - // - aInfo.SetKindOfShape(GEOMAlgo_KS_CIRCLE); - aInfo.SetLocation(aP); - aInfo.SetPosition(aAx2); - aInfo.SetRadius1(aR1); - // - aNbV=aInfo.NbSubShapes(TopAbs_VERTEX); - if (!aNbV) { - myErrorStatus=11; // circle edge without vertices - return; - } - aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED); - aGAC.D0(aT1, aP1); - aGAC.D0(aT2, aP2); - aInfo.SetPnt1(aP1); - aInfo.SetPnt2(aP2); - // - if (aNbV==1) { - aInfo.SetKindOfClosed(GEOMAlgo_KC_CLOSED); - aInfo.SetKindOfName(GEOMAlgo_KN_CIRCLE); - } - else { - aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED); - aInfo.SetKindOfName(GEOMAlgo_KN_ARCCIRCLE); - // - gp_Vec aVecX(aP, aP1); - gp_Dir aDirX(aVecX); - gp_Ax2 aAx2new(aP, aAx2.Direction(), aDirX); - aInfo.SetPosition(aAx2new); - } - }// else if (aCT==GeomAbs_Circle) { - // - // Ellipse - else if (aCT==GeomAbs_Ellipse) { - gp_Elips aElips; - // - aElips=aGAC.Ellipse(); - aP=aElips.Location(); - aAx2=aElips.Position(); - aR1=aElips.MajorRadius(); - aR2=aElips.MinorRadius(); - // - aInfo.SetKindOfShape(GEOMAlgo_KS_ELLIPSE); - aInfo.SetLocation(aP); - aInfo.SetPosition(aAx2); - aInfo.SetRadius1(aR1); - aInfo.SetRadius2(aR2); - // - aNbV=aInfo.NbSubShapes(TopAbs_VERTEX); - if (!aNbV) { - myErrorStatus=11; // ellipse edge without vertices - return; - } - aInfo.SetKindOfBounds(GEOMAlgo_KB_TRIMMED); - aGAC.D0(aT1, aP1); - aGAC.D0(aT2, aP2); - aInfo.SetPnt1(aP1); - aInfo.SetPnt2(aP2); - // - if (aNbV==1) { - aInfo.SetKindOfClosed(GEOMAlgo_KC_CLOSED); - aInfo.SetKindOfName(GEOMAlgo_KN_ELLIPSE); - } - else { - aInfo.SetKindOfClosed(GEOMAlgo_KC_NOTCLOSED); - aInfo.SetKindOfName(GEOMAlgo_KN_ARCELLIPSE); - // - gp_Vec aVecX(aP, aP1); - gp_Dir aDirX(aVecX); - gp_Ax2 aAx2new(aP, aAx2.Direction(), aDirX); - aInfo.SetPosition(aAx2new); - } - }// else if (aCT==GeomAbs_Ellipse) { - // - FillSubShapes(aS); -} -//======================================================================= -//function :FillVertex -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillVertex(const TopoDS_Shape& aS) -{ - myErrorStatus=0; - // - gp_Pnt aP; - TopoDS_Vertex aV; - // - if (myMapInfo.Contains(aS)) { - return; - } - else { - GEOMAlgo_ShapeInfo aInfoX; - myMapInfo.Add(aS, aInfoX); - } - GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aS); - // - aV=TopoDS::Vertex(aS); - aP=BRep_Tool::Pnt(aV); - // - aInfo.SetType(TopAbs_VERTEX); - aInfo.SetLocation(aP); - myMapInfo.Add(aS, aInfo); -} -//======================================================================= -//function : FillNbSubshapes -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillNbSubShapes(const TopoDS_Shape& aS, - GEOMAlgo_ShapeInfo& aInfo) -{ - myErrorStatus=0; - // - Standard_Integer i, aNb, aNbS; - TopTools_IndexedMapOfShape aM; - TopAbs_ShapeEnum aST; - TopAbs_ShapeEnum aTypes[]= { - //TopAbs_FACE, TopAbs_EDGE, TopAbs_VERTEX - TopAbs_COMPOUND, - TopAbs_COMPSOLID, - TopAbs_SOLID, - TopAbs_SHELL, - TopAbs_FACE, - TopAbs_WIRE, - TopAbs_EDGE, - TopAbs_VERTEX - }; - - // - aST=aS.ShapeType(); - aNb=sizeof(aTypes)/sizeof(aTypes[0]); - for (i=0; i -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_ShapeInfoFiller -//purpose : -//======================================================================= -class GEOMAlgo_ShapeInfoFiller : public GEOMAlgo_Algo -{ - public: - Standard_EXPORT - GEOMAlgo_ShapeInfoFiller(); - - Standard_EXPORT - virtual ~GEOMAlgo_ShapeInfoFiller(); - - Standard_EXPORT - void SetShape(const TopoDS_Shape& aS) ; - - Standard_EXPORT - const TopoDS_Shape& Shape() const; - - Standard_EXPORT - void SetTolerance(const Standard_Real aT) ; - - Standard_EXPORT - Standard_Real Tolerance() const; - - Standard_EXPORT - const GEOMAlgo_ShapeInfo& Info() const; - - Standard_EXPORT - const GEOMAlgo_ShapeInfo& Info(const TopoDS_Shape& aS) const; - - Standard_EXPORT - virtual void Perform() ; - - protected: - Standard_EXPORT - virtual void CheckData() ; - - Standard_EXPORT - void FillNbSubShapes(const TopoDS_Shape& aS,GEOMAlgo_ShapeInfo& aInfo) ; - - Standard_EXPORT - void FillSubShapes(const TopoDS_Shape& aS) ; - - Standard_EXPORT - void FillShape(const TopoDS_Shape& aS) ; - - Standard_EXPORT - void FillVertex(const TopoDS_Shape& aS) ; - - Standard_EXPORT - void FillEdge(const TopoDS_Shape& aS) ; - - Standard_EXPORT - void FillFace(const TopoDS_Shape& aS) ; - - Standard_EXPORT - void FillSolid(const TopoDS_Shape& aS) ; - - Standard_EXPORT - void FillContainer(const TopoDS_Shape& aS) ; - - Standard_EXPORT - void FillDetails(const TopoDS_Face& aF,const gp_Pln& aPln) ; - - Standard_EXPORT - void FillDetails(const TopoDS_Face& aF,const gp_Sphere& aSph) ; - - Standard_EXPORT - void FillDetails(const TopoDS_Face& aF,const gp_Cylinder& aCyl) ; - - Standard_EXPORT - void FillDetails(const TopoDS_Face& aF,const gp_Cone& aCone) ; - - Standard_EXPORT - void FillDetails(const TopoDS_Face& aF,const gp_Torus& aTorus) ; - - Standard_EXPORT - void FillDetails(const TopoDS_Solid& aS) ; - - - TopoDS_Shape myShape; - GEOMAlgo_ShapeInfo myEmptyInfo; - GEOMAlgo_IndexedDataMapOfShapeShapeInfo myMapInfo; - Standard_Real myTolerance; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfoFiller_1.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfoFiller_1.cxx deleted file mode 100644 index c641edd85..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeInfoFiller_1.cxx +++ /dev/null @@ -1,762 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#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 - -//======================================================================= -//function : FillDetails -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Solid& aSd) -{ - Standard_Integer i, aNbF, aNbCyl, aNbCon, aNbPgn, aNbRct, aNbCrc, aNbX; - TopoDS_Shape aFCyl, aFCon; - TopTools_IndexedMapOfShape aMF; - GEOMAlgo_KindOfName aKNF; - // - GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aSd); - aInfo.SetKindOfName(GEOMAlgo_KN_UNKNOWN); - // - TopExp::MapShapes(aSd, TopAbs_FACE, aMF); - // - aNbF=aMF.Extent(); - if (!aNbF) { - return; - } - // - if (aNbF==1) { - const TopoDS_Shape& aF=aMF(1); - GEOMAlgo_ShapeInfo& aInfoF=myMapInfo.ChangeFromKey(aF); - aKNF=aInfoF.KindOfName(); // mb: sphere, torus - if (aKNF==GEOMAlgo_KN_SPHERE || - aKNF==GEOMAlgo_KN_TORUS) { - aInfo.SetKindOfName(aKNF); - aInfo.SetLocation(aInfoF.Location()); - aInfo.SetPosition(aInfoF.Position()); - aInfo.SetRadius1(aInfoF.Radius1()); - if(aKNF==GEOMAlgo_KN_TORUS) { - aInfo.SetRadius2(aInfoF.Radius2()); - } - return; - } - } - // - aNbCyl=0; - aNbCon=0; - aNbPgn=0; - aNbRct=0; - aNbCrc=0; - for (i=1; i<=aNbF; ++i) { - const TopoDS_Shape& aF=aMF(i); - GEOMAlgo_ShapeInfo& aInfoF=myMapInfo.ChangeFromKey(aF); - aKNF=aInfoF.KindOfName(); - if (aKNF==GEOMAlgo_KN_CYLINDER) { - aFCyl=aF; - ++aNbCyl; - } - else if (aKNF==GEOMAlgo_KN_CONE) { - aFCon=aF; - ++aNbCon; - } - else if (aKNF==GEOMAlgo_KN_DISKCIRCLE) { - ++aNbCrc; - } - else if (aKNF==GEOMAlgo_KN_POLYGON || - aKNF==GEOMAlgo_KN_TRIANGLE || - aKNF==GEOMAlgo_KN_QUADRANGLE) { - ++aNbPgn; - } - else if (aKNF==GEOMAlgo_KN_RECTANGLE) { - ++aNbPgn; - ++aNbRct; - } - } - // - aNbX=aNbCyl+aNbCrc; - if (aNbCyl==1 && aNbCrc==2 && aNbX==aNbF) { - // cylinder (as they understand it) - GEOMAlgo_ShapeInfo& aInfoF=myMapInfo.ChangeFromKey(aFCyl); - aKNF=aInfoF.KindOfName(); - aInfo.SetKindOfName(aKNF); - aInfo.SetLocation(aInfoF.Location()); - aInfo.SetPosition(aInfoF.Position()); - aInfo.SetRadius1(aInfoF.Radius1()); - aInfo.SetHeight(aInfoF.Height()); - return; - } - // - aNbX=aNbCon+aNbCrc; - if (aNbCon==1 && (aNbCrc==1 || aNbCrc==2) && aNbX==aNbF) { - // cone - GEOMAlgo_ShapeInfo& aInfoF=myMapInfo.ChangeFromKey(aFCon); - aKNF=aInfoF.KindOfName(); - aInfo.SetKindOfName(aKNF); - aInfo.SetLocation(aInfoF.Location()); - aInfo.SetPosition(aInfoF.Position()); - aInfo.SetRadius1(aInfoF.Radius1()); - aInfo.SetRadius2(aInfoF.Radius2()); - aInfo.SetHeight(aInfoF.Height()); - return; - } - // - //modified by NIZNHY-PKV Wed Jan 11 11:04:31 2012f - if (aNbF!=aNbPgn) { - return;// -> GEOMAlgo_KN_UNKNOWN - } - //modified by NIZNHY-PKV Wed Jan 11 11:04:37 2012t - if (aNbPgn!=6) { - aInfo.SetKindOfName(GEOMAlgo_KN_POLYHEDRON); - return; - } - // aNbPgn==6 - if (aNbPgn!=aNbRct) { - aInfo.SetKindOfName(GEOMAlgo_KN_POLYHEDRON); - return; - } - //=================================================== - // aNbRct=6; - // box - Standard_Integer j, aNbFi, aNbV, iMax, iMin, iMid; - Standard_Real aDot, aLength, aWidth, aHeight, aDist[3]; - Standard_Real aDistMin, aDistMax; - gp_Pnt aPi, aPc; - gp_Dir aDir[3]; - gp_XYZ aXYZc; - TColStd_IndexedMapOfInteger aMp; - TopTools_IndexedMapOfShape aMV, aMFi; - // - // barycenter aPc - TopExp::MapShapes(aSd, TopAbs_VERTEX, aMV); - aNbV=aMV.Extent(); - if (aNbV!=8) { - return; - } - // - aXYZc.SetCoord(0.,0.,0.); - for (i=1; i<=aNbV; ++i) { - const TopoDS_Vertex& aVi=TopoDS::Vertex(aMV(i)); - aPi=BRep_Tool::Pnt(aVi); - const gp_XYZ& aXYZ=aPi.XYZ(); - aXYZc=aXYZc+aXYZ; - } - // - aXYZc.Divide(aNbV); - aPc.SetXYZ(aXYZc); - // - // 3 faces - for (i=1; i<=aNbF; ++i) { - if (aMp.Contains(i)) { - continue; - } - // - const TopoDS_Shape& aFi=aMF(i); - const GEOMAlgo_ShapeInfo& aIFi=myMapInfo.FindFromKey(aFi); - const gp_Dir& aDNi=aIFi.Position().Direction(); - // - for (j=i+1; j<=aNbF; ++j) { - if (aMp.Contains(j)) { - continue; - } - // - const TopoDS_Shape& aFj=aMF(j); - const GEOMAlgo_ShapeInfo& aIFj=myMapInfo.FindFromKey(aFj); - const gp_Dir& aDNj=aIFj.Position().Direction(); - // - aDot=aDNi*aDNj; - if (fabs(1.-aDot)<0.0001) { - aMp.Add(i); - aMp.Add(j); - aMFi.Add(aFi); - break; - } - // - } - } - aNbFi=aMFi.Extent(); - if (aNbFi!=3) { - return; - } - // - aDistMin=1.e15; - aDistMax=-aDistMin; - for (i=0; iaDistMax) { - aDistMax=aDist[i]; - iMax=i; - } - if (aDist[i] myTolerance) { - aInfo.SetKindOfName(GEOMAlgo_KN_QUADRANGLE); - return; - } - } - // - // rectangle - aInfo.SetKindOfName(GEOMAlgo_KN_RECTANGLE); - // - // shift location to the center and calc. sizes - aXYZc.SetCoord(0.,0.,0.); - TopExp::MapShapes(aF, TopAbs_VERTEX, aMV); - for (i=1; i<=aNbV; ++i) { - const TopoDS_Vertex& aV=TopoDS::Vertex(aMV(i)); - aP=BRep_Tool::Pnt(aV); - const gp_XYZ& aXYZ=aP.XYZ(); - aXYZc=aXYZc+aXYZ; - } - // - // Location : aPc in center of rectangle - // Position : 0z is plane normal - // 0x is along length - // - aXYZc.Divide(4.); - aPc.SetXYZ(aXYZc); - // - gp_Lin aL0(aPx[0], aDx[0]); - gp_Lin aL1(aPx[1], aDx[1]); - // - aD0=aL0.Distance(aPc); - aD1=aL1.Distance(aPc); - // - aLength=aD0; - aWidth =aD1; - aDX=aL1.Direction(); - if (aD0aR[1]) { - aRmin=aR[1]; - aRmax=aR[0]; - aPc=aPC[0]; - gp_Vec aVz(aPC[0], aPC[1]); - gp_Vec aVx(aPC[0], aPX[0]); - gp_Dir aDz(aVz); - gp_Dir aDx(aVx); - gp_Ax2 aAx2(aPc, aDz, aDx); - aAx2new=aAx2; - } - else { - aRmin=aR[0]; - aRmax=aR[1]; - aPc=aPC[1]; - gp_Vec aVz(aPC[1], aPC[0]); - gp_Vec aVx(aPC[1], aPX[1]); - gp_Dir aDz(aVz); - gp_Dir aDx(aVx); - gp_Ax2 aAx2(aPc, aDz, aDx); - aAx2new=aAx2; - } - // - gp_Ax3 aAx3(aAx2new); - aInfo.SetLocation(aPc); - aInfo.SetPosition(aAx3); - aInfo.SetRadius1(aRmax); - aInfo.SetRadius2(aRmin); - aInfo.SetHeight(aHeight); - // - aInfo.SetKindOfName(GEOMAlgo_KN_CONE); -} -//======================================================================= -//function : FillDetails -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF, - const gp_Cylinder& aCyl) -{ - Standard_Integer i, aNbV, aNbE, aNbCE, aNbSE; - Standard_Real aT0, aT1, aHeight; - gp_Pnt aPC[3], aPc; - TopoDS_Edge aE; - TopExp_Explorer aExp; - TopTools_MapOfShape aM; - GEOMAlgo_KindOfShape aKS; - GEOMAlgo_KindOfName aKN, aKNE; - GEOMAlgo_KindOfClosed aKCE; - // - GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aF); - aKN=GEOMAlgo_KN_UNKNOWN; - aInfo.SetKindOfName(aKN); - // - aKS=aInfo.KindOfShape(); - if (aKS!=GEOMAlgo_KS_CYLINDER) { - return; - } - // - if (aInfo.KindOfBounds()==GEOMAlgo_KB_INFINITE) { - return; - } - // - aNbV=aInfo.NbSubShapes(TopAbs_VERTEX); - aNbE=aInfo.NbSubShapes(TopAbs_EDGE); - if (!(aNbV==2 && aNbE==3)) { - return; - } - // - i=0; - aNbCE=0; - aNbSE=0; - aExp.Init(aF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - aE=TopoDS::Edge(aExp.Current()); - if(aM.Add(aE)) { - const GEOMAlgo_ShapeInfo& aInfoE=myMapInfo.FindFromKey(aE); - aKNE=aInfoE.KindOfName(); - aKCE=aInfoE.KindOfClosed(); - if (aKNE==GEOMAlgo_KN_CIRCLE && aKCE==GEOMAlgo_KC_CLOSED) { - aPC[aNbCE]=aInfoE.Location(); - ++aNbCE; - } - else if (aKNE==GEOMAlgo_KN_SEGMENT) { - if (BRep_Tool::IsClosed(aE, aF)) { - ++aNbSE; - } - } - } - } - // - if (!(aNbCE==2 && aNbSE==1)) { - return; - } - // - const gp_Ax1& aAx1=aCyl.Axis(); - const gp_Dir& aDir=aAx1.Direction(); - const gp_Pnt& aPLoc=aAx1.Location(); - gp_Lin aLin(aPLoc, aDir); - // - aT0=ElCLib::Parameter(aLin, aPC[0]); - aT1=ElCLib::Parameter(aLin, aPC[1]); - // - aPc=aPC[0];; - if (aT0>aT1) { - aPc=aPC[1]; - } - aHeight=aPC[0].Distance(aPC[1]); - // - gp_Ax3 aAx3=aCyl.Position(); - aAx3.SetLocation(aPc); - // - aInfo.SetKindOfName(GEOMAlgo_KN_CYLINDER); - aInfo.SetPosition(aAx3); - aInfo.SetLocation(aPc); - aInfo.SetHeight(aHeight); -} - -//======================================================================= -//function : FillDetails -//purpose : -//======================================================================= - void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF, - const gp_Torus& ) -{ - Standard_Integer aNbV, aNbE, aNbSE; - TopoDS_Edge aE; - TopExp_Explorer aExp; - TopTools_MapOfShape aM; - GEOMAlgo_KindOfShape aKS; - // - GEOMAlgo_ShapeInfo& aInfo=myMapInfo.ChangeFromKey(aF); - aInfo.SetKindOfName(GEOMAlgo_KN_UNKNOWN); - // - aKS=aInfo.KindOfShape(); - if (aKS!=GEOMAlgo_KS_TORUS) { - return; - } - // - aNbV=aInfo.NbSubShapes(TopAbs_VERTEX); - aNbE=aInfo.NbSubShapes(TopAbs_EDGE); - if (!(aNbV==1 && aNbE==2)) { - return; - } - // - aNbSE=0; - aExp.Init(aF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - aE=TopoDS::Edge(aExp.Current()); - if (aM.Add(aE)) { - //const GEOMAlgo_ShapeInfo& aInfoE=myMapInfo.FindFromKey(aE); - if (BRep_Tool::IsClosed(aE, aF)) { - ++aNbSE; - } - } - } - // - if (aNbSE!=2) { - return; - } - aInfo.SetKindOfName(GEOMAlgo_KN_TORUS); -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSet.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSet.cxx deleted file mode 100644 index 3e84aa098..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSet.cxx +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_ShapeSet.cxx -// Created: -// Author: Peter KURNEV -// -#include - -#include - -#include -#include - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_ShapeSet::GEOMAlgo_ShapeSet() -{ -} -//======================================================================= -//function : Clear -//purpose : -//======================================================================= - void GEOMAlgo_ShapeSet::Clear() -{ - myMap.Clear(); - myList.Clear(); -} -//======================================================================= -//function : Add -//purpose : -//======================================================================= - void GEOMAlgo_ShapeSet::Add(const TopoDS_Shape& theShape) -{ - if (myMap.Add(theShape)) { - myList.Append(theShape); - } -} -//======================================================================= -//function : Add -//purpose : -//======================================================================= - void GEOMAlgo_ShapeSet::Add(const TopoDS_Shape& theShape, - const TopAbs_ShapeEnum theType) -{ - TopExp_Explorer aExp; - // - aExp.Init(theShape, theType); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aS=aExp.Current(); - if (myMap.Add(aS)) { - myList.Append(aS); - } - } -} -//======================================================================= -//function : Add -//purpose : -//======================================================================= - void GEOMAlgo_ShapeSet::Add(const TopTools_ListOfShape& theLS) -{ - TopTools_ListIteratorOfListOfShape aIt; - // - aIt.Initialize(theLS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - if (myMap.Add(aS)) { - myList.Append(aS); - } - } -} -//======================================================================= -//function :GetSet -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_ShapeSet::GetSet()const -{ - return myList; -} -//======================================================================= -//function : Contains -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_ShapeSet::Contains(const GEOMAlgo_ShapeSet& theOther)const -{ - Standard_Boolean bRet; - TopAbs_Orientation aOr; - TopTools_ListIteratorOfListOfShape aIt; - // - bRet=Standard_True; - const TopTools_ListOfShape& aLS=theOther.GetSet(); - aIt.Initialize(aLS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - aOr=aF.Orientation(); - if (aOr==TopAbs_FORWARD || aOr==TopAbs_REVERSED) { - bRet=myMap.Contains(aF); - if (!bRet) { - break; - } - } - } - return bRet; -} -//======================================================================= -//function : Subtract -//purpose : -//======================================================================= - void GEOMAlgo_ShapeSet::Subtract(const GEOMAlgo_ShapeSet& theOther) -{ - TopTools_ListIteratorOfListOfShape aIt; - TopTools_ListOfShape aLS; - // - myMap.Clear(); - aIt.Initialize(myList); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - if (!theOther.myMap.Contains(aS)) { - if(myMap.Add(aS)){ - aLS.Append(aS); - } - } - } - // - myList=aLS; -} -//modified by NIZNHY-PKV Wed Oct 28 13:51:36 2010f -//======================================================================= -//function : IsEqual -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_ShapeSet::IsEqual(const GEOMAlgo_ShapeSet& theOther)const -{ - Standard_Boolean bRet; - Standard_Integer aNb1, aNb2; - TopTools_ListIteratorOfListOfShape aIt; - // - bRet=Standard_True; - aNb1=myList.Extent(); - const TopTools_ListOfShape& aLS2=theOther.GetSet(); - aNb2=aLS2.Extent(); - if (aNb1!=aNb2) { - return !bRet; - } - // - aIt.Initialize(myList); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - if(!theOther.myMap.Contains(aS)) { - bRet=!bRet; - break; - } - } - return bRet; -} -//modified by NIZNHY-PKV Wed Oct 28 13:51:38 2010t diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSet.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSet.hxx deleted file mode 100644 index b304a8bba..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSet.hxx +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_ShapeSet.hxx -// Created: -// Author: Peter KURNEV -// -#ifndef _GEOMAlgo_ShapeSet_HeaderFile -#define _GEOMAlgo_ShapeSet_HeaderFile - -#include -#include -#include -#include -#include -#include -#include - -//! Implementation some formal
-//! opereations with Set of shapes
-//======================================================================= -//class : GEOMAlgo_ShapeSet -//purpose : -//======================================================================= -class GEOMAlgo_ShapeSet -{ - public: - //! Empty constructor
- Standard_EXPORT - GEOMAlgo_ShapeSet(); - - //! Adds shapes from the list theLS to the Set
- Standard_EXPORT - void Add(const TopTools_ListOfShape& theLS) ; - - //! Adds shape theShape to the Set
- Standard_EXPORT - void Add(const TopoDS_Shape& theShape) ; - - //! Adds sub-shapes of shape theShape,
- //! that have type theType to the Set
- Standard_EXPORT - void Add(const TopoDS_Shape& theShape,const TopAbs_ShapeEnum theType) ; - - //! Removes shapes of theSet from the Set
- Standard_EXPORT - void Subtract(const GEOMAlgo_ShapeSet& theSet) ; - - //! Clears internal fields
- Standard_EXPORT void Clear() ; - - //! Returns True if the Set contains
- //! all shapes of theSet
- Standard_EXPORT - Standard_Boolean Contains(const GEOMAlgo_ShapeSet& theSet) const; - - //! Returns the Set
- Standard_EXPORT - const TopTools_ListOfShape& GetSet() const; - - //! Returns True if the Set==theSet
- Standard_EXPORT - Standard_Boolean IsEqual(const GEOMAlgo_ShapeSet& theOther) const; - - Standard_Boolean operator ==(const GEOMAlgo_ShapeSet& theOther) const { - return IsEqual(theOther); - } - - protected: - TopTools_MapOfOrientedShape myMap; - TopTools_ListOfShape myList; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSolid.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSolid.cxx deleted file mode 100644 index 04f69b29a..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSolid.cxx +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_ShapeSolid.cxx -// Created: Thu Jan 13 12:54:48 2005 -// Author: Peter KURNEV -// -// -#include - -#include -#include - -//======================================================================= -//function : GEOMAlgo_ShapeSolid -//purpose : -//======================================================================= -GEOMAlgo_ShapeSolid::GEOMAlgo_ShapeSolid() -: - GEOMAlgo_Algo(), - myRank(0), - myDSFiller(NULL) -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_ShapeSolid::~GEOMAlgo_ShapeSolid() -{ -} -//======================================================================= -//function : SetFiller -//purpose : -//======================================================================= -void GEOMAlgo_ShapeSolid::SetFiller(const BOPTools_DSFiller& aDSFiller) -{ - myDSFiller=(BOPTools_DSFiller*) &aDSFiller; -} -//======================================================================= -// function: Shapes -// purpose: -//======================================================================= -const TopTools_ListOfShape& GEOMAlgo_ShapeSolid::Shapes(const TopAbs_State aState) const -{ - const TopTools_ListOfShape *pL; - // - switch (aState) { - case TopAbs_IN: - pL=&myLSIN; - break; - case TopAbs_OUT: - pL=&myLSOUT; - break; - case TopAbs_ON: - pL=&myLSON; - break; - default: - pL=&myLSON; - break; - } - return *pL; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSolid.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSolid.hxx deleted file mode 100644 index 47e3edac7..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ShapeSolid.hxx +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_ShapeSolid.hxx -// Created: Thu Jan 13 12:54:48 2005 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_ShapeSolid_HeaderFile -#define _GEOMAlgo_ShapeSolid_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_ShapeSolid -//purpose : -//======================================================================= -class GEOMAlgo_ShapeSolid : public GEOMAlgo_Algo -{ - 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; - -protected: - Standard_EXPORT - GEOMAlgo_ShapeSolid(); - - Standard_EXPORT - virtual void BuildResult() = 0; - - Standard_EXPORT - virtual void Prepare() = 0; - - - TopTools_ListOfShape myLSIN; - TopTools_ListOfShape myLSOUT; - TopTools_ListOfShape myLSON; - Standard_Integer myRank; - BOPTools_PDSFiller myDSFiller; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ShellSolid.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_ShellSolid.cxx deleted file mode 100644 index c032c1111..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ShellSolid.cxx +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_ShellSolid.cxx -// Created: Wed Jan 12 12:49:45 2005 -// Author: Peter KURNEV -// -// -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_ShellSolid -//purpose : -//======================================================================= -GEOMAlgo_ShellSolid::GEOMAlgo_ShellSolid() -: - GEOMAlgo_ShapeSolid() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_ShellSolid::~GEOMAlgo_ShellSolid() -{ -} -//======================================================================= -// function: -// purpose: -//======================================================================= -void GEOMAlgo_ShellSolid::Perform() -{ - myErrorStatus=0; - // - try { - if (myDSFiller==NULL) { - myErrorStatus=10; - return; - } - if(!myDSFiller->IsDone()) { - myErrorStatus=11; - return; - } - // - Standard_Boolean bIsNewFiller; - // - bIsNewFiller=myDSFiller->IsNewFiller(); - if (bIsNewFiller) { - Prepare(); - myDSFiller->SetNewFiller(!bIsNewFiller); - } - // - myRank=(myDSFiller->DS().Object().ShapeType()==TopAbs_SHELL) ? 1 : 2; - BuildResult(); - } - catch (Standard_Failure) { - myErrorStatus=12; - } -} -//======================================================================= -// function: Prepare -// purpose: -//======================================================================= -void GEOMAlgo_ShellSolid::Prepare() -{ - const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller(); - // - // 1 States - BOPTools_SolidStateFiller aStateFiller(aPaveFiller); - aStateFiller.Do(); - // - // 2 Project section edges on corresp. faces -> P-Curves on edges. - BOPTools_PCurveMaker aPCurveMaker(aPaveFiller); - aPCurveMaker.Do(); - // - // 3. Degenerated Edges Processing - BOPTools_DEProcessor aDEProcessor(aPaveFiller); - aDEProcessor.Do(); - // - // 4. Detect Same Domain Faces - DetectSDFaces(); -} -//================================================================================= -// function: BuildResult -// purpose: -//================================================================================= -void GEOMAlgo_ShellSolid::BuildResult() -{ - Standard_Boolean bIsTouchCase; - Standard_Integer i, j, nF1, nF2, aNbFFs, aNbS, aNbCurves, nSp, iRank1; - Standard_Integer nE, nF, aNbPB, iBeg, iEnd; - BooleanOperations_StateOfShape aState; - TopExp_Explorer anExp; - TopAbs_ShapeEnum aType; - gp_Pnt2d aP2D; - gp_Pnt aP3D; - // - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - const BOPTools_InterferencePool& anInterfPool=myDSFiller->InterfPool(); - BOPTools_InterferencePool* pInterfPool=(BOPTools_InterferencePool*) &anInterfPool; - BOPTools_CArray1OfSSInterference& aFFs=pInterfPool->SSInterferences(); - const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller(); - const BOPTools_SplitShapesPool& aSplitShapesPool=aPaveFiller.SplitShapesPool(); - // - // 1. process pf non-interferring faces - iBeg=1; - iEnd=aDS.NumberOfShapesOfTheObject(); - if (myRank==2) { - iBeg=iEnd+1; - iEnd=aDS.NumberOfSourceShapes(); - } - // - for (i=iBeg; i<=iEnd; ++i) { - aType=aDS.GetShapeType(i); - if (aType!=TopAbs_FACE) { - continue; - } - // - const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(i)); - aState=aDS.GetState(i); - if (aState==BooleanOperations_IN) { - myLSIN.Append(aF1); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aF1); - } - } - // - // 2. process pf interferred faces - aNbFFs=aFFs.Extent(); - for (i=1; i<=aNbFFs; ++i) { - BOPTools_SSInterference& aFFi=aFFs(i); - // - nF1=aFFi.Index1(); - nF2=aFFi.Index2(); - iRank1=aDS.Rank(nF1); - nF=(iRank1==myRank) ? nF1 : nF2; - const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF)); - // - bIsTouchCase=aFFi.IsTangentFaces(); - // - if (bIsTouchCase) { - myLSON.Append(aF1); - continue; - } - // - // Has section edges ? - aNbS=0; - BOPTools_SequenceOfCurves& aBCurves=aFFi.Curves(); - aNbCurves=aBCurves.Length(); - for (j=1; j<=aNbCurves; j++) { - BOPTools_Curve& aBC=aBCurves(j); - const BOPTools_ListOfPaveBlock& aSectEdges=aBC.NewPaveBlocks(); - aNbS=aSectEdges.Extent(); - if (aNbS) { - break; - } - } - // - if (aNbS) { // it has - continue; - } - // - anExp.Init(aF1, TopAbs_EDGE); - for (; anExp.More(); anExp.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(anExp.Current()); - if (BRep_Tool::Degenerated(aE)) { - continue; - } - // - nE=aDS.ShapeIndex(aE, myRank); - const BOPTools_ListOfPaveBlock& aLPB=aSplitShapesPool(aDS.RefEdge(nE)); - aNbPB=aLPB.Extent(); - // - if (aNbPB<2) { - nSp=nE; - if (aNbPB) { - const BOPTools_PaveBlock& aPB=aLPB.First(); - nSp=aPB.Edge(); - } - /*const TopoDS_Shape& aSp=*/aDS.Shape(nSp); - // - aState=aDS.GetState(nSp); - if (aState==BooleanOperations_IN) { - myLSIN.Append(aF1); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aF1); - } - else if (aState==BooleanOperations_ON) { - Standard_Real aTol; - TopAbs_State aSt; - // - //const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape((iRank1==myRank)? nF2 : nF1)); - //aTol=BRep_Tool::Tolerance(aF2); - aTol=1.e-7; - // - BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP3D); - const TopoDS_Solid& aRefSolid=(myRank==1) ? - TopoDS::Solid(aDS.Tool()) : TopoDS::Solid(aDS.Object()); - // - BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)& aPaveFiller; - const Handle(IntTools_Context)& aCtx=pPF->Context(); - // - BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aRefSolid); - aSC.Perform(aP3D, aTol); - aSt=aSC.State(); - if (aSt==TopAbs_IN) { - myLSIN.Append(aF1); - } - else if (aSt==TopAbs_OUT) { - myLSOUT.Append(aF1); - } - } - break; - } // if (aNbPB<2) { - } //for (; anExp.More(); anExp.Next()) - } -} -//======================================================================= -// function: DetectSDFaces -// purpose: -//======================================================================= -void GEOMAlgo_ShellSolid::DetectSDFaces() -{ - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - BOPTools_InterferencePool* pIntrPool=(BOPTools_InterferencePool*)&myDSFiller->InterfPool(); - BOPTools_CArray1OfSSInterference& aFFs=pIntrPool->SSInterferences(); - // - Standard_Boolean bFlag; - Standard_Integer i, aNb, nF1, nF2, iZone, aNbSps, iSenseFlag; - gp_Dir aDNF1, aDNF2; - - aNb=aFFs.Extent(); - for (i=1; i<=aNb; i++) { - bFlag=Standard_False; - - BOPTools_SSInterference& aFF=aFFs(i); - - nF1=aFF.Index1(); - nF2=aFF.Index2(); - const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF1)); - const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape(nF2)); - // - // iSenseFlag; - const BOPTools_ListOfPaveBlock& aLPB=aFF.PaveBlocks(); - aNbSps=aLPB.Extent(); - - if (!aNbSps) { - continue; - } - - const BOPTools_PaveBlock& aPB=aLPB.First(); - const TopoDS_Edge& aSpE=TopoDS::Edge(aDS.Shape(aPB.Edge())); - - BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF1, aDNF1); - BOPTools_Tools3D::GetNormalToFaceOnEdge (aSpE, aF2, aDNF2); - iSenseFlag=BOPTools_Tools3D::SenseFlag (aDNF1, aDNF2); - // - if (iSenseFlag==1 || iSenseFlag==-1) { - // - // - TopoDS_Face aF1FWD=aF1; - aF1FWD.Orientation (TopAbs_FORWARD); - - BOP_WireEdgeSet aWES (aF1FWD); - BOP_SDFWESFiller aWESFiller(nF1, nF2, *myDSFiller); - aWESFiller.SetSenseFlag(iSenseFlag); - aWESFiller.SetOperation(BOP_COMMON); - aWESFiller.Do(aWES); - - BOP_FaceBuilder aFB; - aFB.Do(aWES); - const TopTools_ListOfShape& aLF=aFB.NewFaces(); - - iZone=0; - TopTools_ListIteratorOfListOfShape anIt(aLF); - for (; anIt.More(); anIt.Next()) { - const TopoDS_Shape& aFR=anIt.Value(); - - if (aFR.ShapeType()==TopAbs_FACE) { - const TopoDS_Face& aFaceResult=TopoDS::Face(aFR); - // - Standard_Boolean bIsValidIn2D, bNegativeFlag; - bIsValidIn2D=BOPTools_Tools3D::IsValidArea (aFaceResult, bNegativeFlag); - if (bIsValidIn2D) { - //if(CheckSameDomainFaceInside(aFaceResult, aF2)) { - iZone=1; - break; - //} - } - // - } - } - - if (iZone) { - bFlag=Standard_True; - aFF.SetStatesMap(aWESFiller.StatesMap()); - } - - }// if (iSenseFlag) - - aFF.SetTangentFacesFlag(bFlag); - aFF.SetSenseFlag (iSenseFlag); - }// end of for (i=1; i<=aNb; i++) -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_ShellSolid.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_ShellSolid.hxx deleted file mode 100644 index 941405861..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_ShellSolid.hxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_ShellSolid.hxx -// Created: Wed Jan 12 12:49:45 2005 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_ShellSolid_HeaderFile -#define _GEOMAlgo_ShellSolid_HeaderFile - -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_ShellSolid -//purpose : -//======================================================================= -class GEOMAlgo_ShellSolid : public GEOMAlgo_ShapeSolid -{ - public: - Standard_EXPORT - GEOMAlgo_ShellSolid(); - - Standard_EXPORT - virtual ~GEOMAlgo_ShellSolid(); - - Standard_EXPORT - virtual void Perform() ; - - protected: - Standard_EXPORT - virtual void Prepare() ; - - Standard_EXPORT - virtual void BuildResult() ; - - Standard_EXPORT - void DetectSDFaces() ; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_SolidSolid.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_SolidSolid.cxx deleted file mode 100644 index 31ea5d161..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_SolidSolid.cxx +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_SolidSolid.cxx -// Created: Wed Jan 26 12:06:26 2005 -// Author: Peter KURNEV -// -// -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include - -//======================================================================= -//function : GEOMAlgo_SolidSolid -//purpose : -//======================================================================= -GEOMAlgo_SolidSolid::GEOMAlgo_SolidSolid() -: - GEOMAlgo_ShellSolid() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_SolidSolid::~GEOMAlgo_SolidSolid() -{ -} -//======================================================================= -// function: SetShape2 -// purpose: -//======================================================================= -void GEOMAlgo_SolidSolid::SetShape2(const TopoDS_Shape& aS2) -{ - myS2=aS2; -} -//======================================================================= -// function: Shape2 -// purpose: -//======================================================================= -const TopoDS_Shape& GEOMAlgo_SolidSolid::Shape2()const -{ - return myS2; -} -//======================================================================= -// function: Perform -// purpose: -//======================================================================= -void GEOMAlgo_SolidSolid::Perform() -{ - myErrorStatus=0; - try { - if (myDSFiller==NULL) { - myErrorStatus=10; - return; - } - if(!myDSFiller->IsDone()) { - myErrorStatus=11; - return; - } - // - Standard_Boolean bIsNewFiller; - // - bIsNewFiller=myDSFiller->IsNewFiller(); - if (bIsNewFiller) { - Prepare(); - myDSFiller->SetNewFiller(!bIsNewFiller); - } - // - myRank=2; - BuildResult(); - } - catch (Standard_Failure) { - myErrorStatus=12; - } -} -//================================================================================= -// function: BuildResult -// purpose: -//================================================================================= -void GEOMAlgo_SolidSolid::BuildResult() -{ - myErrorStatus=0; - // - Standard_Integer i, j, aNbF, aNbS; - Standard_Integer aNbFIN, aNbFOUT, aNbFON, aNbFINTR; - TopAbs_State aState; - TopTools_ListIteratorOfListOfShape aIt; - TopTools_IndexedMapOfShape aMF, aMS; - GEOMAlgo_IndexedDataMapOfShapeState aMFS; - // - // 1. classify the faces - GEOMAlgo_ShellSolid::BuildResult(); - // - // 2. fill Shape-State map - aIt.Initialize(myLSIN); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - aMFS.Add(aF, TopAbs_IN); - } - aIt.Initialize(myLSOUT); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - aMFS.Add(aF, TopAbs_OUT); - } - aIt.Initialize(myLSON); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - aMFS.Add(aF, TopAbs_ON); - } - myLSIN.Clear(); - myLSON.Clear(); - myLSOUT.Clear(); - // - // 3. fill states for solids - TopExp::MapShapes(myS2, TopAbs_SOLID, aMS); - // - aNbS=aMS.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aSolid=aMS(i); - // - aMF.Clear(); - TopExp::MapShapes(aSolid, TopAbs_FACE, aMF); - // - aNbFIN=0; - aNbFOUT=0; - aNbFON=0; - aNbFINTR=0; - // - aNbF=aMF.Extent(); - for(j=1; j -// -#ifndef _GEOMAlgo_SolidSolid_HeaderFile -#define _GEOMAlgo_SolidSolid_HeaderFile - -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_SolidSolid -//purpose : -//======================================================================= -class GEOMAlgo_SolidSolid : public GEOMAlgo_ShellSolid -{ - 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; - -protected: - Standard_EXPORT - virtual void BuildResult() ; - - - TopoDS_Shape myS2; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Splitter.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Splitter.cxx deleted file mode 100644 index 7411dce89..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Splitter.cxx +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Splitter.cxx -// Author: Peter KURNEV -// -#include - -#include - -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include - -#include - - -static - void TreatCompound(const TopoDS_Shape& aC, - TopTools_ListOfShape& aLSX); - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_Splitter::GEOMAlgo_Splitter() -: - GEOMAlgo_Builder() -{ - myLimit=TopAbs_SHAPE; - myLimitMode=0; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_Splitter::~GEOMAlgo_Splitter() -{ -} -//======================================================================= -//function : AddToolCompound -//purpose : -//======================================================================= - void GEOMAlgo_Splitter::AddToolCompound(const TopoDS_Shape& theShape) -{ - TopoDS_Iterator aIt; - // - aIt.Initialize(theShape); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - AddTool(aS); - } -} -//======================================================================= -//function : AddTool -//purpose : -//======================================================================= - void GEOMAlgo_Splitter::AddTool(const TopoDS_Shape& theShape) -{ - if (myMapTools.Add(theShape)) { - myTools.Append(theShape); - // - AddShape(theShape); - } -} -//======================================================================= -//function : Tools -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_Splitter::Tools()const -{ - return myTools; -} -//======================================================================= -//function : SetLimit -//purpose : -//======================================================================= - void GEOMAlgo_Splitter::SetLimit(const TopAbs_ShapeEnum aLimit) -{ - myLimit=aLimit; -} -//======================================================================= -//function : Limit -//purpose : -//======================================================================= - TopAbs_ShapeEnum GEOMAlgo_Splitter::Limit()const -{ - return myLimit; -} -//======================================================================= -//function : SetLimitMode -//purpose : -//======================================================================= - void GEOMAlgo_Splitter::SetLimitMode(const Standard_Integer aMode) -{ - myLimitMode=aMode; -} -//======================================================================= -//function : LimitMode -//purpose : -//======================================================================= - Standard_Integer GEOMAlgo_Splitter::LimitMode()const -{ - return myLimitMode; -} -//======================================================================= -//function : Clear -//purpose : -//======================================================================= - void GEOMAlgo_Splitter::Clear() -{ - myTools.Clear(); - myMapTools.Clear(); - myLimit=TopAbs_SHAPE; - GEOMAlgo_Builder::Clear(); -} -//======================================================================= -//function : BuildResult -//purpose : -//======================================================================= - void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType) -{ - myErrorStatus=0; - // - TopAbs_ShapeEnum aType; - BRep_Builder aBB; - TopTools_MapOfShape aM; - TopTools_ListIteratorOfListOfShape aIt, aItIm; - // - aIt.Initialize(myShapes); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - aType=aS.ShapeType(); - if (aType==theType && !myMapTools.Contains(aS)) { - if (myImages.HasImage(aS)) { - const TopTools_ListOfShape& aLSIm=myImages.Image(aS); - aItIm.Initialize(aLSIm); - for (; aItIm.More(); aItIm.Next()) { - const TopoDS_Shape& aSIm=aItIm.Value(); - if (aM.Add(aSIm)) { - aBB.Add(myShape, aSIm); - } - } - } - else { - if (aM.Add(aS)) { - aBB.Add(myShape, aS); - } - } - } - } -} -//======================================================================= -//function : PostTreat -//purpose : -//======================================================================= - void GEOMAlgo_Splitter::PostTreat() -{ - if (myLimit!=TopAbs_SHAPE) { - Standard_Integer i, aNbS; - BRep_Builder aBB; - TopoDS_Compound aC; - TopTools_IndexedMapOfShape aMx; - // - aBB.MakeCompound(aC); - // - TopExp::MapShapes(myShape, myLimit, aMx); - aNbS=aMx.Extent(); - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aS=aMx(i); - aBB.Add(aC, aS); - } - // - if (myLimitMode) { - Standard_Integer iType, iLimit, iTypeX; - TopAbs_ShapeEnum aType, aTypeX; - TopTools_ListOfShape aLSP, aLSX; - TopTools_ListIteratorOfListOfShape aIt, aItX, aItIm; - TopTools_MapOfShape aM; - // - iLimit=(Standard_Integer)myLimit; - // - // 1. Collect the shapes to process aLSP - aIt.Initialize(myShapes); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - if (myMapTools.Contains(aS)) { - continue; - } - // - aType=aS.ShapeType(); - iType=(Standard_Integer)aType; - // - if (iType>iLimit) { - aLSP.Append(aS); - } - // - else if (aType==TopAbs_COMPOUND) { - aLSX.Clear(); - // - TreatCompound(aS, aLSX); - // - aItX.Initialize(aLSX); - for (; aItX.More(); aItX.Next()) { - const TopoDS_Shape& aSX=aItX.Value(); - aTypeX=aSX.ShapeType(); - iTypeX=(Standard_Integer)aTypeX; - // - if (iTypeX>iLimit) { - aLSP.Append(aSX); - } - } - } - }// for (; aIt.More(); aIt.Next()) { - // - //modified by NIZNHY-PKV Fri Oct 30 11:07:08 2009 f - aMx.Clear(); - TopExp::MapShapes(aC, aMx); - //modified by NIZNHY-PKV Fri Oct 30 11:12:30 2009t - // - // 2. Add them to aC - aIt.Initialize(aLSP); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - if (myImages.HasImage(aS)) { - const TopTools_ListOfShape& aLSIm=myImages.Image(aS); - aItIm.Initialize(aLSIm); - for (; aItIm.More(); aItIm.Next()) { - const TopoDS_Shape& aSIm=aItIm.Value(); - if (aM.Add(aSIm)) { - //modified by NIZNHY-PKV Fri Oct 30 11:09:57 2009f - if (!aMx.Contains(aSIm)) { - aBB.Add(aC, aSIm); - } - //aBB.Add(aC, aSIm); - //modified by NIZNHY-PKV Fri Oct 30 11:10:02 2009 - } - } - } - else { - if (aM.Add(aS)) { - //modified by NIZNHY-PKV Fri Oct 30 11:10:46 2009f - if (!aMx.Contains(aS)) { - aBB.Add(aC, aS); - } - //aBB.Add(aC, aS); - //modified by NIZNHY-PKV Fri Oct 30 11:11:00 2009t - } - } - } - }// if (myLimitMode) { - myShape=aC; - }//if (myLimit!=TopAbs_SHAPE) { - // - GEOMAlgo_Builder::PostTreat(); -} -//======================================================================= -//function : TreatCompound -//purpose : -//======================================================================= -void TreatCompound(const TopoDS_Shape& aC1, - TopTools_ListOfShape& aLSX) -{ - Standard_Integer aNbC1; - TopAbs_ShapeEnum aType; - TopTools_ListOfShape aLC, aLC1; - TopTools_ListIteratorOfListOfShape aIt, aIt1; - TopoDS_Iterator aItC; - // - aLC.Append (aC1); - while(1) { - aLC1.Clear(); - aIt.Initialize(aLC); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aC=aIt.Value(); //C is compound - // - aItC.Initialize(aC); - for (; aItC.More(); aItC.Next()) { - const TopoDS_Shape& aS=aItC.Value(); - aType=aS.ShapeType(); - if (aType==TopAbs_COMPOUND) { - aLC1.Append(aS); - } - else { - aLSX.Append(aS); - } - } - } - // - aNbC1=aLC1.Extent(); - if (!aNbC1) { - break; - } - // - aLC.Clear(); - aIt.Initialize(aLC1); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSC=aIt.Value(); - aLC.Append(aSC); - } - }// while(1) -} -// -// myErrorStatus -// -// 0 - Ok -// 1 - The object is just initialized -// 2 - PaveFiller is failed -// 10 - No shapes to process -// 30 - SolidBuilder failed diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Splitter.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_Splitter.hxx deleted file mode 100644 index 469080fe6..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Splitter.hxx +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: GEOMAlgo_Splitter.hxx -// -// Author: Peter KURNEV -// -#ifndef _GEOMAlgo_Splitter_HeaderFile -#define _GEOMAlgo_Splitter_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include - -//! Implementation of Gluing Operation Algorithm (GA)
-//======================================================================= -//function : GEOMAlgo_Splitter -//purpose : -//======================================================================= -class GEOMAlgo_Splitter : public GEOMAlgo_Builder -{ - public: - - //! Empty constructor
- Standard_EXPORT - GEOMAlgo_Splitter(); - - Standard_EXPORT - virtual ~GEOMAlgo_Splitter(); - - //! Clears internal fields and arguments
- Standard_EXPORT - virtual void Clear() ; - - //! Adds Tool argument theShape of the operation
- Standard_EXPORT - virtual void AddTool(const TopoDS_Shape& theShape) ; - - //! Returns the arguments of the operation
- Standard_EXPORT - const TopTools_ListOfShape& Tools() const; - - Standard_EXPORT - void SetLimit(const TopAbs_ShapeEnum aLimit) ; - - Standard_EXPORT - TopAbs_ShapeEnum Limit() const; - - Standard_EXPORT - void SetLimitMode(const Standard_Integer aLimitMode) ; - - Standard_EXPORT - Standard_Integer LimitMode() const; - //! Adds Tool arguments of the operation as
- //! shapes of upper level of container shape theShape
- //! =====================================================
- Standard_EXPORT - void AddToolCompound(const TopoDS_Shape& theShape) ; - - protected: - //! Build the resulting shapes of type theType
- Standard_EXPORT - virtual void BuildResult(const TopAbs_ShapeEnum theType) ; - //! Provides post-tratment actions
- Standard_EXPORT - virtual void PostTreat() ; - - - TopTools_ListOfShape myTools; - TopTools_MapOfShape myMapTools; - TopAbs_ShapeEnum myLimit; - Standard_Integer myLimitMode; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_State.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_State.hxx deleted file mode 100644 index 423d494b2..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_State.hxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - - -#ifndef _GEOMAlgo_State_HeaderFile -#define _GEOMAlgo_State_HeaderFile -enum GEOMAlgo_State { - GEOMAlgo_ST_UNKNOWN, - GEOMAlgo_ST_IN, - GEOMAlgo_ST_OUT, - GEOMAlgo_ST_ON, - GEOMAlgo_ST_ONIN, - GEOMAlgo_ST_ONOUT, - GEOMAlgo_ST_INOUT -}; - -#ifndef _Standard_PrimitiveTypes_HeaderFile -#include -#endif - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_StateCollector.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_StateCollector.cxx deleted file mode 100644 index 5e593541f..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_StateCollector.cxx +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_StateCollector.cxx -// Created: Thu Mar 10 09:42:11 2005 -// Author: Peter KURNEV -// -// -#include - -//======================================================================= -//function : GEOMAlgo_StateCollector -//purpose : -//======================================================================= -GEOMAlgo_StateCollector::GEOMAlgo_StateCollector() -{ - myCounter[0]=0; - myCounter[1]=0; - myCounter[2]=0; -} -//======================================================================= -//function : AppendState -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_StateCollector::AppendState(const TopAbs_State aSt) -{ - Standard_Boolean bIsToBreak; - // - switch(aSt) { - case TopAbs_IN: - ++myCounter[0]; - break; - case TopAbs_OUT: - ++myCounter[1]; - break; - case TopAbs_ON: - ++myCounter[2]; - break; - default: - break; - } - bIsToBreak=(myCounter[0] && myCounter[1]); - // - return bIsToBreak; -} -//======================================================================= -//function : State -//purpose : -//======================================================================= -TopAbs_State GEOMAlgo_StateCollector::State()const -{ - TopAbs_State aSt; - // - aSt=TopAbs_UNKNOWN; - // - if (myCounter[0] && myCounter[1]) { - return aSt; - } - // - else if (myCounter[0] && myCounter[2]>=0) { - aSt=TopAbs_IN; - } - // - else if (myCounter[1] && myCounter[2]>=0) { - aSt=TopAbs_OUT; - } - // - else if (!myCounter[0] && !myCounter[1] && myCounter[2]) { - aSt=TopAbs_ON; - } - // - return aSt; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_StateCollector.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_StateCollector.hxx deleted file mode 100644 index 5ac5a96cf..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_StateCollector.hxx +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_StateCollector.hxx -// Created: Thu Mar 10 09:42:11 2005 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_StateCollector_HeaderFile -#define _GEOMAlgo_StateCollector_HeaderFile - -#include -#include -#include -#include -#include - -//======================================================================= -// class : GEOMAlgo_StateCollector -//purpose : -//======================================================================= -class GEOMAlgo_StateCollector -{ - public: - Standard_EXPORT - GEOMAlgo_StateCollector(); - - Standard_EXPORT - Standard_Boolean AppendState(const TopAbs_State aSt) ; - - Standard_EXPORT - TopAbs_State State() const; - - protected: - Standard_Integer myCounter[3]; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_SurfaceTools.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_SurfaceTools.cxx deleted file mode 100644 index f9d0f036b..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_SurfaceTools.cxx +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_SurfaceTools.cxx -// Created: Thu Jan 27 11:05:16 2005 -// Author: Peter KURNEV -// -// -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -//======================================================================= -//function : GetState -//purpose : -//======================================================================= - Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP, - const GeomAdaptor_Surface& aGAS, - const Standard_Real aTol, - TopAbs_State& aState) -{ - Standard_Integer iErr; - Standard_Real aDp, aR; - GeomAbs_SurfaceType aType; - gp_Sphere aSph; - gp_Cylinder aCyl; - gp_Pln aPln; - // - iErr=0; - aState=TopAbs_UNKNOWN; - // - aType=aGAS.GetType(); - switch (aType) { - case GeomAbs_Plane: - aPln=aGAS.Plane(); - aR=0.; - aDp=GEOMAlgo_SurfaceTools::Distance(aP, aPln); - break; - - case GeomAbs_Cylinder: - aCyl=aGAS.Cylinder(); - aR=aCyl.Radius(); - aDp=GEOMAlgo_SurfaceTools::Distance(aP, aCyl); - break; - - case GeomAbs_Sphere: - aSph=aGAS.Sphere(); - aR=aSph.Radius(); - aDp=GEOMAlgo_SurfaceTools::Distance(aP, aSph); - break; - - default: - iErr=1; // unprocessed surface type - break; - } - // - if (!iErr) { - aState=TopAbs_ON; - if (aDp>aR+aTol) { - aState=TopAbs_OUT; - } - else if (aDp aTol) { - return bRet; - } - // - return !bRet; -} -//======================================================================= -//function : IsAnalytic -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_SurfaceTools::IsAnalytic(const Handle(Geom_Surface)& aSurf) -{ - Standard_Boolean bRet; - GeomAbs_SurfaceType aType; - GeomAdaptor_Surface aGAS; - // - aGAS.Load(aSurf); - aType=aGAS.GetType(); - bRet=(aType==GeomAbs_Plane || - aType==GeomAbs_Cylinder || - aType==GeomAbs_Sphere); - return bRet; -} -//======================================================================= -//function : IsConformState -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_SurfaceTools::IsConformState(const TopAbs_State aST1, - const GEOMAlgo_State aST2) -{ - Standard_Boolean bRet=Standard_False; - // - switch (aST2) { - case GEOMAlgo_ST_IN: - if (aST1==TopAbs_IN) { - bRet=!bRet; - } - break; - case GEOMAlgo_ST_OUT: - if (aST1==TopAbs_OUT) { - bRet=!bRet; - } - break; - case GEOMAlgo_ST_ON: - if (aST1==TopAbs_ON) { - bRet=!bRet; - } - break; - case GEOMAlgo_ST_ONIN: - if (aST1==TopAbs_ON || aST1==TopAbs_IN) { - bRet=!bRet; - } - break; - case GEOMAlgo_ST_ONOUT: - if (aST1==TopAbs_ON || aST1==TopAbs_OUT) { - bRet=!bRet; - } - break; - default: - break; - } - return bRet; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_SurfaceTools.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_SurfaceTools.hxx deleted file mode 100644 index 565a95172..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_SurfaceTools.hxx +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_SurfaceTools.hxx -// Created: Thu Jan 27 11:05:16 2005 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_SurfaceTools_HeaderFile -#define _GEOMAlgo_SurfaceTools_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -//======================================================================= -//function : GEOMAlgo_SurfaceTools -//purpose : -//======================================================================= -class GEOMAlgo_SurfaceTools -{ - 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) ; - -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Tools.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Tools.cxx deleted file mode 100644 index 8ae8a8e8f..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Tools.cxx +++ /dev/null @@ -1,613 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Tools.cxx -// Created: Mon Dec 6 11:35:29 2004 -// Author: Peter KURNEV - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include - -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -static - void GetCount(const TopoDS_Shape& aS, - Standard_Integer& iCnt); - -//======================================================================= -//function : IsCompositeShape -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_Tools::IsCompositeShape(const TopoDS_Shape& aS) -{ - Standard_Boolean bRet; - Standard_Integer iCnt; - TopoDS_Iterator aIt; - // - iCnt=0; - GetCount(aS, iCnt); - bRet=(iCnt>1); - // - return bRet; -} - -//======================================================================= -//function : GetCount -//purpose : -//======================================================================= -void GetCount(const TopoDS_Shape& aS, - Standard_Integer& iCnt) -{ - TopoDS_Iterator aIt; - TopAbs_ShapeEnum aTS; - // - aTS=aS.ShapeType(); - // - if (aTS==TopAbs_SHAPE) { - return; - } - if (aTS!=TopAbs_COMPOUND) { - ++iCnt; - return; - } - // - aIt.Initialize(aS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSx=aIt.Value(); - GetCount(aSx, iCnt); - } -} - -//======================================================================= -//function : RefineSDShapes -//purpose : -//======================================================================= - Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE, - const Standard_Real aTol, - const Handle(IntTools_Context)& aCtx) -{ - Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd; - TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd; - // - iErr=1; - // - aNbE=aMPKLE.Extent(); - for (i=1; i<=aNbE; ++i) { - TopTools_ListOfShape& aLSDE=aMPKLE.ChangeFromIndex(i); - // - aMEE.Clear(); - iErr=GEOMAlgo_Tools::FindSDShapes(aLSDE, aTol, aMEE, aCtx); - if (iErr) { - return iErr; - } - // - aNbEE=aMEE.Extent(); - if (aNbEE==1) { - continue; // nothing to do - } - // - for (j=1; j<=aNbEE; ++j) { - TopTools_ListOfShape& aLEE=aMEE.ChangeFromIndex(j); - // - if (j==1) { - aLSDE.Clear(); - aLSDE.Append(aLEE); - } - else { - const TopoDS_Shape& aE1=aLEE.First(); - aMEToAdd.Add(aE1, aLEE); - } - } - } - // - aNbToAdd=aMEToAdd.Extent(); - if (!aNbToAdd) { - return aNbToAdd; - } - // - for (i=1; i<=aNbToAdd; ++i) { - GEOMAlgo_PassKeyShape aPKE1; - // - const TopoDS_Shape& aE1=aMEToAdd.FindKey(i); - const TopTools_ListOfShape& aLE=aMEToAdd(i); - // - //qf - //aPKE1.SetIds(aE1); - aPKE1.SetShapes(aE1); - //qt - aMPKLE.Add(aPKE1, aLE); - } - // - return 0; -} -//======================================================================= -//function : FindSDShapes -//purpose : -//======================================================================= -Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopTools_ListOfShape& aLE, - const Standard_Real aTol, - TopTools_IndexedDataMapOfShapeListOfShape& aMEE, - const Handle(IntTools_Context)& aCtx) -{ - Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr; - TopTools_ListOfShape aLESD; - TopTools_ListIteratorOfListOfShape aIt, aIt1; - TopTools_IndexedMapOfShape aMProcessed; - TopAbs_ShapeEnum aType; - // - aNbE=aLE.Extent(); - if (!aNbE) { - return 3; // Err - } - //modified by NIZNHY-PKV Thu Dec 30 10:56:52 2004 f - if (aNbE==1) { - return 0; // Nothing to do - } - //modified by NIZNHY-PKV Thu Dec 30 10:56:56 2004 t - // - while(1) { - aNbEProcessed=aMProcessed.Extent(); - if (aNbEProcessed==aNbE) { - break; - } - // - aIt.Initialize(aLE); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - // - if (aMProcessed.Contains(aS)) { - continue; - } - // - //modified by NIZNHY-PKV Thu Dec 30 10:57:01 2004 f - aType=aS.ShapeType(); - if (aType==TopAbs_EDGE) { - const TopoDS_Edge& aE=TopoDS::Edge(aS); - if (BRep_Tool::Degenerated(aE)) { - aMProcessed.Add(aE); - continue; - } - } - //modified by NIZNHY-PKV Thu Dec 30 10:57:03 2004 t - // - aLESD.Clear(); - iErr=GEOMAlgo_Tools::FindSDShapes(aS, aLE, aTol, aLESD, aCtx); - if (iErr) { - return 2; // Err - } - // - aNbESD=aLESD.Extent(); - if (!aNbESD) { - return 1; // Err - } - // - aMEE.Add(aS, aLESD); - // - aIt1.Initialize(aLESD); - for (; aIt1.More(); aIt1.Next()) { - const TopoDS_Shape& aE1=aIt1.Value(); - aMProcessed.Add(aE1); - } - } - } - return 0; -} -//======================================================================= -//function : FindSDShapes -//purpose : -//======================================================================= -Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopoDS_Shape& aE1, - const TopTools_ListOfShape& aLE, - const Standard_Real aTol, - TopTools_ListOfShape& aLESD, - const Handle(IntTools_Context)& aCtx) -{ - Standard_Boolean bIsDone; - Standard_Real aTol2, aD2; - gp_Pnt aP1, aP2; - TopTools_ListIteratorOfListOfShape aIt; - // - aTol2=aTol*aTol; - GEOMAlgo_Tools::PointOnShape(aE1, aP1); - // - aIt.Initialize(aLE); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE2=aIt.Value(); - if (aE2.IsSame(aE1)) { - aLESD.Append(aE2); - } - else { - bIsDone=GEOMAlgo_Tools::ProjectPointOnShape(aP1, aE2, aP2, aCtx); - if (!bIsDone) { - //return 1; - continue; // jfa BUG 20361 - } - aD2=aP1.SquareDistance(aP2); - if(aD2ProjectPointOnEdge(aP1, aE2, aT2); - } - if (!bIsDone) { - return bIsDone; - } - // - GEOMAlgo_Tools::PointOnEdge(aE2, aT2, aP2); - } - break; - // - case TopAbs_FACE: - { - const TopoDS_Face& aF2 = TopoDS::Face(aS); - GeomAPI_ProjectPointOnSurf& aProj = aCtx->ProjPS(aF2); - // - aProj.Perform(aP1); - bIsDone = aProj.IsDone(); - if (!bIsDone) { - return bIsDone; - } - // - aP2 = aProj.NearestPoint(); - } - break; - // - default: - break; // Err - } - return bIsDone; -} -//======================================================================= -//function : PointOnShape -//purpose : -//======================================================================= -void GEOMAlgo_Tools::PointOnShape(const TopoDS_Shape& aS, - gp_Pnt& aP3D) -{ - TopAbs_ShapeEnum aType; - // - aP3D.SetCoord(99.,99.,99.); - aType=aS.ShapeType(); - switch(aType) { - case TopAbs_EDGE: { - const TopoDS_Edge& aE=TopoDS::Edge(aS); - GEOMAlgo_Tools::PointOnEdge(aE, aP3D); - } - break; - // - case TopAbs_FACE: { - const TopoDS_Face& aF=TopoDS::Face(aS); - GEOMAlgo_Tools::PointOnFace(aF, aP3D); - } - break; - // - default: - break; // Err - } -} -//======================================================================= -//function : PointOnFace -//purpose : -//======================================================================= -void GEOMAlgo_Tools::PointOnFace(const TopoDS_Face& aF, - gp_Pnt& aP3D) -{ - Standard_Real aU, aV, aUMin, aUMax, aVMin, aVMax; - // - BRepTools::UVBounds(aF, aUMin, aUMax, aVMin, aVMax); - // - aU=BOPTools_Tools2D::IntermediatePoint(aUMin, aUMax); - aV=BOPTools_Tools2D::IntermediatePoint(aVMin, aVMax); - // - GEOMAlgo_Tools::PointOnFace(aF, aU, aV, aP3D); -} -//======================================================================= -//function : PointOnFace -//purpose : -//======================================================================= -void GEOMAlgo_Tools::PointOnFace(const TopoDS_Face& aF, - const Standard_Real aU, - const Standard_Real aV, - gp_Pnt& aP3D) -{ - Handle(Geom_Surface) aS; - // - aS=BRep_Tool::Surface(aF); - aS->D0(aU, aV, aP3D); -} -//======================================================================= -//function : PointOnEdge -//purpose : -//======================================================================= -void GEOMAlgo_Tools::PointOnEdge(const TopoDS_Edge& aE, - gp_Pnt& aP3D) -{ - Standard_Real aTx, aT1, aT2; - // - BRep_Tool::Curve(aE, aT1, aT2); - aTx=BOPTools_Tools2D::IntermediatePoint(aT1, aT2); - GEOMAlgo_Tools::PointOnEdge(aE, aTx, aP3D); -} -//======================================================================= -//function : PointOnEdge -//purpose : -//======================================================================= -void GEOMAlgo_Tools::PointOnEdge(const TopoDS_Edge& aE, - const Standard_Real aT, - gp_Pnt& aP3D) -{ - Standard_Real aT1, aT2; - Handle(Geom_Curve) aC3D; - // - aC3D=BRep_Tool::Curve(aE, aT1, aT2); - aC3D->D0(aT, aP3D); -} -//======================================================================= -//function : RefinePCurveForEdgeOnFace -//purpose : -//======================================================================= -void GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Standard_Real aUMin, - const Standard_Real aUMax) -{ - Standard_Real aT1, aT2, aTx, aUx, aTol; - gp_Pnt2d aP2D; - Handle(Geom_Surface) aS; - Handle(Geom2d_Curve) aC2D; - BRep_Builder aBB; - // - aC2D=BRep_Tool::CurveOnSurface(aE, aF, aT1, aT2); - if (!aC2D.IsNull()) { - if (BRep_Tool::IsClosed(aE, aF)) { - return; - } - aTx=BOPTools_Tools2D::IntermediatePoint(aT1, aT2); - aC2D->D0(aTx, aP2D); - aUx=aP2D.X(); - if (aUx < aUMin || aUx > aUMax) { - // need to rebuild - Handle(Geom2d_Curve) aC2Dx; - // - aTol=BRep_Tool::Tolerance(aE); - aBB.UpdateEdge(aE, aC2Dx, aF, aTol); - } - } -} -//======================================================================= -//function : IsUPeriodic -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_Tools::IsUPeriodic(const Handle(Geom_Surface) &aS) -{ - Standard_Boolean bRet; - GeomAbs_SurfaceType aType; - GeomAdaptor_Surface aGAS; - // - aGAS.Load(aS); - aType=aGAS.GetType(); - bRet=(aType==GeomAbs_Cylinder|| - aType==GeomAbs_Cone || - aType==GeomAbs_Sphere); - // - return bRet; -} - -//modified by NIZNHY-PKV Fri Feb 03 11:16:35 2012f -//======================================================================= -//function : BuildPCurveForEdgeOnFace -//purpose : -//======================================================================= -Standard_Integer - GEOMAlgo_Tools::BuildPCurveForEdgeOnFace(const TopoDS_Edge& aEold, - const TopoDS_Edge& aEnew, - const TopoDS_Face& aF, - const Handle(IntTools_Context)& aCtx) -{ - Standard_Boolean bIsClosed, bUClosed, bHasOld; - Standard_Integer iRet, aNbPoints; - Standard_Real aTS, aTS1, aTS2, aT, aT1, aT2, aScPr, aTol; - Standard_Real aU, aV, aUS1, aVS1, aUS2, aVS2; - gp_Pnt aP; - gp_Pnt2d aP2DS1, aP2DS2, aP2D; - gp_Vec2d aV2DS1, aV2DS2; - Handle(Geom2d_Curve) aC2D, aC2DS1, aC2DS2; - Handle(Geom_Surface) aS; - TopoDS_Edge aES; - // - iRet=0; - // - bHasOld=BOPTools_Tools2D::HasCurveOnSurface(aEnew, aF, aC2D, aT1, aT2, aTol); - if (bHasOld) { - return iRet; - } - // - BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aEnew, aF); - aC2D=BRep_Tool::CurveOnSurface(aEnew, aF, aT1, aT2); - if (aC2D.IsNull()){ - iRet=1; - return iRet; - } - // - bIsClosed=BRep_Tool::IsClosed(aEold, aF); - if (!bIsClosed) { - return iRet; - } - // - aTol=1.e-7; - // - // 1. bUClosed - direction of closeness - // - aES=aEold; - aES.Orientation(TopAbs_FORWARD); - aC2DS1=BRep_Tool::CurveOnSurface(aES, aF, aTS1, aTS2); - // - aES.Orientation(TopAbs_REVERSED); - aC2DS2=BRep_Tool::CurveOnSurface(aES, aF, aTS1, aTS2); - // - aTS=BOPTools_Tools2D::IntermediatePoint(aTS1, aTS2); - // - aC2DS1->D1(aTS, aP2DS1, aV2DS1); - aC2DS2->D1(aTS, aP2DS2, aV2DS2); - // - gp_Vec2d aV2DS12(aP2DS1, aP2DS2); - gp_Dir2d aD2DS12(aV2DS12); - const gp_Dir2d& aD2DX=gp::DX2d(); - // - aScPr=aD2DS12*aD2DX; - bUClosed=Standard_True; - if (fabs(aScPr) < aTol) { - bUClosed=!bUClosed; - } - // - // 2. aP2D - point on curve aC2D, that corresponds to aP2DS1 - aP2DS1.Coord(aUS1, aVS1); - aP2DS2.Coord(aUS2, aVS2); - // - aS=BRep_Tool::Surface(aF); - aS->D0(aUS1, aVS1, aP); - // - GeomAPI_ProjectPointOnCurve& aProjPC=aCtx->ProjPC(aEnew); - // - aProjPC.Perform(aP); - aNbPoints=aProjPC.NbPoints(); - if (!aNbPoints) { - iRet=2; - return iRet; - } - // - aT=aProjPC.LowerDistanceParameter(); - - // - // 3. Build the second 2D curve - Standard_Boolean bRevOrder; - gp_Vec2d aV2DT, aV2D; - Handle(Geom2d_Curve) aC2Dnew; - Handle(Geom2d_TrimmedCurve) aC2DTnew; - BRep_Builder aBB; - // - aC2D->D1(aT, aP2D, aV2D); - aP2D.Coord(aU, aV); - // - aC2Dnew=Handle(Geom2d_Curve)::DownCast(aC2D->Copy()); - aC2DTnew = new Geom2d_TrimmedCurve(aC2Dnew, aT1, aT2); - // - aV2DT=aV2DS12; - if (!bUClosed) { // V Closed - if (fabs(aV-aVS2)Translate(aV2DT); - // - // 4 Order the 2D curves - bRevOrder=Standard_False; - aScPr=aV2D*aV2DS1; - if(aScPr<0.) { - bRevOrder=!bRevOrder; - } - // - // 5. Update the edge - aTol=BRep_Tool::Tolerance(aEnew); - if (!bRevOrder) { - aBB.UpdateEdge(aEnew, aC2D, aC2DTnew, aF, aTol); - } - else { - aBB.UpdateEdge(aEnew, aC2DTnew, aC2D , aF, aTol); - } - // - return iRet; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Tools.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_Tools.hxx deleted file mode 100644 index d4345eec7..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Tools.hxx +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_Tools.hxx -// Created: Mon Dec 6 11:35:29 2004 -// Author: Peter KURNEV - -#ifndef _GEOMAlgo_Tools_HeaderFile -#define _GEOMAlgo_Tools_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_Tools -//purpose : -//======================================================================= -class GEOMAlgo_Tools - { -public: - Standard_EXPORT - static Standard_Boolean IsCompositeShape(const TopoDS_Shape& aS) ; - - Standard_EXPORT - static Standard_Integer RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMSD, - const Standard_Real aTol, - const Handle(IntTools_Context)& aCtx) ; - - Standard_EXPORT - static Standard_Integer FindSDShapes(const TopTools_ListOfShape& aLE, - const Standard_Real aTol, - TopTools_IndexedDataMapOfShapeListOfShape& aMEE, - const Handle(IntTools_Context)& aCtx) ; - - Standard_EXPORT - static Standard_Integer FindSDShapes(const TopoDS_Shape& aE1, - const TopTools_ListOfShape& aLE, - const Standard_Real aTol, - TopTools_ListOfShape& aLESD, - const Handle(IntTools_Context)& aCtx) ; - - Standard_EXPORT - static Standard_Boolean ProjectPointOnShape(const gp_Pnt& aP1, - const TopoDS_Shape& aS,gp_Pnt& aP2, - const Handle(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) ; - - Standard_EXPORT - static Standard_Boolean CorrectWires(const TopoDS_Shape& aS) ; - - Standard_EXPORT - static Standard_Integer BuildPCurveForEdgeOnFace(const TopoDS_Edge& aE, - const TopoDS_Edge& aEold, - const TopoDS_Face& aF, - const Handle(IntTools_Context)& aCtx) ; - -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Tools3D.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Tools3D.cxx deleted file mode 100644 index 81d7b75e1..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Tools3D.cxx +++ /dev/null @@ -1,1301 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : GEOMAlgo_Tools3D.cxx -// Created : -// Author : Peter KURNEV - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -// -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -// -#include - - -// -static - Standard_Boolean FindFacePairs (const TopoDS_Edge& , - const TopTools_ListOfShape& , - NMTTools_ListOfCoupleOfShape& ); - - -static - Standard_Real AngleWithRef(const gp_Dir& , - const gp_Dir& , - const gp_Dir& ); - -static - void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aE, - const TopoDS_Face& aF, - Standard_Real aT, - gp_Pnt& aPF, - gp_Dir& aDNF, - const Handle(IntTools_Context)& aCtx); - -//======================================================================= -//function : IsInternalFace -//purpose : -//======================================================================= -Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Solid& theSolid, - const TopTools_IndexedDataMapOfShapeListOfShape& theMEF, - const Standard_Real theTol, - const Handle(IntTools_Context)& theContext) -{ - Standard_Boolean bRet; - Standard_Integer aNbF; - TopoDS_Edge aEL; - TopExp_Explorer aExp; - TopTools_ListIteratorOfListOfShape aItF; - // - bRet=Standard_False; - // - // 1 Try to find an edge from theFace in theMEF - aExp.Init(theFace, TopAbs_EDGE); - for(; aExp.More(); aExp.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current()); - if (!theMEF.Contains(aE)) { - continue; - } - // - const TopTools_ListOfShape& aLF=theMEF.FindFromKey(aE); - aNbF=aLF.Extent(); - if (!aNbF) { - return bRet; // it can not be so - } - else if (aNbF==1) { - // aE is internal edge on aLF.First() - const TopoDS_Face& aF1=TopoDS::Face(aLF.First()); - bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, aE, aF1, aF1, theContext); - return bRet; - } - else if (aNbF==2) { - const TopoDS_Face& aF1=TopoDS::Face(aLF.First()); - const TopoDS_Face& aF2=TopoDS::Face(aLF.Last()); - // - if (aF2.IsSame(aF1) && BRep_Tool::IsClosed(aE, aF1)) { - // treat as it was for 1 face - bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, aE, aF1, aF2, theContext); - return bRet; - } - } - if (aNbF%2) { - return bRet; // it can not be so - } - else { // aNbF=2,4,6,8,... - bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, aE, aLF, theContext); - return bRet; - } - }//for(; aExp.More(); aExp.Next()) { - // - //======================================== - // 2. Classify face using classifier - // - TopAbs_State aState; - TopTools_IndexedMapOfShape aBounds; - // - aState=GEOMAlgo_Tools3D::ComputeState(theFace, theSolid, theTol, aBounds, theContext); - bRet=(aState==TopAbs_IN); - // - return bRet; -} -//======================================================================= -//function : IsInternalFace -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Edge& theEdge, - const TopTools_ListOfShape& theLF, - const Handle(IntTools_Context)& theContext) -{ - Standard_Boolean bRet; - Standard_Boolean aNbF; - // - bRet=Standard_False; - // - aNbF=theLF.Extent(); - if (aNbF==2) { - const TopoDS_Face& aF1=TopoDS::Face(theLF.First()); - const TopoDS_Face& aF2=TopoDS::Face(theLF.Last()); - bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, theEdge, aF1, aF2, theContext); - return bRet; - } - // - else { - NMTTools_ListOfCoupleOfShape aLCFF; - NMTTools_ListIteratorOfListOfCoupleOfShape aIt; - // - FindFacePairs(theEdge, theLF, aLCFF); - // - aIt.Initialize(aLCFF); - for (; aIt.More(); aIt.Next()) { - const NMTTools_CoupleOfShape& aCSFF=aIt.Value(); - // - const TopoDS_Face& aF1=TopoDS::Face(aCSFF.Shape1()); - const TopoDS_Face& aF2=TopoDS::Face(aCSFF.Shape2()); - bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, theEdge, aF1, aF2, theContext); - if (bRet) { - return bRet; - } - } - } - return bRet; -} -//======================================================================= -//function : IsInternalFace -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace1, - const TopoDS_Face& theFace2, - const Handle(IntTools_Context)& theContext) -{ - Standard_Boolean bRet; - Standard_Real aT1, aT2, aT, aDt2D, aDt2Dx; - Standard_Real aA12, aA1x, aTwoPI; - gp_Pnt aPx, aPF, aPF1, aPF2; - gp_Pnt2d aP2D, aPF2D; - gp_Dir aDNF1, aDNF2; - TopoDS_Edge aE1, aE2; - Handle(Geom_Curve)aC3D; - // - aC3D =BRep_Tool::Curve(theEdge, aT1, aT2); - aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2); - aC3D->D0(aT, aPx); - // - // 1. PF - aDt2D=BOPTools_Tools3D::MinStepIn2d(); - aDt2Dx=10.*aDt2D; - BOPTools_Tools3D::PointNearEdge (theEdge, theFace, aT, aDt2Dx, aPF2D, aPF); - // - // 2. E1, E2 - GEOMAlgo_Tools3D::GetEdgeOnFace(theEdge, theFace1, aE1); - if (aE1.Orientation()==TopAbs_INTERNAL) { - aE2=aE1; - aE1.Orientation(TopAbs_FORWARD); - aE2.Orientation(TopAbs_REVERSED); - } - else if (theFace1==theFace2) { - aE2=aE1; - aE1.Orientation(TopAbs_FORWARD); - aE2.Orientation(TopAbs_REVERSED); - } - else { - GEOMAlgo_Tools3D::GetEdgeOnFace(theEdge, theFace2, aE2); - } - // - // 3 - bRet=Standard_False; - // - GetApproxNormalToFaceOnEdge (aE1, theFace1, aT, aPF1, aDNF1, theContext); - GetApproxNormalToFaceOnEdge (aE2, theFace2, aT, aPF2, aDNF2, theContext); - // - aTwoPI = 2.*M_PI; - gp_Vec aVBF (aPx, aPF ); - gp_Vec aVBF1(aPx, aPF1); - gp_Vec aVBF2(aPx, aPF2); - // - gp_Dir aDTF1; - gp_Dir aDBF (aVBF); - gp_Dir aDBF1(aVBF1); - gp_Dir aDBF2(aVBF2); - // - aDTF1=aDNF1^aDBF1; - aA12=AngleWithRef(aDBF1, aDBF2, aDTF1); - if (aA12<0.) { - aA12=aA12+aTwoPI; - } - - aA1x=AngleWithRef(aDBF1, aDBF , aDTF1); - if (aA1x<0.) { - aA1x=aA1x+aTwoPI; - } - // - if (aA1xD0(aT, aP3D); - } - // - aState=GEOMAlgo_Tools3D::ComputeState(aP3D, theRef, theTol, theCtx); - // - return aState; -} -//======================================================================= -// function: ComputeState -// purpose: -//======================================================================= - TopAbs_State GEOMAlgo_Tools3D::ComputeState(const gp_Pnt& theP, - const TopoDS_Solid& theRef, - const Standard_Real theTol, - const Handle(IntTools_Context)& theCtx) -{ - TopAbs_State aState; - // - BRepClass3d_SolidClassifier& aSC=theCtx->SolidClassifier(theRef); - aSC.Perform(theP, theTol); - // - aState=aSC.State(); - // - return aState; -} -//======================================================================= -// function: IsSplitToReverse -// purpose: -//======================================================================= - Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Shape& theSp, - const TopoDS_Shape& theSr, - const Handle(IntTools_Context)& theCtx) -{ - Standard_Boolean bRet; - TopAbs_ShapeEnum aType; - // - bRet=Standard_False; - // - aType=theSp.ShapeType(); - switch (aType) { - case TopAbs_EDGE: { - const TopoDS_Edge& aESp=TopoDS::Edge(theSp); - const TopoDS_Edge& aESr=TopoDS::Edge(theSr); - bRet=GEOMAlgo_Tools3D::IsSplitToReverse(aESp, aESr, theCtx); - } - break; - // - case TopAbs_FACE: { - const TopoDS_Face& aFSp=TopoDS::Face(theSp); - const TopoDS_Face& aFSr=TopoDS::Face(theSr); - bRet=GEOMAlgo_Tools3D::IsSplitToReverse(aFSp, aFSr, theCtx); - } - break; - // - default: - break; - } - return bRet; -} -//======================================================================= -//function :IsSplitToReverse -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Face& theFSp, - const TopoDS_Face& theFSr, - const Handle(IntTools_Context)& theContext) -{ - Standard_Boolean bRet, bFound, bInFace; - Standard_Real aT1, aT2, aT, aU, aV, aScPr; - gp_Pnt aPFSp, aPFSr; - gp_Dir aDNFSp; - gp_Vec aD1U, aD1V; - Handle(Geom_Surface) aSr, aSp; - TopAbs_Orientation aOrSr, aOrSp; - TopExp_Explorer anExp; - TopoDS_Edge aESp; - // - bRet=Standard_False; - // - aSr=BRep_Tool::Surface(theFSr); - aSp=BRep_Tool::Surface(theFSp); - if (aSr==aSp) { - aOrSr=theFSr.Orientation(); - aOrSp=theFSp.Orientation(); - bRet=(aOrSr!=aOrSp); - return bRet; - } - // - bFound=Standard_False; - anExp.Init(theFSp, TopAbs_EDGE); - for (; anExp.More(); anExp.Next()) { - aESp=TopoDS::Edge(anExp.Current()); - if (!BRep_Tool::Degenerated(aESp)) { - if (!BRep_Tool::IsClosed(aESp, theFSp)) { - bFound=!bFound; - break; - } - } - } - // - //modified by NIZNHY-PKV Tue Nov 22 10:50:30 2011f - if (!bFound) { - Standard_Boolean bFlag; - Standard_Integer iErr; - gp_Pnt2d aP2DFSp; - // - iErr=GEOMAlgo_Tools3D::PntInFace(theFSp, aPFSp, aP2DFSp); - if (iErr) { - return bRet; - } - // - aP2DFSp.Coord(aU, aV); - bFlag=BOPTools_Tools3D::GetNormalToSurface(aSp, aU, aV, aDNFSp); - if (!bFlag) { - return bRet; - } - } - else { - BRep_Tool::Range(aESp, aT1, aT2); - aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2); - BOPTools_Tools3D::GetApproxNormalToFaceOnEdge(aESp, theFSp, aT, aPFSp, aDNFSp); - } - // - /* - if (!bFound) { - return bRet; - } - BRep_Tool::Range(aESp, aT1, aT2); - aT=BOPTools_Tools2D::IntermediatePoint(aT1, aT2); - BOPTools_Tools3D::GetApproxNormalToFaceOnEdge(aESp, theFSp, aT, aPFSp, aDNFSp); - */ - //modified by NIZNHY-PKV Tue Nov 22 10:50:37 2011t - // - // Parts of theContext.ComputeVS(..) - GeomAPI_ProjectPointOnSurf& aProjector=theContext->ProjPS(theFSr); - aProjector.Perform(aPFSp); - if (!aProjector.IsDone()) { - return bRet; - } - // - aProjector.LowerDistanceParameters(aU, aV); - gp_Pnt2d aP2D(aU, aV); - bInFace=theContext->IsPointInFace (theFSr, aP2D); - if (!bInFace) { - return bRet; - } - // - aSr->D1(aU, aV, aPFSr, aD1U, aD1V); - gp_Dir aDD1U(aD1U); - gp_Dir aDD1V(aD1V); - gp_Dir aDNFSr=aDD1U^aDD1V; - if (theFSr.Orientation()==TopAbs_REVERSED){ - aDNFSr.Reverse(); - } - // - aScPr=aDNFSp*aDNFSr; - bRet=(aScPr<0.); - // - return bRet; -} -//======================================================================= -//function :IsSplitToReverse -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Edge& theSplit, - const TopoDS_Edge& theEdge, - const Handle(IntTools_Context)& theContext) -{ - Standard_Boolean bRet, aFlag, bIsDegenerated; - Standard_Real aTE, aTS, aScPr, aTa, aTb, aT1, aT2; - TopAbs_Orientation aOrSr, aOrSp; - Handle(Geom_Curve) aCEdge, aCSplit; - gp_Vec aVE, aVS; - gp_Pnt aP; - // - bRet=Standard_False; - // - bIsDegenerated=(BRep_Tool::Degenerated(theSplit) || - BRep_Tool::Degenerated(theEdge)); - if (bIsDegenerated) { - return bRet; - } - // - aCEdge =BRep_Tool::Curve(theEdge , aT1, aT2); - aCSplit=BRep_Tool::Curve(theSplit, aTa, aTb); - // - if (aCEdge==aCSplit) { - aOrSr=theEdge.Orientation(); - aOrSp=theSplit.Orientation(); - bRet=(aOrSr!=aOrSp); - return bRet; - } - // - aTS=BOPTools_Tools2D::IntermediatePoint(aTa, aTb); - aCSplit->D0(aTS, aP); - aFlag=BOPTools_Tools2D::EdgeTangent(theSplit, aTS, aVS); - gp_Dir aDTS(aVS); - // - aFlag=theContext->ProjectPointOnEdge(aP, theEdge, aTE); - aFlag=BOPTools_Tools2D::EdgeTangent(theEdge, aTE, aVE); - gp_Dir aDTE(aVE); - // - aScPr=aDTS*aDTE; - bRet=(aScPr<0.); - // - return bRet; -} - -//======================================================================= -// function: Sense -// purpose: -//======================================================================= - Standard_Integer GEOMAlgo_Tools3D::Sense (const TopoDS_Face& theF1, - const TopoDS_Face& theF2) -{ - Standard_Integer iSense=0; - gp_Dir aDNF1, aDNF2; - TopoDS_Edge aE1, aE2; - TopExp_Explorer anExp; - // - anExp.Init(theF1, TopAbs_EDGE); - for (; anExp.More(); anExp.Next()) { - aE1=TopoDS::Edge(anExp.Current()); - if (!BRep_Tool::Degenerated(aE1)) { - if (!BRep_Tool::IsClosed(aE1, theF1)) { - break; - } - } - } - // - anExp.Init(theF2, TopAbs_EDGE); - for (; anExp.More(); anExp.Next()) { - aE2=TopoDS::Edge(anExp.Current()); - if (!BRep_Tool::Degenerated(aE2)) { - if (!BRep_Tool::IsClosed(aE2, theF2)) { - if (aE2.IsSame(aE1)) { - iSense=1; - break; - } - } - } - } - // - if (!iSense) { - return iSense; - } - // - BOPTools_Tools3D::GetNormalToFaceOnEdge(aE1, theF1, aDNF1); - BOPTools_Tools3D::GetNormalToFaceOnEdge(aE2, theF2, aDNF2); - // - iSense=BOPTools_Tools3D::SenseFlag(aDNF1, aDNF2); - // - return iSense; -} -//======================================================================= -// function: CopyFace -// purpose: -//======================================================================= - void GEOMAlgo_Tools3D::CopyFace (const TopoDS_Face& theF1, - TopoDS_Face& theF2) -{ - Standard_Real aTol; - TopLoc_Location aLoc; - TopAbs_Orientation aOr; - TopoDS_Iterator aIt; - BRep_Builder aBB; - // - Handle(Geom_Surface) aSurface=BRep_Tool::Surface(theF1, aLoc); - aTol=BRep_Tool::Tolerance(theF1); - aOr=theF1.Orientation(); - // - aBB.MakeFace (theF2, aSurface, aLoc, aTol); - theF2.Orientation(aOr); - // - aIt.Initialize(theF1); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aW=aIt.Value(); - aBB.Add(theF2, aW); - } -} -//======================================================================= -// function: MakeContainer -// purpose: -//======================================================================= - void GEOMAlgo_Tools3D::MakeContainer(const TopAbs_ShapeEnum theType, - TopoDS_Shape& theC) -{ - BRep_Builder aBB; - // - switch(theType) { - case TopAbs_COMPOUND:{ - TopoDS_Compound aC; - aBB.MakeCompound(aC); - theC=aC; - } - break; - // - case TopAbs_COMPSOLID:{ - TopoDS_CompSolid aCS; - aBB.MakeCompSolid(aCS); - theC=aCS; - } - break; - // - case TopAbs_SOLID:{ - TopoDS_Solid aSolid; - aBB.MakeSolid(aSolid); - theC=aSolid; - } - break; - // - // - case TopAbs_SHELL:{ - TopoDS_Shell aShell; - aBB.MakeShell(aShell); - theC=aShell; - } - break; - // - case TopAbs_WIRE: { - TopoDS_Wire aWire; - aBB.MakeWire(aWire); - theC=aWire; - } - break; - // - default: - break; - } -} -//======================================================================= -// function: MakeConnexityBlock. -// purpose: -//======================================================================= - void GEOMAlgo_Tools3D::MakeConnexityBlock (const TopTools_ListOfShape& theLFIn, - const TopTools_IndexedMapOfShape& theMEAvoid, - TopTools_ListOfShape& theLCB) -{ - Standard_Integer aNbF, aNbAdd1; - TopExp_Explorer aExp; - TopTools_IndexedDataMapOfShapeListOfShape aMEF; - TopTools_MapIteratorOfMapOfShape aItM, aItM1; - TopTools_MapOfShape aMCB, aMAdd, aMAdd1; - TopTools_ListIteratorOfListOfShape aIt; - // - // 1. aMEF - aNbF=theLFIn.Extent(); - aIt.Initialize(theLFIn); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aF=aIt.Value(); - TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF); - } - // - // 2. aMCB - const TopoDS_Shape& aF1=theLFIn.First(); - aMAdd.Add(aF1); - // - while(1) { - aMAdd1.Clear(); - aItM.Initialize(aMAdd); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aF=aItM.Key(); - // - //aMAdd1.Clear(); - aExp.Init(aF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aE=aExp.Current(); - if (theMEAvoid.Contains(aE)){ - continue; - } - // - const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE); - aIt.Initialize(aLF); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aFx=aIt.Value(); - if (aFx.IsSame(aF)) { - continue; - } - if (aMCB.Contains(aFx)) { - continue; - } - aMAdd1.Add(aFx); - } - }//for (; aExp.More(); aExp.Next()){ - aMCB.Add(aF); - }// for (; aItM.More(); aItM.Next()) { - // - aNbAdd1=aMAdd1.Extent(); - if (!aNbAdd1) { - break; - } - // - aMAdd.Clear(); - aItM1.Initialize(aMAdd1); - for (; aItM1.More(); aItM1.Next()) { - const TopoDS_Shape& aFAdd=aItM1.Key(); - aMAdd.Add(aFAdd); - } - // - }//while(1) { - - // - aNbF=aMCB.Extent(); - aItM.Initialize(aMCB); - for (; aItM.More(); aItM.Next()) { - const TopoDS_Shape& aF=aItM.Key(); - theLCB.Append(aF); - } -} -//======================================================================= -//function : FindFacePairs -//purpose : -//======================================================================= -Standard_Boolean FindFacePairs (const TopoDS_Edge& theE, - const TopTools_ListOfShape& thLF, - NMTTools_ListOfCoupleOfShape& theLCFF) -{ - Standard_Boolean bFound; - Standard_Integer i, aNbCEF; - TopAbs_Orientation aOr, aOrC; - TopTools_MapOfShape aMFP; - TopoDS_Face aF1, aF2; - TopoDS_Edge aEL, aE1; - TopTools_ListIteratorOfListOfShape aItLF; - NMTTools_CoupleOfShape aCEF, aCFF; - NMTTools_ListOfCoupleOfShape aLCEF, aLCEFx; - NMTTools_ListIteratorOfListOfCoupleOfShape aIt; - // - bFound=Standard_True; - // - // Preface aLCEF - aItLF.Initialize(thLF); - for (; aItLF.More(); aItLF.Next()) { - const TopoDS_Face& aFL=TopoDS::Face(aItLF.Value()); - // - bFound=GEOMAlgo_Tools3D::GetEdgeOnFace(theE, aFL, aEL); - if (!bFound) { - return bFound; // it can not be so - } - // - aCEF.SetShape1(aEL); - aCEF.SetShape2(aFL); - aLCEF.Append(aCEF); - } - // - aNbCEF=aLCEF.Extent(); - while(aNbCEF) { - // - // aLCEFx - aLCEFx.Clear(); - aIt.Initialize(aLCEF); - for (i=0; aIt.More(); aIt.Next(), ++i) { - const NMTTools_CoupleOfShape& aCSx=aIt.Value(); - const TopoDS_Shape& aEx=aCSx.Shape1(); - const TopoDS_Shape& aFx=aCSx.Shape2(); - // - aOr=aEx.Orientation(); - // - if (!i) { - aOrC=TopAbs::Reverse(aOr); - aE1=TopoDS::Edge(aEx); - aF1=TopoDS::Face(aFx); - aMFP.Add(aFx); - continue; - } - // - if (aOr==aOrC) { - aLCEFx.Append(aCSx); - aMFP.Add(aFx); - } - } - // - // F2 - GEOMAlgo_Tools3D::GetFaceOff(aE1, aF1, aLCEFx, aF2); - // - aCFF.SetShape1(aF1); - aCFF.SetShape2(aF2); - theLCFF.Append(aCFF); - // - aMFP.Add(aF1); - aMFP.Add(aF2); - // - // refine aLCEF - aLCEFx.Clear(); - aLCEFx=aLCEF; - aLCEF.Clear(); - aIt.Initialize(aLCEFx); - for (; aIt.More(); aIt.Next()) { - const NMTTools_CoupleOfShape& aCSx=aIt.Value(); - const TopoDS_Shape& aFx=aCSx.Shape2(); - if (!aMFP.Contains(aFx)) { - aLCEF.Append(aCSx); - } - } - // - aNbCEF=aLCEF.Extent(); - }//while(aNbCEF) { - // - return bFound; -} -// -//======================================================================= -//function : AngleWithRef -//purpose : -//======================================================================= -Standard_Real AngleWithRef(const gp_Dir& theD1, - const gp_Dir& theD2, - const gp_Dir& theDRef) -{ - Standard_Real aCosinus, aSinus, aBeta, aHalfPI, aScPr; - gp_XYZ aXYZ; - // - aHalfPI=0.5*M_PI; - // - const gp_XYZ& aXYZ1=theD1.XYZ(); - const gp_XYZ& aXYZ2=theD2.XYZ(); - aXYZ=aXYZ1.Crossed(aXYZ2); - aSinus=aXYZ.Modulus(); - aCosinus=theD1*theD2; - // - aBeta=0.; - if (aSinus>=0.) { - aBeta=aHalfPI*(1.-aCosinus); - } - else { - aBeta=2.*M_PI-aHalfPI*(3.+aCosinus); - } - // - aScPr=aXYZ.Dot(theDRef.XYZ()); - if (aScPr<0.) { - aBeta=-aBeta; - } - return aBeta; -} -//======================================================================= -//function : GetApproxNormalToFaceOnEdge -//purpose : -//======================================================================= -void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx, - const TopoDS_Face& aFx, - Standard_Real aT, - gp_Pnt& aPF, - gp_Dir& aDNF, - const Handle(IntTools_Context)& aCtx) -{ - Standard_Boolean bReverse; - Standard_Real aT1, aT2, dT, aU, aV; - gp_Dir aDTT, aDNFT, aDBT; - gp_Pnt aPFT, aPFx; - Handle(Geom_Curve) aC3D; - Handle(Geom_Surface) aS; - GeomAdaptor_Surface aGAS; - GeomAbs_SurfaceType aTS; - TopoDS_Face aF; - TopoDS_Edge aE; - // - bReverse=Standard_False; - aF=aFx; - aE=aEx; - if (aF.Orientation()==TopAbs_REVERSED){ - bReverse=!bReverse; - aE.Reverse(); - // - aF.Orientation(TopAbs_FORWARD); - } - // - // Point at aT - aC3D =BRep_Tool::Curve(aE, aT1, aT2); - aC3D->D0(aT, aPFT); - // - // Normal at aT - BOPTools_Tools3D::GetNormalToFaceOnEdge (aE, aF, aT, aDNFT); - - // Tangent at aT - BOPTools_Tools3D::GetTangentToEdge(aE, aT, aDTT); - // - // Binormal at aT - aDBT=aDNFT^aDTT; - // - dT=BOPTools_Tools3D::MinStepIn2d();//~1.e-5; - dT=10.*dT; - //---------------------------------------------- - { - aS=BRep_Tool::Surface(aF); - aGAS.Load(aS); - aTS=aGAS.GetType(); - if (aTS==GeomAbs_BSplineSurface || - aTS==GeomAbs_BezierSurface || - aTS==GeomAbs_Plane){ - Standard_Real aTolEx, aTolFx, aTol, dUR, dVR, dR; - // - aTolEx=BRep_Tool::Tolerance(aEx); - aTolFx=BRep_Tool::Tolerance(aFx); - aTol=2.*aTolEx+aTolFx; - dUR=aGAS.UResolution(aTol); - dVR=aGAS.VResolution(aTol); - dR=(dUR>dVR)? dUR : dVR; - if (dR>dT) { - dT=dR; - } - } - else if (GeomAbs_Torus || - aTS==GeomAbs_Cylinder){ - Standard_Real aTolEx, aTolFx, aTol; - // - aTolEx=BRep_Tool::Tolerance(aEx); - aTolFx=BRep_Tool::Tolerance(aFx); - aTol=2.*aTolEx+aTolFx; - if (aTol>dT) { - dT=aTol; - } - } - } - //---------------------------------------------- - // - aPFx.SetXYZ(aPFT.XYZ()+dT*aDBT.XYZ()); - // - aPF=aPFx; - aDNF=aDNFT; - if (bReverse) { - aDNF.Reverse(); - } - // - GeomAPI_ProjectPointOnSurf& aProjector=aCtx->ProjPS(aF); - // - aProjector.Perform(aPFx); - if(aProjector.IsDone()) { - aProjector.LowerDistanceParameters (aU, aV); - aS->D0(aU, aV, aPF); - BOPTools_Tools3D::GetNormalToSurface (aS, aU, aV, aDNF); - if (bReverse){ - aDNF.Reverse(); - } - } -} - -//modified by NIZNHY-PKV Tue Nov 22 10:36:59 2011f -//======================================================================= -//function : PntInFace -//purpose : -//======================================================================= -Standard_Integer GEOMAlgo_Tools3D::PntInFace(const TopoDS_Face& aF, - gp_Pnt& theP, - gp_Pnt2d& theP2D) -{ - Standard_Boolean bIsDone, bHasFirstPoint, bHasSecondPoint; - Standard_Integer iErr, aIx, aNbDomains, i; - Standard_Real aUMin, aUMax, aVMin, aVMax; - Standard_Real aVx, aUx, aV1, aV2, aU1, aU2, aEpsT; - Standard_Real aTotArcIntr, aTolTangfIntr, aTolHatch2D, aTolHatch3D; - gp_Dir2d aD2D (0., 1.); - gp_Pnt2d aP2D; - gp_Pnt aPx; - Handle(Geom2d_Curve) aC2D; - Handle(Geom2d_TrimmedCurve) aCT2D; - Handle(Geom2d_Line) aL2D; - Handle(Geom_Surface) aS; - TopAbs_Orientation aOrE; - TopoDS_Face aFF; - TopExp_Explorer aExp; - // - aTolHatch2D=1.e-8; - aTolHatch3D=1.e-8; - aTotArcIntr=1.e-10; - aTolTangfIntr=1.e-10; - // - Geom2dHatch_Intersector aIntr(aTotArcIntr, aTolTangfIntr); - Geom2dHatch_Hatcher aHatcher(aIntr, - aTolHatch2D, aTolHatch3D, - Standard_True, Standard_False); - // - iErr=0; - aEpsT=1.e-12; - // - aFF=aF; - aFF.Orientation (TopAbs_FORWARD); - // - aS=BRep_Tool::Surface(aFF); - BRepTools::UVBounds(aFF, aUMin, aUMax, aVMin, aVMax); - // - // 1 - aExp.Init (aFF, TopAbs_EDGE); - for (; aExp.More() ; aExp.Next()) { - const TopoDS_Edge& aE=*((TopoDS_Edge*)&aExp.Current()); - aOrE=aE.Orientation(); - // - aC2D=BRep_Tool::CurveOnSurface (aE, aFF, aU1, aU2); - if (aC2D.IsNull() ) { - iErr=1; - return iErr; - } - if (fabs(aU1-aU2) < aEpsT) { - iErr=2; - return iErr; - } - // - aCT2D=new Geom2d_TrimmedCurve(aC2D, aU1, aU2); - aHatcher.AddElement(aCT2D, aOrE); - }// for (; aExp.More() ; aExp.Next()) { - // - // 2 - aUx=IntTools_Tools::IntermediatePoint(aUMin, aUMax); - aP2D.SetCoord(aUx, 0.); - aL2D=new Geom2d_Line (aP2D, aD2D); - Geom2dAdaptor_Curve aHCur(aL2D); - // - aIx=aHatcher.AddHatching(aHCur) ; - // - // 3. - aHatcher.Trim(); - bIsDone=aHatcher.TrimDone(aIx); - if (!bIsDone) { - iErr=3; - return iErr; - } - // - aHatcher.ComputeDomains(aIx); - bIsDone=aHatcher.IsDone(aIx); - if (!bIsDone) { - iErr=4; - return iErr; - } - // - // 4. - aNbDomains=aHatcher.NbDomains(aIx); - for (i=1; i<=aNbDomains; ++i) { - const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, i) ; - bHasFirstPoint=aDomain.HasFirstPoint(); - if (!bHasFirstPoint) { - iErr=5; - return iErr; - } - // - aV1=aDomain.FirstPoint().Parameter(); - // - bHasSecondPoint=aDomain.HasSecondPoint(); - if (!bHasSecondPoint) { - iErr=6; - return iErr; - } - // - aV2=aDomain.SecondPoint().Parameter(); - // - aVx=IntTools_Tools::IntermediatePoint(aV1, aV2); - // - break; - } - // - aS->D0(aUx, aVx, aPx); - // - theP2D.SetCoord(aUx, aVx); - theP=aPx; - // - return iErr; -} -//modified by NIZNHY-PKV Tue Nov 22 10:37:01 2011t diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Tools3D.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_Tools3D.hxx deleted file mode 100644 index d23d73b60..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Tools3D.hxx +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : GEOMAlgo_Tools3D.hxx -// Created : -// Author : Peter KURNEV - -#ifndef _GEOMAlgo_Tools3D_HeaderFile -#define _GEOMAlgo_Tools3D_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -//! Auxiliary tools for Algorithms
-//======================================================================= -//class : GEOMAlgo_Tools3D -//purpose : -//======================================================================= -class GEOMAlgo_Tools3D { - public: - //! Returns True if the shape theSplit has opposite
- //! direction than theShape
- //! theContext - cashed geometrical tools
- Standard_EXPORT - static Standard_Boolean IsSplitToReverse(const TopoDS_Shape& theSplit, - const TopoDS_Shape& theShape, - const Handle(IntTools_Context)& theContext) ; - - //! Returns True if normal direction of the face
- //! theShape is not the same as for the face
- //! theSplit
- //! theContext - cashed geometrical tools
- Standard_EXPORT - static Standard_Boolean IsSplitToReverse(const TopoDS_Face& theSplit, - const TopoDS_Face& theShape, - const Handle(IntTools_Context)& theContext) ; - - //! Returns True if tangent direction of the edge
- //! theEdge is not the same as for the edge
- //! theSplit
- //! theContext - cashed geometrical tools
- Standard_EXPORT - static Standard_Boolean IsSplitToReverse(const TopoDS_Edge& theEdge, - const TopoDS_Edge& theSplit, - const Handle(IntTools_Context)& theContext) ; - - //! For the couple of faces theF1, theF2
- //! computes sense value
- //! Returns 0 if the faces are not sensible
- //! Returns 1 if the faces have same sense
- //! Returns 2 if the faces have opposite sense
- Standard_EXPORT - static Standard_Integer Sense(const TopoDS_Face& theF1, - const TopoDS_Face& theF2) ; - - //! Makes new face theF2 from surface and wires
- //! of the face theF1
- Standard_EXPORT - static void CopyFace(const TopoDS_Face& theF1, - TopoDS_Face& theF2) ; - - //! Makes empty shape theShape of the type theType
- Standard_EXPORT - static void MakeContainer(const TopAbs_ShapeEnum theType, - TopoDS_Shape& theShape) ; - - //! For the list of faces theLS build block
- //! theLSCB in terms of connexity by edges
- //! theMapAvoid - set of edges to avoid for
- //! the treatment
- Standard_EXPORT - static void MakeConnexityBlock(const TopTools_ListOfShape& theLS, - const TopTools_IndexedMapOfShape& theMapAvoid, - TopTools_ListOfShape& theLSCB) ; - - //! Computes the 3-D state of the shape theShape
- //! toward solid theSolid.
- //! theTol - value of precision of computation
- //! theContext- cahed geometrical tools
- //! Returns 3-D state.
- Standard_EXPORT - static TopAbs_State ComputeStateByOnePoint(const TopoDS_Shape& theShape, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, - const Handle(IntTools_Context)& theContext) ; - - //! Computes the 3-D state of the point thePoint
- //! toward solid theSolid.
- //! theTol - value of precision of computation
- //! theContext- cahed geometrical tools
- //! Returns 3-D state.
- Standard_EXPORT - static TopAbs_State ComputeState(const gp_Pnt& thePoint, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, - const Handle(IntTools_Context)& theContext) ; - - //! Computes the 3-D state of the vertex theVertex
- //! toward solid theSolid.
- //! theTol - value of precision of computation
- //! theContext- cahed geometrical tools
- //! Returns 3-D state.
- Standard_EXPORT - static TopAbs_State ComputeState(const TopoDS_Vertex& theVertex, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, - const Handle(IntTools_Context)& theContext) ; - - //! Computes the 3-D state of the edge theEdge
- //! toward solid theSolid.
- //! theTol - value of precision of computation
- //! theContext- cahed geometrical tools
- //! Returns 3-D state.
- Standard_EXPORT - static TopAbs_State ComputeState(const TopoDS_Edge& theEdge, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, - const Handle(IntTools_Context)& theContext) ; - - //! Computes the 3-D state of the face theFace
- //! toward solid theSolid.
- //! theTol - value of precision of computation
- //! theBounds - set of edges of theFace to avoid
- //! theContext- cahed geometrical tools
- //! Returns 3-D state.
- Standard_EXPORT - static TopAbs_State ComputeState(const TopoDS_Face& theFace, - const TopoDS_Solid& theSolid, - const Standard_Real theTol, - const TopTools_IndexedMapOfShape& theBounds, - const Handle(IntTools_Context)& theContext) ; - - //! Returns True if the face theFace is inside of the
- //! couple of faces theFace1, theFace2.
- //! The faces theFace, theFace1, theFace2 must
- //! share the edge theEdge
- Standard_EXPORT - static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace1, - const TopoDS_Face& theFace2, - const Handle(IntTools_Context)& theContext) ; - - //! Returns True if the face theFace is inside of the
- //! appropriate couple of faces (from the set theLF) .
- //! The faces of the set theLF and theFace must
- //! share the edge theEdge
- Standard_EXPORT - static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Edge& theEdge, - const TopTools_ListOfShape& theLF, - const Handle(IntTools_Context)& theContext) ; - - //! Returns True if the face theFace is inside the
- //! solid theSolid.
- //! theMEF - Map Edge/Faces for theSolid
- //! theTol - value of precision of computation
- //! theContext- cahed geometrical tools
- Standard_EXPORT - static Standard_Boolean IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Solid& theSolid, - const TopTools_IndexedDataMapOfShapeListOfShape& theMEF, - const Standard_Real theTol, - const Handle(IntTools_Context)& theContext) ; - - //! For the face theFace and its edge theEdge
- //! finds the face suitable to produce shell.
- //! theLCEF - set of faces to search. All faces
- //! from theLCEF must share edge theEdge
- Standard_EXPORT - static void GetFaceOff(const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace, - const NMTTools_ListOfCoupleOfShape& theLCEF, - TopoDS_Face& theFaceOff) ; - - //! For the face theFace gets the edge theEdgeOnF
- //! that is the same as theEdge
- //! Returns True if such edge exists
- //! Returns False if there is no such edge
- Standard_EXPORT - static Standard_Boolean GetEdgeOnFace(const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace, - TopoDS_Edge& theEdgeOnF) ; - - //! Returns True if the face theFace contains
- //! the edge theEdge but with opposite orientation.
- //! If the method returns True theEdgeOff is the
- //! edge founded
- Standard_EXPORT - static Standard_Boolean GetEdgeOff(const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace, - TopoDS_Edge& theEdgeOff) ; - - //! Computes a point inside the face .
- //! - 2D representation of
- //! on the surface of
- //! Returns 0 in case of success.
- Standard_EXPORT - static Standard_Integer PntInFace(const TopoDS_Face& theF, - gp_Pnt& theP, - gp_Pnt2d& theP2D) ; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_Tools_1.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_Tools_1.cxx deleted file mode 100644 index 56caf6c91..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_Tools_1.cxx +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_1.cxx -// Created: Thu May 6 10:46:21 2010 -// Author: Peter KURNEV -// - -#include -// -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -static - inline Standard_Boolean IsEqual(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) { - return TopTools_ShapeMapHasher::IsEqual(aS1, aS2); -} -// -static - Standard_Boolean CorrectWire(const TopoDS_Wire& aW, - const TopoDS_Face& aF); - -//======================================================================= -//function : CorrectWires -//purpose : -//======================================================================= - Standard_Boolean GEOMAlgo_Tools::CorrectWires(const TopoDS_Shape& aShape) -{ - Standard_Boolean bRet; - TopoDS_Iterator aItF; - TopExp_Explorer aExp; - TopTools_MapOfShape aMF; - GeomAdaptor_Surface aGAS; - GeomAbs_SurfaceType aTS; - TopLoc_Location aLoc; - // - bRet=Standard_False; - // - aExp.Init(aShape, TopAbs_FACE); - for (; aExp.More(); aExp.Next()) { - const TopoDS_Face& aF=*((TopoDS_Face*)&aExp.Current()); - if (aMF.Add(aF)) { - const Handle(Geom_Surface)& aS=BRep_Tool::Surface(aF, aLoc); - aGAS.Load(aS); - aTS=aGAS.GetType(); - if (aTS==GeomAbs_Cylinder || aTS==GeomAbs_Plane) { - aItF.Initialize(aF); - for (; aItF.More(); aItF.Next()) { - const TopoDS_Wire& aW=*((TopoDS_Wire*)&aItF.Value()); - if (CorrectWire(aW, aF)) { - bRet=Standard_True; - } - } - } - } - } - return bRet; -} -//======================================================================= -//class: GEOMAlgo_InfoEdge -//purpose : -//======================================================================= -class GEOMAlgo_InfoEdge { - public: - // - GEOMAlgo_InfoEdge() { - myErrorStatus=0; - myTolInt=1.0e-10; - }; - // - ~GEOMAlgo_InfoEdge(){ - }; - // - void Init(const TopoDS_Edge& aE, - const TopoDS_Face& aF); - // - void SetTolInt(const Standard_Real aTolInt) { - myTolInt=aTolInt; - }; - // - const Standard_Real TolInt() const { - return myTolInt; - } - // - const Geom2dAdaptor_Curve& Adaptor() const { - return myGAC2D; - } - // - const IntRes2d_Domain& Domain()const { - return myDomain; - } - // - const Handle(Geom2d_Curve)& CurveOnSurface()const { - return myC2D; - } - // - const Handle(Geom_Curve)& Curve()const { - return myC3D; - } - // - Standard_Integer ErrorStatus()const { - return myErrorStatus; - } - // - protected: - Standard_Integer myErrorStatus; - Standard_Real myTolInt; - Geom2dAdaptor_Curve myGAC2D; - IntRes2d_Domain myDomain; - Handle(Geom2d_Curve) myC2D; - Handle(Geom_Curve) myC3D; -}; -// -typedef NCollection_DataMap GEOMAlgo_DataMapOfShapeInfoEdge; -typedef GEOMAlgo_DataMapOfShapeInfoEdge::Iterator GEOMAlgo_DataMapIteratorOfDataMapOfShapeInfoEdge; - -//======================================================================= -//function : Init -//purpose : -//======================================================================= - void GEOMAlgo_InfoEdge::Init(const TopoDS_Edge& aE, - const TopoDS_Face& aF) -{ - Standard_Real aT1, aT2, aT1x, aT2x; - gp_Pnt2d aP2D1, aP2D2; - // - myErrorStatus=0; - // - myC3D=BRep_Tool::Curve(aE, aT1, aT2); - myC2D=BRep_Tool::CurveOnSurface(aE ,aF, aT1, aT2); - if (!myC2D.IsNull() && aT2>aT1) { - myGAC2D.Load(myC2D); - if(!myGAC2D.IsPeriodic()) { - aT1x=myGAC2D.FirstParameter(); - aT2x=myGAC2D.LastParameter(); - if(aT1x > aT1) { - aT1=aT1x; - } - if(aT2x < aT2) { - aT2=aT2x; - } - } - // - BRep_Tool::UVPoints(aE, aF, aP2D1, aP2D2); - myDomain.SetValues(aP2D1, aT1, myTolInt, aP2D2, aT2, myTolInt); - } - else { - myErrorStatus=10; - return; - } -} -//======================================================================= -//function : CorrectWire -//purpose : -//======================================================================= -Standard_Boolean CorrectWire(const TopoDS_Wire& aW, - const TopoDS_Face& aF) -{ - Standard_Boolean bRet; - Standard_Real aTolInt; - Standard_Integer iErr, aNbV, aNbE; - TopoDS_Iterator aItW, aItE; - Geom2dInt_GInter aInter; - GEOMAlgo_DataMapOfShapeInfoEdge aDMEIE; - TopTools_DataMapOfShapeListOfShape aDMVLE; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItDMVLE; - // - bRet=Standard_False; - aTolInt=1.0e-10; - // - aItW.Initialize(aW); - for (; aItW.More(); aItW.Next()) { - const TopoDS_Edge& aE=*((TopoDS_Edge*)&aItW.Value()); - - aItE.Initialize(aE); - for (aNbV=0; aItE.More(); aItE.Next(), ++aNbV) { - } - if (aNbV<2) { - return bRet; // - } - // - if (!aDMEIE.IsBound(aE)) { - GEOMAlgo_InfoEdge aInfoEdge; - // - aInfoEdge.Init (aE, aF); - iErr=aInfoEdge.ErrorStatus(); - if (iErr) { - return bRet; // - } - // - aDMEIE.Bind(aE, aInfoEdge); - } - // - aItE.Initialize(aE); - for (; aItE.More(); aItE.Next()) { - const TopoDS_Shape& aV=aItE.Value(); - if (aDMVLE.IsBound(aV)) { - TopTools_ListOfShape& aLE=aDMVLE.ChangeFind(aV); - aLE.Append(aE); - } - else { - TopTools_ListOfShape aLE; - aLE.Append(aE); - aDMVLE.Bind(aV, aLE); - } - } - } - // - // 2 - Standard_Real aTolV, aD1, aD2, aDmax, aCoeff; - gp_Pnt aPV; - Handle(Geom_Surface) aS; - BRep_Builder aBB; - // - aCoeff=1.1; - aS=BRep_Tool::Surface(aF); - // - aItDMVLE.Initialize(aDMVLE); - for(; aItDMVLE.More(); aItDMVLE.Next()) { - const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aItDMVLE.Key()); - const TopTools_ListOfShape& aLE=aItDMVLE.Value(); - aNbE=aLE.Extent(); - if (aNbE!=2) { - continue; - } - // - aPV=BRep_Tool::Pnt(aV); - aTolV=BRep_Tool::Tolerance(aV); - // - const TopoDS_Edge& aE1=*((TopoDS_Edge*)&aLE.First()); - const GEOMAlgo_InfoEdge& aIE1=aDMEIE.Find(aE1); - const Geom2dAdaptor_Curve& aGAC1=aIE1.Adaptor(); - const IntRes2d_Domain& aDomain1=aIE1.Domain(); - // - const TopoDS_Edge& aE2=*((TopoDS_Edge*)&aLE.Last()); - const GEOMAlgo_InfoEdge& aIE2=aDMEIE.Find(aE2); - const Geom2dAdaptor_Curve& aGAC2=aIE2.Adaptor(); - const IntRes2d_Domain& aDomain2=aIE2.Domain(); - // - aInter.Perform(aGAC1, aDomain1,aGAC2, aDomain2, aTolInt, aTolInt); - if(!aInter.IsDone()) { - continue; - } - // - Standard_Integer i, aNbP; - Standard_Real aIP_ParamOnFirst, aIP_ParamOnSecond; - gp_Pnt aP3D1, aP3D2; - gp_Pnt2d aP2D1, aP2D2; - IntRes2d_Transition aTr1, aTr2; - // - aNbP=aInter.NbPoints(); - for (i=1; i<=aNbP; ++i) { - const IntRes2d_IntersectionPoint& aIP = aInter.Point(i); - aIP_ParamOnFirst = aIP.ParamOnFirst(); - aIP_ParamOnSecond = aIP.ParamOnSecond(); - aTr1 =aIP.TransitionOfFirst(); - aTr2 =aIP.TransitionOfSecond(); - if(aTr1.PositionOnCurve()==IntRes2d_Middle || - aTr2.PositionOnCurve()==IntRes2d_Middle) { - // - const Handle(Geom_Curve)& aC3D1=aIE1.Curve(); - if (!aC3D1.IsNull()) { - aP3D1=aC3D1->Value(aIP_ParamOnFirst); - } - else { - aP2D1=aGAC1.Value(aIP_ParamOnFirst); - aS->D0(aP2D1.X(), aP2D1.Y(), aP3D1); - } - // - const Handle(Geom_Curve)& aC3D2=aIE2.Curve(); - if (!aC3D2.IsNull()) { - aP3D2=aC3D2->Value(aIP_ParamOnSecond); - } - else { - aP2D2=aGAC2.Value(aIP_ParamOnSecond); - aS->D0(aP2D2.X(), aP2D2.Y(), aP3D2); - } - // - aD1=aPV.Distance(aP3D1); - aD2=aPV.Distance(aP3D2); - aDmax=(aD1>aD2)? aD1 : aD2; - if (aDmax>aCoeff*aTolV) { - if (aDmax<10.*aTolV){ - aBB.UpdateVertex(aV, aDmax); - bRet=Standard_True; - } - } - }// - }//for (i=1; i<=aNbP; ++i) { - }//for(; aItDMVLE.More(); aItDMVLE.Next()) { - return bRet; -} - - diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_VertexSolid.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_VertexSolid.cxx deleted file mode 100644 index 76d087cff..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_VertexSolid.cxx +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_VertexSolid.cxx -// Created: Wed Jan 12 16:36:40 2005 -// Author: Peter KURNEV -// -// -#include - -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_VertexSolid -//purpose : -//======================================================================= -GEOMAlgo_VertexSolid::GEOMAlgo_VertexSolid() -: - GEOMAlgo_ShapeSolid() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_VertexSolid::~GEOMAlgo_VertexSolid() -{ -} -//======================================================================= -// function: Perform -// purpose: -//======================================================================= -void GEOMAlgo_VertexSolid::Perform() -{ - myErrorStatus=0; - // - try { - if (myDSFiller==NULL) { - myErrorStatus=10; - return; - } - if(!myDSFiller->IsDone()) { - myErrorStatus=11; - return; - } - // - Standard_Boolean bIsNewFiller; - Standard_Integer aNbF; - TopTools_IndexedMapOfShape aM; - // - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - const TopoDS_Shape& aObj=aDS.Object(); - // - TopExp::MapShapes(aObj, TopAbs_FACE, aM); - aNbF=aM.Extent(); - myRank=(aNbF) ? 2 : 1; - // - bIsNewFiller=myDSFiller->IsNewFiller(); - - if (bIsNewFiller) { - Prepare(); - myDSFiller->SetNewFiller(!bIsNewFiller); - } - BuildResult(); - } - // - catch (Standard_Failure) { - myErrorStatus = 12; - } -} -//======================================================================= -// function: Prepare -// purpose: -//======================================================================= -void GEOMAlgo_VertexSolid::Prepare() -{ - Standard_Integer i, iBeg, iEnd, aNbVV, j, n1, n2, iFound; - Standard_Real aTol; - TopAbs_State aSt; - TopAbs_ShapeEnum aType; - BooleanOperations_StateOfShape aState; - gp_Pnt aP3D; - // - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - BooleanOperations_ShapesDataStructure* pDS=(BooleanOperations_ShapesDataStructure*)&aDS; - const BOPTools_InterferencePool& aIP=myDSFiller->InterfPool(); - BOPTools_InterferencePool* pIP=(BOPTools_InterferencePool*) &aIP; - BOPTools_CArray1OfVVInterference& aVVs=pIP->VVInterferences(); - const BOPTools_PaveFiller& aPF=myDSFiller->PaveFiller(); - BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)&aPF; - const Handle(IntTools_Context)& aCtx=pPF->Context(); - // - const TopoDS_Shape& aObj=aDS.Object(); - const TopoDS_Shape& aTool=aDS.Tool(); - // - const TopoDS_Solid& aSolid=(myRank==1) ? TopoDS::Solid(aTool) : TopoDS::Solid(aObj); - // - BRepClass3d_SolidClassifier& aSC=aCtx->SolidClassifier(aSolid); - // - iBeg=1; - iEnd=aDS.NumberOfShapesOfTheObject(); - if (myRank==2) { - iBeg=iEnd+1; - iEnd=aDS.NumberOfSourceShapes(); - } - // - for (i=iBeg; i<=iEnd; ++i) { - aType=aDS.GetShapeType(i); - if (aType!=TopAbs_VERTEX) { - continue; - } - // - const TopoDS_Vertex& aV=TopoDS::Vertex(aDS.Shape(i)); - // - aState=aDS.GetState(i); - if (aState==BooleanOperations_ON || - aState==BooleanOperations_IN || - aState==BooleanOperations_OUT) { - continue; - } - // - iFound=0; - aNbVV=aVVs.Extent(); - for (j=1; j<=aNbVV; ++j) { - BOPTools_VVInterference& aVV=aVVs(j); - aVV.Indices(n1, n2); - if (n1==i || n2==i) { - pDS->SetState (n1, BooleanOperations_ON); - pDS->SetState (n2, BooleanOperations_ON); - iFound=1; - break; - } - } - if (iFound) { - continue; - } - // - aP3D=BRep_Tool::Pnt(aV); - aTol=1.E-7; - aSC.Perform(aP3D, aTol); - aSt=aSC.State(); - if (aSt==TopAbs_IN) { - pDS->SetState (i, BooleanOperations_IN); - } - else if (aSt==TopAbs_OUT) { - pDS->SetState (i, BooleanOperations_OUT); - } - } -} -//======================================================================= -// function: BuildResult -// purpose: -//======================================================================= -void GEOMAlgo_VertexSolid::BuildResult() -{ - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - // - Standard_Integer i, iBeg, iEnd; - TopAbs_ShapeEnum aType; - BooleanOperations_StateOfShape aState; - // - myLSIN.Clear(); - myLSOUT.Clear(); - myLSON.Clear(); - // - iBeg=1; - iEnd=aDS.NumberOfShapesOfTheObject(); - if (myRank==2) { - iBeg=iEnd+1; - iEnd=aDS.NumberOfSourceShapes(); - } - // - for (i=iBeg; i<=iEnd; ++i) { - aType=aDS.GetShapeType(i); - if (aType!=TopAbs_VERTEX) { - continue; - } - const TopoDS_Shape& aV=aDS.Shape(i); - aState=aDS.GetState(i); - // - if (aState==BooleanOperations_IN) { - myLSIN.Append(aV); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aV); - } - else if (aState==BooleanOperations_ON) { - myLSON.Append(aV); - } - } -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_VertexSolid.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_VertexSolid.hxx deleted file mode 100644 index 5e10a6060..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_VertexSolid.hxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_VertexSolid.hxx -// Created: Wed Jan 12 16:36:40 2005 -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_VertexSolid_HeaderFile -#define _GEOMAlgo_VertexSolid_HeaderFile - -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_VertexSolid -//purpose : -//======================================================================= -class GEOMAlgo_VertexSolid : public GEOMAlgo_ShapeSolid -{ - public: - Standard_EXPORT - GEOMAlgo_VertexSolid(); - - Standard_EXPORT - virtual ~GEOMAlgo_VertexSolid(); - - Standard_EXPORT - virtual void Perform() ; - -protected: - Standard_EXPORT - virtual void Prepare() ; - - Standard_EXPORT - virtual void BuildResult() ; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_WESCorrector.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_WESCorrector.cxx deleted file mode 100644 index 83fea18f7..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_WESCorrector.cxx +++ /dev/null @@ -1,429 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTAlgo_WESCorrector.cxx -// Author: Peter KURNEV - -#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 - void MakeWire(const TopTools_ListOfShape& aLE, - TopoDS_Wire& newWire); - - -static - Standard_Boolean IsToScale(const TopoDS_Face& aF, - Standard_Real& aScale); - -//======================================================================= -// function: -// purpose: -//======================================================================= - GEOMAlgo_WESCorrector::GEOMAlgo_WESCorrector() -: - GEOMAlgo_Algo() -{ -} -//======================================================================= -// function: ~ -// purpose: -//======================================================================= - GEOMAlgo_WESCorrector::~GEOMAlgo_WESCorrector() -{ -} -//======================================================================= -// function: SetWES -// purpose: -//======================================================================= - void GEOMAlgo_WESCorrector::SetWES (const GEOMAlgo_WireEdgeSet& aWES) -{ - GEOMAlgo_WireEdgeSet* pWES=(GEOMAlgo_WireEdgeSet*) &aWES; - myWES=pWES; -} -//======================================================================= -// function: WES -// purpose: -//======================================================================= - GEOMAlgo_WireEdgeSet& GEOMAlgo_WESCorrector::WES () -{ - return *myWES; -} -//======================================================================= -// function: NewWES -// purpose: -//======================================================================= - GEOMAlgo_WireEdgeSet& GEOMAlgo_WESCorrector::NewWES () -{ - return myNewWES; -} -//======================================================================= -// function: Perform -// purpose: -//======================================================================= - void GEOMAlgo_WESCorrector::Perform() -{ - myErrorStatus=0; - // - DoConnexityBlocks(); - DoCorrections(); -} -//======================================================================= -// function: DoConnexityBlocks -// purpose: -//======================================================================= - void GEOMAlgo_WESCorrector::DoConnexityBlocks() -{ - Standard_Boolean bRegular, bClosed; - Standard_Integer i, aNbV, j, aNbC, aNbVP, aNbVS; - TopTools_ListIteratorOfListOfShape aIt; - TopoDS_Iterator aItE; - TopoDS_Shape aER; - TopTools_IndexedMapOfShape aMER, aMEP, aMEC, aMVP; - TopTools_IndexedMapOfShape aMVS, aMVAdd; - TopTools_IndexedDataMapOfShapeListOfShape aMVE; - // - // 1. aMVE; - const TopTools_ListOfShape& aLSE=myWES->StartElements(); - aIt.Initialize(aLSE); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE=aIt.Value(); - if (!aMEP.Contains(aE)) { - aMEP.Add(aE); - TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE); - } - else { - aMER.Add(aE); - } - } - // - // 2. - aNbV=aMVE.Extent(); - for (i=1; i<=aNbV; ++i) { - const TopoDS_Shape& aV=aMVE.FindKey(i); - // - aNbVS=aMVS.Extent(); - if (aNbVS==aNbV) { - break; - } - // - if (aMVS.Contains(aV)) { - continue; - } - aMVS.Add(aV); // aMVS - globally processed vertices - // - //------------------------------------- goal: aMEC - aMEC.Clear(); // aMEC - edges of CB - aMVP.Clear(); // aMVP - vertices to process right now - aMVAdd.Clear(); // aMVAdd vertices to process on next step of while(1) - // - aMVP.Add(aV); - // - while(1) { - aNbVP=aMVP.Extent(); - for (j=1; j<=aNbVP; ++j) { - const TopoDS_Shape& aVP=aMVP(j); - const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aVP); - aIt.Initialize(aLE); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE=aIt.Value(); - if (aMEC.Contains(aE)) { - continue; - } - aMEC.Add(aE); - // - aItE.Initialize(aE); - for (; aItE.More(); aItE.Next()) { - const TopoDS_Shape& aVE=aItE.Value(); - if (!aMVS.Contains(aVE)) { - aMVS.Add(aVE); - aMVAdd.Add(aVE); - } - } - } - }//for (j=1; j<=aNbVP; ++j) - // - aNbVP=aMVAdd.Extent(); - if (!aNbVP) { - break; // from while(1) - } - // - aMVP.Clear(); - for (j=1; j<=aNbVP; ++j) { - const TopoDS_Shape& aVE=aMVAdd(j); - aMVP.Add(aVE); - } - aMVAdd.Clear(); - }// while(1) { - //------------------------------------- - BOP_ConnexityBlock aCB; - TopTools_ListOfShape aLEC; - TopTools_IndexedDataMapOfShapeListOfShape aMVER; - // - bRegular=Standard_True; - // - aNbC=aMEC.Extent(); - for (j=1; j<=aNbC; ++j) { - aER=aMEC(j); - // - if (aMER.Contains(aER)) { - aER.Orientation(TopAbs_FORWARD); - aLEC.Append(aER); - aER.Orientation(TopAbs_REVERSED); - aLEC.Append(aER); - // - bRegular=Standard_False; - } - else { - aLEC.Append(aER); - } - // - if (bRegular) { - const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aER); - if (!BRep_Tool::Degenerated(aEx)) { - TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER); - } - } - }//for (j=1; j<=aNbC; ++j) { - // - if (bRegular) { - Standard_Integer k, aNbVR, aNbER; - // - aNbVR=aMVER.Extent(); - for (k=1; k<=aNbVR; ++k) { - const TopTools_ListOfShape& aLER=aMVER(k); - aNbER=aLER.Extent(); - if (aNbER==1) { - const TopoDS_Edge& aEx=TopoDS::Edge(aER); - bClosed=BRep_Tool::IsClosed(aEx, myWES->Face()); - if (!bClosed) { - bRegular=!bRegular; - break; - } - } - if (aNbER>2) { - bRegular=!bRegular; - break; - } - } - } - // - aCB.SetShapes(aLEC); - aCB.SetRegularity(bRegular); - myConnexityBlocks.Append(aCB); - aMEC.Clear(); - }//for (i=1; i<=aNbV; ++i) { -} - -//======================================================================= -// function: DoCorrections -// purpose: -//======================================================================= - void GEOMAlgo_WESCorrector::DoCorrections() -{ - Standard_Boolean bIsRegular, bIsNothingToDo, bToScale; - Standard_Integer iErr; - Standard_Real aScale; - TopoDS_Wire aW; - BOP_ListIteratorOfListOfConnexityBlock aCBIt; - GEOMAlgo_WESScaler aWSC; - // - const TopoDS_Face& aF=myWES->Face(); - // - bToScale=IsToScale(aF, aScale); - // - myNewWES.SetFace(aF); - aCBIt.Initialize(myConnexityBlocks); - for (; aCBIt.More(); aCBIt.Next()) { - const BOP_ConnexityBlock& aCB=aCBIt.Value(); - const TopTools_ListOfShape& aLE=aCB.Shapes(); - // - bIsRegular=aCB.IsRegular(); - if (bIsRegular) { - MakeWire(aLE, aW); - myNewWES.AddShape (aW); - continue; - } - // - GEOMAlgo_WireSplitter aWS; - // - if(bToScale) { - TopoDS_Shape aE; - TopTools_ListIteratorOfListOfShape aIt; - BOPTColStd_ListIteratorOfListOfListOfShape aItLLSS; - // - aWSC.SetScale(aScale); - aWSC.SetFace(aF); - aWSC.SetEdges(aLE); - // - aWSC.Perform(); - iErr=aWSC.ErrorStatus(); - if (iErr) { - return; - } - // - const TopoDS_Face& aFS=aWSC.FaceScaled(); - const TopTools_ListOfShape& aLES=aWSC.EdgesScaled(); - // - aWS.SetFace(aFS); - aWS.SetEdges(aLES); - // - aWS.Perform(); - iErr=aWS.ErrorStatus(); - if (iErr) { - continue; - } - // - bIsNothingToDo=aWS.IsNothingToDo(); - if (bIsNothingToDo) { - MakeWire(aLE, aW); - myNewWES.AddShape (aW); - continue; - } - // - const BOPTColStd_ListOfListOfShape& aLLSS=aWS.Shapes(); - aItLLSS.Initialize(aLLSS); - for (; aItLLSS.More(); aItLLSS.Next()) { - TopTools_ListOfShape aLS; - // - const TopTools_ListOfShape& aLSS=aItLLSS.Value(); - aIt.Initialize(aLSS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aES=aIt.Value(); - aE=aWSC.Origin(aES); - aLS.Append(aE); - } - // - MakeWire(aLS, aW); - myNewWES.AddShape (aW); - } - }//if(bToScale) - // - else { - aWS.SetFace(aF); - aWS.SetEdges(aLE); - // - aWS.Perform(); - iErr=aWS.ErrorStatus(); - if (iErr) { - continue; - } - bIsNothingToDo=aWS.IsNothingToDo(); - if (bIsNothingToDo) { - MakeWire(aLE, aW); - myNewWES.AddShape (aW); - continue; - } - // - const BOPTColStd_ListOfListOfShape& aSSS=aWS.Shapes(); - // - BOPTColStd_ListIteratorOfListOfListOfShape aWireIt(aSSS); - for (; aWireIt.More(); aWireIt.Next()) { - const TopTools_ListOfShape& aLEx=aWireIt.Value(); - // - MakeWire(aLEx, aW); - myNewWES.AddShape (aW); - } - }// else - } -} - -//======================================================================= -// function: MakeWire -// purpose: -//======================================================================= - void MakeWire(const TopTools_ListOfShape& aLE, - TopoDS_Wire& newWire) -{ - BRep_Builder aBB; - aBB.MakeWire(newWire); - - TopTools_ListIteratorOfListOfShape anIt(aLE); - for (; anIt.More(); anIt.Next()){ - const TopoDS_Edge& aE=TopoDS::Edge(anIt.Value()); - aBB.Add(newWire, aE); - } -} - -//======================================================================= -//function : IsToScale -//purpose : -//======================================================================= -Standard_Boolean IsToScale(const TopoDS_Face& aF, - Standard_Real& aScale) -{ - Standard_Boolean bRet; - Standard_Real aV1, aV2, dV, aTr; - GeomAbs_SurfaceType aType; - BRepAdaptor_Surface aBAS; - // - bRet=Standard_False; - aScale=1.; - // - aBAS.Initialize(aF); - aType=aBAS.GetType(); - if (aType==GeomAbs_Cylinder) { - aTr=1.e5; - aV1=aBAS.FirstVParameter(); - aV2=aBAS.LastVParameter(); - dV=aV2-aV1; - // - if (dV>aTr) { - bRet=!bRet; - aScale=1./aTr; - return bRet; - } - } - return bRet; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_WESCorrector.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_WESCorrector.hxx deleted file mode 100644 index 8348935fc..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_WESCorrector.hxx +++ /dev/null @@ -1,87 +0,0 @@ - -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: NMTAlgo_WESCorrector.hxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef _GEOMAlgo_WESCorrector_HeaderFile -#define _GEOMAlgo_WESCorrector_HeaderFile - -#include -#include -#include -#include -#include -#include - - -//! The algorithm to change the Wire Edges Set (WES) contents.
-//! The NewWES will contain only wires instead of wires and edges.
-//======================================================================= -//class : GEOMAlgo_WESCorrector -//purpose : -//======================================================================= -class GEOMAlgo_WESCorrector : public GEOMAlgo_Algo -{ - public: - //! Empty constructor;
- //!
- Standard_EXPORT - GEOMAlgo_WESCorrector(); - - Standard_EXPORT - virtual ~GEOMAlgo_WESCorrector(); - - //! Modifier
- Standard_EXPORT - void SetWES(const GEOMAlgo_WireEdgeSet& aWES) ; - - //! Performs the algorithm that consists of two steps
- //! 1. Make conexity blocks ( DoConnexityBlocks() )
- //! 2. Make corrections ( DoCorrections() )
- Standard_EXPORT - virtual void Perform() ; - - //! Selector
- Standard_EXPORT - GEOMAlgo_WireEdgeSet& WES() ; - - //! Selector
- Standard_EXPORT - GEOMAlgo_WireEdgeSet& NewWES() ; - -protected: - Standard_EXPORT - void DoConnexityBlocks() ; - - Standard_EXPORT - void DoCorrections() ; - - - GEOMAlgo_PWireEdgeSet myWES; - GEOMAlgo_WireEdgeSet myNewWES; - BOP_ListOfConnexityBlock myConnexityBlocks; -}; - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_WESScaler.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_WESScaler.cxx deleted file mode 100644 index aea8c7fad..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_WESScaler.cxx +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_WESScaler.cxx -// Created: -// Author: -// - - -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include - - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_WESScaler::GEOMAlgo_WESScaler() -: - GEOMAlgo_Algo() -{ - myScale=1.; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - GEOMAlgo_WESScaler::~GEOMAlgo_WESScaler() -{ -} -//======================================================================= -// function: SetScale -// purpose: -//======================================================================= - void GEOMAlgo_WESScaler::SetScale (const Standard_Real aScale) -{ - myScale=aScale; -} -//======================================================================= -// function: Scale -// purpose: -//======================================================================= - Standard_Real GEOMAlgo_WESScaler::Scale()const -{ - return myScale; -} -//======================================================================= -// function: SetFace -// purpose: -//======================================================================= - void GEOMAlgo_WESScaler::SetFace(const TopoDS_Face& aF) -{ - myFace=aF; -} -//======================================================================= -// function: Face -// purpose: -//======================================================================= - const TopoDS_Face& GEOMAlgo_WESScaler::Face()const -{ - return myFace; -} -//======================================================================= -// function: SetEdges -// purpose: -//======================================================================= - void GEOMAlgo_WESScaler::SetEdges(const TopTools_ListOfShape& aLE) -{ - myEdges=aLE; -} -//======================================================================= -// function: Edges -// purpose: -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_WESScaler::Edges()const -{ - return myEdges; -} -//======================================================================= -// function: FaceScaled -// purpose: -//======================================================================= - const TopoDS_Face& GEOMAlgo_WESScaler::FaceScaled()const -{ - return myFaceScaled; -} -//======================================================================= -// function: EdgesScaled -// purpose: -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_WESScaler::EdgesScaled()const -{ - return myEdgesScaled; -} -//======================================================================= -// function: Image -// purpose: -//======================================================================= - const TopoDS_Shape& GEOMAlgo_WESScaler::Image (const TopoDS_Shape& aS) const -{ - if (myImages.IsBound(aS)) { - return myImages.Find(aS); - } - return myShapeTmp; -} -//======================================================================= -// function: Origin -// purpose: -//======================================================================= - const TopoDS_Shape& GEOMAlgo_WESScaler::Origin (const TopoDS_Shape& aS) const -{ - if (myOrigins.IsBound(aS)) { - return myOrigins.Find(aS); - } - return myShapeTmp; -} -//======================================================================= -// function: Images -// purpose: -//======================================================================= - const GEOMAlgo_DataMapOfOrientedShapeShape& GEOMAlgo_WESScaler::Images () const -{ - return myImages; -} -//======================================================================= -// function: Origins -// purpose: -//======================================================================= - const GEOMAlgo_DataMapOfOrientedShapeShape& GEOMAlgo_WESScaler::Origins () const -{ - return myOrigins; -} -//======================================================================= -// function: CheckData -// purpose: -//======================================================================= - void GEOMAlgo_WESScaler::CheckData() -{ - myErrorStatus=0; - // - if(myFace.IsNull()) { - myErrorStatus=2; - return; - } - if(!myEdges.Extent()) { - myErrorStatus=3; - return; - } - if (myScale<=0.){ - myErrorStatus=4; - } -} -//======================================================================= -// function: Perform -// purpose: -//======================================================================= - void GEOMAlgo_WESScaler::Perform() -{ - Standard_Boolean bIsDone; - Standard_Integer i; - gp_Pnt aP; - gp_Trsf aTrsf; - TopAbs_Orientation aOr; - TopoDS_Shape aFC, aFR, aER; - TopoDS_Wire aWE; - TopoDS_Iterator aItS; - BRep_Builder aBB; - TopTools_ListIteratorOfListOfShape aIt; - // - // 0. CheckData - CheckData(); - if(myErrorStatus) { - return; - } - // - myImages.Clear(); - myOrigins.Clear(); - myEdgesScaled.Clear(); - // - // 1. aFC - aFC=myFace.EmptyCopied(); - // - aBB.MakeWire(aWE); - aIt.Initialize(myEdges); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE=aIt.Value(); - aBB.Add(aWE, aE); - } - aBB.Add(aFC, aWE); - // - aItS.Initialize(myFace); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aW=aItS.Value(); - aBB.Add(aFC, aW); - } - // - // 2. Scale aFC - aP.SetCoord(0.,0.,0.); - aTrsf.SetScale(aP, myScale); - // - BRepBuilderAPI_Transform aBT(aTrsf); - aBT.Perform(aFC); - bIsDone=aBT.IsDone(); - if (!bIsDone) { - myErrorStatus=10; - return; - } - // - const TopoDS_Shape& aSR=aBT.Shape(); - // - // Refined image face FR - aFR=aSR.EmptyCopied(); - aItS.Initialize(aSR); - for (i=0; aItS.More(); aItS.Next(),++i) { - const TopoDS_Shape& aWR=aItS.Value(); - if (i) { - aBB.Add(aFR, aWR); - } - } - myFaceScaled=*((TopoDS_Face*)&aFR); - // - // 3. Fill Images, Origins, EdgesScaled - aIt.Initialize(myEdges); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE=aIt.Value(); - aOr=aE.Orientation(); - // - aER=aBT.ModifiedShape(aE); - if(aER.IsNull()) { - myErrorStatus=11; - return; - } - // - aER.Orientation(aOr); - myImages.Bind(aE, aER); - myOrigins.Bind(aER, aE); - // - myEdgesScaled.Append(aER); - } -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_WESScaler.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_WESScaler.hxx deleted file mode 100644 index bd1d1d5ee..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_WESScaler.hxx +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_WESScaler.hxx -// Created: -// Author: -// - -#ifndef _GEOMAlgo_WESScaler_HeaderFile -#define _GEOMAlgo_WESScaler_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_WESScaler -//purpose : -//======================================================================= -class GEOMAlgo_WESScaler : public GEOMAlgo_Algo -{ -public: - //! Empty constructor
- Standard_EXPORT - GEOMAlgo_WESScaler(); - - Standard_EXPORT - virtual ~GEOMAlgo_WESScaler(); - - //! Modifier
- Standard_EXPORT - void SetScale(const Standard_Real aWES) ; - - //! Selector
- Standard_EXPORT - Standard_Real Scale() const; - - Standard_EXPORT - void SetFace(const TopoDS_Face& aF) ; - - Standard_EXPORT - const TopoDS_Face& Face() const; - - Standard_EXPORT - void SetEdges(const TopTools_ListOfShape& aLE) ; - - Standard_EXPORT - const TopTools_ListOfShape& Edges() const; - - //! Performs the algorithm
- Standard_EXPORT - virtual void Perform() ; - - Standard_EXPORT - const TopoDS_Face& FaceScaled() const; - - Standard_EXPORT - const TopTools_ListOfShape& EdgesScaled() const; - - Standard_EXPORT - const TopoDS_Shape& Image(const TopoDS_Shape& aS) const; - - Standard_EXPORT - const TopoDS_Shape& Origin(const TopoDS_Shape& aS) const; - - //! Selector
- Standard_EXPORT - const GEOMAlgo_DataMapOfOrientedShapeShape& Images() const; - - //! Selector
- Standard_EXPORT - const GEOMAlgo_DataMapOfOrientedShapeShape& Origins() const; - - protected: - - //! Performs the algorithm
- Standard_EXPORT virtual void CheckData() ; - - - Standard_Real myScale; - TopoDS_Face myFace; - TopTools_ListOfShape myEdges; - TopoDS_Face myFaceScaled; - TopTools_ListOfShape myEdgesScaled; - GEOMAlgo_DataMapOfOrientedShapeShape myImages; - GEOMAlgo_DataMapOfOrientedShapeShape myOrigins; - TopoDS_Shape myShapeTmp; -}; - -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_WireEdgeSet.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_WireEdgeSet.cxx deleted file mode 100644 index 5a39f0e10..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_WireEdgeSet.cxx +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_WireEdgeSet.cxx -// Created: -// Author: Peter KURNEV -// -// -#include - -//======================================================================= -//function : -//purpose : -//======================================================================= - GEOMAlgo_WireEdgeSet::GEOMAlgo_WireEdgeSet() -{ - Clear(); -} - -//======================================================================= -//function : Clear -//purpose : -//======================================================================= - void GEOMAlgo_WireEdgeSet::Clear() -{ - myStartShapes.Clear(); - myShapes.Clear(); -} -//======================================================================= -//function : SetFace -//purpose : -//======================================================================= - void GEOMAlgo_WireEdgeSet::SetFace(const TopoDS_Face& aF) -{ - myFace=aF; -} -//======================================================================= -//function : Face -//purpose : -//======================================================================= - const TopoDS_Face& GEOMAlgo_WireEdgeSet::Face()const -{ - return myFace; -} -//======================================================================= -//function : AddStartElement -//purpose : -//======================================================================= - void GEOMAlgo_WireEdgeSet::AddStartElement(const TopoDS_Shape& aE) -{ - myStartShapes.Append(aE); -} -//======================================================================= -//function : StartElements -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_WireEdgeSet::StartElements()const -{ - return myStartShapes; -} -//======================================================================= -//function : AddShape -//purpose : -//======================================================================= - void GEOMAlgo_WireEdgeSet::AddShape(const TopoDS_Shape& aW) -{ - myShapes.Append(aW); -} -//======================================================================= -//function : Shapes -//purpose : -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_WireEdgeSet::Shapes()const -{ - return myShapes; -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_WireEdgeSet.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_WireEdgeSet.hxx deleted file mode 100644 index 97708870e..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_WireEdgeSet.hxx +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_WireEdgeSet.hxx -// Created: -// Author: Peter KURNEV -// -// - -#ifndef _GEOMAlgo_WireEdgeSet_HeaderFile -#define _GEOMAlgo_WireEdgeSet_HeaderFile - -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_WireEdgeSet -//purpose : -//======================================================================= -class GEOMAlgo_WireEdgeSet { - public: - Standard_EXPORT - GEOMAlgo_WireEdgeSet(); - - Standard_EXPORT - void Clear() ; - - Standard_EXPORT - void SetFace(const TopoDS_Face& aF) ; - - Standard_EXPORT - const TopoDS_Face& Face() const; - - Standard_EXPORT - void AddStartElement(const TopoDS_Shape& sS) ; - - Standard_EXPORT - const TopTools_ListOfShape& StartElements() const; - - Standard_EXPORT - void AddShape(const TopoDS_Shape& sS) ; - - Standard_EXPORT - const TopTools_ListOfShape& Shapes() const; - -protected: - TopoDS_Face myFace; - TopTools_ListOfShape myStartShapes; - TopTools_ListOfShape myShapes; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_WireSolid.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_WireSolid.cxx deleted file mode 100644 index 3acfda53c..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_WireSolid.cxx +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_WireSolid.cxx -// Created: Wed Jan 12 10:19:31 2005 -// Author: Peter KURNEV -// -// -#include - -#include - -#include - -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : GEOMAlgo_WireSolid -//purpose : -//======================================================================= -GEOMAlgo_WireSolid::GEOMAlgo_WireSolid() -: - GEOMAlgo_ShapeSolid() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -GEOMAlgo_WireSolid::~GEOMAlgo_WireSolid() -{ -} -//======================================================================= -// function: Perform -// purpose: -//======================================================================= -void GEOMAlgo_WireSolid::Perform() -{ - myErrorStatus=0; - // - try { - if (myDSFiller==NULL) { - myErrorStatus=10; - return; - } - if(!myDSFiller->IsDone()) { - myErrorStatus=11; - return; - } - // - Standard_Boolean bIsNewFiller; - // - bIsNewFiller=myDSFiller->IsNewFiller(); - - if (bIsNewFiller) { - Prepare(); - myDSFiller->SetNewFiller(!bIsNewFiller); - } - BuildResult(); - } - // - catch (Standard_Failure) { - myErrorStatus= 12; - } -} -//======================================================================= -// function: Prepare -// purpose: -//======================================================================= -void GEOMAlgo_WireSolid::Prepare() -{ - const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller(); - // - BOPTools_WireStateFiller aStateFiller(aPaveFiller); - aStateFiller.Do(); - // -} -//======================================================================= -// function: BuildResult -// purpose: -//======================================================================= -void GEOMAlgo_WireSolid::BuildResult() -{ - const BooleanOperations_ShapesDataStructure& aDS=myDSFiller->DS(); - const BOPTools_PaveFiller& aPaveFiller=myDSFiller->PaveFiller(); - const BOPTools_SplitShapesPool& aSplitShapesPool=aPaveFiller.SplitShapesPool(); - // - Standard_Integer i, aNbPB, nSp, iBeg, iEnd; - TopAbs_ShapeEnum aType; - BooleanOperations_StateOfShape aState; - // - myLSIN.Clear(); - myLSOUT.Clear(); - myLSON.Clear(); - // - iBeg=1; - iEnd=aDS.NumberOfShapesOfTheObject(); - if (aDS.Tool().ShapeType()==TopAbs_WIRE) { - iBeg=iEnd+1; - iEnd=aDS.NumberOfSourceShapes(); - } - // - for (i=iBeg; i<=iEnd; ++i) { - aType=aDS.GetShapeType(i); - if (aType==TopAbs_EDGE) { - const TopoDS_Shape& aE=aDS.Shape(i); - const BOPTools_ListOfPaveBlock& aLPB=aSplitShapesPool(aDS.RefEdge(i)); - aNbPB=aLPB.Extent(); - // - if (!aNbPB) { - aState=aDS.GetState(i); - // - if (aState==BooleanOperations_IN) { - myLSIN.Append(aE); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aE); - } - else if (aState==BooleanOperations_ON) { - myLSON.Append(aE); - } - } - // - else if (aNbPB==1) { - const BOPTools_PaveBlock& aPB=aLPB.First(); - nSp=aPB.Edge(); - /*const TopoDS_Shape& aSp=*/aDS.Shape(nSp); - aState=aDS.GetState(nSp); - // - if (aState==BooleanOperations_IN) { - myLSIN.Append(aE); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aE); - } - else if (aState==BooleanOperations_ON) { - myLSON.Append(aE); - } - } - } - } -} diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_WireSolid.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_WireSolid.hxx deleted file mode 100644 index 93a5463ed..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_WireSolid.hxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_WireSolid.hxx -// Created: Wed Jan 12 10:19:31 2005 -// Author: Peter KURNEV -// - -#ifndef _GEOMAlgo_WireSolid_HeaderFile -#define _GEOMAlgo_WireSolid_HeaderFile - -#include -#include -#include - -//======================================================================= -//class : GEOMAlgo_WireSolid -//purpose : -//======================================================================= -class GEOMAlgo_WireSolid : public GEOMAlgo_ShapeSolid -{ - public: - Standard_EXPORT - GEOMAlgo_WireSolid(); - - Standard_EXPORT - virtual ~GEOMAlgo_WireSolid(); - - Standard_EXPORT - virtual void Perform() ; - - protected: - Standard_EXPORT - virtual void Prepare() ; - - Standard_EXPORT - virtual void BuildResult() ; -}; -#endif diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_WireSplitter.cxx b/src/GEOMAlgo_NEW/GEOMAlgo_WireSplitter.cxx deleted file mode 100644 index b9a452053..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_WireSplitter.cxx +++ /dev/null @@ -1,899 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_WireSplitter.cxx -// Author: Peter KURNEV - -#include - -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include - -static - void Path (const GeomAdaptor_Surface& aGAS, - const TopoDS_Face& myFace, - const TopoDS_Vertex& aVa, - const TopoDS_Edge& aEOuta, - BOP_EdgeInfo& anEdgeInfo, - TopTools_SequenceOfShape& aLS, - TopTools_SequenceOfShape& aVertVa, - TColgp_SequenceOfPnt2d& aCoordVa, - BOPTColStd_ListOfListOfShape& myShapes, - BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap); - - -static - Standard_Real Angle (const gp_Dir2d& aDir2D); - - -static - void GetNextVertex(const TopoDS_Vertex& aV, - const TopoDS_Edge& aE, - TopoDS_Vertex& aV1); -static - Standard_Real ClockWiseAngle(const Standard_Real aAngleIn, - const Standard_Real aAngleOut); - -static - Standard_Real AngleIn(const TopoDS_Edge& aEIn, - const BOP_ListOfEdgeInfo& aLEInfo); - -static - Standard_Real Angle2D (const TopoDS_Vertex& aV, - const TopoDS_Edge& anEdge, - const TopoDS_Face& myFace, - const GeomAdaptor_Surface& aGAS, - const Standard_Boolean aFlag); -static - gp_Pnt2d Coord2d (const TopoDS_Vertex& aV1, - const TopoDS_Edge& aE1, - const TopoDS_Face& aF); -static - gp_Pnt2d Coord2dVf (const TopoDS_Edge& aE, - const TopoDS_Face& aF); -static - Standard_Real Tolerance2D (const TopoDS_Vertex& aV, - const GeomAdaptor_Surface& aGAS); - - -//modified by NIZNHY-PKV Thu Apr 19 09:04:59 2012f -static - Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta, - const BOP_ListOfEdgeInfo& aLEInfo); -//static -// Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& ); -//modified by NIZNHY-PKV Thu Apr 19 09:04:53 2012t - -//======================================================================= -// function: -// purpose: -//======================================================================= - GEOMAlgo_WireSplitter::GEOMAlgo_WireSplitter() -: - GEOMAlgo_Algo(), - myNothingToDo(Standard_False) -{ -} -//======================================================================= -// function: ~ -// purpose: -//======================================================================= - GEOMAlgo_WireSplitter::~GEOMAlgo_WireSplitter() -{ -} -//======================================================================= -// function: SetFace -// purpose: -//======================================================================= - void GEOMAlgo_WireSplitter::SetFace(const TopoDS_Face& aFace) -{ - myFace=aFace; -} -//======================================================================= -// function: Face -// purpose: -//======================================================================= - const TopoDS_Face& GEOMAlgo_WireSplitter::Face()const -{ - return myFace; -} -//======================================================================= -// function: SetEdges -// purpose: -//======================================================================= - void GEOMAlgo_WireSplitter::SetEdges(const TopTools_ListOfShape& aLE) -{ - TopTools_ListIteratorOfListOfShape anIt; - // - myEdges.Clear(); - anIt.Initialize(aLE); - for (; anIt.More(); anIt.Next()) { - const TopoDS_Shape& aE =anIt.Value(); - // - if (aE.Orientation()==TopAbs_INTERNAL){ - continue; - } - // - myEdges.Append(aE); - } -} -//======================================================================= -// function: Edges -// purpose: -//======================================================================= - const TopTools_ListOfShape& GEOMAlgo_WireSplitter::Edges()const -{ - return myEdges; -} -//======================================================================= -// function: IsNothingToDo -// purpose: -//======================================================================= - Standard_Boolean GEOMAlgo_WireSplitter::IsNothingToDo()const -{ - return myNothingToDo; -} -//======================================================================= -// function: Shapes -// purpose: -//======================================================================= - const BOPTColStd_ListOfListOfShape& GEOMAlgo_WireSplitter::Shapes()const -{ - return myShapes; -} -//======================================================================= -// function: Perform -// purpose: -//======================================================================= - void GEOMAlgo_WireSplitter::Perform() -{ - myErrorStatus=2; - myNothingToDo=Standard_True; - - Standard_Integer index, i, aNb, aCntIn, aCntOut; - Standard_Boolean anIsIn; - Standard_Real anAngle; - - BOP_ListOfEdgeInfo emptyInfo; - TopTools_ListIteratorOfListOfShape anItList; - // - // 1.Filling mySmartMap - mySmartMap.Clear(); - - anItList.Initialize(myEdges); - for (; anItList.More(); anItList.Next()) { - const TopoDS_Edge& anEdge = TopoDS::Edge(anItList.Value()); - // - if (!BOPTools_Tools2D::HasCurveOnSurface (anEdge, myFace)) { - continue; - } - // - TopExp_Explorer anExpVerts (anEdge, TopAbs_VERTEX); - for (; anExpVerts.More(); anExpVerts.Next()) { - const TopoDS_Shape& aVertex= anExpVerts.Current(); - - index = mySmartMap.FindIndex(aVertex); - if (!index) { - index=mySmartMap.Add(aVertex, emptyInfo); - } - - BOP_ListOfEdgeInfo& aListOfEInfo=mySmartMap(index); - - BOP_EdgeInfo aEInfo; - aEInfo.SetEdge(anEdge); - - TopAbs_Orientation anOr=aVertex.Orientation(); - - if (anOr==TopAbs_FORWARD) { - aEInfo.SetInFlag(Standard_False); - } - - else if (anOr==TopAbs_REVERSED) { - aEInfo.SetInFlag(Standard_True); - } - - aListOfEInfo.Append(aEInfo); - } - } - // - aNb=mySmartMap.Extent(); - // - // 2. myNothingToDo - myNothingToDo=Standard_True; - - for (i=1; i<=aNb; i++) { - aCntIn=0; - aCntOut=0; - const BOP_ListOfEdgeInfo& aLEInfo= mySmartMap(i); - BOP_ListIteratorOfListOfEdgeInfo anIt(aLEInfo); - for (; anIt.More(); anIt.Next()) { - const BOP_EdgeInfo& anEdgeInfo=anIt.Value(); - anIsIn=anEdgeInfo.IsIn(); - if (anIsIn) { - aCntIn++; - } - else { - aCntOut++; - } - } - if (aCntIn!=1 || aCntOut!=1) { - myNothingToDo=Standard_False; - break; - } - } - // - // Each vertex has one edge In and one - Out. Good. But it is not enought - // to consider that nothing to do with this. We must check edges on TShape - // coinsidence. If there are such edges there is something to do with. - // - if (myNothingToDo) { - Standard_Integer aNbE, aNbMapEE; - TopTools_IndexedDataMapOfShapeListOfShape aMapEE; - aNbE=myEdges.Extent(); - - anItList.Initialize(myEdges); - for (; anItList.More(); anItList.Next()) { - const TopoDS_Shape& aE = anItList.Value(); - - if (!aMapEE.Contains(aE)) { - TopTools_ListOfShape aLEx; - aLEx.Append(aE); - aMapEE.Add(aE, aLEx); - } - else { - TopTools_ListOfShape& aLEx=aMapEE.ChangeFromKey(aE); - aLEx.Append(aE); - } - } - - Standard_Boolean bFlag; - bFlag=Standard_True; - aNbMapEE=aMapEE.Extent(); - for (i=1; i<=aNbMapEE; i++) { - const TopTools_ListOfShape& aLEx=aMapEE(i); - aNbE=aLEx.Extent(); - if (aNbE==1) { - // usual case - continue; - } - else if (aNbE==2){ - const TopoDS_Shape& aE1=aLEx.First(); - const TopoDS_Shape& aE2=aLEx.Last(); - if (aE1.IsSame(aE2)) { - bFlag=Standard_False; - break; - } - } - else { - bFlag=Standard_False; - break; - } - } - myNothingToDo=myNothingToDo && bFlag; - } - // - // - if (myNothingToDo) { - myErrorStatus=0; - return; - } - // - // 3. Angles in mySmartMap - BRepAdaptor_Surface aBAS(myFace); - const GeomAdaptor_Surface& aGAS=aBAS.Surface(); - for (i=1; i<=aNb; i++) { - const TopoDS_Vertex& aV=TopoDS::Vertex (mySmartMap.FindKey(i)); - const BOP_ListOfEdgeInfo& aLEInfo= mySmartMap(i); - - BOP_ListIteratorOfListOfEdgeInfo anIt(aLEInfo); - for (; anIt.More(); anIt.Next()) { - BOP_EdgeInfo& anEdgeInfo=anIt.Value(); - const TopoDS_Edge& aE=anEdgeInfo.Edge(); - // - TopoDS_Vertex aVV=aV; - // - anIsIn=anEdgeInfo.IsIn(); - if (anIsIn) { - // - aVV.Orientation(TopAbs_REVERSED); - anAngle=Angle2D (aVV, aE, myFace, aGAS, Standard_True); - } - // - else { // OUT - // - aVV.Orientation(TopAbs_FORWARD); - anAngle=Angle2D (aVV, aE, myFace, aGAS, Standard_False); - } - anEdgeInfo.SetAngle(anAngle); - - } - } - // - // 4. Do - // - Standard_Boolean anIsOut, anIsNotPassed; - - TopTools_SequenceOfShape aLS, aVertVa; - TColgp_SequenceOfPnt2d aCoordVa; - - BOP_ListIteratorOfListOfEdgeInfo anIt; - - for (i=1; i<=aNb; i++) { - const TopoDS_Vertex aVa=TopoDS::Vertex (mySmartMap.FindKey(i)); - const BOP_ListOfEdgeInfo& aLEInfo=mySmartMap(i); - - anIt.Initialize(aLEInfo); - for (; anIt.More(); anIt.Next()) { - BOP_EdgeInfo& anEdgeInfo=anIt.Value(); - const TopoDS_Edge& aEOuta=anEdgeInfo.Edge(); - - anIsOut=!anEdgeInfo.IsIn(); - anIsNotPassed=!anEdgeInfo.Passed(); - - if (anIsOut && anIsNotPassed) { - // - aLS.Clear(); - aVertVa.Clear(); - aCoordVa.Clear(); - // - Path(aGAS, myFace, aVa, aEOuta, anEdgeInfo, aLS, - aVertVa, aCoordVa, myShapes, mySmartMap); - } - } - } - // - { - Standard_Integer aNbV, aNbE; - TopoDS_Vertex aV1, aV2; - BOPTColStd_ListOfListOfShape aShapes; - BOPTColStd_ListIteratorOfListOfListOfShape anItW(myShapes); - - for (; anItW.More(); anItW.Next()) { - TopTools_IndexedMapOfShape aMV, aME; - const TopTools_ListOfShape& aLE=anItW.Value(); - TopTools_ListIteratorOfListOfShape anItE(aLE); - for (; anItE.More(); anItE.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(anItE.Value()); - aME.Add(aE); - TopExp::Vertices(aE, aV1, aV2); - aMV.Add(aV1); - aMV.Add(aV2); - } - aNbV=aMV.Extent(); - aNbE=aME.Extent(); - if (aNbV<=aNbE) { - aShapes.Append(aLE); - } - } - // - myShapes.Clear(); - anItW.Initialize(aShapes); - for (; anItW.More(); anItW.Next()) { - const TopTools_ListOfShape& aLE=anItW.Value(); - myShapes.Append(aLE); - } - } - // - myErrorStatus=0; -} -//======================================================================= -// function: Path -// purpose: -//======================================================================= - void Path (const GeomAdaptor_Surface& aGAS, - const TopoDS_Face& myFace, - const TopoDS_Vertex& aVa, - const TopoDS_Edge& aEOuta, - BOP_EdgeInfo& anEdgeInfo, - TopTools_SequenceOfShape& aLS, - TopTools_SequenceOfShape& aVertVa, - TColgp_SequenceOfPnt2d& aCoordVa, - BOPTColStd_ListOfListOfShape& myShapes, - BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap) -{ - Standard_Integer i,j, aNb, aNbj, iCnt; - Standard_Real aTol, anAngleIn, anAngleOut, anAngle, aMinAngle; - Standard_Real aTol2D, aTol2D2; - Standard_Real aTol2, aD2; - Standard_Boolean anIsSameV2d, anIsSameV, anIsFound, anIsOut, anIsNotPassed; - BOP_ListIteratorOfListOfEdgeInfo anIt; - TopoDS_Vertex aVb; - TopoDS_Edge aEOutb; - // - aTol=1.e-7; - // - // append block - // - // Do not escape through edge from which you enter - aNb=aLS.Length(); - if (aNb==1) { - const TopoDS_Shape& anEPrev=aLS(aNb); - if (anEPrev.IsSame(aEOuta)) { - return; - } - } - // - // - anEdgeInfo.SetPassed(Standard_True); - aLS.Append(aEOuta); - aVertVa.Append(aVa); - - TopoDS_Vertex pVa=aVa; - pVa.Orientation(TopAbs_FORWARD); - gp_Pnt2d aPa=Coord2d(pVa, aEOuta, myFace); - aCoordVa.Append(aPa); - - GetNextVertex (pVa, aEOuta, aVb); - - gp_Pnt2d aPb=Coord2d(aVb, aEOuta, myFace); - // - aTol=2.*Tolerance2D(aVb, aGAS); - aTol2=10.*aTol*aTol; - // - aNb=aLS.Length(); - if (aNb>0) { - // - TopTools_ListOfShape aBuf; - // - for (i=aNb; i>0; i--) { - const TopoDS_Shape& aVPrev=aVertVa(i); - const gp_Pnt2d& aPaPrev=aCoordVa(i); - const TopoDS_Shape& aEPrev=aLS(i); - - aBuf.Append(aEPrev); - - anIsSameV=aVPrev.IsSame(aVb); - anIsSameV2d=Standard_False; - - if (anIsSameV) { - anIsSameV2d = Standard_True; - // - aD2=aPaPrev.SquareDistance(aPb); - anIsSameV2d =aD2 aTol2D2){ - continue; - } - // - anAngleOut=anEI.Angle(); - // - anAngle=ClockWiseAngle(anAngleIn, anAngleOut); - if (anAngle < aMinAngle) { - aMinAngle=anAngle; - pEdgeInfo=&anEI; - anIsFound=Standard_True; - } - } - } // for (; anIt.More(); anIt.Next()) - // - if (!anIsFound) { - // no way to go . (Error) - return; - } - // - aEOutb=pEdgeInfo->Edge(); - // - Path (aGAS, myFace, aVb, aEOutb, *pEdgeInfo, aLS, - aVertVa, aCoordVa, myShapes, mySmartMap); -} -//======================================================================= -// function: Coord2dVf -// purpose: -//======================================================================= - gp_Pnt2d Coord2dVf (const TopoDS_Edge& aE, - const TopoDS_Face& aF) -{ - Standard_Real aCoord=99.; - gp_Pnt2d aP2D1(aCoord, aCoord); - TopoDS_Iterator aIt; - // - aIt.Initialize(aE); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aVx=aIt.Value(); - if (aVx.Orientation()==TopAbs_FORWARD) { - const TopoDS_Vertex& aVxx=TopoDS::Vertex(aVx); - aP2D1=Coord2d(aVxx, aE, aF); - return aP2D1; - } - } - return aP2D1; -} -//======================================================================= -// function: Tolerance2D -// purpose: -//======================================================================= - Standard_Real Tolerance2D (const TopoDS_Vertex& aV, - const GeomAdaptor_Surface& aGAS) -{ - Standard_Real aTol2D, anUr, aVr, aTolV3D; - GeomAbs_SurfaceType aType; - // - aType=aGAS.GetType(); - aTolV3D=BRep_Tool::Tolerance(aV); - - anUr=aGAS.UResolution(aTolV3D); - aVr =aGAS.VResolution(aTolV3D); - aTol2D=(aVr>anUr) ? aVr : anUr; - // - if (aType==GeomAbs_BSplineSurface|| - aType==GeomAbs_Sphere|| - GeomAbs_SurfaceOfRevolution) { - if (aTol2D < aTolV3D) { - aTol2D=aTolV3D; - } - } - if (aType==GeomAbs_BSplineSurface) { - aTol2D=1.1*aTol2D; - } - // - return aTol2D; -} - -//======================================================================= -// function: Coord2d -// purpose: -//======================================================================= - gp_Pnt2d Coord2d (const TopoDS_Vertex& aV1, - const TopoDS_Edge& aE1, - const TopoDS_Face& aF) -{ - Standard_Real aT, aFirst, aLast; - Handle(Geom2d_Curve) aC2D; - gp_Pnt2d aP2D1; - // - aT=BRep_Tool::Parameter (aV1, aE1, aF); - aC2D=BRep_Tool::CurveOnSurface(aE1, aF, aFirst, aLast); - aC2D->D0 (aT, aP2D1); - // - return aP2D1; -} -//======================================================================= -// function: AngleIn -// purpose: -//======================================================================= - Standard_Real AngleIn(const TopoDS_Edge& aEIn, - const BOP_ListOfEdgeInfo& aLEInfo) -{ - Standard_Real anAngleIn; - Standard_Boolean anIsIn; - BOP_ListIteratorOfListOfEdgeInfo anIt; - - anIt.Initialize(aLEInfo); - for (; anIt.More(); anIt.Next()) { - BOP_EdgeInfo& anEdgeInfo=anIt.Value(); - const TopoDS_Edge& aE=anEdgeInfo.Edge(); - anIsIn=anEdgeInfo.IsIn(); - // - if (anIsIn && aE==aEIn) { - anAngleIn=anEdgeInfo.Angle(); - return anAngleIn; - } - } - anAngleIn=0.; - return anAngleIn; -} -//======================================================================= -// function: ClockWiseAngle -// purpose: -//======================================================================= - Standard_Real ClockWiseAngle(const Standard_Real aAngleIn, - const Standard_Real aAngleOut) -{ - Standard_Real aTwoPi = M_PI+M_PI; - Standard_Real dA, A1, A2, AIn, AOut ; - - AIn=aAngleIn; - AOut=aAngleOut; - if (AIn >= aTwoPi) { - AIn=AIn-aTwoPi; - } - - if (AOut >= aTwoPi) { - AOut=AOut-aTwoPi; - } - - A1 = AIn + M_PI; - - if (A1 >= aTwoPi) { - A1=A1-aTwoPi; - } - - A2=AOut; - - dA=A1-A2; - if (dA <= 0.) { - dA=aTwoPi+dA; - if (dA <= 1.e-14) { - dA=aTwoPi; - } - } - //xx - else if (dA <= 1.e-14) { - dA=aTwoPi; - } - return dA; -} -//======================================================================= -// function: GetNextVertex -// purpose: -//======================================================================= - void GetNextVertex(const TopoDS_Vertex& aV, - const TopoDS_Edge& aE, - TopoDS_Vertex& aV1) -{ - TopoDS_Iterator aIt; - // - aIt.Initialize(aE); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aVx=aIt.Value(); - if (!aVx.IsEqual(aV)) { - aV1=TopoDS::Vertex(aVx); - return ; - } - } - aV1=aV; -} -//======================================================================= -// function: Angle2D -// purpose: -//======================================================================= - Standard_Real Angle2D (const TopoDS_Vertex& aV, - const TopoDS_Edge& anEdge, - const TopoDS_Face& myFace, - const GeomAdaptor_Surface& aGAS, - const Standard_Boolean aFlag) -{ - Standard_Real aFirst, aLast, aToler, dt, aTV, aTV1, anAngle, aTX; - gp_Pnt2d aPV, aPV1; - gp_Vec2d aV2D; - Handle(Geom2d_Curve) aC2D; - // - aTV=BRep_Tool::Parameter (aV, anEdge, myFace); - if (Precision::IsInfinite(aTV)) { - return 0.; - } - // - BOPTools_Tools2D::CurveOnSurface (anEdge, myFace, aC2D, - aFirst, aLast, aToler, Standard_True); - //dt=1.e-7; - dt=2.*Tolerance2D(aV, aGAS); - // - aTX=0.25*(aLast - aFirst); - if(dt > aTX) { - // to save direction of the curve as much as it possible - // in the case of big tolerances - dt = aTX; - } - // - if (fabs (aTV-aFirst) < fabs(aTV - aLast)) { - aTV1=aTV + dt; - } - else { - aTV1=aTV - dt; - } - // - aC2D->D0 (aTV, aPV); - aC2D->D0 (aTV1, aPV1); - // - if (aFlag) {//IN - gp_Vec2d aV2DIn(aPV1, aPV); - aV2D=aV2DIn; - } - else { - gp_Vec2d aV2DOut(aPV, aPV1); - aV2D=aV2DOut; - } - // - gp_Dir2d aDir2D(aV2D); - anAngle=Angle(aDir2D); - // - return anAngle; -} -//======================================================================= -// function: Angle -// purpose: -//======================================================================= -Standard_Real Angle (const gp_Dir2d& aDir2D) -{ - gp_Dir2d aRefDir(1., 0.); - Standard_Real anAngle = aRefDir.Angle(aDir2D); - - if (anAngle < 0.) - anAngle += M_PI + M_PI; - - return anAngle; -} -//modified by NIZNHY-PKV Thu Apr 19 09:02:04 2012f -//======================================================================= -// function: NbWaysOut -// purpose: -//======================================================================= -Standard_Integer NbWaysOut(const TopoDS_Edge& aEOuta, - const BOP_ListOfEdgeInfo& aLEInfo) -{ - Standard_Boolean bIsOut, bIsNotPassed; - Standard_Integer iCnt=0; - BOP_ListIteratorOfListOfEdgeInfo anIt; - // - anIt.Initialize(aLEInfo); - for (; anIt.More(); anIt.Next()) { - BOP_EdgeInfo& aEI=anIt.Value(); - const TopoDS_Edge& aE=aEI.Edge(); - bIsOut=!aEI.IsIn(); - bIsNotPassed=!aEI.Passed(); - if (bIsOut && bIsNotPassed) { - if (!aE.IsSame(aEOuta)) { - iCnt++; - } - } - } - return iCnt; -} -/* -//======================================================================= -// function: NbWaysOut -// purpose: -//======================================================================= -Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& aLEInfo) -{ - Standard_Boolean bIsOut, bIsNotPassed; - Standard_Integer iCnt=0; - BOP_ListIteratorOfListOfEdgeInfo anIt; - // - anIt.Initialize(aLEInfo); - for (; anIt.More(); anIt.Next()) { - BOP_EdgeInfo& anEI=anIt.Value(); - // - bIsOut=!anEI.IsIn(); - bIsNotPassed=!anEI.Passed(); - if (bIsOut && bIsNotPassed) { - iCnt++; - } - } - return iCnt; -} -*/ -//modified by NIZNHY-PKV Thu Apr 19 09:01:57 2012t diff --git a/src/GEOMAlgo_NEW/GEOMAlgo_WireSplitter.hxx b/src/GEOMAlgo_NEW/GEOMAlgo_WireSplitter.hxx deleted file mode 100644 index cbfc9ff05..000000000 --- a/src/GEOMAlgo_NEW/GEOMAlgo_WireSplitter.hxx +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: GEOMAlgo_WireSplitter.hxx -// Author: Peter KURNEV - -#ifndef _GEOMAlgo_WireSplitter_HeaderFile -#define _GEOMAlgo_WireSplitter_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include - -//! the algorithm to split multiconnexed set of edges
-//! wires on a face onto simple connexed wires
-//! .
-//======================================================================= -//class : GEOMAlgo_WireSplitter -//purpose : -//======================================================================= -class GEOMAlgo_WireSplitter : public GEOMAlgo_Algo -{ -public: - Standard_EXPORT - GEOMAlgo_WireSplitter(); - - Standard_EXPORT - virtual ~GEOMAlgo_WireSplitter(); - - Standard_EXPORT - void SetFace(const TopoDS_Face& aF) ; - - Standard_EXPORT - void SetEdges(const TopTools_ListOfShape& aLE) ; - - Standard_EXPORT - const TopTools_ListOfShape& Edges() const; - - Standard_EXPORT - virtual void Perform() ; - - Standard_EXPORT - Standard_Boolean IsNothingToDo() const; - - Standard_EXPORT - const TopoDS_Face& Face() const; - - Standard_EXPORT - const BOPTColStd_ListOfListOfShape& Shapes() const; - -protected: - TopoDS_Face myFace; - Standard_Boolean myIsDone; - Standard_Boolean myNothingToDo; - BOPTColStd_ListOfListOfShape myShapes; - BOP_IndexedDataMapOfVertexListEdgeInfo mySmartMap; - TopTools_ListOfShape myEdges; -}; - -#endif diff --git a/src/GEOMAlgo_NEW/Handle_BlockFix_BlockFixAPI.hxx b/src/GEOMAlgo_NEW/Handle_BlockFix_BlockFixAPI.hxx deleted file mode 100644 index 3fce5be46..000000000 --- a/src/GEOMAlgo_NEW/Handle_BlockFix_BlockFixAPI.hxx +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_BlockFix_BlockFixAPI_HeaderFile -#define _Handle_BlockFix_BlockFixAPI_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_MMgt_TShared_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(MMgt_TShared); -class BlockFix_BlockFixAPI; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(BlockFix_BlockFixAPI); - -class Handle(BlockFix_BlockFixAPI) : public Handle(MMgt_TShared) { - 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(BlockFix_BlockFixAPI)():Handle(MMgt_TShared)() {} - Handle(BlockFix_BlockFixAPI)(const Handle(BlockFix_BlockFixAPI)& aHandle) : Handle(MMgt_TShared)(aHandle) - { - } - - Handle(BlockFix_BlockFixAPI)(const BlockFix_BlockFixAPI* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) - { - } - - Handle(BlockFix_BlockFixAPI)& operator=(const Handle(BlockFix_BlockFixAPI)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(BlockFix_BlockFixAPI)& operator=(const BlockFix_BlockFixAPI* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - BlockFix_BlockFixAPI* operator->() - { - return (BlockFix_BlockFixAPI *)ControlAccess(); - } - - BlockFix_BlockFixAPI* operator->() const - { - return (BlockFix_BlockFixAPI *)ControlAccess(); - } - - Standard_EXPORT ~Handle(BlockFix_BlockFixAPI)(); - - Standard_EXPORT static const Handle(BlockFix_BlockFixAPI) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo_NEW/Handle_BlockFix_PeriodicSurfaceModifier.hxx b/src/GEOMAlgo_NEW/Handle_BlockFix_PeriodicSurfaceModifier.hxx deleted file mode 100644 index 1cb29e022..000000000 --- a/src/GEOMAlgo_NEW/Handle_BlockFix_PeriodicSurfaceModifier.hxx +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_BlockFix_PeriodicSurfaceModifier_HeaderFile -#define _Handle_BlockFix_PeriodicSurfaceModifier_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_BRepTools_Modification_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(BRepTools_Modification); -class BlockFix_PeriodicSurfaceModifier; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(BlockFix_PeriodicSurfaceModifier); - -class Handle(BlockFix_PeriodicSurfaceModifier) : public Handle(BRepTools_Modification) { - 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(BlockFix_PeriodicSurfaceModifier)():Handle(BRepTools_Modification)() {} - Handle(BlockFix_PeriodicSurfaceModifier)(const Handle(BlockFix_PeriodicSurfaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle) - { - } - - Handle(BlockFix_PeriodicSurfaceModifier)(const BlockFix_PeriodicSurfaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem) - { - } - - Handle(BlockFix_PeriodicSurfaceModifier)& operator=(const Handle(BlockFix_PeriodicSurfaceModifier)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(BlockFix_PeriodicSurfaceModifier)& operator=(const BlockFix_PeriodicSurfaceModifier* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - BlockFix_PeriodicSurfaceModifier* operator->() - { - return (BlockFix_PeriodicSurfaceModifier *)ControlAccess(); - } - - BlockFix_PeriodicSurfaceModifier* operator->() const - { - return (BlockFix_PeriodicSurfaceModifier *)ControlAccess(); - } - - Standard_EXPORT ~Handle(BlockFix_PeriodicSurfaceModifier)(); - - Standard_EXPORT static const Handle(BlockFix_PeriodicSurfaceModifier) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo_NEW/Handle_BlockFix_SphereSpaceModifier.hxx b/src/GEOMAlgo_NEW/Handle_BlockFix_SphereSpaceModifier.hxx deleted file mode 100644 index 33dc8a198..000000000 --- a/src/GEOMAlgo_NEW/Handle_BlockFix_SphereSpaceModifier.hxx +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_BlockFix_SphereSpaceModifier_HeaderFile -#define _Handle_BlockFix_SphereSpaceModifier_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_BRepTools_Modification_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(BRepTools_Modification); -class BlockFix_SphereSpaceModifier; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(BlockFix_SphereSpaceModifier); - -class Handle(BlockFix_SphereSpaceModifier) : public Handle(BRepTools_Modification) { - 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(BlockFix_SphereSpaceModifier)():Handle(BRepTools_Modification)() {} - Handle(BlockFix_SphereSpaceModifier)(const Handle(BlockFix_SphereSpaceModifier)& aHandle) : Handle(BRepTools_Modification)(aHandle) - { - } - - Handle(BlockFix_SphereSpaceModifier)(const BlockFix_SphereSpaceModifier* anItem) : Handle(BRepTools_Modification)((BRepTools_Modification *)anItem) - { - } - - Handle(BlockFix_SphereSpaceModifier)& operator=(const Handle(BlockFix_SphereSpaceModifier)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(BlockFix_SphereSpaceModifier)& operator=(const BlockFix_SphereSpaceModifier* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - BlockFix_SphereSpaceModifier* operator->() - { - return (BlockFix_SphereSpaceModifier *)ControlAccess(); - } - - BlockFix_SphereSpaceModifier* operator->() const - { - return (BlockFix_SphereSpaceModifier *)ControlAccess(); - } - - Standard_EXPORT ~Handle(BlockFix_SphereSpaceModifier)(); - - Standard_EXPORT static const Handle(BlockFix_SphereSpaceModifier) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMAlgo_NEW/Makefile.am b/src/GEOMAlgo_NEW/Makefile.am deleted file mode 100644 index ef79bda69..000000000 --- a/src/GEOMAlgo_NEW/Makefile.am +++ /dev/null @@ -1,226 +0,0 @@ -# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it 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 -# - -# GEOM GEOMAlgo : tools for Glue Faces algorithm -# File : Makefile.am -# Author : Julia DOROVSKIKH -# Module : GEOM - -include $(top_srcdir)/adm_local/unix/make_common_starter.am - -# Libraries targets -lib_LTLIBRARIES = libGEOMAlgo.la - -dist_libGEOMAlgo_la_SOURCES = \ - BlockFix_BlockFixAPI.cxx \ - BlockFix_CheckTool.cxx \ - BlockFix.cxx \ - BlockFix_PeriodicSurfaceModifier.cxx \ - BlockFix_SphereSpaceModifier.cxx \ - 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_ClsfSolid.cxx \ - GEOMAlgo_ClsfSurf.cxx \ - GEOMAlgo_CoupleOfShapes.cxx \ - GEOMAlgo_FinderShapeOn1.cxx \ - GEOMAlgo_FinderShapeOn2.cxx \ - GEOMAlgo_FinderShapeOn.cxx \ - GEOMAlgo_FinderShapeOnQuad.cxx \ - GEOMAlgo_GetInPlace_1.cxx \ - GEOMAlgo_GetInPlace_2.cxx \ - GEOMAlgo_GetInPlace_3.cxx \ - GEOMAlgo_GetInPlace.cxx \ - GEOMAlgo_GlueAnalyser.cxx \ - GEOMAlgo_GlueDetector.cxx \ - GEOMAlgo_Gluer2_1.cxx \ - GEOMAlgo_Gluer2_2.cxx \ - GEOMAlgo_Gluer2_3.cxx \ - GEOMAlgo_Gluer2.cxx \ - GEOMAlgo_GluerAlgo.cxx \ - GEOMAlgo_Gluer.cxx \ - GEOMAlgo_HAlgo.cxx \ - GEOMAlgo_PassKey.cxx \ - GEOMAlgo_PassKeyMapHasher.cxx \ - GEOMAlgo_PassKeyShape.cxx \ - GEOMAlgo_PassKeyShapeMapHasher.cxx \ - GEOMAlgo_ShapeAlgo.cxx \ - GEOMAlgo_ShapeInfo.cxx \ - GEOMAlgo_ShapeInfoFiller_1.cxx \ - GEOMAlgo_ShapeInfoFiller.cxx \ - GEOMAlgo_ShapeSet.cxx \ - GEOMAlgo_ShapeSolid.cxx \ - GEOMAlgo_ShellSolid.cxx \ - GEOMAlgo_SolidSolid.cxx \ - GEOMAlgo_Splitter.cxx \ - GEOMAlgo_StateCollector.cxx \ - GEOMAlgo_SurfaceTools.cxx \ - GEOMAlgo_Tools_1.cxx \ - GEOMAlgo_Tools3D.cxx \ - GEOMAlgo_Tools.cxx \ - GEOMAlgo_VertexSolid.cxx \ - GEOMAlgo_WESCorrector.cxx \ - GEOMAlgo_WESScaler.cxx \ - GEOMAlgo_WireEdgeSet.cxx \ - GEOMAlgo_WireSolid.cxx \ - GEOMAlgo_WireSplitter.cxx - -# header files -salomeinclude_HEADERS = \ - BlockFix.hxx \ - BlockFix.ixx \ - BlockFix.jxx \ - BlockFix_BlockFixAPI.hxx \ - BlockFix_BlockFixAPI.ixx \ - BlockFix_BlockFixAPI.jxx \ - BlockFix_BlockFixAPI.lxx \ - BlockFix_CheckTool.hxx \ - BlockFix_CheckTool.ixx \ - BlockFix_CheckTool.jxx \ - BlockFix_PeriodicSurfaceModifier.hxx \ - BlockFix_PeriodicSurfaceModifier.ixx \ - BlockFix_PeriodicSurfaceModifier.jxx \ - BlockFix_SphereSpaceModifier.hxx \ - BlockFix_SphereSpaceModifier.ixx \ - BlockFix_SphereSpaceModifier.jxx \ - BlockFix_UnionEdges.hxx \ - BlockFix_UnionEdges.ixx \ - BlockFix_UnionEdges.jxx \ - BlockFix_UnionFaces.hxx \ - BlockFix_UnionFaces.ixx \ - BlockFix_UnionFaces.jxx \ - Handle_BlockFix_BlockFixAPI.hxx \ - Handle_BlockFix_SphereSpaceModifier.hxx \ - Handle_BlockFix_PeriodicSurfaceModifier.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_ClsfSolid.hxx \ - GEOMAlgo_ClsfSurf.hxx \ - GEOMAlgo_CoupleOfShapes.hxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx \ - GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx \ - GEOMAlgo_DataMapOfOrientedShapeShape.hxx \ - GEOMAlgo_DataMapOfPassKeyInteger.hxx \ - GEOMAlgo_DataMapOfPassKeyShapeShape.hxx \ - GEOMAlgo_DataMapOfRealListOfShape.hxx \ - GEOMAlgo_DataMapOfShapeMapOfShape.hxx \ - GEOMAlgo_DataMapOfShapePnt.hxx \ - GEOMAlgo_DataMapOfShapeReal.hxx \ - GEOMAlgo_DataMapOfShapeShapeSet.hxx \ - GEOMAlgo_FinderShapeOn1.hxx \ - GEOMAlgo_FinderShapeOn2.hxx \ - GEOMAlgo_FinderShapeOn.hxx \ - GEOMAlgo_FinderShapeOnQuad.hxx \ - GEOMAlgo_GetInPlace.hxx \ - GEOMAlgo_GlueAnalyser.hxx \ - GEOMAlgo_GlueDetector.hxx \ - GEOMAlgo_Gluer2.hxx \ - GEOMAlgo_GluerAlgo.hxx \ - GEOMAlgo_Gluer.hxx \ - GEOMAlgo_HAlgo.hxx \ - GEOMAlgo_IndexedDataMapOfIntegerShape.hxx \ - GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx \ - GEOMAlgo_IndexedDataMapOfShapeBox.hxx \ - GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx \ - GEOMAlgo_IndexedDataMapOfShapeState.hxx \ - GEOMAlgo_KindOfBounds.hxx \ - GEOMAlgo_KindOfClosed.hxx \ - GEOMAlgo_KindOfName.hxx \ - GEOMAlgo_KindOfShape.hxx \ - GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx \ - GEOMAlgo_ListIteratorOfListOfPnt.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_ShapeInfo.hxx \ - GEOMAlgo_ShapeInfoFiller.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_WESScaler.hxx \ - GEOMAlgo_WireEdgeSet.hxx \ - GEOMAlgo_WireSolid.hxx \ - GEOMAlgo_WireSplitter.hxx - -libGEOMAlgo_la_CPPFLAGS = \ - $(CAS_CPPFLAGS) \ - $(KERNEL_CXXFLAGS) \ - -I$(srcdir)/../$(NMTDS_VAR) \ - -I$(srcdir)/../$(NMTTools_VAR) - -libGEOMAlgo_la_LDFLAGS = \ - ../$(NMTTools_VAR)/libNMTTools.la \ - $(STDLIB) \ - $(CAS_LDPATH) -lTKBO -lTKShHealing -lTKBool -lTKMesh \ - $(KERNEL_LDFLAGS) -lSALOMELocalTrace - -# extra distributed files -CDL_FILES = \ - BlockFix.cdl \ - BlockFix_BlockFixAPI.cdl \ - BlockFix_CheckTool.cdl \ - BlockFix_PeriodicSurfaceModifier.cdl \ - BlockFix_SphereSpaceModifier.cdl \ - BlockFix_UnionEdges.cdl \ - BlockFix_UnionFaces.cdl \ - GEOMAlgo.cdl - -EXTRA_DIST += \ - $(CDL_FILES) \ - FILES diff --git a/src/GEOMImpl/Makefile.am b/src/GEOMImpl/Makefile.am index dc948c6e9..275c4d529 100644 --- a/src/GEOMImpl/Makefile.am +++ b/src/GEOMImpl/Makefile.am @@ -240,17 +240,17 @@ libGEOMimpl_la_CPPFLAGS = \ $(BOOST_CPPFLAGS) \ $(PYTHON_INCLUDES) \ -I$(srcdir)/../ShHealOper \ - -I$(srcdir)/../$(NMTDS_VAR) \ - -I$(srcdir)/../$(NMTTools_VAR) \ + -I$(srcdir)/../NMTDS \ + -I$(srcdir)/../NMTTools \ -I$(srcdir)/../GEOM \ - -I$(srcdir)/../$(GEOMAlgo_VAR) \ + -I$(srcdir)/../GEOMAlgo \ -I$(srcdir)/../SKETCHER \ -I$(srcdir)/../ARCHIMEDE \ -I$(top_builddir)/idl libGEOMimpl_la_LDFLAGS = \ ../GEOM/libGEOMbasic.la \ - ../$(GEOMAlgo_VAR)/libGEOMAlgo.la \ + ../GEOMAlgo/libGEOMAlgo.la \ ../ShHealOper/libShHealOper.la \ ../ARCHIMEDE/libGEOMArchimede.la \ ../SKETCHER/libGEOMSketcher.la \ diff --git a/src/GEOM_I/Makefile.am b/src/GEOM_I/Makefile.am index e6f4a825c..dfdba30a5 100644 --- a/src/GEOM_I/Makefile.am +++ b/src/GEOM_I/Makefile.am @@ -79,7 +79,7 @@ libGEOMEngine_la_CPPFLAGS = \ -I$(srcdir)/../SKETCHER \ -I$(srcdir)/../ARCHIMEDE \ -I$(srcdir)/../GEOMImpl \ - -I$(srcdir)/../$(GEOMAlgo_VAR) \ + -I$(srcdir)/../GEOMAlgo \ -I$(srcdir)/../GEOM \ -I$(top_builddir)/idl diff --git a/src/GEOM_I_Superv/Makefile.am b/src/GEOM_I_Superv/Makefile.am index 2cf693d60..ca96283db 100644 --- a/src/GEOM_I_Superv/Makefile.am +++ b/src/GEOM_I_Superv/Makefile.am @@ -55,7 +55,7 @@ libGEOM_SupervEngine_la_CPPFLAGS = \ -I$(srcdir)/../GEOMImpl \ -I$(srcdir)/../GEOM \ -I$(srcdir)/../GEOM_I \ - -I$(srcdir)/../$(GEOMAlgo_VAR) \ + -I$(srcdir)/../GEOMAlgo \ -I$(top_builddir)/idl libGEOM_SupervEngine_la_LDFLAGS = \ diff --git a/src/Makefile.am b/src/Makefile.am index 795831ae7..862b90287 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,22 +21,11 @@ # Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com) # Package : src (source files directory) -SUBDIRS = ARCHIMEDE $(NMTDS_VAR) $(NMTTools_VAR) $(GEOMAlgo_VAR) SKETCHER OCC2VTK GEOM \ +SUBDIRS = ARCHIMEDE NMTDS NMTTools GEOMAlgo SKETCHER OCC2VTK GEOM \ BREPExport BREPImport IGESExport IGESImport STEPExport \ STEPImport STLExport VTKExport ShHealOper GEOMImpl GEOM_I \ GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY -#if PARTITION_OLD_PACKAGING -# SUBDIRS += NMTDS NMTTools GEOMAlgo -#else -# SUBDIRS += NMTDS_NEW NMTTools_NEW GEOMAlgo_NEW -#endif -# -# SUBDIRS += SKETCHER OCC2VTK GEOM \ -# BREPExport BREPImport IGESExport IGESImport STEPExport \ -# STEPImport STLExport VTKExport ShHealOper GEOMImpl GEOM_I \ -# GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY - if WITH_OPENCV SUBDIRS += ShapeRecognition endif @@ -48,8 +37,8 @@ if GEOM_ENABLE_GUI GroupGUI BlocksGUI AdvancedGUI GEOM_SWIG_WITHIHM endif -DIST_SUBDIRS = ARCHIMEDE NMTDS NMTTools GEOMAlgo NMTDS_NEW NMTTools_NEW GEOMAlgo_NEW \ - SKETCHER OCC2VTK GEOM BREPExport\ +DIST_SUBDIRS = ARCHIMEDE NMTDS NMTTools GEOMAlgo \ + SKETCHER OCC2VTK GEOM BREPExport \ BREPImport IGESExport IGESImport STEPExport STEPImport STLExport \ VTKExport ShHealOper GEOMImpl GEOM_I GEOMClient GEOM_I_Superv \ GEOM_SWIG OBJECT DlgRef GEOMFiltersSelection Material GEOMGUI GEOMBase \ diff --git a/src/NMTDS_NEW/FILES b/src/NMTDS/FILES similarity index 100% rename from src/NMTDS_NEW/FILES rename to src/NMTDS/FILES diff --git a/src/NMTDS/Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx b/src/NMTDS/Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx deleted file mode 100644 index 8de3ea25d..000000000 --- a/src/NMTDS/Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile -#define _Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger); - -class Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) : public Handle(TCollection_MapNode) { - public: - Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)():Handle(TCollection_MapNode)() {} - Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)(const Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)(const NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)& operator=(const Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)& operator=(const NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger* operator->() const - { - return (NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)(); - - Standard_EXPORT static const Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx deleted file mode 100644 index 965b6cfcf..000000000 --- a/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile -#define _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger); - -class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) : public Handle(TCollection_MapNode) { - public: - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)():Handle(TCollection_MapNode)() {} - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& operator=(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& operator=(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const - { - return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(); - - Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx b/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx deleted file mode 100644 index e07627aec..000000000 --- a/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile -#define _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape); - -class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) : public Handle(TCollection_MapNode) { - public: - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)():Handle(TCollection_MapNode)() {} - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& operator=(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)& operator=(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape* operator->() const - { - return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)(); - - Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx b/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx deleted file mode 100644 index 7bac03fc0..000000000 --- a/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile -#define _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere); - -class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) : public Handle(TCollection_MapNode) { - public: - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)():Handle(TCollection_MapNode)() {} - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)& operator=(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)& operator=(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere* operator->() const - { - return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)(); - - Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx b/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx deleted file mode 100644 index 8f35c8719..000000000 --- a/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile -#define _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox); - -class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) : public Handle(TCollection_MapNode) { - public: - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)():Handle(TCollection_MapNode)() {} - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& operator=(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)& operator=(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox* operator->() const - { - return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)(); - - Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx deleted file mode 100644 index 520709f89..000000000 --- a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#define _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors); - -class Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) : public Handle(TCollection_MapNode) { - public: - Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)():Handle(TCollection_MapNode)() {} - Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& operator=(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& operator=(const NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const - { - return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(); - - Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPair.hxx b/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPair.hxx deleted file mode 100644 index 4262ba849..000000000 --- a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPair.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_ListNodeOfListOfPair_HeaderFile -#define _Handle_NMTDS_ListNodeOfListOfPair_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle(Standard_Type); -class Handle(TCollection_MapNode); -class NMTDS_ListNodeOfListOfPair; - -DEFINE_STANDARD_HANDLE(NMTDS_ListNodeOfListOfPair,TCollection_MapNode) - -#endif diff --git a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPairBoolean.hxx b/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPairBoolean.hxx deleted file mode 100644 index 3d61c80e2..000000000 --- a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPairBoolean.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_ListNodeOfListOfPairBoolean_HeaderFile -#define _Handle_NMTDS_ListNodeOfListOfPairBoolean_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle(Standard_Type); -class Handle(TCollection_MapNode); -class NMTDS_ListNodeOfListOfPairBoolean; - -DEFINE_STANDARD_HANDLE(NMTDS_ListNodeOfListOfPairBoolean,TCollection_MapNode) - -#endif diff --git a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPassKey.hxx b/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPassKey.hxx deleted file mode 100644 index 33d31ff1f..000000000 --- a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPassKey.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_ListNodeOfListOfPassKey_HeaderFile -#define _Handle_NMTDS_ListNodeOfListOfPassKey_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTDS_ListNodeOfListOfPassKey; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKey); - -class Handle(NMTDS_ListNodeOfListOfPassKey) : public Handle(TCollection_MapNode) { - public: - Handle(NMTDS_ListNodeOfListOfPassKey)():Handle(TCollection_MapNode)() {} - Handle(NMTDS_ListNodeOfListOfPassKey)(const Handle(NMTDS_ListNodeOfListOfPassKey)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTDS_ListNodeOfListOfPassKey)(const NMTDS_ListNodeOfListOfPassKey* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTDS_ListNodeOfListOfPassKey)& operator=(const Handle(NMTDS_ListNodeOfListOfPassKey)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTDS_ListNodeOfListOfPassKey)& operator=(const NMTDS_ListNodeOfListOfPassKey* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTDS_ListNodeOfListOfPassKey* operator->() const - { - return (NMTDS_ListNodeOfListOfPassKey *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfPassKey)(); - - Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfPassKey) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx b/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx deleted file mode 100644 index 12f0edcf2..000000000 --- a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile -#define _Handle_NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTDS_ListNodeOfListOfPassKeyBoolean; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKeyBoolean); - -class Handle(NMTDS_ListNodeOfListOfPassKeyBoolean) : public Handle(TCollection_MapNode) { - public: - Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)():Handle(TCollection_MapNode)() {} - Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)(const Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)(const NMTDS_ListNodeOfListOfPassKeyBoolean* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)& operator=(const Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)& operator=(const NMTDS_ListNodeOfListOfPassKeyBoolean* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTDS_ListNodeOfListOfPassKeyBoolean* operator->() const - { - return (NMTDS_ListNodeOfListOfPassKeyBoolean *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)(); - - Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfPassKeyBoolean) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPairBoolean.hxx b/src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPairBoolean.hxx deleted file mode 100644 index 9aaee498a..000000000 --- a/src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPairBoolean.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile -#define _Handle_NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle(Standard_Type); -class Handle(TCollection_MapNode); -class NMTDS_StdMapNodeOfMapOfPairBoolean; - -DEFINE_STANDARD_HANDLE(NMTDS_StdMapNodeOfMapOfPairBoolean,TCollection_MapNode) - -#endif diff --git a/src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx b/src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx deleted file mode 100644 index 927c075aa..000000000 --- a/src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile -#define _Handle_NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTDS_StdMapNodeOfMapOfPassKey; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKey); - -class Handle(NMTDS_StdMapNodeOfMapOfPassKey) : public Handle(TCollection_MapNode) { - public: - Handle(NMTDS_StdMapNodeOfMapOfPassKey)():Handle(TCollection_MapNode)() {} - Handle(NMTDS_StdMapNodeOfMapOfPassKey)(const Handle(NMTDS_StdMapNodeOfMapOfPassKey)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTDS_StdMapNodeOfMapOfPassKey)(const NMTDS_StdMapNodeOfMapOfPassKey* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTDS_StdMapNodeOfMapOfPassKey)& operator=(const Handle(NMTDS_StdMapNodeOfMapOfPassKey)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTDS_StdMapNodeOfMapOfPassKey)& operator=(const NMTDS_StdMapNodeOfMapOfPassKey* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTDS_StdMapNodeOfMapOfPassKey* operator->() const - { - return (NMTDS_StdMapNodeOfMapOfPassKey *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTDS_StdMapNodeOfMapOfPassKey)(); - - Standard_EXPORT static const Handle(NMTDS_StdMapNodeOfMapOfPassKey) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx b/src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx deleted file mode 100644 index 8a889dda8..000000000 --- a/src/NMTDS/Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile -#define _Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTDS_StdMapNodeOfMapOfPassKeyBoolean; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKeyBoolean); - -class Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) : public Handle(TCollection_MapNode) { - public: - Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)():Handle(TCollection_MapNode)() {} - Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)(const Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)(const NMTDS_StdMapNodeOfMapOfPassKeyBoolean* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)& operator=(const Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)& operator=(const NMTDS_StdMapNodeOfMapOfPassKeyBoolean* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTDS_StdMapNodeOfMapOfPassKeyBoolean* operator->() const - { - return (NMTDS_StdMapNodeOfMapOfPassKeyBoolean *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)(); - - Standard_EXPORT static const Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTDS/Makefile.am b/src/NMTDS/Makefile.am index b3976a622..a8a43b8dd 100644 --- a/src/NMTDS/Makefile.am +++ b/src/NMTDS/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE + # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -15,7 +15,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# # GEOM NMTAlgo : partition algorithm # File : Makefile.in @@ -27,165 +26,73 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am # header files salomeinclude_HEADERS = \ - Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx \ - Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \ - Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \ - Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \ - Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ - Handle_NMTDS_ListNodeOfListOfPair.hxx \ - Handle_NMTDS_ListNodeOfListOfPairBoolean.hxx \ - Handle_NMTDS_StdMapNodeOfMapOfPairBoolean.hxx \ - Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx \ - Handle_NMTDS_ListNodeOfListOfPassKey.hxx \ - Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx \ - Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx \ - Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx \ + NMTDS_BndSphere.hxx \ + NMTDS_BndSphere.lxx \ + NMTDS_BndSphereTree.hxx \ + NMTDS_BoxBndTree.hxx \ NMTDS_CArray1OfIndexRange.hxx \ NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx \ - NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx \ NMTDS_DataMapOfIntegerMapOfInteger.hxx \ - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \ - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx \ - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx \ - NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \ NMTDS_IndexedDataMapOfIntegerShape.hxx \ - NMTDS_IndexedDataMapOfShapeBox.hxx \ - NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx \ NMTDS_IndexedDataMapOfShapeBndSphere.hxx \ + NMTDS_IndexedDataMapOfShapeBox.hxx \ NMTDS_IndexRange.hxx \ - NMTDS_IndexRange.ixx \ - NMTDS_IndexRange.jxx \ NMTDS_InterfPool.hxx \ - NMTDS_InterfPool.ixx \ - NMTDS_InterfPool.jxx \ NMTDS_InterfType.hxx \ - NMTDS_Iterator.hxx \ - NMTDS_Iterator.ixx \ - NMTDS_Iterator.jxx \ NMTDS_IteratorCheckerSI.hxx \ - NMTDS_IteratorCheckerSI.ixx \ - NMTDS_IteratorCheckerSI.jxx \ + NMTDS_Iterator.hxx \ NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ - NMTDS_ListIteratorOfListOfPair.hxx \ NMTDS_ListIteratorOfListOfPairBoolean.hxx \ - NMTDS_ListNodeOfListOfPair.hxx \ - NMTDS_ListNodeOfListOfPairBoolean.hxx \ - NMTDS_ListOfPair.hxx \ - NMTDS_ListOfPairBoolean.hxx \ - NMTDS_MapIteratorOfMapOfPairBoolean.hxx \ - NMTDS_MapOfPairBoolean.hxx \ - NMTDS_Pair.hxx \ - NMTDS_Pair.ixx \ - NMTDS_Pair.jxx \ - NMTDS_PairBoolean.hxx \ - NMTDS_PairBoolean.ixx \ - NMTDS_PairBoolean.jxx \ - NMTDS_PairMapHasher.hxx \ - NMTDS_PairMapHasher.ixx \ - NMTDS_PairMapHasher.jxx \ - NMTDS_StdMapNodeOfMapOfPairBoolean.hxx \ + NMTDS_ListIteratorOfListOfPair.hxx \ NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx \ NMTDS_ListIteratorOfListOfPassKey.hxx \ - NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ - NMTDS_ListNodeOfListOfPassKeyBoolean.hxx \ - NMTDS_ListNodeOfListOfPassKey.hxx \ NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ + NMTDS_ListOfPairBoolean.hxx \ + NMTDS_ListOfPair.hxx \ NMTDS_ListOfPassKeyBoolean.hxx \ NMTDS_ListOfPassKey.hxx \ + NMTDS_MapIteratorOfMapOfPairBoolean.hxx \ NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx \ NMTDS_MapIteratorOfMapOfPassKey.hxx \ + NMTDS_MapOfPairBoolean.hxx \ NMTDS_MapOfPassKeyBoolean.hxx \ NMTDS_MapOfPassKey.hxx \ + NMTDS_PairBoolean.hxx \ + NMTDS_Pair.hxx \ + NMTDS_PairMapHasher.hxx \ NMTDS_PassKeyBoolean.hxx \ - NMTDS_PassKeyBoolean.ixx \ - NMTDS_PassKeyBoolean.jxx \ - NMTDS_PInterfPool.hxx \ - NMTDS_PIterator.hxx \ NMTDS_PassKey.hxx \ - NMTDS_PassKey.ixx \ - NMTDS_PassKey.jxx \ NMTDS_PassKeyMapHasher.hxx \ - NMTDS_PassKeyMapHasher.ixx \ - NMTDS_PassKeyMapHasher.jxx \ NMTDS_PassKeyShape.hxx \ - NMTDS_PassKeyShape.ixx \ - NMTDS_PassKeyShape.jxx \ NMTDS_PassKeyShapeMapHasher.hxx \ - NMTDS_PassKeyShapeMapHasher.ixx \ - NMTDS_PassKeyShapeMapHasher.jxx \ + NMTDS_PInterfPool.hxx \ + NMTDS_PIterator.hxx \ NMTDS_PShapesDataStructure.hxx \ NMTDS_ShapesDataStructure.hxx \ - NMTDS_ShapesDataStructure.ixx \ - NMTDS_ShapesDataStructure.jxx \ - NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx \ - NMTDS_StdMapNodeOfMapOfPassKey.hxx \ - NMTDS_Tools.hxx \ - NMTDS_Tools.ixx \ - NMTDS_Tools.jxx \ - NMTDS_BndSphere.hxx \ - NMTDS_BndSphere.ixx \ - NMTDS_BndSphere.jxx \ - NMTDS_BndSphere.lxx \ - NMTDS_BndSphereTree.hxx \ - NMTDS_BoxBndTree.hxx + NMTDS_Tools.hxx # Libraries targets lib_LTLIBRARIES = libNMTDS.la dist_libNMTDS_la_SOURCES = \ - NMTDS_CArray1OfIndexRange_0.cxx \ - NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_0.cxx \ - NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_0.cxx \ - NMTDS_DataMapOfIntegerMapOfInteger_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_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_0.cxx \ - NMTDS_IndexedDataMapOfShapeBndSphere_0.cxx \ + NMTDS_BndSphere.cxx \ + NMTDS_BndSphereTree.cxx \ + NMTDS_BoxBndTree.cxx \ + NMTDS_CArray1OfIndexRange.cxx \ NMTDS_IndexRange.cxx \ NMTDS_InterfPool.cxx \ - NMTDS_Iterator.cxx \ NMTDS_IteratorCheckerSI.cxx \ - NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \ - NMTDS_ListIteratorOfListOfPairBoolean_0.cxx \ - NMTDS_ListIteratorOfListOfPair_0.cxx \ - NMTDS_ListNodeOfListOfPairBoolean_0.cxx \ - NMTDS_ListNodeOfListOfPair_0.cxx \ - NMTDS_ListOfPairBoolean_0.cxx \ - NMTDS_ListOfPair_0.cxx \ - NMTDS_MapIteratorOfMapOfPairBoolean_0.cxx \ - NMTDS_MapOfPairBoolean_0.cxx \ - NMTDS_Pair.cxx \ + NMTDS_Iterator.cxx \ NMTDS_PairBoolean.cxx \ + NMTDS_Pair.cxx \ NMTDS_PairMapHasher.cxx \ - NMTDS_StdMapNodeOfMapOfPairBoolean_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_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_PassKeyShape.cxx \ NMTDS_PassKeyShapeMapHasher.cxx \ NMTDS_ShapesDataStructure.cxx \ - NMTDS_StdMapNodeOfMapOfPassKey_0.cxx \ - NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx \ - NMTDS_Tools.cxx \ - NMTDS_BndSphere.cxx \ - NMTDS_BndSphereTree.cxx \ - NMTDS_BoxBndTree.cxx + NMTDS_Tools.cxx # additional information to compile and link file @@ -198,22 +105,8 @@ libNMTDS_la_LDFLAGS = \ $(CAS_LDPATH) -lTKBool -lTKBO # extra dist files -CDL_FILES = \ - NMTDS.cdl \ - NMTDS_BndSphere.cdl \ - NMTDS_IndexRange.cdl \ - NMTDS_InterfPool.cdl \ - NMTDS_Iterator.cdl \ - NMTDS_IteratorCheckerSI.cdl \ - NMTDS_Pair.cdl \ - NMTDS_PairBoolean.cdl \ - NMTDS_PairMapHasher.cdl \ - NMTDS_PassKey.cdl \ - NMTDS_PassKeyBoolean.cdl \ - NMTDS_PassKeyMapHasher.cdl \ - NMTDS_PassKeyShape.cdl \ - NMTDS_PassKeyShapeMapHasher.cdl \ - NMTDS_ShapesDataStructure.cdl \ - NMTDS_Tools.cdl +CDL_FILES = NMTDS.cdl -EXTRA_DIST += $(CDL_FILES) +EXTRA_DIST += \ + $(CDL_FILES) \ + FILES diff --git a/src/NMTDS/NMTDS.cdl b/src/NMTDS/NMTDS.cdl index 5845f0ad0..de747be18 100644 --- a/src/NMTDS/NMTDS.cdl +++ b/src/NMTDS/NMTDS.cdl @@ -28,109 +28,67 @@ package NMTDS ---Purpose: -uses - TCollection, - TColStd, - gp, - Bnd, - TopoDS, - TopAbs, - TopTools, - BooleanOperations, - BOPTools, - BOPTColStd +--uses + --TCollection, + --TColStd, + --gp, + --Bnd, + --TopoDS, + --TopAbs, + --TopTools, + --BooleanOperations, + --BOPTools, + --BOPTColStd is - enumeration InterfType is - TI_VV, - TI_VE, - TI_VF, - TI_EE, - TI_EF, - TI_FF, - TI_UNKNOWN - end InterfType; + imported InterfType from NMTDS; + imported BndSphere from NMTDS; + imported IndexRange from NMTDS; + imported InterfPool from NMTDS; + imported Iterator from NMTDS; + imported IteratorCheckerSI from NMTDS; + imported Pair from NMTDS; + imported PairBoolean from NMTDS; + imported PairMapHasher from NMTDS; + imported PassKey from NMTDS; + imported PassKeyBoolean from NMTDS; + imported PassKeyMapHasher from NMTDS; + imported PassKeyShape from NMTDS; + imported PassKeyShapeMapHasher from NMTDS; + imported Tools from NMTDS; + imported ShapesDataStructure from NMTDS; + imported PShapesDataStructure from NMTDS; + imported PIterator from NMTDS; + imported PInterfPool from NMTDS; -- - class ShapesDataStructure; - class IndexRange; - - class Iterator; - - class PassKey; - class PassKeyBoolean; - class PassKeyMapHasher; - class PassKeyShape; - class PassKeyShapeMapHasher; - class IteratorCheckerSI; - class Tools; - class InterfPool; - class BndSphere; - --modified by NIZNHY-PKV Mon Dec 12 08:39:27 2011f - class Pair; - class PairBoolean; - class PairMapHasher; - --modified by NIZNHY-PKV Mon Dec 12 08:39:30 2011t - -- - pointer PShapesDataStructure to ShapesDataStructure from NMTDS; - pointer PIterator to Iterator from NMTDS; - pointer PInterfPool to InterfPool from NMTDS; - - class CArray1OfIndexRange instantiates - CArray1 from BOPTColStd(IndexRange from NMTDS); + imported ListOfPassKey from NMTDS; + imported ListIteratorOfListOfPassKey from NMTDS; + + imported ListOfPassKeyBoolean from NMTDS; + imported ListIteratorOfListOfPassKeyBoolean from NMTDS; - class ListOfIndexedDataMapOfShapeAncestorsSuccessors instantiates - List from TCollection(IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations); - - class ListOfPassKey instantiates - List from TCollection(PassKey from NMTDS); + imported ListOfPair from NMTDS; + imported ListIteratorOfListOfPair from NMTDS; + + imported ListOfPairBoolean from NMTDS; + imported ListIteratorOfListOfPairBoolean from NMTDS; - class MapOfPassKey instantiates - Map from TCollection(PassKey from NMTDS, - PassKeyMapHasher from NMTDS); - - class ListOfPassKeyBoolean instantiates - List from TCollection(PassKeyBoolean from NMTDS); + imported ListOfIndexedDataMapOfShapeAncestorsSuccessors from NMTDS; + imported ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors from NMTDS; + + imported MapOfPassKey from NMTDS; + imported MapIteratorOfMapOfPassKey from NMTDS; - class MapOfPassKeyBoolean instantiates - Map from TCollection(PassKeyBoolean from NMTDS, - PassKeyMapHasher from NMTDS); - - 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); - - class DataMapOfIntegerMapOfInteger - instantiates DataMap from TCollection (Integer from Standard, - MapOfInteger from TColStd, - MapIntegerHasher from TColStd); + imported MapOfPairBoolean from NMTDS; + imported MapIteratorOfMapOfPairBoolean from NMTDS; - - class IndexedDataMapOfShapeBndSphere - instantiates IndexedDataMap from TCollection(Shape from TopoDS, - BndSphere from NMTDS, - ShapeMapHasher from TopTools); + imported IndexedDataMapOfShapeBox from NMTDS; + imported IndexedDataMapOfIntegerShape from NMTDS; + imported IndexedDataMapOfShapeBndSphere from NMTDS; + imported DataMapOfIntegerMapOfInteger from NMTDS; + imported DataMapIteratorOfDataMapOfIntegerMapOfInteger from NMTDS; - --modified by NIZNHY-PKV Mon Dec 12 08:41:50 2011f - class ListOfPair instantiates - List from TCollection(Pair from NMTDS); - - class ListOfPairBoolean instantiates - List from TCollection(PairBoolean from NMTDS); - - class MapOfPairBoolean instantiates - Map from TCollection(PairBoolean from NMTDS, - PairMapHasher from NMTDS); --- class IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger instantiates --- IndexedDataMap from TCollection(Integer from Standard, --- IndexedDataMapOfShapeInteger from BooleanOperations, --- MapIntegerHasher from TColStd); - --modified by NIZNHY-PKV Mon Dec 12 08:41:54 2011t - - + imported CArray1OfIndexRange from NMTDS; + end NMTDS; diff --git a/src/NMTDS/NMTDS.pro b/src/NMTDS/NMTDS.pro deleted file mode 100644 index 524fa4f29..000000000 --- a/src/NMTDS/NMTDS.pro +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it 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 -# - -TEMPLATE = lib -TARGET = NMTDS -DESTDIR = ../../lib -MOC_DIR = ../../moc -OBJECTS_DIR = ../../obj/$$TARGET - -CASROOT = $$(CASROOT) -CAS_CPPFLAGS = $${CASROOT}/inc - -KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome - -STDLIB = -lstdc++ - -CAS_LDPATH = -L$$(CASROOT)/Linux/lib - -INCLUDEPATH += $${CAS_CPPFLAGS} $${KERNEL_CXXFLAGS} - -LIBS += $${STDLIB} $${CAS_LDPATH} -lTKBool -lTKBO - -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - -win32:DEFINES += WIN32 -DEFINES += OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS - -HEADERS = Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx -HEADERS += Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx -HEADERS += Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx -HEADERS += Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx -HEADERS += Handle_NMTDS_ListNodeOfListOfPassKeyBoolean.hxx -HEADERS += Handle_NMTDS_ListNodeOfListOfPassKey.hxx -HEADERS += Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx -HEADERS += Handle_NMTDS_StdMapNodeOfMapOfPassKey.hxx -HEADERS += NMTDS_CArray1OfIndexRange.hxx -HEADERS += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx -HEADERS += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx -HEADERS += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx -HEADERS += NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx -HEADERS += NMTDS_IndexedDataMapOfIntegerShape.hxx -HEADERS += NMTDS_IndexedDataMapOfShapeBox.hxx -HEADERS += NMTDS_IndexRange.hxx -HEADERS += NMTDS_Iterator.hxx -HEADERS += NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx -HEADERS += NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx -HEADERS += NMTDS_ListIteratorOfListOfPassKey.hxx -HEADERS += NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx -HEADERS += NMTDS_ListNodeOfListOfPassKeyBoolean.hxx -HEADERS += NMTDS_ListNodeOfListOfPassKey.hxx -HEADERS += NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx -HEADERS += NMTDS_ListOfPassKeyBoolean.hxx -HEADERS += NMTDS_ListOfPassKey.hxx -HEADERS += NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx -HEADERS += NMTDS_MapIteratorOfMapOfPassKey.hxx -HEADERS += NMTDS_MapOfPassKeyBoolean.hxx -HEADERS += NMTDS_MapOfPassKey.hxx -HEADERS += NMTDS_PassKeyBoolean.hxx -HEADERS += NMTDS_PassKey.hxx -HEADERS += NMTDS_PassKeyMapHasher.hxx -HEADERS += NMTDS_PShapesDataStructure.hxx -HEADERS += NMTDS_ShapesDataStructure.hxx -HEADERS += NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx -HEADERS += NMTDS_StdMapNodeOfMapOfPassKey.hxx -HEADERS += NMTDS_BoxBndTree.hxx - -SOURCES = NMTDS_CArray1OfIndexRange_0.cxx -SOURCES += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx -SOURCES += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx -SOURCES += NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx -SOURCES += NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx -SOURCES += NMTDS_IndexedDataMapOfIntegerShape_0.cxx -SOURCES += NMTDS_IndexedDataMapOfShapeBox_0.cxx -SOURCES += NMTDS_IndexRange.cxx -SOURCES += NMTDS_Iterator.cxx -SOURCES += NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx -SOURCES += NMTDS_ListIteratorOfListOfPassKey_0.cxx -SOURCES += NMTDS_ListIteratorOfListOfPassKeyBoolean_0.cxx -SOURCES += NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx -SOURCES += NMTDS_ListNodeOfListOfPassKey_0.cxx -SOURCES += NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx -SOURCES += NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx -SOURCES += NMTDS_ListOfPassKey_0.cxx -SOURCES += NMTDS_ListOfPassKeyBoolean_0.cxx -SOURCES += NMTDS_MapIteratorOfMapOfPassKey_0.cxx -SOURCES += NMTDS_MapIteratorOfMapOfPassKeyBoolean_0.cxx -SOURCES += NMTDS_MapOfPassKey_0.cxx -SOURCES += NMTDS_MapOfPassKeyBoolean_0.cxx -SOURCES += NMTDS_PassKeyBoolean.cxx -SOURCES += NMTDS_PassKey.cxx -SOURCES += NMTDS_PassKeyMapHasher.cxx -SOURCES += NMTDS_ShapesDataStructure.cxx -SOURCES += NMTDS_StdMapNodeOfMapOfPassKey_0.cxx -SOURCES += NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx -SOURCES += NMTDS_BoxBndTree.cxx - -includes.files = $$HEADERS -includes.path = ../../include - -INSTALLS += includes diff --git a/src/NMTDS/NMTDS_BndSphere.cdl b/src/NMTDS/NMTDS_BndSphere.cdl deleted file mode 100644 index 25a63c885..000000000 --- a/src/NMTDS/NMTDS_BndSphere.cdl +++ /dev/null @@ -1,78 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- This library is free software; you can redistribute it and/or --- modify it 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_BndSphere.cdl --- Created: --- Author: Peter KURNEV --- --- -class BndSphere from NMTDS - - ---Purpose: - -uses - Pnt from gp - -is - Create - returns BndSphere from NMTDS; - ---C++: alias "Standard_EXPORT virtual ~NMTDS_BndSphere();" - - SetCenter(me:out; - theP:Pnt from gp); - ---C++: inline - - Center(me) - returns Pnt from gp; - ---C++:return const& - ---C++: inline - - SetRadius(me:out; - theR:Real from Standard); - ---C++: inline - - Radius(me) - returns Real from Standard; - ---C++: inline - - SetGap(me:out; - theGap:Real from Standard); - ---C++: inline - - Gap(me) - returns Real from Standard; - ---C++: inline - - Add(me:out; - theOther: BndSphere from NMTDS); - ---C++: inline - - IsOut(me; - theOther: BndSphere from NMTDS) - returns Boolean from Standard; - - SquareExtent(me) - returns Real from Standard; - ---C++: inline -fields - myCenter: Pnt from gp is protected; - myRadius: Real from Standard is protected; - myGap : Real from Standard is protected; - -end BndSphere; diff --git a/src/NMTDS/NMTDS_BndSphere.cxx b/src/NMTDS/NMTDS_BndSphere.cxx index f67212dc1..6d1b2d8b2 100644 --- a/src/NMTDS/NMTDS_BndSphere.cxx +++ b/src/NMTDS/NMTDS_BndSphere.cxx @@ -22,7 +22,7 @@ // Author: Peter KURNEV // // -#include +#include //======================================================================= //function : diff --git a/src/NMTDS/NMTDS_BndSphere.hxx b/src/NMTDS/NMTDS_BndSphere.hxx index 2ae2cb390..9e5f6554e 100644 --- a/src/NMTDS/NMTDS_BndSphere.hxx +++ b/src/NMTDS/NMTDS_BndSphere.hxx @@ -17,107 +17,57 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_BndSphere.hxx +// Created: +// Author: Peter KURNEV +// + #ifndef _NMTDS_BndSphere_HeaderFile #define _NMTDS_BndSphere_HeaderFile -#ifndef _gp_Pnt_HeaderFile +#include +#include #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -class gp_Pnt; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - +//======================================================================= +//class : NMTDS_BndSphere +//purpose : +//======================================================================= class NMTDS_BndSphere { - -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 - // - - -Standard_EXPORT NMTDS_BndSphere(); -Standard_EXPORT virtual ~NMTDS_BndSphere(); - + public: + Standard_EXPORT + NMTDS_BndSphere(); + + Standard_EXPORT + virtual ~NMTDS_BndSphere(); + void SetCenter(const gp_Pnt& theP) ; - - const gp_Pnt& Center() const; - + + const gp_Pnt& Center() const; + void SetRadius(const Standard_Real theR) ; - + Standard_Real Radius() const; - + void SetGap(const Standard_Real theGap) ; - + Standard_Real Gap() const; - + void Add(const NMTDS_BndSphere& theOther) ; - - -Standard_EXPORT Standard_Boolean IsOut(const NMTDS_BndSphere& theOther) const; - + + Standard_EXPORT + Standard_Boolean IsOut(const NMTDS_BndSphere& theOther) const; + Standard_Real SquareExtent() const; - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -gp_Pnt myCenter; -Standard_Real myRadius; -Standard_Real myGap; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + protected: + gp_Pnt myCenter; + Standard_Real myRadius; + Standard_Real myGap; }; - #include - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTDS/NMTDS_BndSphere.ixx b/src/NMTDS/NMTDS_BndSphere.ixx deleted file mode 100644 index fb01dda00..000000000 --- a/src/NMTDS/NMTDS_BndSphere.ixx +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_BndSphere.jxx b/src/NMTDS/NMTDS_BndSphere.jxx deleted file mode 100644 index 00ab43301..000000000 --- a/src/NMTDS/NMTDS_BndSphere.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _gp_Pnt_HeaderFile -#include -#endif -#ifndef _NMTDS_BndSphere_HeaderFile -#include -#endif diff --git a/src/NMTDS_NEW/NMTDS_CArray1OfIndexRange.cxx b/src/NMTDS/NMTDS_CArray1OfIndexRange.cxx similarity index 100% rename from src/NMTDS_NEW/NMTDS_CArray1OfIndexRange.cxx rename to src/NMTDS/NMTDS_CArray1OfIndexRange.cxx diff --git a/src/NMTDS/NMTDS_CArray1OfIndexRange.hxx b/src/NMTDS/NMTDS_CArray1OfIndexRange.hxx index 8c50b819b..b2451b241 100644 --- a/src/NMTDS/NMTDS_CArray1OfIndexRange.hxx +++ b/src/NMTDS/NMTDS_CArray1OfIndexRange.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -20,136 +17,105 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_BndSphere.hxx +// Created: +// Author: Peter KURNEV +// + #ifndef _NMTDS_CArray1OfIndexRange_HeaderFile #define _NMTDS_CArray1OfIndexRange_HeaderFile -#include - -#ifndef _Standard_Address_HeaderFile +#include +#include #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif +#include class Standard_OutOfRange; class Standard_OutOfMemory; -class NMTDS_IndexRange; -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif +//======================================================================= +//function : NMTDS_CArray1OfIndexRange +//purpose : +//======================================================================= class NMTDS_CArray1OfIndexRange { - -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 - // - - -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; - -#if OCC_VERSION_LARGE > 0x06050200 -Standard_EXPORT void Purge(); -#endif - -protected: - - // Methods PROTECTED - // - - // Fields PROTECTED - // - -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; - - // Fields PRIVATE - // -Standard_Address myStart; -Standard_Integer myLength; -Standard_Integer myFactLength; -Standard_Integer myBlockLength; -Standard_Boolean myIsAllocated; + 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; + + Standard_EXPORT + void Purge() ; + + 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; + + + Standard_Address myStart; + Standard_Integer myLength; + Standard_Integer myFactLength; + Standard_Integer myBlockLength; + Standard_Boolean myIsAllocated; }; -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx b/src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx deleted file mode 100644 index 3920609b2..000000000 --- a/src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_OutOfMemory_HeaderFile -#include -#endif -#ifndef _NMTDS_IndexRange_HeaderFile -#include -#endif - - -#define Array1Item NMTDS_IndexRange -#define Array1Item_hxx -#define BOPTColStd_CArray1 NMTDS_CArray1OfIndexRange -#define BOPTColStd_CArray1_hxx -#include - diff --git a/src/NMTDS/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx b/src/NMTDS/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx index 37c111b84..e139ab938 100644 --- a/src/NMTDS/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx +++ b/src/NMTDS/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx @@ -16,100 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx +// Created: Mon Feb 20 09:31:43 2012 +// Author: +// -#ifndef _NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile -#define _NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class TColStd_MapOfInteger; -class TColStd_MapIntegerHasher; -class NMTDS_DataMapOfIntegerMapOfInteger; -class NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger; +#ifndef NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile +#define NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include +#ifndef NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile +#include #endif - -class NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger : public TCollection_BasicMapIterator { - -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 - // - - -Standard_EXPORT NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger(); - - -Standard_EXPORT NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger(const NMTDS_DataMapOfIntegerMapOfInteger& aMap); - - -Standard_EXPORT void Initialize(const NMTDS_DataMapOfIntegerMapOfInteger& aMap) ; - - -Standard_EXPORT const Standard_Integer& Key() const; - - -Standard_EXPORT const TColStd_MapOfInteger& Value() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTDS/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_0.cxx b/src/NMTDS/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_0.cxx deleted file mode 100644 index 6b84e611e..000000000 --- a/src/NMTDS/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_0.cxx +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TColStd_MapOfInteger_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile -#include -#endif -#ifndef _NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile -#include -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TColStd_MapOfInteger -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapNode_Type_() NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_Type_() -#define TCollection_DataMap NMTDS_DataMapOfIntegerMapOfInteger -#define TCollection_DataMap_hxx -#include - diff --git a/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx b/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx deleted file mode 100644 index 8ca3cb1c7..000000000 --- a/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile -#define _NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile -#include -#endif - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _TColStd_MapOfInteger_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class TColStd_MapOfInteger; -class TColStd_MapIntegerHasher; -class NMTDS_DataMapOfIntegerMapOfInteger; -class NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger; - - - -class NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger(const Standard_Integer& K,const TColStd_MapOfInteger& I,const TCollection_MapNodePtr& n); - - Standard_Integer& Key() const; - - TColStd_MapOfInteger& Value() const; -//Standard_EXPORT ~NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Integer myKey; -TColStd_MapOfInteger myValue; - - -}; - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TColStd_MapOfInteger -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapNode_Type_() NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_Type_() -#define TCollection_DataMap NMTDS_DataMapOfIntegerMapOfInteger -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_0.cxx b/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_0.cxx deleted file mode 100644 index ebe774718..000000000 --- a/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_0.cxx +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TColStd_MapOfInteger_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile -#include -#endif -#ifndef _NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile -#include -#endif -//NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger::~NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger", - sizeof(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger))) { - _anOtherObject = Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)((Handle(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger::DynamicType() const -{ - return STANDARD_TYPE(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) ; -} -//Standard_Boolean NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger::~Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger() {} -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TColStd_MapOfInteger -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapNode_Type_() NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_Type_() -#define TCollection_DataMap NMTDS_DataMapOfIntegerMapOfInteger -#define TCollection_DataMap_hxx -#include - diff --git a/src/NMTDS/NMTDS_DataMapOfIntegerMapOfInteger.hxx b/src/NMTDS/NMTDS_DataMapOfIntegerMapOfInteger.hxx index 2b8e12b0d..69278c1a5 100644 --- a/src/NMTDS/NMTDS_DataMapOfIntegerMapOfInteger.hxx +++ b/src/NMTDS/NMTDS_DataMapOfIntegerMapOfInteger.hxx @@ -16,100 +16,25 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_DataMapOfIntegerMapOfInteger.hxx +// Created: Mon Feb 20 09:27:40 2012 +// Author: +// -#ifndef _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile -#define _NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_NoSuchObject; -class TColStd_MapOfInteger; -class TColStd_MapIntegerHasher; -class NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger; -class NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class NMTDS_DataMapOfIntegerMapOfInteger : public TCollection_BasicMap -{ -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 - // +#ifndef NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile +#define NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile - Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger(const Standard_Integer NbBuckets = 1); +#include +#include - Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger& Assign(const NMTDS_DataMapOfIntegerMapOfInteger& Other); - NMTDS_DataMapOfIntegerMapOfInteger& operator =(const NMTDS_DataMapOfIntegerMapOfInteger& Other) - { - return Assign(Other); - } +#define _NCollection_MapHasher +#include - Standard_EXPORT void ReSize(const Standard_Integer NbBuckets); +typedef NCollection_DataMap NMTDS_DataMapOfIntegerMapOfInteger; +typedef NMTDS_DataMapOfIntegerMapOfInteger::Iterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger; + +#undef _NCollection_MapHasher - Standard_EXPORT void Clear(); - ~NMTDS_DataMapOfIntegerMapOfInteger() - { - Clear(); - } - - Standard_EXPORT Standard_Boolean Bind (const Standard_Integer& K,const TColStd_MapOfInteger& I); - Standard_EXPORT Standard_Boolean IsBound (const Standard_Integer& K) const; - Standard_EXPORT Standard_Boolean UnBind (const Standard_Integer& K); - - Standard_EXPORT const TColStd_MapOfInteger& Find (const Standard_Integer& K) const; - const TColStd_MapOfInteger& operator()(const Standard_Integer& K) const - { - return Find(K); - } - - Standard_EXPORT TColStd_MapOfInteger& ChangeFind(const Standard_Integer& K); - TColStd_MapOfInteger& operator()(const Standard_Integer& K) - { - return ChangeFind(K); - } - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address Find1 (const Standard_Integer& K) const; - Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Integer& K); -#endif - -private: - - // Methods PRIVATE - // - - Standard_EXPORT NMTDS_DataMapOfIntegerMapOfInteger(const NMTDS_DataMapOfIntegerMapOfInteger& Other); - -}; - -// other Inline functions and methods (like "C++: function call" methods) -// #endif diff --git a/src/NMTDS/NMTDS_DataMapOfIntegerMapOfInteger_0.cxx b/src/NMTDS/NMTDS_DataMapOfIntegerMapOfInteger_0.cxx deleted file mode 100644 index 8eec6f6f8..000000000 --- a/src/NMTDS/NMTDS_DataMapOfIntegerMapOfInteger_0.cxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TColStd_MapOfInteger_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_HeaderFile -#include -#endif -#ifndef _NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile -#include -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TColStd_MapOfInteger -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger -#define TCollection_DataMapNode_Type_() NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_Type_() -#define TCollection_DataMap NMTDS_DataMapOfIntegerMapOfInteger -#define TCollection_DataMap_hxx -#include - diff --git a/src/NMTDS/NMTDS_IndexRange.cdl b/src/NMTDS/NMTDS_IndexRange.cdl deleted file mode 100644 index 9584167eb..000000000 --- a/src/NMTDS/NMTDS_IndexRange.cdl +++ /dev/null @@ -1,58 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTDS_IndexRange.cdl --- Created: Fri Nov 28 10:31:05 2003 --- Author: Peter KURNEV --- -class IndexRange from NMTDS - - ---Purpose: - ---uses ---raises - -is - Create - returns IndexRange from NMTDS; - - SetFirst(me:out; - aFirst:Integer from Standard); - - SetLast(me:out; - aLast:Integer from Standard); - - First(me) - returns Integer from Standard; - - Last(me) - returns Integer from Standard; - - IsInRange(me; - aIndex:Integer from Standard) - returns Boolean from Standard; - -fields - myFirst : Integer from Standard is protected; - myLast : Integer from Standard is protected; - -end IndexRange; diff --git a/src/NMTDS/NMTDS_IndexRange.cxx b/src/NMTDS/NMTDS_IndexRange.cxx index 5a6e5a05f..83969f5ae 100644 --- a/src/NMTDS/NMTDS_IndexRange.cxx +++ b/src/NMTDS/NMTDS_IndexRange.cxx @@ -25,7 +25,8 @@ // Author: Peter KURNEV // // -#include +#include + //======================================================================= //function :NMTDS_IndexRange::NMTDS_IndexRange //purpose : diff --git a/src/NMTDS/NMTDS_IndexRange.hxx b/src/NMTDS/NMTDS_IndexRange.hxx index 223277bc9..84b055745 100644 --- a/src/NMTDS/NMTDS_IndexRange.hxx +++ b/src/NMTDS/NMTDS_IndexRange.hxx @@ -20,96 +20,43 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_IndexRange.hxx +// Created: +// Author: Peter KURNEV +// +// + #ifndef _NMTDS_IndexRange_HeaderFile #define _NMTDS_IndexRange_HeaderFile -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - +#include +#include +//======================================================================= +//class : NMTDS_IndexRange +//purpose : +//======================================================================= class NMTDS_IndexRange { - -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 - // - - -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; - - - - + 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; protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -Standard_Integer myFirst; -Standard_Integer myLast; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + Standard_Integer myFirst; + Standard_Integer myLast; }; - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTDS/NMTDS_IndexRange.ixx b/src/NMTDS/NMTDS_IndexRange.ixx deleted file mode 100644 index ad27de88d..000000000 --- a/src/NMTDS/NMTDS_IndexRange.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_IndexRange.jxx b/src/NMTDS/NMTDS_IndexRange.jxx deleted file mode 100644 index 12d5916ef..000000000 --- a/src/NMTDS/NMTDS_IndexRange.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_IndexRange_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx deleted file mode 100644 index 9d2ab4e81..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile -#define _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile -#include -#endif - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class BooleanOperations_IndexedDataMapOfShapeInteger; -class TColStd_MapIntegerHasher; -class NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger; - - - -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger : public TCollection_MapNode { - -public: - // 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(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Integer myKey1; -Standard_Integer myKey2; -BooleanOperations_IndexedDataMapOfShapeInteger myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem BooleanOperations_IndexedDataMapOfShapeInteger -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx deleted file mode 100644 index e16a95041..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile -#include -#endif -//NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger", - sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger))) { - _anOtherObject = Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)((Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::DynamicType() const -{ - 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() {} -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem BooleanOperations_IndexedDataMapOfShapeInteger -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx deleted file mode 100644 index 8aff27799..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile -#define _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile -#include -#endif - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class TopoDS_Shape; -class TColStd_MapIntegerHasher; -class NMTDS_IndexedDataMapOfIntegerShape; - - - -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTDS_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 ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Integer myKey1; -Standard_Integer myKey2; -TopoDS_Shape myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx deleted file mode 100644 index 752ed5342..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_IndexedDataMapOfIntegerShape_HeaderFile -#include -#endif -//NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape", - sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape))) { - _anOtherObject = Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)((Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::DynamicType() const -{ - return STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) ; -} -//Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape() {} -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx deleted file mode 100644 index 1fa4e7f46..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere.hxx +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile -#define _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _NMTDS_BndSphere_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class TopoDS_Shape; -class NMTDS_BndSphere; -class TopTools_ShapeMapHasher; -class NMTDS_IndexedDataMapOfShapeBndSphere; - - - -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere(const TopoDS_Shape& K1,const Standard_Integer K2,const NMTDS_BndSphere& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); - - TopoDS_Shape& Key1() const; - - Standard_Integer& Key2() const; - - TCollection_MapNodePtr& Next2() const; - - NMTDS_BndSphere& Value() const; -//Standard_EXPORT ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -TopoDS_Shape myKey1; -Standard_Integer myKey2; -NMTDS_BndSphere myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem NMTDS_BndSphere -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBndSphere -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_0.cxx deleted file mode 100644 index 296bc7d73..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_0.cxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _NMTDS_BndSphere_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile -#include -#endif -//NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere", - sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere))) { - _anOtherObject = Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)((Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere::DynamicType() const -{ - return STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) ; -} -//Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere() {} -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem NMTDS_BndSphere -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBndSphere -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx deleted file mode 100644 index 6d3d29799..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile -#define _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Bnd_Box_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class TopoDS_Shape; -class Bnd_Box; -class TopTools_ShapeMapHasher; -class NMTDS_IndexedDataMapOfShapeBox; - - - -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTDS_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 ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -TopoDS_Shape myKey1; -Standard_Integer myKey2; -Bnd_Box myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem Bnd_Box -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBox -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx deleted file mode 100644 index 4cfc11d1c..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Bnd_Box_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_IndexedDataMapOfShapeBox_HeaderFile -#include -#endif -//NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox", - sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox))) { - _anOtherObject = Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)((Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::DynamicType() const -{ - return STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) ; -} -//Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox() {} -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem Bnd_Box -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBox -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx deleted file mode 100644 index 78df45139..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile -#define _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class BooleanOperations_IndexedDataMapOfShapeInteger; -class TColStd_MapIntegerHasher; -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger : public TCollection_BasicMap { - -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 - // - - -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) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K); -#endif - -private: - - // Methods PRIVATE - // - -Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other); - -}; - -// other Inline functions and methods (like "C++: function call" methods) -// - -#endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx deleted file mode 100644 index da098cd29..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile -#include -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem BooleanOperations_IndexedDataMapOfShapeInteger -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerShape.hxx b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerShape.hxx index 8c58c5c5a..8ae674ea8 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerShape.hxx +++ b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerShape.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,146 +16,27 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_IndexedDataMapOfIntegerShape.hxx +// Created: Mon Feb 20 09:20:07 2012 +// Author: +// -#ifndef _NMTDS_IndexedDataMapOfIntegerShape_HeaderFile -#define _NMTDS_IndexedDataMapOfIntegerShape_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Shape; -class TColStd_MapIntegerHasher; -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class NMTDS_IndexedDataMapOfIntegerShape : public TCollection_BasicMap { - -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 - // - - -Standard_EXPORT NMTDS_IndexedDataMapOfIntegerShape(const Standard_Integer NbBuckets = 1); - - -Standard_EXPORT NMTDS_IndexedDataMapOfIntegerShape& Assign(const NMTDS_IndexedDataMapOfIntegerShape& Other) ; - NMTDS_IndexedDataMapOfIntegerShape& operator =(const NMTDS_IndexedDataMapOfIntegerShape& Other) -{ - return Assign(Other); -} - - - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - -Standard_EXPORT void Clear() ; -~NMTDS_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) ; +#ifndef NMTDS_IndexedDataMapOfIntegerShape_HeaderFile +#define NMTDS_IndexedDataMapOfIntegerShape_HeaderFile -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) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K); -#endif - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTDS_IndexedDataMapOfIntegerShape(const NMTDS_IndexedDataMapOfIntegerShape& Other); - - - // Fields PRIVATE - // - - -}; - +#include +#include +#include +#define _NCollection_MapHasher +#include +typedef NCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerShape; + +#undef _NCollection_MapHasher -// other Inline functions and methods (like "C++: function call" methods) -// #endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerShape_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerShape_0.cxx deleted file mode 100644 index 1e3d33618..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerShape_0.cxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_HeaderFile -#include -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TopoDS_Shape -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerShape -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfShapeBndSphere.hxx b/src/NMTDS/NMTDS_IndexedDataMapOfShapeBndSphere.hxx index 176cabb3c..23a1df289 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapOfShapeBndSphere.hxx +++ b/src/NMTDS/NMTDS_IndexedDataMapOfShapeBndSphere.hxx @@ -17,135 +17,29 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile -#define _NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Shape; -class NMTDS_BndSphere; -class TopTools_ShapeMapHasher; -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class NMTDS_IndexedDataMapOfShapeBndSphere : public TCollection_BasicMap { - -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 - // - - -Standard_EXPORT NMTDS_IndexedDataMapOfShapeBndSphere(const Standard_Integer NbBuckets = 1); - - -Standard_EXPORT NMTDS_IndexedDataMapOfShapeBndSphere& Assign(const NMTDS_IndexedDataMapOfShapeBndSphere& Other) ; - NMTDS_IndexedDataMapOfShapeBndSphere& operator =(const NMTDS_IndexedDataMapOfShapeBndSphere& Other) -{ - return Assign(Other); -} - - - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - -Standard_EXPORT void Clear() ; -~NMTDS_IndexedDataMapOfShapeBndSphere() -{ - Clear(); -} +// File: NMTDS_IndexedDataMapOfShapeBndSphere.hxx +// Created: Mon Feb 20 09:17:01 2012 +// Author: +// +#ifndef NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile +#define NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile -Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const NMTDS_BndSphere& I) ; +#include +#include +#include +#define _NCollection_MapHasher +#include -Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const NMTDS_BndSphere& T) ; -Standard_EXPORT void RemoveLast() ; +typedef NCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBndSphere; + +#undef _NCollection_MapHasher -Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; -Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; - - -Standard_EXPORT const NMTDS_BndSphere& FindFromIndex(const Standard_Integer I) const; - const NMTDS_BndSphere& operator ()(const Standard_Integer I) const -{ - return FindFromIndex(I); -} - - - -Standard_EXPORT NMTDS_BndSphere& ChangeFromIndex(const Standard_Integer I) ; - NMTDS_BndSphere& operator ()(const Standard_Integer I) -{ - return ChangeFromIndex(I); -} - - - -Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const; - - -Standard_EXPORT const NMTDS_BndSphere& FindFromKey(const TopoDS_Shape& K) const; - - -Standard_EXPORT NMTDS_BndSphere& ChangeFromKey(const TopoDS_Shape& K) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K); -#endif - -private: - - // Methods PRIVATE - // - -Standard_EXPORT NMTDS_IndexedDataMapOfShapeBndSphere(const NMTDS_IndexedDataMapOfShapeBndSphere& Other); - -}; - -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfShapeBndSphere_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapOfShapeBndSphere_0.cxx deleted file mode 100644 index 3ee2d9d75..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapOfShapeBndSphere_0.cxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _NMTDS_BndSphere_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem NMTDS_BndSphere -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBndSphere_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBndSphere -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfShapeBox.hxx b/src/NMTDS/NMTDS_IndexedDataMapOfShapeBox.hxx index f7a8b9b8a..7c50c3925 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapOfShapeBox.hxx +++ b/src/NMTDS/NMTDS_IndexedDataMapOfShapeBox.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -20,156 +17,28 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _NMTDS_IndexedDataMapOfShapeBox_HeaderFile -#define _NMTDS_IndexedDataMapOfShapeBox_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Shape; -class Bnd_Box; -class TopTools_ShapeMapHasher; -class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class NMTDS_IndexedDataMapOfShapeBox : public TCollection_BasicMap { - -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 - // - - -Standard_EXPORT NMTDS_IndexedDataMapOfShapeBox(const Standard_Integer NbBuckets = 1); - - -Standard_EXPORT NMTDS_IndexedDataMapOfShapeBox& Assign(const NMTDS_IndexedDataMapOfShapeBox& Other) ; - NMTDS_IndexedDataMapOfShapeBox& operator =(const NMTDS_IndexedDataMapOfShapeBox& Other) -{ - return Assign(Other); -} - - - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - -Standard_EXPORT void Clear() ; -~NMTDS_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() ; +// File: NMTDS_IndexedDataMapOfShapeBox.hxx +// Created: Mon Feb 20 09:17:01 2012 +// Author: +// -Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; +#ifndef NMTDS_IndexedDataMapOfShapeBox_HeaderFile +#define NMTDS_IndexedDataMapOfShapeBox_HeaderFile +#include +#include +#include -Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; +#define _NCollection_MapHasher +#include -Standard_EXPORT const Bnd_Box& FindFromIndex(const Standard_Integer I) const; - const Bnd_Box& operator ()(const Standard_Integer I) const -{ - return FindFromIndex(I); -} +typedef NCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBox; + +#undef _NCollection_MapHasher -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) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K); -#endif - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTDS_IndexedDataMapOfShapeBox(const NMTDS_IndexedDataMapOfShapeBox& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfShapeBox_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapOfShapeBox_0.cxx deleted file mode 100644 index 662654d37..000000000 --- a/src/NMTDS/NMTDS_IndexedDataMapOfShapeBox_0.cxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Bnd_Box_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem Bnd_Box -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox -#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_Type_() -#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBox -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTDS/NMTDS_InterfPool.cdl b/src/NMTDS/NMTDS_InterfPool.cdl deleted file mode 100644 index 3f009341c..000000000 --- a/src/NMTDS/NMTDS_InterfPool.cdl +++ /dev/null @@ -1,150 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- This library is free software; you can redistribute it and/or --- modify it 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_InterfPool.cdl --- Created: --- Author: Peter KURNEV --- -class InterfPool from NMTDS - - ---Purpose: - -uses - MapOfPairBoolean from NMTDS, - ListOfPairBoolean from NMTDS, - PairBoolean from NMTDS, - InterfType from NMTDS, - -- - CArray1OfSSInterference from BOPTools, - CArray1OfESInterference from BOPTools, - CArray1OfVSInterference from BOPTools, - CArray1OfEEInterference from BOPTools, - CArray1OfVEInterference from BOPTools, - CArray1OfVVInterference from BOPTools - ---raises - -is - Create - returns InterfPool from NMTDS; - ---C++: alias "Standard_EXPORT virtual ~NMTDS_InterfPool();" - - - Add (me:out; - aPKB : PairBoolean from NMTDS; - aType: InterfType from NMTDS) - returns Boolean from Standard; - - Add (me:out; - aInd1 : Integer from Standard; - aInd2 : Integer from Standard; - aType : InterfType from NMTDS) - returns Boolean from Standard; - - Add (me:out; - aInd1 : Integer from Standard; - aInd2 : Integer from Standard; - bFlag : Boolean from Standard; - aType : InterfType from NMTDS) - returns Boolean from Standard; - - Contains(me; - aPKB : PairBoolean from NMTDS) - returns Boolean from Standard; - - Contains(me; - aInd1 : Integer from Standard; - aInd2 : Integer from Standard) - returns Boolean from Standard; - - Get(me) - returns ListOfPairBoolean from NMTDS; - ---C++: return const & - - Get(me; - aType : InterfType from NMTDS) - returns ListOfPairBoolean from NMTDS; - ---C++: return const & - - Get(me; - aInd : Integer from Standard) - returns ListOfPairBoolean from NMTDS; - ---C++: return const & - - Get(me; - aInd : Integer from Standard; - aType: InterfType from NMTDS) - returns ListOfPairBoolean from NMTDS; - ---C++: return const & - - -- - -- Interferences - -- - SSInterferences (me:out) - returns CArray1OfSSInterference from BOPTools; - ---C++: return & - ---Purpose: - --- Returns the reference to array Of F/F interferences - --- - ESInterferences (me:out) - returns CArray1OfESInterference from BOPTools; - ---C++: return & - ---Purpose: - --- Returns the reference to array Of E/F interferences - --- - VSInterferences (me:out) - returns CArray1OfVSInterference from BOPTools; - ---C++: return & - ---Purpose: - --- Returns the reference to array Of V/F interferences - --- - EEInterferences (me:out) - returns CArray1OfEEInterference from BOPTools; - ---C++: return & - ---Purpose: - --- Returns the reference to arrray Of E/E interferences - --- - VEInterferences (me:out) - returns CArray1OfVEInterference from BOPTools; - ---C++: return & - ---Purpose: - --- Returns the reference to arrray Of V/E interferences - --- - VVInterferences (me:out) - returns CArray1OfVVInterference from BOPTools; - ---C++: return & - ---Purpose: - --- Returns the reference to arrray Of V/V interferences - --- - --modified by NIZNHY-PKV Mon Dec 12 09:07:13 2011f - Purge(me:out) ; - --modified by NIZNHY-PKV Mon Dec 12 09:07:16 2011t -fields - myTable : MapOfPairBoolean from NMTDS [6] is protected; - myList : ListOfPairBoolean from NMTDS is protected; - myMaxInd: Integer from Standard is protected; - -- - mySSInterferences : CArray1OfSSInterference from BOPTools is protected; - myESInterferences : CArray1OfESInterference from BOPTools is protected; - myVSInterferences : CArray1OfVSInterference from BOPTools is protected; - myEEInterferences : CArray1OfEEInterference from BOPTools is protected; - myVEInterferences : CArray1OfVEInterference from BOPTools is protected; - myVVInterferences : CArray1OfVVInterference from BOPTools is protected; - -end InterfPool; diff --git a/src/NMTDS/NMTDS_InterfPool.cxx b/src/NMTDS/NMTDS_InterfPool.cxx index 945161996..025946bab 100644 --- a/src/NMTDS/NMTDS_InterfPool.cxx +++ b/src/NMTDS/NMTDS_InterfPool.cxx @@ -20,7 +20,7 @@ // File: NMTDS_InterfPool.cxx // Author: Peter KURNEV -#include +#include #include #include diff --git a/src/NMTDS/NMTDS_InterfPool.hxx b/src/NMTDS/NMTDS_InterfPool.hxx index f3947ec72..71dc6c2ae 100644 --- a/src/NMTDS/NMTDS_InterfPool.hxx +++ b/src/NMTDS/NMTDS_InterfPool.hxx @@ -16,151 +16,108 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_InterfPool_HeaderFile -#define _NMTDS_InterfPool_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _NMTDS_MapOfPairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfPairBoolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfSSInterference_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfESInterference_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfVSInterference_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfEEInterference_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfVEInterference_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfVVInterference_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _NMTDS_InterfType_HeaderFile -#include -#endif -class NMTDS_PairBoolean; -class NMTDS_ListOfPairBoolean; -class BOPTools_CArray1OfSSInterference; -class BOPTools_CArray1OfESInterference; -class BOPTools_CArray1OfVSInterference; -class BOPTools_CArray1OfEEInterference; -class BOPTools_CArray1OfVEInterference; -class BOPTools_CArray1OfVVInterference; - - - -class NMTDS_InterfPool { -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); - } - - - Standard_EXPORT NMTDS_InterfPool(); -Standard_EXPORT virtual ~NMTDS_InterfPool(); - - Standard_EXPORT Standard_Boolean Add(const NMTDS_PairBoolean& aPKB,const NMTDS_InterfType aType) ; - - Standard_EXPORT Standard_Boolean Add(const Standard_Integer aInd1,const Standard_Integer aInd2,const NMTDS_InterfType aType) ; - - Standard_EXPORT Standard_Boolean Add(const Standard_Integer aInd1,const Standard_Integer aInd2,const Standard_Boolean bFlag,const NMTDS_InterfType aType) ; - - Standard_EXPORT Standard_Boolean Contains(const NMTDS_PairBoolean& aPKB) const; - - Standard_EXPORT Standard_Boolean Contains(const Standard_Integer aInd1,const Standard_Integer aInd2) const; - - Standard_EXPORT const NMTDS_ListOfPairBoolean& Get() const; - - Standard_EXPORT const NMTDS_ListOfPairBoolean& Get(const NMTDS_InterfType aType) const; - - Standard_EXPORT const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd) const; - - Standard_EXPORT const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd,const NMTDS_InterfType aType) const; - -//! Returns the reference to array Of F/F interferences
- Standard_EXPORT BOPTools_CArray1OfSSInterference& SSInterferences() ; - -//! Returns the reference to array Of E/F interferences
- Standard_EXPORT BOPTools_CArray1OfESInterference& ESInterferences() ; - -//! Returns the reference to array Of V/F interferences
- Standard_EXPORT BOPTools_CArray1OfVSInterference& VSInterferences() ; - -//! Returns the reference to arrray Of E/E interferences
- Standard_EXPORT BOPTools_CArray1OfEEInterference& EEInterferences() ; - -//! Returns the reference to arrray Of V/E interferences
- Standard_EXPORT BOPTools_CArray1OfVEInterference& VEInterferences() ; - -//! Returns the reference to arrray Of V/V interferences
- Standard_EXPORT BOPTools_CArray1OfVVInterference& VVInterferences() ; - - Standard_EXPORT void Purge() ; - - - - - -protected: - - - -NMTDS_MapOfPairBoolean myTable[6]; -NMTDS_ListOfPairBoolean myList; -Standard_Integer myMaxInd; -BOPTools_CArray1OfSSInterference mySSInterferences; -BOPTools_CArray1OfESInterference myESInterferences; -BOPTools_CArray1OfVSInterference myVSInterferences; -BOPTools_CArray1OfEEInterference myEEInterferences; -BOPTools_CArray1OfVEInterference myVEInterferences; -BOPTools_CArray1OfVVInterference myVVInterferences; - - -private: - - - - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif + +// File: NMTDS_InterfPool.hxx +// +// Author: Peter KURNEV + +#ifndef _NMTDS_InterfPool_HeaderFile +#define _NMTDS_InterfPool_HeaderFile + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//class : NMTDS_InterfPool +//purpose : +//======================================================================= +class NMTDS_InterfPool { + public: + Standard_EXPORT + NMTDS_InterfPool(); + Standard_EXPORT + virtual ~NMTDS_InterfPool(); + + Standard_EXPORT + Standard_Boolean Add(const NMTDS_PairBoolean& aPKB, + const NMTDS_InterfType aType) ; + + Standard_EXPORT + Standard_Boolean Add(const Standard_Integer aInd1, + const Standard_Integer aInd2, + const NMTDS_InterfType aType) ; + + Standard_EXPORT + Standard_Boolean Add(const Standard_Integer aInd1, + const Standard_Integer aInd2, + const Standard_Boolean bFlag, + const NMTDS_InterfType aType) ; + + Standard_EXPORT + Standard_Boolean Contains(const NMTDS_PairBoolean& aPKB) const; + + Standard_EXPORT + Standard_Boolean Contains(const Standard_Integer aInd1, + const Standard_Integer aInd2) const; + + Standard_EXPORT + const NMTDS_ListOfPairBoolean& Get() const; + + Standard_EXPORT + const NMTDS_ListOfPairBoolean& Get(const NMTDS_InterfType aType) const; + + Standard_EXPORT + const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd) const; + + Standard_EXPORT + const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd, + const NMTDS_InterfType aType) const; + + //! Returns the reference to array Of F/F interferences
+ Standard_EXPORT BOPTools_CArray1OfSSInterference& SSInterferences() ; + + //! Returns the reference to array Of E/F interferences
+ Standard_EXPORT BOPTools_CArray1OfESInterference& ESInterferences() ; + + //! Returns the reference to array Of V/F interferences
+ Standard_EXPORT BOPTools_CArray1OfVSInterference& VSInterferences() ; + + //! Returns the reference to arrray Of E/E interferences
+ Standard_EXPORT BOPTools_CArray1OfEEInterference& EEInterferences() ; + + //! Returns the reference to arrray Of V/E interferences
+ Standard_EXPORT BOPTools_CArray1OfVEInterference& VEInterferences() ; + + //! Returns the reference to arrray Of V/V interferences
+ Standard_EXPORT BOPTools_CArray1OfVVInterference& VVInterferences() ; + + Standard_EXPORT void Purge() ; + +protected: + NMTDS_MapOfPairBoolean myTable[6]; + NMTDS_ListOfPairBoolean myList; + Standard_Integer myMaxInd; + BOPTools_CArray1OfSSInterference mySSInterferences; + BOPTools_CArray1OfESInterference myESInterferences; + BOPTools_CArray1OfVSInterference myVSInterferences; + BOPTools_CArray1OfEEInterference myEEInterferences; + BOPTools_CArray1OfVEInterference myVEInterferences; + BOPTools_CArray1OfVVInterference myVVInterferences; + +private: +}; + +#endif diff --git a/src/NMTDS/NMTDS_InterfPool.ixx b/src/NMTDS/NMTDS_InterfPool.ixx deleted file mode 100644 index f47c11b80..000000000 --- a/src/NMTDS/NMTDS_InterfPool.ixx +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_InterfPool.jxx b/src/NMTDS/NMTDS_InterfPool.jxx deleted file mode 100644 index 281442164..000000000 --- a/src/NMTDS/NMTDS_InterfPool.jxx +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_PairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfPairBoolean_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfSSInterference_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfESInterference_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfVSInterference_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfEEInterference_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfVEInterference_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfVVInterference_HeaderFile -#include -#endif -#ifndef _NMTDS_InterfPool_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_InterfType.hxx b/src/NMTDS/NMTDS_InterfType.hxx index b87a71b78..5bf1e72a8 100644 --- a/src/NMTDS/NMTDS_InterfType.hxx +++ b/src/NMTDS/NMTDS_InterfType.hxx @@ -17,12 +17,18 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_InterfType.hxx +// Created: +// Author: Peter KURNEV +// + + #ifndef _NMTDS_InterfType_HeaderFile #define _NMTDS_InterfType_HeaderFile -enum NMTDS_InterfType { - NMTDS_TI_VV, +enum NMTDS_InterfType { +NMTDS_TI_VV, NMTDS_TI_VE, NMTDS_TI_VF, NMTDS_TI_EE, @@ -31,7 +37,6 @@ NMTDS_TI_FF, NMTDS_TI_UNKNOWN }; - #ifndef _Standard_PrimitiveTypes_HeaderFile #include #endif diff --git a/src/NMTDS/NMTDS_Iterator.cdl b/src/NMTDS/NMTDS_Iterator.cdl deleted file mode 100755 index f19f77aca..000000000 --- a/src/NMTDS/NMTDS_Iterator.cdl +++ /dev/null @@ -1,96 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTDS_Iterator.cdl --- Created: --- Author: Peter KURNEV --- -class Iterator from NMTDS - - ---Purpose: - -uses - DataMapOfIntegerListOfInteger from TColStd, - ShapeEnum from TopAbs, - ShapesDataStructure from NMTDS, - PShapesDataStructure from NMTDS, - ListOfPairBoolean from NMTDS, - ListIteratorOfListOfPairBoolean from NMTDS, - PassKeyBoolean from NMTDS - ---raises - -is - Create - returns Iterator from NMTDS; - ---C++: alias "Standard_EXPORT virtual ~NMTDS_Iterator();" - - - SetDS(me:out; - pDS:PShapesDataStructure from NMTDS); - - DS(me) - returns ShapesDataStructure from NMTDS; - ---C++:return const & - - Initialize(me: out; - aType1: ShapeEnum from TopAbs; - aType2: ShapeEnum from TopAbs); - More(me) - returns Boolean from Standard; - - Next(me: out); - - Current(me; aIndex1:out Integer from Standard; - aIndex2:out Integer from Standard; - aWithSubShape: out Boolean from Standard); - - Prepare(me:out) - is virtual; - - Intersect(me:out) - is virtual protected; - - ExpectedLength(me) - returns Integer from Standard; - - BlockLength(me) - returns Integer from Standard; - - SDVertices(me) - returns DataMapOfIntegerListOfInteger from TColStd; - ---C++:return const & - - FillMVSD(myclass; - aMVSD1:DataMapOfIntegerListOfInteger from TColStd; - aMVSD2:out DataMapOfIntegerListOfInteger from TColStd); - -fields - myDS :PShapesDataStructure from NMTDS is protected; - myLists :ListOfPairBoolean from NMTDS [6] is protected; - myIterator :ListIteratorOfListOfPairBoolean from NMTDS is protected; - myEmptyList:ListOfPairBoolean from NMTDS is protected; - myLength :Integer from Standard is protected; - -- - myMVSD :DataMapOfIntegerListOfInteger from TColStd is protected; - -end Iterator; diff --git a/src/NMTDS/NMTDS_Iterator.cxx b/src/NMTDS/NMTDS_Iterator.cxx index 4bdba644b..00bd62623 100755 --- a/src/NMTDS/NMTDS_Iterator.cxx +++ b/src/NMTDS/NMTDS_Iterator.cxx @@ -23,7 +23,7 @@ // File: NMTDS_Iterator.cxx // Author: Peter KURNEV -#include +#include // #include // @@ -53,6 +53,7 @@ #include #include #include +#include //======================================================================= //function : NMTDS_Iterator diff --git a/src/NMTDS/NMTDS_Iterator.hxx b/src/NMTDS/NMTDS_Iterator.hxx index 8504349d8..d1d0ebd92 100644 --- a/src/NMTDS/NMTDS_Iterator.hxx +++ b/src/NMTDS/NMTDS_Iterator.hxx @@ -19,105 +19,85 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_Iterator_HeaderFile -#define _NMTDS_Iterator_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _NMTDS_PShapesDataStructure_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfPairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _TColStd_DataMapOfIntegerListOfInteger_HeaderFile -#include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class NMTDS_ShapesDataStructure; -class TColStd_DataMapOfIntegerListOfInteger; - - - -class NMTDS_Iterator { -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); - } - - - Standard_EXPORT NMTDS_Iterator(); -Standard_EXPORT virtual ~NMTDS_Iterator(); - - Standard_EXPORT void SetDS(const NMTDS_PShapesDataStructure& pDS) ; - - Standard_EXPORT const NMTDS_ShapesDataStructure& DS() const; - - Standard_EXPORT void Initialize(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ; - - Standard_EXPORT Standard_Boolean More() const; - - Standard_EXPORT void Next() ; - - Standard_EXPORT void Current(Standard_Integer& aIndex1,Standard_Integer& aIndex2,Standard_Boolean& aWithSubShape) const; - - Standard_EXPORT virtual void Prepare() ; - - Standard_EXPORT Standard_Integer ExpectedLength() const; - - Standard_EXPORT Standard_Integer BlockLength() const; - - Standard_EXPORT const TColStd_DataMapOfIntegerListOfInteger& SDVertices() const; - - Standard_EXPORT static void FillMVSD(const TColStd_DataMapOfIntegerListOfInteger& aMVSD1,TColStd_DataMapOfIntegerListOfInteger& aMVSD2) ; - - -protected: - - - Standard_EXPORT virtual void Intersect() ; - - -NMTDS_PShapesDataStructure myDS; -NMTDS_ListOfPairBoolean myLists[6]; -NMTDS_ListIteratorOfListOfPairBoolean myIterator; -NMTDS_ListOfPairBoolean myEmptyList; -Standard_Integer myLength; -TColStd_DataMapOfIntegerListOfInteger myMVSD; - - -private: - -}; - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif + +// File: NMTDS_Iterator.hxx +// Author: Peter KURNEV + +#ifndef _NMTDS_Iterator_HeaderFile +#define _NMTDS_Iterator_HeaderFile + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//class : NMTDS_Iterator +//purpose : +//======================================================================= +class NMTDS_Iterator { + public: + Standard_EXPORT + NMTDS_Iterator(); + + Standard_EXPORT + virtual ~NMTDS_Iterator(); + + Standard_EXPORT + void SetDS(const NMTDS_PShapesDataStructure& pDS) ; + + Standard_EXPORT + const NMTDS_ShapesDataStructure& DS() const; + + Standard_EXPORT + void Initialize(const TopAbs_ShapeEnum aType1, + const TopAbs_ShapeEnum aType2) ; + + Standard_EXPORT + Standard_Boolean More() const; + + Standard_EXPORT + void Next() ; + + Standard_EXPORT + void Current(Standard_Integer& aIndex1, + Standard_Integer& aIndex2, + Standard_Boolean& aWithSubShape) const; + + Standard_EXPORT + virtual void Prepare() ; + + Standard_EXPORT + Standard_Integer ExpectedLength() const; + + Standard_EXPORT + Standard_Integer BlockLength() const; + + Standard_EXPORT + const TColStd_DataMapOfIntegerListOfInteger& SDVertices() const; + + Standard_EXPORT + static void FillMVSD(const TColStd_DataMapOfIntegerListOfInteger& aMVSD1, + TColStd_DataMapOfIntegerListOfInteger& aMVSD2) ; + +protected: + Standard_EXPORT + virtual void Intersect() ; + // + + NMTDS_PShapesDataStructure myDS; + NMTDS_ListOfPairBoolean myLists[6]; + NMTDS_ListIteratorOfListOfPairBoolean myIterator; + NMTDS_ListOfPairBoolean myEmptyList; + Standard_Integer myLength; + TColStd_DataMapOfIntegerListOfInteger myMVSD; +}; + +#endif diff --git a/src/NMTDS/NMTDS_Iterator.ixx b/src/NMTDS/NMTDS_Iterator.ixx deleted file mode 100644 index f0d0a4a30..000000000 --- a/src/NMTDS/NMTDS_Iterator.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_Iterator.jxx b/src/NMTDS/NMTDS_Iterator.jxx deleted file mode 100644 index 4dbc61129..000000000 --- a/src/NMTDS/NMTDS_Iterator.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_ShapesDataStructure_HeaderFile -#include -#endif -#ifndef _TColStd_DataMapOfIntegerListOfInteger_HeaderFile -#include -#endif -#ifndef _NMTDS_Iterator_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_IteratorCheckerSI.cdl b/src/NMTDS/NMTDS_IteratorCheckerSI.cdl deleted file mode 100644 index 7f8850e50..000000000 --- a/src/NMTDS/NMTDS_IteratorCheckerSI.cdl +++ /dev/null @@ -1,41 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- This library is free software; you can redistribute it and/or --- modify it 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_IteratorCheckerSI.cdl --- Created: Tue Feb 6 10:18:27 2007 --- Author: Peter KURNEV --- -class IteratorCheckerSI from NMTDS - inherits Iterator from NMTDS - - ---Purpose: - ---uses ---raises - -is - Create - returns IteratorCheckerSI from NMTDS; - ---C++: alias "Standard_EXPORT virtual ~NMTDS_IteratorCheckerSI();" - - Intersect(me:out) - is redefined protected; - ---fields -end IteratorCheckerSI; diff --git a/src/NMTDS/NMTDS_IteratorCheckerSI.cxx b/src/NMTDS/NMTDS_IteratorCheckerSI.cxx index 92742abc9..275333e9d 100644 --- a/src/NMTDS/NMTDS_IteratorCheckerSI.cxx +++ b/src/NMTDS/NMTDS_IteratorCheckerSI.cxx @@ -17,10 +17,10 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_IteratorChecker.cxx +// File: NMTDS_IteratorChecker.hxx // Author: Peter KURNEV -#include +#include #include #include diff --git a/src/NMTDS/NMTDS_IteratorCheckerSI.hxx b/src/NMTDS/NMTDS_IteratorCheckerSI.hxx index eac4a768e..3278a86c4 100644 --- a/src/NMTDS/NMTDS_IteratorCheckerSI.hxx +++ b/src/NMTDS/NMTDS_IteratorCheckerSI.hxx @@ -17,80 +17,30 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_IteratorChecker.cxx +// Author: Peter KURNEV + #ifndef _NMTDS_IteratorCheckerSI_HeaderFile #define _NMTDS_IteratorCheckerSI_HeaderFile -#ifndef _NMTDS_Iterator_HeaderFile -#include -#endif - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - +#include +//======================================================================= +//class : NMTDS_IteratorCheckerSI +//purpose : +//======================================================================= class NMTDS_IteratorCheckerSI : public NMTDS_Iterator { - -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 - // - - -Standard_EXPORT NMTDS_IteratorCheckerSI(); -Standard_EXPORT virtual ~NMTDS_IteratorCheckerSI(); - - - - + public: + + Standard_EXPORT + NMTDS_IteratorCheckerSI(); + Standard_EXPORT + virtual ~NMTDS_IteratorCheckerSI(); protected: - - // Methods PROTECTED - // - - -Standard_EXPORT virtual void Intersect() ; - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + Standard_EXPORT + virtual void Intersect() ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTDS/NMTDS_IteratorCheckerSI.ixx b/src/NMTDS/NMTDS_IteratorCheckerSI.ixx deleted file mode 100644 index 8453f5868..000000000 --- a/src/NMTDS/NMTDS_IteratorCheckerSI.ixx +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_IteratorCheckerSI.jxx b/src/NMTDS/NMTDS_IteratorCheckerSI.jxx deleted file mode 100644 index e6a40defa..000000000 --- a/src/NMTDS/NMTDS_IteratorCheckerSI.jxx +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_IteratorCheckerSI_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx index ffc908677..b2738719c 100644 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ b/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,126 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// -#ifndef _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#define _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors; -class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors; -class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors { - -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 - // - - -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() ; +#ifndef NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#define NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Value() const; - - -friend class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Address current; -Standard_Address previous; - - -}; - -#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() -#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - +#ifndef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif #endif diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx b/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx deleted file mode 100644 index 83358d4eb..000000000 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoMoreObject_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif -#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif -#ifndef _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif - - -#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() -#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfPair.hxx b/src/NMTDS/NMTDS_ListIteratorOfListOfPair.hxx index 30f9b9be3..958ce936b 100644 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfPair.hxx +++ b/src/NMTDS/NMTDS_ListIteratorOfListOfPair.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,110 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_ListIteratorOfListOfPair_HeaderFile -#define _NMTDS_ListIteratorOfListOfPair_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPair_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class NMTDS_ListOfPair; -class NMTDS_Pair; -class NMTDS_ListNodeOfListOfPair; - - - -class NMTDS_ListIteratorOfListOfPair { -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); - } - - - Standard_EXPORT NMTDS_ListIteratorOfListOfPair(); - - Standard_EXPORT NMTDS_ListIteratorOfListOfPair(const NMTDS_ListOfPair& L); - - Standard_EXPORT void Initialize(const NMTDS_ListOfPair& L) ; - - Standard_Boolean More() const; - - Standard_EXPORT void Next() ; - - Standard_EXPORT NMTDS_Pair& Value() const; - - -friend class NMTDS_ListOfPair; - - - -protected: - - - - - -private: - - - -Standard_Address current; -Standard_Address previous; - - -}; - -#define Item NMTDS_Pair -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_() -#define TCollection_List NMTDS_ListOfPair -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif +// File: NMTDS_ListIteratorOfListOfPair.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// + + +#ifndef NMTDS_ListIteratorOfListOfPair_HeaderFile +#define NMTDS_ListIteratorOfListOfPair_HeaderFile + +#ifndef NMTDS_ListOfPair_HeaderFile +#include +#endif + +#endif diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfPairBoolean.hxx b/src/NMTDS/NMTDS_ListIteratorOfListOfPairBoolean.hxx index e6b4c566a..4353f75be 100644 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfPairBoolean.hxx +++ b/src/NMTDS/NMTDS_ListIteratorOfListOfPairBoolean.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,110 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile -#define _NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPairBoolean_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class NMTDS_ListOfPairBoolean; -class NMTDS_PairBoolean; -class NMTDS_ListNodeOfListOfPairBoolean; - - - -class NMTDS_ListIteratorOfListOfPairBoolean { -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); - } - - - Standard_EXPORT NMTDS_ListIteratorOfListOfPairBoolean(); - - Standard_EXPORT NMTDS_ListIteratorOfListOfPairBoolean(const NMTDS_ListOfPairBoolean& L); - - Standard_EXPORT void Initialize(const NMTDS_ListOfPairBoolean& L) ; - - Standard_Boolean More() const; - - Standard_EXPORT void Next() ; - - Standard_EXPORT NMTDS_PairBoolean& Value() const; - - -friend class NMTDS_ListOfPairBoolean; - - - -protected: - - - - - -private: - - - -Standard_Address current; -Standard_Address previous; - - -}; - -#define Item NMTDS_PairBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_() -#define TCollection_List NMTDS_ListOfPairBoolean -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif +// File: NMTDS_ListIteratorOfListOfPairBoolean.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// + + +#ifndef NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile +#define NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile + +#ifndef NMTDS_ListOfPairBoolean_HeaderFile +#include +#endif + +#endif diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfPairBoolean_0.cxx b/src/NMTDS/NMTDS_ListIteratorOfListOfPairBoolean_0.cxx deleted file mode 100644 index dc6e2e8b8..000000000 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfPairBoolean_0.cxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoMoreObject_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfPairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_PairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_ListNodeOfListOfPairBoolean_HeaderFile -#include -#endif - - -#define Item NMTDS_PairBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_() -#define TCollection_List NMTDS_ListOfPairBoolean -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfPair_0.cxx b/src/NMTDS/NMTDS_ListIteratorOfListOfPair_0.cxx deleted file mode 100644 index b887aa7b9..000000000 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfPair_0.cxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoMoreObject_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfPair_HeaderFile -#include -#endif -#ifndef _NMTDS_Pair_HeaderFile -#include -#endif -#ifndef _NMTDS_ListNodeOfListOfPair_HeaderFile -#include -#endif - - -#define Item NMTDS_Pair -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_() -#define TCollection_List NMTDS_ListOfPair -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfPassKey.hxx b/src/NMTDS/NMTDS_ListIteratorOfListOfPassKey.hxx index 62f8352fa..8f7980ea2 100644 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfPassKey.hxx +++ b/src/NMTDS/NMTDS_ListIteratorOfListOfPassKey.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,126 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_ListIteratorOfListOfPassKey.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// -#ifndef _NMTDS_ListIteratorOfListOfPassKey_HeaderFile -#define _NMTDS_ListIteratorOfListOfPassKey_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPassKey_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class NMTDS_ListOfPassKey; -class NMTDS_PassKey; -class NMTDS_ListNodeOfListOfPassKey; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTDS_ListIteratorOfListOfPassKey { - -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 - // - - -Standard_EXPORT NMTDS_ListIteratorOfListOfPassKey(); - - -Standard_EXPORT NMTDS_ListIteratorOfListOfPassKey(const NMTDS_ListOfPassKey& L); - - -Standard_EXPORT void Initialize(const NMTDS_ListOfPassKey& L) ; - - Standard_Boolean More() const; - - -Standard_EXPORT void Next() ; +#ifndef NMTDS_ListIteratorOfListOfPassKey_HeaderFile +#define NMTDS_ListIteratorOfListOfPassKey_HeaderFile -Standard_EXPORT NMTDS_PassKey& Value() const; - - -friend class NMTDS_ListOfPassKey; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Address current; -Standard_Address previous; - - -}; - -#define Item NMTDS_PassKey -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_() -#define TCollection_List NMTDS_ListOfPassKey -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - +#ifndef NMTDS_ListOfPassKey_HeaderFile +#include +#endif #endif diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx b/src/NMTDS/NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx index f9db23ead..908b61d72 100644 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx +++ b/src/NMTDS/NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,126 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// -#ifndef _NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile -#define _NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class NMTDS_ListOfPassKeyBoolean; -class NMTDS_PassKeyBoolean; -class NMTDS_ListNodeOfListOfPassKeyBoolean; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTDS_ListIteratorOfListOfPassKeyBoolean { - -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 - // - - -Standard_EXPORT NMTDS_ListIteratorOfListOfPassKeyBoolean(); - - -Standard_EXPORT NMTDS_ListIteratorOfListOfPassKeyBoolean(const NMTDS_ListOfPassKeyBoolean& L); - - -Standard_EXPORT void Initialize(const NMTDS_ListOfPassKeyBoolean& L) ; - - Standard_Boolean More() const; - - -Standard_EXPORT void Next() ; +#ifndef NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile +#define NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile -Standard_EXPORT NMTDS_PassKeyBoolean& Value() const; - - -friend class NMTDS_ListOfPassKeyBoolean; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Address current; -Standard_Address previous; - - -}; - -#define Item NMTDS_PassKeyBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_() -#define TCollection_List NMTDS_ListOfPassKeyBoolean -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - +#ifndef NMTDS_ListOfPassKeyBoolean_HeaderFile +#include +#endif #endif diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfPassKeyBoolean_0.cxx b/src/NMTDS/NMTDS_ListIteratorOfListOfPassKeyBoolean_0.cxx deleted file mode 100644 index 3e447305c..000000000 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfPassKeyBoolean_0.cxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoMoreObject_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfPassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile -#include -#endif - - -#define Item NMTDS_PassKeyBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_() -#define TCollection_List NMTDS_ListOfPassKeyBoolean -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfPassKey_0.cxx b/src/NMTDS/NMTDS_ListIteratorOfListOfPassKey_0.cxx deleted file mode 100644 index 2e1793c2f..000000000 --- a/src/NMTDS/NMTDS_ListIteratorOfListOfPassKey_0.cxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoMoreObject_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfPassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_ListNodeOfListOfPassKey_HeaderFile -#include -#endif - - -#define Item NMTDS_PassKey -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_() -#define TCollection_List NMTDS_ListOfPassKey -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx deleted file mode 100644 index b61612bca..000000000 --- a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#define _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif - -#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors; -class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors; -class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors; - - - -class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,const TCollection_MapNodePtr& n); - - BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Value() const; -//Standard_EXPORT ~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors myValue; - - -}; - -#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() -#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx deleted file mode 100644 index 8dcfd7540..000000000 --- a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif -#ifndef _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif -//NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors", - sizeof(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors))) { - _anOtherObject = Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)((Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::DynamicType() const -{ - 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() {} -#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() -#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPair.hxx b/src/NMTDS/NMTDS_ListNodeOfListOfPair.hxx deleted file mode 100644 index 64f53eb36..000000000 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPair.hxx +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_ListNodeOfListOfPair_HeaderFile -#define _NMTDS_ListNodeOfListOfPair_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPair_HeaderFile -#include -#endif - -#ifndef _NMTDS_Pair_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class NMTDS_Pair; -class NMTDS_ListOfPair; -class NMTDS_ListIteratorOfListOfPair; - - - -class NMTDS_ListNodeOfListOfPair : public TCollection_MapNode { - -public: - - - NMTDS_ListNodeOfListOfPair(const NMTDS_Pair& I,const TCollection_MapNodePtr& n); - - NMTDS_Pair& Value() const; - - - - - DEFINE_STANDARD_RTTI(NMTDS_ListNodeOfListOfPair) - -protected: - - - - -private: - - -NMTDS_Pair myValue; - - -}; - -#define Item NMTDS_Pair -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_() -#define TCollection_List NMTDS_ListOfPair -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPairBoolean.hxx b/src/NMTDS/NMTDS_ListNodeOfListOfPairBoolean.hxx deleted file mode 100644 index 973c7b1ff..000000000 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPairBoolean.hxx +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_ListNodeOfListOfPairBoolean_HeaderFile -#define _NMTDS_ListNodeOfListOfPairBoolean_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPairBoolean_HeaderFile -#include -#endif - -#ifndef _NMTDS_PairBoolean_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class NMTDS_PairBoolean; -class NMTDS_ListOfPairBoolean; -class NMTDS_ListIteratorOfListOfPairBoolean; - - - -class NMTDS_ListNodeOfListOfPairBoolean : public TCollection_MapNode { - -public: - - - NMTDS_ListNodeOfListOfPairBoolean(const NMTDS_PairBoolean& I,const TCollection_MapNodePtr& n); - - NMTDS_PairBoolean& Value() const; - - - - - DEFINE_STANDARD_RTTI(NMTDS_ListNodeOfListOfPairBoolean) - -protected: - - - - -private: - - -NMTDS_PairBoolean myValue; - - -}; - -#define Item NMTDS_PairBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_() -#define TCollection_List NMTDS_ListOfPairBoolean -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPairBoolean_0.cxx b/src/NMTDS/NMTDS_ListNodeOfListOfPairBoolean_0.cxx deleted file mode 100644 index 3f4798ae1..000000000 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPairBoolean_0.cxx +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_Type_HeaderFile -#include -#endif - -#ifndef _NMTDS_PairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfPairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile -#include -#endif - - - - -IMPLEMENT_STANDARD_TYPE(NMTDS_ListNodeOfListOfPairBoolean) -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(TCollection_MapNode), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() -IMPLEMENT_STANDARD_TYPE_END(NMTDS_ListNodeOfListOfPairBoolean) - - -IMPLEMENT_DOWNCAST(NMTDS_ListNodeOfListOfPairBoolean,Standard_Transient) -IMPLEMENT_STANDARD_RTTI(NMTDS_ListNodeOfListOfPairBoolean) - - -#define Item NMTDS_PairBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_() -#define TCollection_List NMTDS_ListOfPairBoolean -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPair_0.cxx b/src/NMTDS/NMTDS_ListNodeOfListOfPair_0.cxx deleted file mode 100644 index bdb6ec4c2..000000000 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPair_0.cxx +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_Type_HeaderFile -#include -#endif - -#ifndef _NMTDS_Pair_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfPair_HeaderFile -#include -#endif -#ifndef _NMTDS_ListIteratorOfListOfPair_HeaderFile -#include -#endif - - - - -IMPLEMENT_STANDARD_TYPE(NMTDS_ListNodeOfListOfPair) -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(TCollection_MapNode), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() -IMPLEMENT_STANDARD_TYPE_END(NMTDS_ListNodeOfListOfPair) - - -IMPLEMENT_DOWNCAST(NMTDS_ListNodeOfListOfPair,Standard_Transient) -IMPLEMENT_STANDARD_RTTI(NMTDS_ListNodeOfListOfPair) - - -#define Item NMTDS_Pair -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_() -#define TCollection_List NMTDS_ListOfPair -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPassKey.hxx b/src/NMTDS/NMTDS_ListNodeOfListOfPassKey.hxx deleted file mode 100644 index 722700a71..000000000 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPassKey.hxx +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_ListNodeOfListOfPassKey_HeaderFile -#define _NMTDS_ListNodeOfListOfPassKey_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPassKey_HeaderFile -#include -#endif - -#ifndef _NMTDS_PassKey_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class NMTDS_PassKey; -class NMTDS_ListOfPassKey; -class NMTDS_ListIteratorOfListOfPassKey; - - - -class NMTDS_ListNodeOfListOfPassKey : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTDS_ListNodeOfListOfPassKey(const NMTDS_PassKey& I,const TCollection_MapNodePtr& n); - - NMTDS_PassKey& Value() const; -//Standard_EXPORT ~NMTDS_ListNodeOfListOfPassKey(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -NMTDS_PassKey myValue; - - -}; - -#define Item NMTDS_PassKey -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_() -#define TCollection_List NMTDS_ListOfPassKey -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean.hxx b/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean.hxx deleted file mode 100644 index 56caf5caa..000000000 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean.hxx +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile -#define _NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile -#include -#endif - -#ifndef _NMTDS_PassKeyBoolean_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class NMTDS_PassKeyBoolean; -class NMTDS_ListOfPassKeyBoolean; -class NMTDS_ListIteratorOfListOfPassKeyBoolean; - - - -class NMTDS_ListNodeOfListOfPassKeyBoolean : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTDS_ListNodeOfListOfPassKeyBoolean(const NMTDS_PassKeyBoolean& I,const TCollection_MapNodePtr& n); - - NMTDS_PassKeyBoolean& Value() const; -//Standard_EXPORT ~NMTDS_ListNodeOfListOfPassKeyBoolean(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -NMTDS_PassKeyBoolean myValue; - - -}; - -#define Item NMTDS_PassKeyBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_() -#define TCollection_List NMTDS_ListOfPassKeyBoolean -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx b/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx deleted file mode 100644 index ca21567e3..000000000 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _NMTDS_PassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfPassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile -#include -#endif -//NMTDS_ListNodeOfListOfPassKeyBoolean::~NMTDS_ListNodeOfListOfPassKeyBoolean() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTDS_ListNodeOfListOfPassKeyBoolean_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTDS_ListNodeOfListOfPassKeyBoolean", - sizeof(NMTDS_ListNodeOfListOfPassKeyBoolean), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTDS_ListNodeOfListOfPassKeyBoolean) Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTDS_ListNodeOfListOfPassKeyBoolean) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKeyBoolean))) { - _anOtherObject = Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)((Handle(NMTDS_ListNodeOfListOfPassKeyBoolean)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTDS_ListNodeOfListOfPassKeyBoolean::DynamicType() const -{ - return STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKeyBoolean) ; -} -//Standard_Boolean NMTDS_ListNodeOfListOfPassKeyBoolean::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKeyBoolean) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_NMTDS_ListNodeOfListOfPassKeyBoolean::~Handle_NMTDS_ListNodeOfListOfPassKeyBoolean() {} -#define Item NMTDS_PassKeyBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_() -#define TCollection_List NMTDS_ListOfPassKeyBoolean -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPassKey_0.cxx b/src/NMTDS/NMTDS_ListNodeOfListOfPassKey_0.cxx deleted file mode 100644 index f5656e282..000000000 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPassKey_0.cxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _NMTDS_PassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_ListOfPassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_ListIteratorOfListOfPassKey_HeaderFile -#include -#endif -//NMTDS_ListNodeOfListOfPassKey::~NMTDS_ListNodeOfListOfPassKey() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTDS_ListNodeOfListOfPassKey_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTDS_ListNodeOfListOfPassKey", - sizeof(NMTDS_ListNodeOfListOfPassKey), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTDS_ListNodeOfListOfPassKey) Handle(NMTDS_ListNodeOfListOfPassKey)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTDS_ListNodeOfListOfPassKey) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKey))) { - _anOtherObject = Handle(NMTDS_ListNodeOfListOfPassKey)((Handle(NMTDS_ListNodeOfListOfPassKey)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTDS_ListNodeOfListOfPassKey::DynamicType() const -{ - return STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKey) ; -} -//Standard_Boolean NMTDS_ListNodeOfListOfPassKey::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(NMTDS_ListNodeOfListOfPassKey) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_NMTDS_ListNodeOfListOfPassKey::~Handle_NMTDS_ListNodeOfListOfPassKey() {} -#define Item NMTDS_PassKey -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_() -#define TCollection_List NMTDS_ListOfPassKey -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx index 3f4ab1ee4..f89d3e3ac 100644 --- a/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ b/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,180 +16,19 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// -#ifndef _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#define _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors; -class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors; -class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors { - -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 - // - - -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) ; +#ifndef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#define NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -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) ; - - -friend class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other); - - - // Fields PRIVATE - // -Standard_Address myFirst; -Standard_Address myLast; - - -}; - -#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() -#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// +#include +#include +typedef NCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors; +typedef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors::Iterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors; #endif diff --git a/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx b/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx deleted file mode 100644 index 45bcf18f3..000000000 --- a/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif -#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif -#ifndef _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif - - -#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() -#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListOfPair.hxx b/src/NMTDS/NMTDS_ListOfPair.hxx index bc31abbfe..400cd66fb 100644 --- a/src/NMTDS/NMTDS_ListOfPair.hxx +++ b/src/NMTDS/NMTDS_ListOfPair.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,148 +16,19 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_ListOfPair_HeaderFile -#define _NMTDS_ListOfPair_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPair_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class NMTDS_ListIteratorOfListOfPair; -class NMTDS_Pair; -class NMTDS_ListNodeOfListOfPair; - - - -class NMTDS_ListOfPair { -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); - } - - - Standard_EXPORT NMTDS_ListOfPair(); - - Standard_EXPORT void Assign(const NMTDS_ListOfPair& Other) ; - void operator=(const NMTDS_ListOfPair& Other) -{ - Assign(Other); -} - - Standard_EXPORT Standard_Integer Extent() const; - - Standard_EXPORT void Clear() ; -~NMTDS_ListOfPair() -{ - Clear(); -} - - Standard_Boolean IsEmpty() const; - - Standard_EXPORT void Prepend(const NMTDS_Pair& I) ; - - Standard_EXPORT void Prepend(const NMTDS_Pair& I,NMTDS_ListIteratorOfListOfPair& theIt) ; - - Standard_EXPORT void Prepend(NMTDS_ListOfPair& Other) ; - - Standard_EXPORT void Append(const NMTDS_Pair& I) ; - - Standard_EXPORT void Append(const NMTDS_Pair& I,NMTDS_ListIteratorOfListOfPair& theIt) ; - - Standard_EXPORT void Append(NMTDS_ListOfPair& Other) ; - - Standard_EXPORT NMTDS_Pair& First() const; - - Standard_EXPORT NMTDS_Pair& Last() const; - - Standard_EXPORT void RemoveFirst() ; - - Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfPair& It) ; - - Standard_EXPORT void InsertBefore(const NMTDS_Pair& I,NMTDS_ListIteratorOfListOfPair& It) ; - - Standard_EXPORT void InsertBefore(NMTDS_ListOfPair& Other,NMTDS_ListIteratorOfListOfPair& It) ; - - Standard_EXPORT void InsertAfter(const NMTDS_Pair& I,NMTDS_ListIteratorOfListOfPair& It) ; - - Standard_EXPORT void InsertAfter(NMTDS_ListOfPair& Other,NMTDS_ListIteratorOfListOfPair& It) ; - - -friend class NMTDS_ListIteratorOfListOfPair; - - - -protected: - - - - - -private: - - - Standard_EXPORT NMTDS_ListOfPair(const NMTDS_ListOfPair& Other); - - -Standard_Address myFirst; -Standard_Address myLast; - - -}; - -#define Item NMTDS_Pair -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_() -#define TCollection_List NMTDS_ListOfPair -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif +// File: NMTDS_ListOfPair.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// + + +#ifndef NMTDS_ListOfPair_HeaderFile +#define NMTDS_ListOfPair_HeaderFile + +#include +#include + +typedef NCollection_List NMTDS_ListOfPair; +typedef NMTDS_ListOfPair::Iterator NMTDS_ListIteratorOfListOfPair; + +#endif diff --git a/src/NMTDS/NMTDS_ListOfPairBoolean.hxx b/src/NMTDS/NMTDS_ListOfPairBoolean.hxx index e7e0a354a..e45f4b91a 100644 --- a/src/NMTDS/NMTDS_ListOfPairBoolean.hxx +++ b/src/NMTDS/NMTDS_ListOfPairBoolean.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,148 +16,19 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_ListOfPairBoolean_HeaderFile -#define _NMTDS_ListOfPairBoolean_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPairBoolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class NMTDS_ListIteratorOfListOfPairBoolean; -class NMTDS_PairBoolean; -class NMTDS_ListNodeOfListOfPairBoolean; - - - -class NMTDS_ListOfPairBoolean { -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); - } - - - Standard_EXPORT NMTDS_ListOfPairBoolean(); - - Standard_EXPORT void Assign(const NMTDS_ListOfPairBoolean& Other) ; - void operator=(const NMTDS_ListOfPairBoolean& Other) -{ - Assign(Other); -} - - Standard_EXPORT Standard_Integer Extent() const; - - Standard_EXPORT void Clear() ; -~NMTDS_ListOfPairBoolean() -{ - Clear(); -} - - Standard_Boolean IsEmpty() const; - - Standard_EXPORT void Prepend(const NMTDS_PairBoolean& I) ; - - Standard_EXPORT void Prepend(const NMTDS_PairBoolean& I,NMTDS_ListIteratorOfListOfPairBoolean& theIt) ; - - Standard_EXPORT void Prepend(NMTDS_ListOfPairBoolean& Other) ; - - Standard_EXPORT void Append(const NMTDS_PairBoolean& I) ; - - Standard_EXPORT void Append(const NMTDS_PairBoolean& I,NMTDS_ListIteratorOfListOfPairBoolean& theIt) ; - - Standard_EXPORT void Append(NMTDS_ListOfPairBoolean& Other) ; - - Standard_EXPORT NMTDS_PairBoolean& First() const; - - Standard_EXPORT NMTDS_PairBoolean& Last() const; - - Standard_EXPORT void RemoveFirst() ; - - Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfPairBoolean& It) ; - - Standard_EXPORT void InsertBefore(const NMTDS_PairBoolean& I,NMTDS_ListIteratorOfListOfPairBoolean& It) ; - - Standard_EXPORT void InsertBefore(NMTDS_ListOfPairBoolean& Other,NMTDS_ListIteratorOfListOfPairBoolean& It) ; - - Standard_EXPORT void InsertAfter(const NMTDS_PairBoolean& I,NMTDS_ListIteratorOfListOfPairBoolean& It) ; - - Standard_EXPORT void InsertAfter(NMTDS_ListOfPairBoolean& Other,NMTDS_ListIteratorOfListOfPairBoolean& It) ; - - -friend class NMTDS_ListIteratorOfListOfPairBoolean; - - - -protected: - - - - - -private: - - - Standard_EXPORT NMTDS_ListOfPairBoolean(const NMTDS_ListOfPairBoolean& Other); - - -Standard_Address myFirst; -Standard_Address myLast; - - -}; - -#define Item NMTDS_PairBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_() -#define TCollection_List NMTDS_ListOfPairBoolean -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif +// File: NMTDS_ListOfPairBoolean.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// + + +#ifndef NMTDS_ListOfPairBoolean_HeaderFile +#define NMTDS_ListOfPairBoolean_HeaderFile + +#include +#include + +typedef NCollection_List NMTDS_ListOfPairBoolean; +typedef NMTDS_ListOfPairBoolean::Iterator NMTDS_ListIteratorOfListOfPairBoolean; + +#endif diff --git a/src/NMTDS/NMTDS_ListOfPairBoolean_0.cxx b/src/NMTDS/NMTDS_ListOfPairBoolean_0.cxx deleted file mode 100644 index 08fe7d645..000000000 --- a/src/NMTDS/NMTDS_ListOfPairBoolean_0.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_PairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_ListNodeOfListOfPairBoolean_HeaderFile -#include -#endif - - -#define Item NMTDS_PairBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPairBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPairBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPairBoolean_Type_() -#define TCollection_List NMTDS_ListOfPairBoolean -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListOfPair_0.cxx b/src/NMTDS/NMTDS_ListOfPair_0.cxx deleted file mode 100644 index f6009aa61..000000000 --- a/src/NMTDS/NMTDS_ListOfPair_0.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_ListIteratorOfListOfPair_HeaderFile -#include -#endif -#ifndef _NMTDS_Pair_HeaderFile -#include -#endif -#ifndef _NMTDS_ListNodeOfListOfPair_HeaderFile -#include -#endif - - -#define Item NMTDS_Pair -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPair -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPair -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPair_Type_() -#define TCollection_List NMTDS_ListOfPair -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListOfPassKey.hxx b/src/NMTDS/NMTDS_ListOfPassKey.hxx index a6b2dcaa0..3c920f215 100644 --- a/src/NMTDS/NMTDS_ListOfPassKey.hxx +++ b/src/NMTDS/NMTDS_ListOfPassKey.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,180 +16,19 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_ListOfPassKey.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// -#ifndef _NMTDS_ListOfPassKey_HeaderFile -#define _NMTDS_ListOfPassKey_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPassKey_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class NMTDS_ListIteratorOfListOfPassKey; -class NMTDS_PassKey; -class NMTDS_ListNodeOfListOfPassKey; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTDS_ListOfPassKey { - -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 - // - - -Standard_EXPORT NMTDS_ListOfPassKey(); - - -Standard_EXPORT void Assign(const NMTDS_ListOfPassKey& Other) ; - void operator=(const NMTDS_ListOfPassKey& Other) -{ - Assign(Other); -} - - - -Standard_EXPORT Standard_Integer Extent() const; - - -Standard_EXPORT void Clear() ; -~NMTDS_ListOfPassKey() -{ - Clear(); -} - - - Standard_Boolean IsEmpty() const; - - -Standard_EXPORT void Prepend(const NMTDS_PassKey& I) ; - - -Standard_EXPORT void Prepend(const NMTDS_PassKey& I,NMTDS_ListIteratorOfListOfPassKey& theIt) ; - - -Standard_EXPORT void Prepend(NMTDS_ListOfPassKey& Other) ; - - -Standard_EXPORT void Append(const NMTDS_PassKey& I) ; - - -Standard_EXPORT void Append(const NMTDS_PassKey& I,NMTDS_ListIteratorOfListOfPassKey& theIt) ; - - -Standard_EXPORT void Append(NMTDS_ListOfPassKey& Other) ; +#ifndef NMTDS_ListOfPassKey_HeaderFile +#define NMTDS_ListOfPassKey_HeaderFile -Standard_EXPORT NMTDS_PassKey& First() const; - - -Standard_EXPORT NMTDS_PassKey& Last() const; - - -Standard_EXPORT void RemoveFirst() ; - - -Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfPassKey& It) ; - - -Standard_EXPORT void InsertBefore(const NMTDS_PassKey& I,NMTDS_ListIteratorOfListOfPassKey& It) ; - - -Standard_EXPORT void InsertBefore(NMTDS_ListOfPassKey& Other,NMTDS_ListIteratorOfListOfPassKey& It) ; - - -Standard_EXPORT void InsertAfter(const NMTDS_PassKey& I,NMTDS_ListIteratorOfListOfPassKey& It) ; - - -Standard_EXPORT void InsertAfter(NMTDS_ListOfPassKey& Other,NMTDS_ListIteratorOfListOfPassKey& It) ; - - -friend class NMTDS_ListIteratorOfListOfPassKey; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTDS_ListOfPassKey(const NMTDS_ListOfPassKey& Other); - - - // Fields PRIVATE - // -Standard_Address myFirst; -Standard_Address myLast; - - -}; - -#define Item NMTDS_PassKey -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_() -#define TCollection_List NMTDS_ListOfPassKey -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// +#include +#include +typedef NCollection_List NMTDS_ListOfPassKey; +typedef NMTDS_ListOfPassKey::Iterator NMTDS_ListIteratorOfListOfPassKey; #endif diff --git a/src/NMTDS/NMTDS_ListOfPassKeyBoolean.hxx b/src/NMTDS/NMTDS_ListOfPassKeyBoolean.hxx index 4dc70ab2b..402b6f1d7 100644 --- a/src/NMTDS/NMTDS_ListOfPassKeyBoolean.hxx +++ b/src/NMTDS/NMTDS_ListOfPassKeyBoolean.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,180 +16,19 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_ListOfPassKeyBoolean.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// -#ifndef _NMTDS_ListOfPassKeyBoolean_HeaderFile -#define _NMTDS_ListOfPassKeyBoolean_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class NMTDS_ListIteratorOfListOfPassKeyBoolean; -class NMTDS_PassKeyBoolean; -class NMTDS_ListNodeOfListOfPassKeyBoolean; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTDS_ListOfPassKeyBoolean { - -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 - // - - -Standard_EXPORT NMTDS_ListOfPassKeyBoolean(); - - -Standard_EXPORT void Assign(const NMTDS_ListOfPassKeyBoolean& Other) ; - void operator=(const NMTDS_ListOfPassKeyBoolean& Other) -{ - Assign(Other); -} - - - -Standard_EXPORT Standard_Integer Extent() const; - - -Standard_EXPORT void Clear() ; -~NMTDS_ListOfPassKeyBoolean() -{ - Clear(); -} - - - Standard_Boolean IsEmpty() const; - - -Standard_EXPORT void Prepend(const NMTDS_PassKeyBoolean& I) ; - - -Standard_EXPORT void Prepend(const NMTDS_PassKeyBoolean& I,NMTDS_ListIteratorOfListOfPassKeyBoolean& theIt) ; - - -Standard_EXPORT void Prepend(NMTDS_ListOfPassKeyBoolean& Other) ; - - -Standard_EXPORT void Append(const NMTDS_PassKeyBoolean& I) ; - - -Standard_EXPORT void Append(const NMTDS_PassKeyBoolean& I,NMTDS_ListIteratorOfListOfPassKeyBoolean& theIt) ; - - -Standard_EXPORT void Append(NMTDS_ListOfPassKeyBoolean& Other) ; +#ifndef NMTDS_ListOfPassKeyBoolean_HeaderFile +#define NMTDS_ListOfPassKeyBoolean_HeaderFile -Standard_EXPORT NMTDS_PassKeyBoolean& First() const; - - -Standard_EXPORT NMTDS_PassKeyBoolean& Last() const; - - -Standard_EXPORT void RemoveFirst() ; - - -Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfPassKeyBoolean& It) ; - - -Standard_EXPORT void InsertBefore(const NMTDS_PassKeyBoolean& I,NMTDS_ListIteratorOfListOfPassKeyBoolean& It) ; - - -Standard_EXPORT void InsertBefore(NMTDS_ListOfPassKeyBoolean& Other,NMTDS_ListIteratorOfListOfPassKeyBoolean& It) ; - - -Standard_EXPORT void InsertAfter(const NMTDS_PassKeyBoolean& I,NMTDS_ListIteratorOfListOfPassKeyBoolean& It) ; - - -Standard_EXPORT void InsertAfter(NMTDS_ListOfPassKeyBoolean& Other,NMTDS_ListIteratorOfListOfPassKeyBoolean& It) ; - - -friend class NMTDS_ListIteratorOfListOfPassKeyBoolean; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTDS_ListOfPassKeyBoolean(const NMTDS_ListOfPassKeyBoolean& Other); - - - // Fields PRIVATE - // -Standard_Address myFirst; -Standard_Address myLast; - - -}; - -#define Item NMTDS_PassKeyBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_() -#define TCollection_List NMTDS_ListOfPassKeyBoolean -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// +#include +#include +typedef NCollection_List NMTDS_ListOfPassKeyBoolean; +typedef NMTDS_ListOfPassKeyBoolean::Iterator NMTDS_ListIteratorOfListOfPassKeyBoolean; #endif diff --git a/src/NMTDS/NMTDS_ListOfPassKeyBoolean_0.cxx b/src/NMTDS/NMTDS_ListOfPassKeyBoolean_0.cxx deleted file mode 100644 index 0dd0e2799..000000000 --- a/src/NMTDS/NMTDS_ListOfPassKeyBoolean_0.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_ListNodeOfListOfPassKeyBoolean_HeaderFile -#include -#endif - - -#define Item NMTDS_PassKeyBoolean -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKeyBoolean -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKeyBoolean -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKeyBoolean_Type_() -#define TCollection_List NMTDS_ListOfPassKeyBoolean -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_ListOfPassKey_0.cxx b/src/NMTDS/NMTDS_ListOfPassKey_0.cxx deleted file mode 100644 index 674622d84..000000000 --- a/src/NMTDS/NMTDS_ListOfPassKey_0.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_ListIteratorOfListOfPassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_ListNodeOfListOfPassKey_HeaderFile -#include -#endif - - -#define Item NMTDS_PassKey -#define Item_hxx -#define TCollection_ListNode NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTDS_ListIteratorOfListOfPassKey -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfPassKey -#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfPassKey_Type_() -#define TCollection_List NMTDS_ListOfPassKey -#define TCollection_List_hxx -#include - diff --git a/src/NMTDS/NMTDS_MapIteratorOfMapOfPairBoolean.hxx b/src/NMTDS/NMTDS_MapIteratorOfMapOfPairBoolean.hxx index 21ca725a8..5bce39236 100644 --- a/src/NMTDS/NMTDS_MapIteratorOfMapOfPairBoolean.hxx +++ b/src/NMTDS/NMTDS_MapIteratorOfMapOfPairBoolean.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,79 +16,18 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile -#define _NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class NMTDS_PairBoolean; -class NMTDS_PairMapHasher; -class NMTDS_MapOfPairBoolean; -class NMTDS_StdMapNodeOfMapOfPairBoolean; - - - -class NMTDS_MapIteratorOfMapOfPairBoolean : public TCollection_BasicMapIterator { -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); - } - - - Standard_EXPORT NMTDS_MapIteratorOfMapOfPairBoolean(); - - Standard_EXPORT NMTDS_MapIteratorOfMapOfPairBoolean(const NMTDS_MapOfPairBoolean& aMap); - - Standard_EXPORT void Initialize(const NMTDS_MapOfPairBoolean& aMap) ; - - Standard_EXPORT const NMTDS_PairBoolean& Key() const; - - - - - -protected: - - - - - -private: - - - - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif + +// File: NMTDS_MapIteratorOfMapOfPairBoolean.hxx +// Created: Mon Feb 20 08:22:39 2012 +// Author: +// + + +#ifndef NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile +#define NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile + +#ifndef NMTDS_MapOfPairBoolean_HeaderFile +#include +#endif + +#endif diff --git a/src/NMTDS/NMTDS_MapIteratorOfMapOfPairBoolean_0.cxx b/src/NMTDS/NMTDS_MapIteratorOfMapOfPairBoolean_0.cxx deleted file mode 100644 index 85c3bfdf2..000000000 --- a/src/NMTDS/NMTDS_MapIteratorOfMapOfPairBoolean_0.cxx +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_PairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_PairMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_MapOfPairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile -#include -#endif - - -#define TheKey NMTDS_PairBoolean -#define TheKey_hxx -#define Hasher NMTDS_PairMapHasher -#define Hasher_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPairBoolean -#define TCollection_StdMapNode_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPairBoolean -#define TCollection_MapIterator_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPairBoolean -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPairBoolean_Type_() -#define TCollection_Map NMTDS_MapOfPairBoolean -#define TCollection_Map_hxx -#include - diff --git a/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKey.hxx b/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKey.hxx index 0945a30ed..b96214eda 100644 --- a/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKey.hxx +++ b/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKey.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -20,93 +17,17 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _NMTDS_MapIteratorOfMapOfPassKey_HeaderFile -#define _NMTDS_MapIteratorOfMapOfPassKey_HeaderFile +// File: NMRCol_MapIteratorOfMapOfPassKey.hxx +// Created: Mon Feb 20 08:22:39 2012 +// Author: +// -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class NMTDS_PassKey; -class NMTDS_PassKeyMapHasher; -class NMTDS_MapOfPassKey; -class NMTDS_StdMapNodeOfMapOfPassKey; +#ifndef NMRCol_MapIteratorOfMapOfPassKey_HeaderFile +#define NMRCol_MapIteratorOfMapOfPassKey_HeaderFile -#ifndef _Standard_HeaderFile -#include +#ifndef NMTDS_MapOfPassKey_HeaderFile +#include #endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTDS_MapIteratorOfMapOfPassKey : public TCollection_BasicMapIterator { - -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 - // - - -Standard_EXPORT NMTDS_MapIteratorOfMapOfPassKey(); - - -Standard_EXPORT NMTDS_MapIteratorOfMapOfPassKey(const NMTDS_MapOfPassKey& aMap); - - -Standard_EXPORT void Initialize(const NMTDS_MapOfPassKey& aMap) ; - - -Standard_EXPORT const NMTDS_PassKey& Key() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx b/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx index e6e0ce631..db4dc221d 100644 --- a/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx +++ b/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -20,93 +17,17 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _NMTDS_MapIteratorOfMapOfPassKeyBoolean_HeaderFile -#define _NMTDS_MapIteratorOfMapOfPassKeyBoolean_HeaderFile +// File: NMRCol_MapIteratorOfMapOfPassKeyBoolean.hxx +// Created: Mon Feb 20 08:22:39 2012 +// Author: +// -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class NMTDS_PassKeyBoolean; -class NMTDS_PassKeyMapHasher; -class NMTDS_MapOfPassKeyBoolean; -class NMTDS_StdMapNodeOfMapOfPassKeyBoolean; +#ifndef NMRCol_MapIteratorOfMapOfPassKeyBoolean_HeaderFile +#define NMRCol_MapIteratorOfMapOfPassKeyBoolean_HeaderFile -#ifndef _Standard_HeaderFile -#include +#ifndef NMTDS_MapOfPassKeyBoolean_HeaderFile +#include #endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTDS_MapIteratorOfMapOfPassKeyBoolean : public TCollection_BasicMapIterator { - -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 - // - - -Standard_EXPORT NMTDS_MapIteratorOfMapOfPassKeyBoolean(); - - -Standard_EXPORT NMTDS_MapIteratorOfMapOfPassKeyBoolean(const NMTDS_MapOfPassKeyBoolean& aMap); - - -Standard_EXPORT void Initialize(const NMTDS_MapOfPassKeyBoolean& aMap) ; - - -Standard_EXPORT const NMTDS_PassKeyBoolean& Key() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKeyBoolean_0.cxx b/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKeyBoolean_0.cxx deleted file mode 100644 index e29a06d7e..000000000 --- a/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKeyBoolean_0.cxx +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_MapOfPassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile -#include -#endif - - -#define TheKey NMTDS_PassKeyBoolean -#define TheKey_hxx -#define Hasher NMTDS_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKeyBoolean -#define TCollection_MapIterator_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKeyBoolean -#define TCollection_StdMapNode_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKeyBoolean_Type_() -#define TCollection_Map NMTDS_MapOfPassKeyBoolean -#define TCollection_Map_hxx -#include - diff --git a/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKey_0.cxx b/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKey_0.cxx deleted file mode 100644 index 7aa98e781..000000000 --- a/src/NMTDS/NMTDS_MapIteratorOfMapOfPassKey_0.cxx +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_MapOfPassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile -#include -#endif - - -#define TheKey NMTDS_PassKey -#define TheKey_hxx -#define Hasher NMTDS_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKey -#define TCollection_MapIterator_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKey -#define TCollection_StdMapNode_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKey -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKey_Type_() -#define TCollection_Map NMTDS_MapOfPassKey -#define TCollection_Map_hxx -#include - diff --git a/src/NMTDS/NMTDS_MapOfPairBoolean.hxx b/src/NMTDS/NMTDS_MapOfPairBoolean.hxx index 51e1f0707..0fdb9c41d 100644 --- a/src/NMTDS/NMTDS_MapOfPairBoolean.hxx +++ b/src/NMTDS/NMTDS_MapOfPairBoolean.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,101 +16,25 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_MapOfPairBoolean_HeaderFile -#define _NMTDS_MapOfPairBoolean_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_DomainError; -class NMTDS_PairBoolean; -class NMTDS_PairMapHasher; -class NMTDS_StdMapNodeOfMapOfPairBoolean; -class NMTDS_MapIteratorOfMapOfPairBoolean; - - - -class NMTDS_MapOfPairBoolean : public TCollection_BasicMap { -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); - } - - - Standard_EXPORT NMTDS_MapOfPairBoolean(const Standard_Integer NbBuckets = 1); - - Standard_EXPORT NMTDS_MapOfPairBoolean& Assign(const NMTDS_MapOfPairBoolean& Other) ; - NMTDS_MapOfPairBoolean& operator =(const NMTDS_MapOfPairBoolean& Other) -{ - return Assign(Other); -} - - Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - Standard_EXPORT void Clear() ; -~NMTDS_MapOfPairBoolean() -{ - Clear(); -} - - Standard_EXPORT Standard_Boolean Add(const NMTDS_PairBoolean& aKey) ; - - Standard_EXPORT Standard_Boolean Contains(const NMTDS_PairBoolean& aKey) const; - - Standard_EXPORT Standard_Boolean Remove(const NMTDS_PairBoolean& aKey) ; - - - - - -protected: - - - - - -private: - - - Standard_EXPORT NMTDS_MapOfPairBoolean(const NMTDS_MapOfPairBoolean& Other); - - - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif + +// File: NMTDS_MapOfPairBoolean.hxx +// Created: Mon Feb 20 08:19:07 2012 +// Author: +// + + +#ifndef NMTDS_MapOfPairBoolean_HeaderFile +#define NMTDS_MapOfPairBoolean_HeaderFile + +#include +#include + +#define _NCollection_MapHasher +#include + +typedef NCollection_Map NMTDS_MapOfPairBoolean; +typedef NMTDS_MapOfPairBoolean::Iterator NMTDS_MapIteratorOfMapOfPairBoolean; + +#undef _NCollection_MapHasher + +#endif diff --git a/src/NMTDS/NMTDS_MapOfPairBoolean_0.cxx b/src/NMTDS/NMTDS_MapOfPairBoolean_0.cxx deleted file mode 100644 index 6906c74c8..000000000 --- a/src/NMTDS/NMTDS_MapOfPairBoolean_0.cxx +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _NMTDS_PairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_PairMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile -#include -#endif - - -#define TheKey NMTDS_PairBoolean -#define TheKey_hxx -#define Hasher NMTDS_PairMapHasher -#define Hasher_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPairBoolean -#define TCollection_StdMapNode_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPairBoolean -#define TCollection_MapIterator_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPairBoolean -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPairBoolean_Type_() -#define TCollection_Map NMTDS_MapOfPairBoolean -#define TCollection_Map_hxx -#include - diff --git a/src/NMTDS/NMTDS_MapOfPassKey.hxx b/src/NMTDS/NMTDS_MapOfPassKey.hxx index 2c30844b7..4648a43cf 100644 --- a/src/NMTDS/NMTDS_MapOfPassKey.hxx +++ b/src/NMTDS/NMTDS_MapOfPassKey.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -20,121 +17,24 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _NMTDS_MapOfPassKey_HeaderFile -#define _NMTDS_MapOfPassKey_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_DomainError; -class NMTDS_PassKey; -class NMTDS_PassKeyMapHasher; -class NMTDS_MapIteratorOfMapOfPassKey; -class NMTDS_StdMapNodeOfMapOfPassKey; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTDS_MapOfPassKey : public TCollection_BasicMap { - -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 - // - - -Standard_EXPORT NMTDS_MapOfPassKey(const Standard_Integer NbBuckets = 1); - - -Standard_EXPORT NMTDS_MapOfPassKey& Assign(const NMTDS_MapOfPassKey& Other) ; - NMTDS_MapOfPassKey& operator =(const NMTDS_MapOfPassKey& Other) -{ - return Assign(Other); -} - - - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - -Standard_EXPORT void Clear() ; -~NMTDS_MapOfPassKey() -{ - Clear(); -} - +// File: NMTDS_MapOfPassKey.hxx +// Created: Mon Feb 20 08:19:07 2012 +// Author: +// -Standard_EXPORT Standard_Boolean Add(const NMTDS_PassKey& aKey) ; +#ifndef NMTDS_MapOfPassKey_HeaderFile +#define NMTDS_MapOfPassKey_HeaderFile +#include +#include -Standard_EXPORT Standard_Boolean Contains(const NMTDS_PassKey& aKey) const; +#define _NCollection_MapHasher +#include +typedef NCollection_Map NMTDS_MapOfPassKey; +typedef NMTDS_MapOfPassKey::Iterator NMTDS_MapIteratorOfMapOfPassKey; -Standard_EXPORT Standard_Boolean Remove(const NMTDS_PassKey& aKey) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTDS_MapOfPassKey(const NMTDS_MapOfPassKey& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - +#undef _NCollection_MapHasher #endif diff --git a/src/NMTDS/NMTDS_MapOfPassKeyBoolean.hxx b/src/NMTDS/NMTDS_MapOfPassKeyBoolean.hxx index 8dc78dc16..bbc2596e6 100644 --- a/src/NMTDS/NMTDS_MapOfPassKeyBoolean.hxx +++ b/src/NMTDS/NMTDS_MapOfPassKeyBoolean.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -20,121 +17,24 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _NMTDS_MapOfPassKeyBoolean_HeaderFile -#define _NMTDS_MapOfPassKeyBoolean_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_DomainError; -class NMTDS_PassKeyBoolean; -class NMTDS_PassKeyMapHasher; -class NMTDS_MapIteratorOfMapOfPassKeyBoolean; -class NMTDS_StdMapNodeOfMapOfPassKeyBoolean; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTDS_MapOfPassKeyBoolean : public TCollection_BasicMap { - -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 - // - - -Standard_EXPORT NMTDS_MapOfPassKeyBoolean(const Standard_Integer NbBuckets = 1); - - -Standard_EXPORT NMTDS_MapOfPassKeyBoolean& Assign(const NMTDS_MapOfPassKeyBoolean& Other) ; - NMTDS_MapOfPassKeyBoolean& operator =(const NMTDS_MapOfPassKeyBoolean& Other) -{ - return Assign(Other); -} - - - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - -Standard_EXPORT void Clear() ; -~NMTDS_MapOfPassKeyBoolean() -{ - Clear(); -} - +// File: NMTDS_MapOfPassKeyBoolean.hxx +// Created: Mon Feb 20 08:19:07 2012 +// Author: +// -Standard_EXPORT Standard_Boolean Add(const NMTDS_PassKeyBoolean& aKey) ; +#ifndef NMTDS_MapOfPassKeyBoolean_HeaderFile +#define NMTDS_MapOfPassKeyBoolean_HeaderFile +#include +#include -Standard_EXPORT Standard_Boolean Contains(const NMTDS_PassKeyBoolean& aKey) const; +#define _NCollection_MapHasher +#include +typedef NCollection_Map NMTDS_MapOfPassKeyBoolean; +typedef NMTDS_MapOfPassKeyBoolean::Iterator NMTDS_MapIteratorOfMapOfPassKeyBoolean; -Standard_EXPORT Standard_Boolean Remove(const NMTDS_PassKeyBoolean& aKey) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTDS_MapOfPassKeyBoolean(const NMTDS_MapOfPassKeyBoolean& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - +#undef _NCollection_MapHasher #endif diff --git a/src/NMTDS/NMTDS_MapOfPassKeyBoolean_0.cxx b/src/NMTDS/NMTDS_MapOfPassKeyBoolean_0.cxx deleted file mode 100644 index 47ca945b9..000000000 --- a/src/NMTDS/NMTDS_MapOfPassKeyBoolean_0.cxx +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_MapIteratorOfMapOfPassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile -#include -#endif - - -#define TheKey NMTDS_PassKeyBoolean -#define TheKey_hxx -#define Hasher NMTDS_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKeyBoolean -#define TCollection_MapIterator_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKeyBoolean -#define TCollection_StdMapNode_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKeyBoolean_Type_() -#define TCollection_Map NMTDS_MapOfPassKeyBoolean -#define TCollection_Map_hxx -#include - diff --git a/src/NMTDS/NMTDS_MapOfPassKey_0.cxx b/src/NMTDS/NMTDS_MapOfPassKey_0.cxx deleted file mode 100644 index f14d71e77..000000000 --- a/src/NMTDS/NMTDS_MapOfPassKey_0.cxx +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_MapIteratorOfMapOfPassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile -#include -#endif - - -#define TheKey NMTDS_PassKey -#define TheKey_hxx -#define Hasher NMTDS_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKey -#define TCollection_MapIterator_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKey -#define TCollection_StdMapNode_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKey -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKey_Type_() -#define TCollection_Map NMTDS_MapOfPassKey -#define TCollection_Map_hxx -#include - diff --git a/src/NMTDS/NMTDS_PInterfPool.hxx b/src/NMTDS/NMTDS_PInterfPool.hxx index 2271d5e4b..68a45c7dc 100644 --- a/src/NMTDS/NMTDS_PInterfPool.hxx +++ b/src/NMTDS/NMTDS_PInterfPool.hxx @@ -1,5 +1,8 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,6 +20,9 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_PInterfPool.hxx +// Author: Peter KURNEV + #ifndef _NMTDS_PInterfPool_HeaderFile #define _NMTDS_PInterfPool_HeaderFile diff --git a/src/NMTDS/NMTDS_PIterator.hxx b/src/NMTDS/NMTDS_PIterator.hxx index 9fa24a53c..8c745d979 100644 --- a/src/NMTDS/NMTDS_PIterator.hxx +++ b/src/NMTDS/NMTDS_PIterator.hxx @@ -1,5 +1,8 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -17,6 +20,9 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_PIterator.hxx +// Author: Peter KURNEV + #ifndef _NMTDS_PIterator_HeaderFile #define _NMTDS_PIterator_HeaderFile diff --git a/src/NMTDS/NMTDS_PShapesDataStructure.hxx b/src/NMTDS/NMTDS_PShapesDataStructure.hxx index 82569ed99..66c380da6 100644 --- a/src/NMTDS/NMTDS_PShapesDataStructure.hxx +++ b/src/NMTDS/NMTDS_PShapesDataStructure.hxx @@ -20,6 +20,9 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_PShapesDataStructure.hxx +// Author: Peter KURNEV + #ifndef _NMTDS_PShapesDataStructure_HeaderFile #define _NMTDS_PShapesDataStructure_HeaderFile diff --git a/src/NMTDS/NMTDS_Pair.cdl b/src/NMTDS/NMTDS_Pair.cdl deleted file mode 100644 index 844004da4..000000000 --- a/src/NMTDS/NMTDS_Pair.cdl +++ /dev/null @@ -1,66 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTDS_Pair.cdl --- Created: --- Author: Peter KURNEV --- -class Pair from NMTDS - - ---Purpose: - ---uses ---raises - -is - Create - returns Pair from NMTDS; - ---C++: alias "Standard_EXPORT virtual ~NMTDS_Pair();" - - Create(Other:Pair from NMTDS) - returns Pair from NMTDS; - ---C++: alias "Standard_EXPORT NMTDS_Pair& operator =(const NMTDS_Pair& Other);" - - Clear(me:out); - - SetIds(me:out; - aI1 :Integer from Standard; - aI2 :Integer from Standard); - - Ids(me; - aI1 :out Integer from Standard; - aI2 :out Integer from Standard); - - IsEqual(me; - aOther:Pair from NMTDS) - returns Boolean from Standard; - - HashCode(me; - Upper : Integer from Standard) - returns Integer from Standard; - - -fields - myId1: Integer from Standard is protected; - myId2: Integer from Standard is protected; - -end Pair; diff --git a/src/NMTDS/NMTDS_Pair.cxx b/src/NMTDS/NMTDS_Pair.cxx index 088853004..5e2fd50bc 100644 --- a/src/NMTDS/NMTDS_Pair.cxx +++ b/src/NMTDS/NMTDS_Pair.cxx @@ -23,7 +23,7 @@ // File: NMTDS_Pair.cxx // Author: Peter KURNEV -#include +#include #include #include diff --git a/src/NMTDS/NMTDS_Pair.hxx b/src/NMTDS/NMTDS_Pair.hxx index ab359bf1e..d0a4de9f9 100644 --- a/src/NMTDS/NMTDS_Pair.hxx +++ b/src/NMTDS/NMTDS_Pair.hxx @@ -19,84 +19,55 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_Pair_HeaderFile -#define _NMTDS_Pair_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - - - -class NMTDS_Pair { -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); - } - - - Standard_EXPORT NMTDS_Pair(); -Standard_EXPORT virtual ~NMTDS_Pair(); - - Standard_EXPORT NMTDS_Pair(const NMTDS_Pair& Other); -Standard_EXPORT NMTDS_Pair& operator =(const NMTDS_Pair& Other); - - Standard_EXPORT void Clear() ; - - Standard_EXPORT void SetIds(const Standard_Integer aI1,const Standard_Integer aI2) ; - - Standard_EXPORT void Ids(Standard_Integer& aI1,Standard_Integer& aI2) const; - - Standard_EXPORT Standard_Boolean IsEqual(const NMTDS_Pair& aOther) const; - - Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const; - - - - - -protected: - - - -Standard_Integer myId1; -Standard_Integer myId2; - - -private: - - - - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif + +// File: NMTDS_Pair.hxx +// Author: Peter KURNEV + +#ifndef _NMTDS_Pair_HeaderFile +#define _NMTDS_Pair_HeaderFile + +#include +#include +#include +#include + +//======================================================================= +//function : NMTDS_Pair +//purpose : +//======================================================================= +class NMTDS_Pair { + public: + Standard_EXPORT + NMTDS_Pair(); + + Standard_EXPORT + virtual ~NMTDS_Pair(); + + Standard_EXPORT + NMTDS_Pair(const NMTDS_Pair& Other); + + Standard_EXPORT + NMTDS_Pair& operator =(const NMTDS_Pair& Other); + + Standard_EXPORT + void Clear() ; + + Standard_EXPORT + void SetIds(const Standard_Integer aI1, + const Standard_Integer aI2) ; + + Standard_EXPORT + void Ids(Standard_Integer& aI1, + Standard_Integer& aI2) const; + + Standard_EXPORT + Standard_Boolean IsEqual(const NMTDS_Pair& aOther) const; + + Standard_EXPORT + Standard_Integer HashCode(const Standard_Integer Upper) const; + +protected: +Standard_Integer myId1; +Standard_Integer myId2; +}; +#endif diff --git a/src/NMTDS/NMTDS_Pair.ixx b/src/NMTDS/NMTDS_Pair.ixx deleted file mode 100644 index 8dfc463e8..000000000 --- a/src/NMTDS/NMTDS_Pair.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_Pair.jxx b/src/NMTDS/NMTDS_Pair.jxx deleted file mode 100644 index caebbd1a7..000000000 --- a/src/NMTDS/NMTDS_Pair.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_Pair_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_PairBoolean.cdl b/src/NMTDS/NMTDS_PairBoolean.cdl deleted file mode 100644 index 87269afec..000000000 --- a/src/NMTDS/NMTDS_PairBoolean.cdl +++ /dev/null @@ -1,53 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTDS_PairBoolean.cdl --- Created: --- Author: Peter KURNEV - -class PairBoolean from NMTDS - inherits Pair from NMTDS - - ---Purpose: - -uses - Shape from TopoDS, - ListOfInteger from TColStd - ---raises - -is - Create - returns PairBoolean from NMTDS; - ---C++: alias "Standard_EXPORT virtual ~NMTDS_PairBoolean();" - - SetFlag(me:out; - aFlag: Boolean from Standard); - ---C++: alias " Standard_EXPORT NMTDS_PairBoolean& operator =(const NMTDS_PairBoolean& Other);" - - Flag(me) - returns Boolean from Standard; - -fields - myFlag: Boolean from Standard is protected; - -end PairBoolean; diff --git a/src/NMTDS/NMTDS_PairBoolean.cxx b/src/NMTDS/NMTDS_PairBoolean.cxx index f5ebfc9d6..9067d5c94 100644 --- a/src/NMTDS/NMTDS_PairBoolean.cxx +++ b/src/NMTDS/NMTDS_PairBoolean.cxx @@ -23,7 +23,7 @@ // File: NMTDS_PairBoolean.cxx // Author: Peter KURNEV -#include +#include //======================================================================= //function : diff --git a/src/NMTDS/NMTDS_PairBoolean.hxx b/src/NMTDS/NMTDS_PairBoolean.hxx index 24c4df99b..308c8fc05 100644 --- a/src/NMTDS/NMTDS_PairBoolean.hxx +++ b/src/NMTDS/NMTDS_PairBoolean.hxx @@ -19,75 +19,40 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_PairBoolean_HeaderFile -#define _NMTDS_PairBoolean_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _NMTDS_Pair_HeaderFile -#include -#endif - - - -class NMTDS_PairBoolean : public NMTDS_Pair { -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); - } - - - Standard_EXPORT NMTDS_PairBoolean(); -Standard_EXPORT virtual ~NMTDS_PairBoolean(); - - Standard_EXPORT void SetFlag(const Standard_Boolean aFlag) ; - Standard_EXPORT NMTDS_PairBoolean& operator =(const NMTDS_PairBoolean& Other); - - Standard_EXPORT Standard_Boolean Flag() const; - - - - - -protected: - - - -Standard_Boolean myFlag; - - -private: - - - - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif + +// File: NMTDS_PairBoolean.hxx +// Author: Peter KURNEV + +#ifndef _NMTDS_PairBoolean_HeaderFile +#define _NMTDS_PairBoolean_HeaderFile + +#include +#include +#include +#include + +//======================================================================= +//class : NMTDS_PairBoolean +//purpose : +//======================================================================= +class NMTDS_PairBoolean : public NMTDS_Pair { + public: + Standard_EXPORT + NMTDS_PairBoolean(); + + Standard_EXPORT + virtual ~NMTDS_PairBoolean(); + + Standard_EXPORT + void SetFlag(const Standard_Boolean aFlag) ; + + Standard_EXPORT + NMTDS_PairBoolean& operator =(const NMTDS_PairBoolean& Other); + + Standard_EXPORT + Standard_Boolean Flag() const; + +protected: + Standard_Boolean myFlag; +}; +#endif diff --git a/src/NMTDS/NMTDS_PairBoolean.ixx b/src/NMTDS/NMTDS_PairBoolean.ixx deleted file mode 100644 index ec1a9bfbb..000000000 --- a/src/NMTDS/NMTDS_PairBoolean.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_PairBoolean.jxx b/src/NMTDS/NMTDS_PairBoolean.jxx deleted file mode 100644 index f501aaa30..000000000 --- a/src/NMTDS/NMTDS_PairBoolean.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_PairBoolean_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_PairMapHasher.cdl b/src/NMTDS/NMTDS_PairMapHasher.cdl deleted file mode 100644 index 244c134ec..000000000 --- a/src/NMTDS/NMTDS_PairMapHasher.cdl +++ /dev/null @@ -1,47 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTDS_PairMapHasher.cdl --- Author: Peter KURNEV - -class PairMapHasher from NMTDS - - ---Purpose: - -uses - Pair from NMTDS - ---raises - -is - HashCode(myclass; - aPKey : Pair from NMTDS; - Upper : Integer from Standard) - returns Integer from Standard; - - - IsEqual(myclass; - aPKey1 : Pair from NMTDS; - aPKey2 : Pair from NMTDS) - returns Boolean from Standard; - -end PairMapHasher; diff --git a/src/NMTDS/NMTDS_PairMapHasher.cxx b/src/NMTDS/NMTDS_PairMapHasher.cxx index c3f67e772..3dadcc181 100644 --- a/src/NMTDS/NMTDS_PairMapHasher.cxx +++ b/src/NMTDS/NMTDS_PairMapHasher.cxx @@ -23,7 +23,7 @@ // File: NMTDS_PairMapHasher.cxx // Author: Peter KURNEV -#include +#include //======================================================================= //function : HashCode diff --git a/src/NMTDS/NMTDS_PairMapHasher.hxx b/src/NMTDS/NMTDS_PairMapHasher.hxx index d7be6558d..19dfea723 100644 --- a/src/NMTDS/NMTDS_PairMapHasher.hxx +++ b/src/NMTDS/NMTDS_PairMapHasher.hxx @@ -19,71 +19,31 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_PairMapHasher_HeaderFile -#define _NMTDS_PairMapHasher_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class NMTDS_Pair; - - - -class NMTDS_PairMapHasher { -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); - } - - - Standard_EXPORT static Standard_Integer HashCode(const NMTDS_Pair& aPKey,const Standard_Integer Upper) ; - - Standard_EXPORT static Standard_Boolean IsEqual(const NMTDS_Pair& aPKey1,const NMTDS_Pair& aPKey2) ; - - - - - -protected: - - - - - -private: - - - - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif + +// File: NMTDS_PairMapHasher.cxx +// Author: Peter KURNEV + +#ifndef _NMTDS_PairMapHasher_HeaderFile +#define _NMTDS_PairMapHasher_HeaderFile + +#include +#include +#include +#include +#include + +//======================================================================= +//class : NMTDS_PairMapHasher +//purpose : +//======================================================================= +class NMTDS_PairMapHasher { + public: + Standard_EXPORT + static Standard_Integer HashCode(const NMTDS_Pair& aPKey, + const Standard_Integer Upper) ; + + Standard_EXPORT + static Standard_Boolean IsEqual(const NMTDS_Pair& aPKey1, + const NMTDS_Pair& aPKey2) ; +}; +#endif diff --git a/src/NMTDS/NMTDS_PairMapHasher.ixx b/src/NMTDS/NMTDS_PairMapHasher.ixx deleted file mode 100644 index b6f7022d6..000000000 --- a/src/NMTDS/NMTDS_PairMapHasher.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_PairMapHasher.jxx b/src/NMTDS/NMTDS_PairMapHasher.jxx deleted file mode 100644 index a5c53718e..000000000 --- a/src/NMTDS/NMTDS_PairMapHasher.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_Pair_HeaderFile -#include -#endif -#ifndef _NMTDS_PairMapHasher_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_PassKey.cdl b/src/NMTDS/NMTDS_PassKey.cdl deleted file mode 100755 index 160ac0039..000000000 --- a/src/NMTDS/NMTDS_PassKey.cdl +++ /dev/null @@ -1,98 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTDS_PassKey.cdl --- Created: Mon Nov 20 12:16:13 2006 --- Author: Peter KURNEV --- -class PassKey from NMTDS - - ---Purpose: - -uses - Shape from TopoDS, - IndexedMapOfInteger from TColStd, - ListOfInteger from TColStd - ---raises - -is - Create - returns PassKey from NMTDS; - ---C++: alias "Standard_EXPORT virtual ~NMTDS_PassKey();" - - Create(Other:PassKey from NMTDS) - returns PassKey from NMTDS; - ---C++: alias "Standard_EXPORT NMTDS_PassKey& operator =(const NMTDS_PassKey& Other);" - - Clear(me:out); - - SetIds(me:out; - aI1 :Integer from Standard); - - SetIds(me:out; - aI1 :Integer from Standard; - aI2 :Integer from Standard); - - SetIds(me:out; - aI1 :Integer from Standard; - aI2 :Integer from Standard; - aI3 :Integer from Standard); - - SetIds(me:out; - aI1 :Integer from Standard; - aI2 :Integer from Standard; - aI3 :Integer from Standard; - aI4 :Integer from Standard); - - SetIds(me:out; - aLS :ListOfInteger from TColStd); - - NbIds(me) - returns Integer from Standard; - - IsEqual(me; - aOther:PassKey from NMTDS) - returns Boolean from Standard; - - HashCode(me; - Upper : Integer from Standard) - returns Integer from Standard; - - Id(me; - aIndex: Integer from Standard) - returns Integer from Standard; - - Ids(me; - aI1 :out Integer from Standard; - aI2 :out Integer from Standard); - - Dump(me; - aHex:Integer from Standard=0); - - -fields - myNbIds: Integer from Standard is protected; - mySum : Integer from Standard is protected; - myMap : IndexedMapOfInteger from TColStd is protected; - -end PassKey; diff --git a/src/NMTDS/NMTDS_PassKey.cxx b/src/NMTDS/NMTDS_PassKey.cxx index 83b05e407..4d8aa41aa 100755 --- a/src/NMTDS/NMTDS_PassKey.cxx +++ b/src/NMTDS/NMTDS_PassKey.cxx @@ -20,12 +20,12 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_Algo.cxx -// Created: Sat Dec 04 12:39:47 2004 +// File: NMTDS_PassKey.cxx +// Created: // Author: Peter KURNEV // // -#include +#include #include #include diff --git a/src/NMTDS/NMTDS_PassKey.hxx b/src/NMTDS/NMTDS_PassKey.hxx index ef9c02b12..88fb6cb0f 100644 --- a/src/NMTDS/NMTDS_PassKey.hxx +++ b/src/NMTDS/NMTDS_PassKey.hxx @@ -20,127 +20,84 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_PassKey.hxx +// Created: +// Author: Peter KURNEV +// +// #ifndef _NMTDS_PassKey_HeaderFile #define _NMTDS_PassKey_HeaderFile -#ifndef _Standard_Integer_HeaderFile +#include +#include #include -#endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -class TColStd_ListOfInteger; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - +#include +//======================================================================= +//function : NMTDS_PassKey +//purpose : +//======================================================================= class NMTDS_PassKey { - -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 - // - - -Standard_EXPORT NMTDS_PassKey(); -Standard_EXPORT virtual ~NMTDS_PassKey(); - - -Standard_EXPORT NMTDS_PassKey(const NMTDS_PassKey& Other); -Standard_EXPORT NMTDS_PassKey& operator =(const NMTDS_PassKey& Other); - - -Standard_EXPORT void Clear() ; - - -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 NMTDS_PassKey& aOther) const; - - -Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const; - - -Standard_EXPORT Standard_Integer Id(const Standard_Integer aIndex) const; - - -Standard_EXPORT void Ids(Standard_Integer& aI1,Standard_Integer& aI2) const; - - -Standard_EXPORT void Dump(const Standard_Integer aHex = 0) const; - - - - + public: + Standard_EXPORT + NMTDS_PassKey(); + + Standard_EXPORT + virtual ~NMTDS_PassKey(); + + Standard_EXPORT + NMTDS_PassKey(const NMTDS_PassKey& Other); + + Standard_EXPORT + NMTDS_PassKey& operator =(const NMTDS_PassKey& Other); + + Standard_EXPORT + void Clear() ; + + 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 NMTDS_PassKey& aOther) const; + + Standard_EXPORT + Standard_Integer HashCode(const Standard_Integer Upper) const; + + Standard_EXPORT + Standard_Integer Id(const Standard_Integer aIndex) const; + + Standard_EXPORT + void Ids(Standard_Integer& aI1,Standard_Integer& aI2) const; + + Standard_EXPORT + void Dump(const Standard_Integer aHex = 0) const; protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -Standard_Integer myNbIds; -Standard_Integer mySum; -TColStd_IndexedMapOfInteger myMap; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + Standard_Integer myNbIds; + Standard_Integer mySum; + TColStd_IndexedMapOfInteger myMap; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTDS/NMTDS_PassKey.ixx b/src/NMTDS/NMTDS_PassKey.ixx deleted file mode 100644 index 063fcbba1..000000000 --- a/src/NMTDS/NMTDS_PassKey.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_PassKey.jxx b/src/NMTDS/NMTDS_PassKey.jxx deleted file mode 100644 index 5b85d7891..000000000 --- a/src/NMTDS/NMTDS_PassKey.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TColStd_ListOfInteger_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKey_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_PassKeyBoolean.cdl b/src/NMTDS/NMTDS_PassKeyBoolean.cdl deleted file mode 100755 index 1d2bdafff..000000000 --- a/src/NMTDS/NMTDS_PassKeyBoolean.cdl +++ /dev/null @@ -1,53 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTDS_PassKeyBoolean.cdl --- Created: --- Author: Peter KURNEV --- -class PassKeyBoolean from NMTDS - inherits PassKey from NMTDS - - ---Purpose: - -uses - Shape from TopoDS, - ListOfInteger from TColStd - ---raises - -is - Create - returns PassKeyBoolean from NMTDS; - ---C++: alias "Standard_EXPORT virtual ~NMTDS_PassKeyBoolean();" - - SetFlag(me:out; - aFlag: Boolean from Standard); - ---C++: alias " Standard_EXPORT NMTDS_PassKeyBoolean& operator =(const NMTDS_PassKeyBoolean& Other);" - - Flag(me) - returns Boolean from Standard; - -fields - myFlag: Boolean from Standard is protected; - -end PassKeyBoolean; diff --git a/src/NMTDS/NMTDS_PassKeyBoolean.cxx b/src/NMTDS/NMTDS_PassKeyBoolean.cxx index dba3d636e..dc0c77704 100755 --- a/src/NMTDS/NMTDS_PassKeyBoolean.cxx +++ b/src/NMTDS/NMTDS_PassKeyBoolean.cxx @@ -25,7 +25,7 @@ // Author: Peter KURNEV // // -#include +#include //======================================================================= //function : diff --git a/src/NMTDS/NMTDS_PassKeyBoolean.hxx b/src/NMTDS/NMTDS_PassKeyBoolean.hxx index d4b49aa56..210efb63f 100644 --- a/src/NMTDS/NMTDS_PassKeyBoolean.hxx +++ b/src/NMTDS/NMTDS_PassKeyBoolean.hxx @@ -20,88 +20,41 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_PassKeyBoolean.hxx +// Created: +// Author: Peter KURNEV +// +// #ifndef _NMTDS_PassKeyBoolean_HeaderFile #define _NMTDS_PassKeyBoolean_HeaderFile -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKey_HeaderFile -#include -#endif - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - +#include +#include +//======================================================================= +//class : NMTDS_PassKeyBoolean +//purpose : +//======================================================================= class NMTDS_PassKeyBoolean : public NMTDS_PassKey { - -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 - // - - -Standard_EXPORT NMTDS_PassKeyBoolean(); -Standard_EXPORT virtual ~NMTDS_PassKeyBoolean(); - - -Standard_EXPORT void SetFlag(const Standard_Boolean aFlag) ; - Standard_EXPORT NMTDS_PassKeyBoolean& operator =(const NMTDS_PassKeyBoolean& Other); - - -Standard_EXPORT Standard_Boolean Flag() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -Standard_Boolean myFlag; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + public: + Standard_EXPORT + NMTDS_PassKeyBoolean(); + + Standard_EXPORT + virtual ~NMTDS_PassKeyBoolean(); + + Standard_EXPORT + void SetFlag(const Standard_Boolean aFlag) ; + + Standard_EXPORT + NMTDS_PassKeyBoolean& operator =(const NMTDS_PassKeyBoolean& Other); + + Standard_EXPORT + Standard_Boolean Flag() const; + + protected: + Standard_Boolean myFlag; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTDS/NMTDS_PassKeyBoolean.ixx b/src/NMTDS/NMTDS_PassKeyBoolean.ixx deleted file mode 100644 index b123c3cb1..000000000 --- a/src/NMTDS/NMTDS_PassKeyBoolean.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_PassKeyBoolean.jxx b/src/NMTDS/NMTDS_PassKeyBoolean.jxx deleted file mode 100644 index 6fbd11115..000000000 --- a/src/NMTDS/NMTDS_PassKeyBoolean.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_PassKeyBoolean_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_PassKeyMapHasher.cdl b/src/NMTDS/NMTDS_PassKeyMapHasher.cdl deleted file mode 100755 index 45b4709f8..000000000 --- a/src/NMTDS/NMTDS_PassKeyMapHasher.cdl +++ /dev/null @@ -1,48 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTDS_PassKeyMapHasher.cdl --- Created: --- Author: Peter KURNEV --- -class PassKeyMapHasher from NMTDS - - ---Purpose: - -uses - PassKey from NMTDS - ---raises - -is - HashCode(myclass; - aPKey : PassKey from NMTDS; - Upper : Integer from Standard) - returns Integer from Standard; - - - IsEqual(myclass; - aPKey1 : PassKey from NMTDS; - aPKey2 : PassKey from NMTDS) - returns Boolean from Standard; - -end PassKeyMapHasher; diff --git a/src/NMTDS/NMTDS_PassKeyMapHasher.cxx b/src/NMTDS/NMTDS_PassKeyMapHasher.cxx index 8ce47a026..3b55d93db 100755 --- a/src/NMTDS/NMTDS_PassKeyMapHasher.cxx +++ b/src/NMTDS/NMTDS_PassKeyMapHasher.cxx @@ -25,7 +25,7 @@ // Author: Peter KURNEV // // -#include +#include //======================================================================= //function : HashCode diff --git a/src/NMTDS/NMTDS_PassKeyMapHasher.hxx b/src/NMTDS/NMTDS_PassKeyMapHasher.hxx index 8dd0df515..1ad371c3e 100644 --- a/src/NMTDS/NMTDS_PassKeyMapHasher.hxx +++ b/src/NMTDS/NMTDS_PassKeyMapHasher.hxx @@ -20,83 +20,33 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_PassKeyMapHasher.hxx +// Created: +// Author: Peter KURNEV +// +// #ifndef _NMTDS_PassKeyMapHasher_HeaderFile #define _NMTDS_PassKeyMapHasher_HeaderFile -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class NMTDS_PassKey; - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif +#include +#include +#include +//======================================================================= +//function : NMTDS_PassKeyMapHasher +//purpose : +//======================================================================= class NMTDS_PassKeyMapHasher { - -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 - // - - -Standard_EXPORT static Standard_Integer HashCode(const NMTDS_PassKey& aPKey,const Standard_Integer Upper) ; - - -Standard_EXPORT static Standard_Boolean IsEqual(const NMTDS_PassKey& aPKey1,const NMTDS_PassKey& aPKey2) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + public: + Standard_EXPORT + static Standard_Integer HashCode(const NMTDS_PassKey& aPKey, + const Standard_Integer Upper) ; + + Standard_EXPORT + static Standard_Boolean IsEqual(const NMTDS_PassKey& aPKey1, + const NMTDS_PassKey& aPKey2) ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTDS/NMTDS_PassKeyMapHasher.ixx b/src/NMTDS/NMTDS_PassKeyMapHasher.ixx deleted file mode 100644 index 9088b96af..000000000 --- a/src/NMTDS/NMTDS_PassKeyMapHasher.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_PassKeyMapHasher.jxx b/src/NMTDS/NMTDS_PassKeyMapHasher.jxx deleted file mode 100644 index b16c77df8..000000000 --- a/src/NMTDS/NMTDS_PassKeyMapHasher.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_PassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyMapHasher_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_PassKeyShape.cdl b/src/NMTDS/NMTDS_PassKeyShape.cdl deleted file mode 100644 index 4dbd33d59..000000000 --- a/src/NMTDS/NMTDS_PassKeyShape.cdl +++ /dev/null @@ -1,93 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- This library is free software; you can redistribute it and/or --- modify it 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_PassKeyShape.cdl --- Created: --- Author: Peter KURNEV --- -class PassKeyShape from NMTDS - - ---Purpose: - -uses - Shape from TopoDS, - ListOfShape from TopTools, - IndexedMapOfShape from TopTools - ---raises - -is - Create - returns PassKeyShape from NMTDS; - ---C++: alias "Standard_EXPORT virtual ~NMTDS_PassKeyShape();" - - Create(Other:PassKeyShape from NMTDS) - returns PassKeyShape from NMTDS; - - Assign(me:out; - Other : PassKeyShape from NMTDS) - returns PassKeyShape from NMTDS; - ---C++: alias operator = - ---C++: return & - - SetShapes(me:out; - aS :Shape from TopoDS); - - SetShapes(me:out; - aS1 :Shape from TopoDS; - aS2 :Shape from TopoDS); - - SetShapes(me:out; - aS1 :Shape from TopoDS; - aS2 :Shape from TopoDS; - aS3 :Shape from TopoDS); - - SetShapes(me:out; - aS1 :Shape from TopoDS; - aS2 :Shape from TopoDS; - aS3 :Shape from TopoDS; - aS4 :Shape from TopoDS); - - SetShapes(me:out; - aLS :ListOfShape from TopTools); - - Clear(me:out); - - - NbIds(me) - returns Integer from Standard; - - IsEqual(me; - aOther:PassKeyShape from NMTDS) - returns Boolean from Standard; - - HashCode(me; - Upper : Integer from Standard) - returns Integer from Standard; - - Dump(me; - aHex:Integer from Standard=0); - -fields - 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/NMTDS/NMTDS_PassKeyShape.cxx b/src/NMTDS/NMTDS_PassKeyShape.cxx index 586dd2cc3..5010c582a 100644 --- a/src/NMTDS/NMTDS_PassKeyShape.cxx +++ b/src/NMTDS/NMTDS_PassKeyShape.cxx @@ -22,10 +22,11 @@ // Author: Peter KURNEV // // -#include +#include #include #include +#include static diff --git a/src/NMTDS/NMTDS_PassKeyShape.hxx b/src/NMTDS/NMTDS_PassKeyShape.hxx index c03f8c394..1498499bf 100644 --- a/src/NMTDS/NMTDS_PassKeyShape.hxx +++ b/src/NMTDS/NMTDS_PassKeyShape.hxx @@ -17,130 +17,84 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_PassKeyShape.hxx +// Created: +// Author: Peter KURNEV +// +// #ifndef _NMTDS_PassKeyShape_HeaderFile #define _NMTDS_PassKeyShape_HeaderFile -#ifndef _Standard_Integer_HeaderFile +#include +#include #include -#endif -#ifndef _TopTools_IndexedMapOfShape_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -class TopoDS_Shape; -class TopTools_ListOfShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - +#include +#include +//======================================================================= +//function : NMTDS_PassKeyShape +//purpose : +//======================================================================= class NMTDS_PassKeyShape { - -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 - // - - -Standard_EXPORT NMTDS_PassKeyShape(); -Standard_EXPORT virtual ~NMTDS_PassKeyShape(); - - -Standard_EXPORT NMTDS_PassKeyShape(const NMTDS_PassKeyShape& Other); - - -Standard_EXPORT NMTDS_PassKeyShape& Assign(const NMTDS_PassKeyShape& Other) ; - NMTDS_PassKeyShape& operator =(const NMTDS_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 NMTDS_PassKeyShape& aOther) const; - - -Standard_EXPORT Standard_Integer HashCode(const Standard_Integer Upper) const; - - -Standard_EXPORT void Dump(const Standard_Integer aHex = 0) const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -Standard_Integer myNbIds; -Standard_Integer mySum; -Standard_Integer myUpper; -TopTools_IndexedMapOfShape myMap; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + public: + Standard_EXPORT + NMTDS_PassKeyShape(); + + Standard_EXPORT + virtual ~NMTDS_PassKeyShape(); + + Standard_EXPORT + NMTDS_PassKeyShape(const NMTDS_PassKeyShape& Other); + + Standard_EXPORT + NMTDS_PassKeyShape& Assign(const NMTDS_PassKeyShape& Other) ; + + NMTDS_PassKeyShape& operator =(const NMTDS_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 NMTDS_PassKeyShape& aOther) const; + + Standard_EXPORT + Standard_Integer HashCode(const Standard_Integer Upper) const; + + Standard_EXPORT + void Dump(const Standard_Integer aHex = 0) const; + + protected: + Standard_Integer myNbIds; + Standard_Integer mySum; + Standard_Integer myUpper; + TopTools_IndexedMapOfShape myMap; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTDS/NMTDS_PassKeyShape.ixx b/src/NMTDS/NMTDS_PassKeyShape.ixx deleted file mode 100644 index 21e5656a8..000000000 --- a/src/NMTDS/NMTDS_PassKeyShape.ixx +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_PassKeyShape.jxx b/src/NMTDS/NMTDS_PassKeyShape.jxx deleted file mode 100644 index be1208a3a..000000000 --- a/src/NMTDS/NMTDS_PassKeyShape.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyShape_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.cdl b/src/NMTDS/NMTDS_PassKeyShapeMapHasher.cdl deleted file mode 100644 index 295e16697..000000000 --- a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.cdl +++ /dev/null @@ -1,45 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- This library is free software; you can redistribute it and/or --- modify it 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_PassKeyMapHasher.cdl --- Created: --- Author: Peter KURNEV --- -class PassKeyShapeMapHasher from NMTDS - - ---Purpose: - -uses - PassKeyShape from NMTDS - ---raises - -is - HashCode(myclass; - aPKey : PassKeyShape from NMTDS; - Upper : Integer from Standard) - returns Integer from Standard; - - - IsEqual(myclass; - aPKey1 : PassKeyShape from NMTDS; - aPKey2 : PassKeyShape from NMTDS) - returns Boolean from Standard; - -end PassKeyShapeMapHasher; diff --git a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx b/src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx index 11e4cd82d..4ff71d48e 100644 --- a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx +++ b/src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx @@ -22,7 +22,7 @@ // Author: Peter KURNEV // // -#include +#include //======================================================================= //function : HashCode diff --git a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.hxx b/src/NMTDS/NMTDS_PassKeyShapeMapHasher.hxx index 395e72435..a674091db 100644 --- a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.hxx +++ b/src/NMTDS/NMTDS_PassKeyShapeMapHasher.hxx @@ -17,83 +17,32 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_PassKeyMapHasher.cxx +// Created: +// Author: Peter KURNEV +// +// #ifndef _NMTDS_PassKeyShapeMapHasher_HeaderFile #define _NMTDS_PassKeyShapeMapHasher_HeaderFile -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class NMTDS_PassKeyShape; - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - +#include +#include +#include +//======================================================================= +//function : NMTDS_PassKeyShapeMapHasher +//purpose : +//======================================================================= class NMTDS_PassKeyShapeMapHasher { - -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 - // - - -Standard_EXPORT static Standard_Integer HashCode(const NMTDS_PassKeyShape& aPKey,const Standard_Integer Upper) ; - - -Standard_EXPORT static Standard_Boolean IsEqual(const NMTDS_PassKeyShape& aPKey1,const NMTDS_PassKeyShape& aPKey2) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + public: + Standard_EXPORT + static Standard_Integer HashCode(const NMTDS_PassKeyShape& aPKey, + const Standard_Integer Upper) ; + + Standard_EXPORT + static Standard_Boolean IsEqual(const NMTDS_PassKeyShape& aPKey1, + const NMTDS_PassKeyShape& aPKey2) ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.ixx b/src/NMTDS/NMTDS_PassKeyShapeMapHasher.ixx deleted file mode 100644 index a0ec546a1..000000000 --- a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.ixx +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.jxx b/src/NMTDS/NMTDS_PassKeyShapeMapHasher.jxx deleted file mode 100644 index 5ce5c65ff..000000000 --- a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.jxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_PassKeyShape_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyShapeMapHasher_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.cdl b/src/NMTDS/NMTDS_ShapesDataStructure.cdl deleted file mode 100644 index 869650931..000000000 --- a/src/NMTDS/NMTDS_ShapesDataStructure.cdl +++ /dev/null @@ -1,102 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTDS_ShapesDataStructure.cdl --- Created: --- Author: Peter KURNEV --- -class ShapesDataStructure from NMTDS - inherits ShapesDataStructure from BooleanOperations - - ---Purpose: - -uses - Box from Bnd, - IndexedMapOfInteger from TColStd, - Shape from TopoDS, - IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations, - CArray1OfIndexRange from NMTDS, - --modified by NIZNHY-PKV Mon Dec 12 08:57:18 2011f - DataMapOfShapeInteger from TopTools - --IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger from NMTDS - --modified by NIZNHY-PKV Mon Dec 12 08:57:22 2011t ---raises - -is - Create - returns ShapesDataStructure from NMTDS; - - SetCompositeShape(me:out; - aS:Shape from TopoDS); - - Init(me:out); - - Ranges(me) - returns CArray1OfIndexRange from NMTDS; - ---C++: return const & - - CompositeShape(me) - returns Shape from TopoDS; - ---C++: return const & - - ShapeRangeIndex(me; - aId:Integer from Standard) - returns Integer from Standard; - - Rank (me; - anIndex:Integer from Standard) - returns Integer from Standard - is redefined; - - ShapeIndex (me; - aS:Shape from TopoDS; - iRank:Integer from Standard) - returns Integer from Standard - is redefined; - - 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); - - GetAllSuccessors(me; - anIndex:Integer from Standard; - aScrs :out IndexedMapOfInteger from TColStd); - - ComputeBoxEx(me; - anIndex:Integer from Standard; - aBox:out Box from Bnd); - -fields - myCompositeShape: Shape from TopoDS is protected; - myRanges : CArray1OfIndexRange from NMTDS is protected; - --modified by NIZNHY-PKV Mon Dec 12 08:58:07 2011f - myShapeIndexMap : DataMapOfShapeInteger from TopTools is protected; - --myShapeIndexMap : IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger from NMTDS is protected; - --modified by NIZNHY-PKV Mon Dec 12 08:58:21 2011t -end ShapesDataStructure; - diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.cxx b/src/NMTDS/NMTDS_ShapesDataStructure.cxx index 107c5b4d7..ef679ed2f 100644 --- a/src/NMTDS/NMTDS_ShapesDataStructure.cxx +++ b/src/NMTDS/NMTDS_ShapesDataStructure.cxx @@ -23,7 +23,7 @@ // File: NMTDS_ShapesDataStructure.cxx // Author: Peter KURNEV -#include +#include #include #include #include diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.hxx b/src/NMTDS/NMTDS_ShapesDataStructure.hxx index 484617ff8..e574b92ec 100644 --- a/src/NMTDS/NMTDS_ShapesDataStructure.hxx +++ b/src/NMTDS/NMTDS_ShapesDataStructure.hxx @@ -19,107 +19,78 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTDS_ShapesDataStructure_HeaderFile -#define _NMTDS_ShapesDataStructure_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile -#include -#endif -#ifndef _TopTools_DataMapOfShapeInteger_HeaderFile -#include -#endif -#ifndef _BooleanOperations_ShapesDataStructure_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -class TopoDS_Shape; -class NMTDS_CArray1OfIndexRange; -class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors; -class TColStd_IndexedMapOfInteger; -class Bnd_Box; - - - -class NMTDS_ShapesDataStructure : public BooleanOperations_ShapesDataStructure { -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); - } - - - Standard_EXPORT 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; - - Standard_EXPORT void GetAllSuccessors(const Standard_Integer anIndex,TColStd_IndexedMapOfInteger& aScrs) const; - - Standard_EXPORT void ComputeBoxEx(const Standard_Integer anIndex,Bnd_Box& aBox) const; - - - - - -protected: - - - -TopoDS_Shape myCompositeShape; -NMTDS_CArray1OfIndexRange myRanges; -TopTools_DataMapOfShapeInteger myShapeIndexMap; - - -private: - - - - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif + + +#ifndef _NMTDS_ShapesDataStructure_HeaderFile +#define _NMTDS_ShapesDataStructure_HeaderFile + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//class : NMTDS_ShapesDataStructure +//purpose : +//======================================================================= +class NMTDS_ShapesDataStructure : public BooleanOperations_ShapesDataStructure +{ + public: + Standard_EXPORT + 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; + + Standard_EXPORT + void GetAllSuccessors(const Standard_Integer anIndex, + TColStd_IndexedMapOfInteger& aScrs) const; + + Standard_EXPORT + void ComputeBoxEx(const Standard_Integer anIndex, + Bnd_Box& aBox) const; + + + protected: + TopoDS_Shape myCompositeShape; + NMTDS_CArray1OfIndexRange myRanges; + TopTools_DataMapOfShapeInteger myShapeIndexMap; +}; +#endif diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.ixx b/src/NMTDS/NMTDS_ShapesDataStructure.ixx deleted file mode 100644 index 98419c2e2..000000000 --- a/src/NMTDS/NMTDS_ShapesDataStructure.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.jxx b/src/NMTDS/NMTDS_ShapesDataStructure.jxx deleted file mode 100644 index 95f584caa..000000000 --- a/src/NMTDS/NMTDS_ShapesDataStructure.jxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile -#include -#endif -#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include -#endif -#ifndef _Bnd_Box_HeaderFile -#include -#endif -#ifndef _NMTDS_ShapesDataStructure_HeaderFile -#include -#endif diff --git a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPairBoolean.hxx b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPairBoolean.hxx deleted file mode 100644 index a6ab8f45c..000000000 --- a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPairBoolean.hxx +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile -#define _NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_DefineHandle_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPairBoolean_HeaderFile -#include -#endif - -#ifndef _NMTDS_PairBoolean_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class NMTDS_PairBoolean; -class NMTDS_PairMapHasher; -class NMTDS_MapOfPairBoolean; -class NMTDS_MapIteratorOfMapOfPairBoolean; - - - -class NMTDS_StdMapNodeOfMapOfPairBoolean : public TCollection_MapNode { - -public: - - - NMTDS_StdMapNodeOfMapOfPairBoolean(const NMTDS_PairBoolean& K,const TCollection_MapNodePtr& n); - - NMTDS_PairBoolean& Key() const; - - - - - DEFINE_STANDARD_RTTI(NMTDS_StdMapNodeOfMapOfPairBoolean) - -protected: - - - - -private: - - -NMTDS_PairBoolean myKey; - - -}; - -#define TheKey NMTDS_PairBoolean -#define TheKey_hxx -#define Hasher NMTDS_PairMapHasher -#define Hasher_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPairBoolean -#define TCollection_StdMapNode_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPairBoolean -#define TCollection_MapIterator_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPairBoolean -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPairBoolean_Type_() -#define TCollection_Map NMTDS_MapOfPairBoolean -#define TCollection_Map_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_StdMapNode -#undef TCollection_StdMapNode_hxx -#undef TCollection_MapIterator -#undef TCollection_MapIterator_hxx -#undef Handle_TCollection_StdMapNode -#undef TCollection_StdMapNode_Type_ -#undef TCollection_Map -#undef TCollection_Map_hxx - - -// other Inline functions and methods (like "C++: function call" methods) - - -#endif diff --git a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPairBoolean_0.cxx b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPairBoolean_0.cxx deleted file mode 100644 index c0a7c049b..000000000 --- a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPairBoolean_0.cxx +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_Type_HeaderFile -#include -#endif - -#ifndef _NMTDS_PairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_PairMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_MapOfPairBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile -#include -#endif - - - - -IMPLEMENT_STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPairBoolean) -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(TCollection_MapNode), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - -IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() -IMPLEMENT_STANDARD_TYPE_END(NMTDS_StdMapNodeOfMapOfPairBoolean) - - -IMPLEMENT_DOWNCAST(NMTDS_StdMapNodeOfMapOfPairBoolean,Standard_Transient) -IMPLEMENT_STANDARD_RTTI(NMTDS_StdMapNodeOfMapOfPairBoolean) - - -#define TheKey NMTDS_PairBoolean -#define TheKey_hxx -#define Hasher NMTDS_PairMapHasher -#define Hasher_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPairBoolean -#define TCollection_StdMapNode_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPairBoolean -#define TCollection_MapIterator_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPairBoolean -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPairBoolean_Type_() -#define TCollection_Map NMTDS_MapOfPairBoolean -#define TCollection_Map_hxx -#include - diff --git a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey.hxx b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey.hxx deleted file mode 100644 index 9df76826f..000000000 --- a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey.hxx +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile -#define _NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKey_HeaderFile -#include -#endif - -#ifndef _NMTDS_PassKey_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class NMTDS_PassKey; -class NMTDS_PassKeyMapHasher; -class NMTDS_MapOfPassKey; -class NMTDS_MapIteratorOfMapOfPassKey; - - - -class NMTDS_StdMapNodeOfMapOfPassKey : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTDS_StdMapNodeOfMapOfPassKey(const NMTDS_PassKey& K,const TCollection_MapNodePtr& n); - - NMTDS_PassKey& Key() const; -//Standard_EXPORT ~NMTDS_StdMapNodeOfMapOfPassKey(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -NMTDS_PassKey myKey; - - -}; - -#define TheKey NMTDS_PassKey -#define TheKey_hxx -#define Hasher NMTDS_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKey -#define TCollection_MapIterator_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKey -#define TCollection_StdMapNode_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKey -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKey_Type_() -#define TCollection_Map NMTDS_MapOfPassKey -#define TCollection_Map_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_MapIterator -#undef TCollection_MapIterator_hxx -#undef TCollection_StdMapNode -#undef TCollection_StdMapNode_hxx -#undef Handle_TCollection_StdMapNode -#undef TCollection_StdMapNode_Type_ -#undef TCollection_Map -#undef TCollection_Map_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx deleted file mode 100644 index b1b550978..000000000 --- a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile -#define _NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean_HeaderFile -#include -#endif - -#ifndef _NMTDS_PassKeyBoolean_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class NMTDS_PassKeyBoolean; -class NMTDS_PassKeyMapHasher; -class NMTDS_MapOfPassKeyBoolean; -class NMTDS_MapIteratorOfMapOfPassKeyBoolean; - - - -class NMTDS_StdMapNodeOfMapOfPassKeyBoolean : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTDS_StdMapNodeOfMapOfPassKeyBoolean(const NMTDS_PassKeyBoolean& K,const TCollection_MapNodePtr& n); - - NMTDS_PassKeyBoolean& Key() const; -//Standard_EXPORT ~NMTDS_StdMapNodeOfMapOfPassKeyBoolean(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -NMTDS_PassKeyBoolean myKey; - - -}; - -#define TheKey NMTDS_PassKeyBoolean -#define TheKey_hxx -#define Hasher NMTDS_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKeyBoolean -#define TCollection_MapIterator_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKeyBoolean -#define TCollection_StdMapNode_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKeyBoolean_Type_() -#define TCollection_Map NMTDS_MapOfPassKeyBoolean -#define TCollection_Map_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_MapIterator -#undef TCollection_MapIterator_hxx -#undef TCollection_StdMapNode -#undef TCollection_StdMapNode_hxx -#undef Handle_TCollection_StdMapNode -#undef TCollection_StdMapNode_Type_ -#undef TCollection_Map -#undef TCollection_Map_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx deleted file mode 100644 index e8f8445f4..000000000 --- a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _NMTDS_PassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_MapOfPassKeyBoolean_HeaderFile -#include -#endif -#ifndef _NMTDS_MapIteratorOfMapOfPassKeyBoolean_HeaderFile -#include -#endif -//NMTDS_StdMapNodeOfMapOfPassKeyBoolean::~NMTDS_StdMapNodeOfMapOfPassKeyBoolean() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTDS_StdMapNodeOfMapOfPassKeyBoolean_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTDS_StdMapNodeOfMapOfPassKeyBoolean", - sizeof(NMTDS_StdMapNodeOfMapOfPassKeyBoolean), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKeyBoolean))) { - _anOtherObject = Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)((Handle(NMTDS_StdMapNodeOfMapOfPassKeyBoolean)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTDS_StdMapNodeOfMapOfPassKeyBoolean::DynamicType() const -{ - return STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) ; -} -//Standard_Boolean NMTDS_StdMapNodeOfMapOfPassKeyBoolean::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKeyBoolean) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean::~Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean() {} -#define TheKey NMTDS_PassKeyBoolean -#define TheKey_hxx -#define Hasher NMTDS_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKeyBoolean -#define TCollection_MapIterator_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKeyBoolean -#define TCollection_StdMapNode_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKeyBoolean -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKeyBoolean_Type_() -#define TCollection_Map NMTDS_MapOfPassKeyBoolean -#define TCollection_Map_hxx -#include - diff --git a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey_0.cxx b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey_0.cxx deleted file mode 100644 index 5a20e13e7..000000000 --- a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey_0.cxx +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _NMTDS_PassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_PassKeyMapHasher_HeaderFile -#include -#endif -#ifndef _NMTDS_MapOfPassKey_HeaderFile -#include -#endif -#ifndef _NMTDS_MapIteratorOfMapOfPassKey_HeaderFile -#include -#endif -//NMTDS_StdMapNodeOfMapOfPassKey::~NMTDS_StdMapNodeOfMapOfPassKey() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTDS_StdMapNodeOfMapOfPassKey_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTDS_StdMapNodeOfMapOfPassKey", - sizeof(NMTDS_StdMapNodeOfMapOfPassKey), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTDS_StdMapNodeOfMapOfPassKey) Handle(NMTDS_StdMapNodeOfMapOfPassKey)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTDS_StdMapNodeOfMapOfPassKey) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKey))) { - _anOtherObject = Handle(NMTDS_StdMapNodeOfMapOfPassKey)((Handle(NMTDS_StdMapNodeOfMapOfPassKey)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTDS_StdMapNodeOfMapOfPassKey::DynamicType() const -{ - return STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKey) ; -} -//Standard_Boolean NMTDS_StdMapNodeOfMapOfPassKey::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(NMTDS_StdMapNodeOfMapOfPassKey) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_NMTDS_StdMapNodeOfMapOfPassKey::~Handle_NMTDS_StdMapNodeOfMapOfPassKey() {} -#define TheKey NMTDS_PassKey -#define TheKey_hxx -#define Hasher NMTDS_PassKeyMapHasher -#define Hasher_hxx -#define TCollection_MapIterator NMTDS_MapIteratorOfMapOfPassKey -#define TCollection_MapIterator_hxx -#define TCollection_StdMapNode NMTDS_StdMapNodeOfMapOfPassKey -#define TCollection_StdMapNode_hxx -#define Handle_TCollection_StdMapNode Handle_NMTDS_StdMapNodeOfMapOfPassKey -#define TCollection_StdMapNode_Type_() NMTDS_StdMapNodeOfMapOfPassKey_Type_() -#define TCollection_Map NMTDS_MapOfPassKey -#define TCollection_Map_hxx -#include - diff --git a/src/NMTDS/NMTDS_Tools.cdl b/src/NMTDS/NMTDS_Tools.cdl deleted file mode 100644 index db44b1e58..000000000 --- a/src/NMTDS/NMTDS_Tools.cdl +++ /dev/null @@ -1,61 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- This library is free software; you can redistribute it and/or --- modify it 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_Tools.cdl --- Created: Tue Feb 20 14:56:14 2007 --- Author: Peter KURNEV --- -class Tools from NMTDS - - ---Purpose: - -uses - ShapeEnum from TopAbs, - Vertex from TopoDS, - Shape from TopoDS, - IndexedDataMapOfShapeShape from TopTools - ---raises - -is - TypeToInteger(myclass; - aT1: ShapeEnum from TopAbs; - aT2: ShapeEnum from TopAbs) - returns Integer from Standard; - - HasBRep(myclass; - aT: ShapeEnum from TopAbs) - returns Boolean from Standard; - - ComputeVV(myclass; - aV1:Vertex from TopoDS; - aV2:Vertex from TopoDS) - returns Integer from Standard; - - CopyShape(myclass; - aS:Shape from TopoDS; - aSC:out Shape from TopoDS); - - CopyShape(myclass; - aS:Shape from TopoDS; - aSC :out Shape from TopoDS; - aMSS :out IndexedDataMapOfShapeShape from TopTools); ---fields - -end Tools; diff --git a/src/NMTDS/NMTDS_Tools.cxx b/src/NMTDS/NMTDS_Tools.cxx index cdffe47d3..f34ce68e5 100644 --- a/src/NMTDS/NMTDS_Tools.cxx +++ b/src/NMTDS/NMTDS_Tools.cxx @@ -21,7 +21,7 @@ // Created: Tue Feb 20 14:57:28 2007 // Author: Peter KURNEV -#include +#include #include #include #include @@ -84,7 +84,6 @@ void CopySource(const TopoDS_Shape& aS, // bFree=aSC.Free(); aSC.Free(Standard_True); - //modified by NIZNHY-PKV Fri Nov 25 10:10:03 2011f aSF=aS; if (aT==TopAbs_EDGE){ TopAbs_Orientation aOr; @@ -95,8 +94,6 @@ void CopySource(const TopoDS_Shape& aS, } } aIt.Initialize(aSF); - //aIt.Initialize(aS); - //modified by NIZNHY-PKV Fri Nov 25 10:10:05 2011t for (; aIt.More(); aIt.Next()) { TopoDS_Shape aSCx; // diff --git a/src/NMTDS/NMTDS_Tools.hxx b/src/NMTDS/NMTDS_Tools.hxx index 2d2a15fac..e30d8924c 100644 --- a/src/NMTDS/NMTDS_Tools.hxx +++ b/src/NMTDS/NMTDS_Tools.hxx @@ -17,97 +17,47 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_Tools.hxx +// Created: +// Author: Peter KURNEV + #ifndef _NMTDS_Tools_HeaderFile #define _NMTDS_Tools_HeaderFile -#ifndef _Standard_Integer_HeaderFile +#include +#include #include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -class TopoDS_Vertex; -class TopoDS_Shape; -class TopTools_IndexedDataMapOfShapeShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTDS_Tools { - -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 - // - - -Standard_EXPORT static Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aT1,const TopAbs_ShapeEnum aT2) ; - - -Standard_EXPORT static Standard_Boolean HasBRep(const TopAbs_ShapeEnum aT) ; - - -Standard_EXPORT static Standard_Integer ComputeVV(const TopoDS_Vertex& aV1,const TopoDS_Vertex& aV2) ; - - -Standard_EXPORT static void CopyShape(const TopoDS_Shape& aS,TopoDS_Shape& aSC) ; - - -Standard_EXPORT static void CopyShape(const TopoDS_Shape& aS,TopoDS_Shape& aSC,TopTools_IndexedDataMapOfShapeShape& aMSS) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - +#include +#include +#include + +//======================================================================= +//function : NMTDS_Tools +//purpose : +//======================================================================= +class NMTDS_Tools +{ + public: + Standard_EXPORT + static Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aT1, + const TopAbs_ShapeEnum aT2) ; + + Standard_EXPORT + static Standard_Boolean HasBRep(const TopAbs_ShapeEnum aT) ; + + Standard_EXPORT + static Standard_Integer ComputeVV(const TopoDS_Vertex& aV1, + const TopoDS_Vertex& aV2) ; + + Standard_EXPORT + static void CopyShape(const TopoDS_Shape& aS, + TopoDS_Shape& aSC) ; + + Standard_EXPORT + static void CopyShape(const TopoDS_Shape& aS, + TopoDS_Shape& aSC, + TopTools_IndexedDataMapOfShapeShape& aMSS) ; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTDS/NMTDS_Tools.ixx b/src/NMTDS/NMTDS_Tools.ixx deleted file mode 100644 index a42537372..000000000 --- a/src/NMTDS/NMTDS_Tools.ixx +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - - - - diff --git a/src/NMTDS/NMTDS_Tools.jxx b/src/NMTDS/NMTDS_Tools.jxx deleted file mode 100644 index 056b7a8a3..000000000 --- a/src/NMTDS/NMTDS_Tools.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Vertex_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_IndexedDataMapOfShapeShape_HeaderFile -#include -#endif -#ifndef _NMTDS_Tools_HeaderFile -#include -#endif diff --git a/src/NMTDS_NEW/Makefile.am b/src/NMTDS_NEW/Makefile.am deleted file mode 100644 index a8a43b8dd..000000000 --- a/src/NMTDS_NEW/Makefile.am +++ /dev/null @@ -1,112 +0,0 @@ - -# -# This library is free software; you can redistribute it and/or -# modify it 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 - -# GEOM NMTAlgo : partition algorithm -# File : Makefile.in -# Author : Julia DOROVSKIKH -# Modified by : Alexander BORODIN (OCN) - autotools usage -# Module : GEOM - -include $(top_srcdir)/adm_local/unix/make_common_starter.am - -# header files -salomeinclude_HEADERS = \ - NMTDS_BndSphere.hxx \ - NMTDS_BndSphere.lxx \ - NMTDS_BndSphereTree.hxx \ - NMTDS_BoxBndTree.hxx \ - NMTDS_CArray1OfIndexRange.hxx \ - NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx \ - NMTDS_DataMapOfIntegerMapOfInteger.hxx \ - NMTDS_IndexedDataMapOfIntegerShape.hxx \ - NMTDS_IndexedDataMapOfShapeBndSphere.hxx \ - NMTDS_IndexedDataMapOfShapeBox.hxx \ - NMTDS_IndexRange.hxx \ - NMTDS_InterfPool.hxx \ - NMTDS_InterfType.hxx \ - NMTDS_IteratorCheckerSI.hxx \ - NMTDS_Iterator.hxx \ - NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ - NMTDS_ListIteratorOfListOfPairBoolean.hxx \ - NMTDS_ListIteratorOfListOfPair.hxx \ - NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx \ - NMTDS_ListIteratorOfListOfPassKey.hxx \ - NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx \ - NMTDS_ListOfPairBoolean.hxx \ - NMTDS_ListOfPair.hxx \ - NMTDS_ListOfPassKeyBoolean.hxx \ - NMTDS_ListOfPassKey.hxx \ - NMTDS_MapIteratorOfMapOfPairBoolean.hxx \ - NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx \ - NMTDS_MapIteratorOfMapOfPassKey.hxx \ - NMTDS_MapOfPairBoolean.hxx \ - NMTDS_MapOfPassKeyBoolean.hxx \ - NMTDS_MapOfPassKey.hxx \ - NMTDS_PairBoolean.hxx \ - NMTDS_Pair.hxx \ - NMTDS_PairMapHasher.hxx \ - NMTDS_PassKeyBoolean.hxx \ - NMTDS_PassKey.hxx \ - NMTDS_PassKeyMapHasher.hxx \ - NMTDS_PassKeyShape.hxx \ - NMTDS_PassKeyShapeMapHasher.hxx \ - NMTDS_PInterfPool.hxx \ - NMTDS_PIterator.hxx \ - NMTDS_PShapesDataStructure.hxx \ - NMTDS_ShapesDataStructure.hxx \ - NMTDS_Tools.hxx - -# Libraries targets -lib_LTLIBRARIES = libNMTDS.la - -dist_libNMTDS_la_SOURCES = \ - NMTDS_BndSphere.cxx \ - NMTDS_BndSphereTree.cxx \ - NMTDS_BoxBndTree.cxx \ - NMTDS_CArray1OfIndexRange.cxx \ - NMTDS_IndexRange.cxx \ - NMTDS_InterfPool.cxx \ - NMTDS_IteratorCheckerSI.cxx \ - NMTDS_Iterator.cxx \ - NMTDS_PairBoolean.cxx \ - NMTDS_Pair.cxx \ - NMTDS_PairMapHasher.cxx \ - NMTDS_PassKeyBoolean.cxx \ - NMTDS_PassKey.cxx \ - NMTDS_PassKeyMapHasher.cxx \ - NMTDS_PassKeyShape.cxx \ - NMTDS_PassKeyShapeMapHasher.cxx \ - NMTDS_ShapesDataStructure.cxx \ - NMTDS_Tools.cxx - -# additional information to compile and link file - -libNMTDS_la_CPPFLAGS = \ - $(CAS_CPPFLAGS) \ - $(KERNEL_CXXFLAGS) - -libNMTDS_la_LDFLAGS = \ - $(STDLIB) \ - $(CAS_LDPATH) -lTKBool -lTKBO - -# extra dist files -CDL_FILES = NMTDS.cdl - -EXTRA_DIST += \ - $(CDL_FILES) \ - FILES diff --git a/src/NMTDS_NEW/NMTDS.cdl b/src/NMTDS_NEW/NMTDS.cdl deleted file mode 100644 index de747be18..000000000 --- a/src/NMTDS_NEW/NMTDS.cdl +++ /dev/null @@ -1,94 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTDS.cdl --- Created: Fri Nov 28 10:13:19 2003 --- Author: Peter KURNEV --- -package NMTDS - - ---Purpose: - ---uses - --TCollection, - --TColStd, - --gp, - --Bnd, - --TopoDS, - --TopAbs, - --TopTools, - --BooleanOperations, - --BOPTools, - --BOPTColStd - -is - imported InterfType from NMTDS; - imported BndSphere from NMTDS; - imported IndexRange from NMTDS; - imported InterfPool from NMTDS; - imported Iterator from NMTDS; - imported IteratorCheckerSI from NMTDS; - imported Pair from NMTDS; - imported PairBoolean from NMTDS; - imported PairMapHasher from NMTDS; - imported PassKey from NMTDS; - imported PassKeyBoolean from NMTDS; - imported PassKeyMapHasher from NMTDS; - imported PassKeyShape from NMTDS; - imported PassKeyShapeMapHasher from NMTDS; - imported Tools from NMTDS; - imported ShapesDataStructure from NMTDS; - imported PShapesDataStructure from NMTDS; - imported PIterator from NMTDS; - imported PInterfPool from NMTDS; - -- - imported ListOfPassKey from NMTDS; - imported ListIteratorOfListOfPassKey from NMTDS; - - imported ListOfPassKeyBoolean from NMTDS; - imported ListIteratorOfListOfPassKeyBoolean from NMTDS; - - imported ListOfPair from NMTDS; - imported ListIteratorOfListOfPair from NMTDS; - - imported ListOfPairBoolean from NMTDS; - imported ListIteratorOfListOfPairBoolean from NMTDS; - - imported ListOfIndexedDataMapOfShapeAncestorsSuccessors from NMTDS; - imported ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors from NMTDS; - - imported MapOfPassKey from NMTDS; - imported MapIteratorOfMapOfPassKey from NMTDS; - - imported MapOfPairBoolean from NMTDS; - imported MapIteratorOfMapOfPairBoolean from NMTDS; - - imported IndexedDataMapOfShapeBox from NMTDS; - imported IndexedDataMapOfIntegerShape from NMTDS; - imported IndexedDataMapOfShapeBndSphere from NMTDS; - - imported DataMapOfIntegerMapOfInteger from NMTDS; - imported DataMapIteratorOfDataMapOfIntegerMapOfInteger from NMTDS; - - imported CArray1OfIndexRange from NMTDS; - -end NMTDS; diff --git a/src/NMTDS_NEW/NMTDS_BndSphere.cxx b/src/NMTDS_NEW/NMTDS_BndSphere.cxx deleted file mode 100644 index 6d1b2d8b2..000000000 --- a/src/NMTDS_NEW/NMTDS_BndSphere.cxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_BndSphere.cxx -// Created: -// Author: Peter KURNEV -// -// -#include - -//======================================================================= -//function : -//purpose : -//======================================================================= - NMTDS_BndSphere::NMTDS_BndSphere() -{ - myCenter.SetCoord(0., 0., 0.); - myRadius=0.; - myGap=0.; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - NMTDS_BndSphere::~NMTDS_BndSphere() -{ -} -//======================================================================= -//function : IsOut -//purpose : -//======================================================================= - Standard_Boolean NMTDS_BndSphere::IsOut(const NMTDS_BndSphere& theOther)const -{ - Standard_Real aD2, aT2; - // - aD2=myCenter.SquareDistance(theOther.myCenter); - aT2=myRadius+myGap+theOther.myRadius+theOther.myGap; - aT2=aT2*aT2; - // - return aD2>aT2; -} diff --git a/src/NMTDS_NEW/NMTDS_BndSphere.hxx b/src/NMTDS_NEW/NMTDS_BndSphere.hxx deleted file mode 100644 index 9e5f6554e..000000000 --- a/src/NMTDS_NEW/NMTDS_BndSphere.hxx +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_BndSphere.hxx -// Created: -// Author: Peter KURNEV -// - -#ifndef _NMTDS_BndSphere_HeaderFile -#define _NMTDS_BndSphere_HeaderFile - -#include -#include -#include -#include -#include - -//======================================================================= -//class : NMTDS_BndSphere -//purpose : -//======================================================================= -class NMTDS_BndSphere { - public: - Standard_EXPORT - NMTDS_BndSphere(); - - Standard_EXPORT - virtual ~NMTDS_BndSphere(); - - void SetCenter(const gp_Pnt& theP) ; - - const gp_Pnt& Center() const; - - void SetRadius(const Standard_Real theR) ; - - Standard_Real Radius() const; - - void SetGap(const Standard_Real theGap) ; - - Standard_Real Gap() const; - - void Add(const NMTDS_BndSphere& theOther) ; - - Standard_EXPORT - Standard_Boolean IsOut(const NMTDS_BndSphere& theOther) const; - - Standard_Real SquareExtent() const; - - protected: - gp_Pnt myCenter; - Standard_Real myRadius; - Standard_Real myGap; -}; - -#include - -#endif diff --git a/src/NMTDS_NEW/NMTDS_BndSphere.lxx b/src/NMTDS_NEW/NMTDS_BndSphere.lxx deleted file mode 100644 index a7be22637..000000000 --- a/src/NMTDS_NEW/NMTDS_BndSphere.lxx +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_BndSphere.lxx -// Created: -// Author: Peter KURNEV -// -//======================================================================= -//function : SetCenter -//purpose : -//======================================================================= - inline void NMTDS_BndSphere::SetCenter(const gp_Pnt& theP) -// -{ - myCenter=theP; -} -//======================================================================= -//function : Center -//purpose : -//======================================================================= - inline const gp_Pnt& NMTDS_BndSphere::Center()const -{ - return myCenter; -} -//======================================================================= -//function : SetRadius -//purpose : -//======================================================================= - inline void NMTDS_BndSphere::SetRadius(const Standard_Real theR) -{ - myRadius=theR; -} -//======================================================================= -//function : Radius -//purpose : -//======================================================================= - inline Standard_Real NMTDS_BndSphere::Radius()const -{ - return myRadius; -} -//======================================================================= -//function : SetGap -//purpose : -//======================================================================= - inline void NMTDS_BndSphere::SetGap(const Standard_Real theGap) -{ - myGap=theGap; -} -//======================================================================= -//function : Gap -//purpose : -//======================================================================= - inline Standard_Real NMTDS_BndSphere::Gap()const -{ - return myGap; -} -//======================================================================= -//function : Add -//purpose : -//======================================================================= - inline void NMTDS_BndSphere::Add(const NMTDS_BndSphere& theOther) -{ - Standard_Real aTmax, aR, aT, aTOther; - gp_Pnt aPc; - // - aPc.SetXYZ(0.5*(myCenter.XYZ()+theOther.myCenter.XYZ())); - // - aR=aPc.Distance(myCenter); - // - aT=myRadius+myGap; - aTOther=theOther.myRadius+theOther.myGap; - aTmax=(aT>aTOther) ? aT: aTOther; - // - aR=aR+aTmax; - // - myCenter=aPc; - myRadius=aR; -} -//======================================================================= -//function : SquareExtent -//purpose : -//======================================================================= - inline Standard_Real NMTDS_BndSphere::SquareExtent()const -{ - Standard_Real aD; - // - aD=myRadius+myGap; - aD=aD+aD; - aD=aD*aD; - // - return aD; -} diff --git a/src/NMTDS_NEW/NMTDS_BndSphereTree.cxx b/src/NMTDS_NEW/NMTDS_BndSphereTree.cxx deleted file mode 100644 index a6b449ac9..000000000 --- a/src/NMTDS_NEW/NMTDS_BndSphereTree.cxx +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_BndSphereTree.cxx -// Created: -// Author: Peter KURNEV -// -// -#include -//======================================================================= -//function : -//purpose : -//======================================================================= - NMTDS_BndSphereTreeSelector::NMTDS_BndSphereTreeSelector() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - NMTDS_BndSphereTreeSelector::~NMTDS_BndSphereTreeSelector() -{ -} -//======================================================================= -//function : Reject -//purpose : -//======================================================================= - Standard_Boolean NMTDS_BndSphereTreeSelector::Reject (const NMTDS_BndSphere& aBox) const -{ - Standard_Boolean bRet; - // - bRet=myBox.IsOut(aBox); - return bRet; -} -//======================================================================= -//function : Accept -//purpose : -//======================================================================= - Standard_Boolean NMTDS_BndSphereTreeSelector::Accept (const Standard_Integer& aIndex) -{ - Standard_Boolean bRet=Standard_False; - // - if (myFence.Add(aIndex)) { - myIndices.Append(aIndex); - bRet=!bRet; - } - return bRet; -} -//======================================================================= -//function : SetBox -//purpose : -//======================================================================= - void NMTDS_BndSphereTreeSelector::SetBox(const NMTDS_BndSphere& aBox) -{ - myBox=aBox; -} -//======================================================================= -//function : Clear -//purpose : -//======================================================================= - void NMTDS_BndSphereTreeSelector::Clear() -{ - myFence.Clear(); - myIndices.Clear(); -} -//======================================================================= -//function : Indices -//purpose : -//======================================================================= - const TColStd_ListOfInteger& NMTDS_BndSphereTreeSelector::Indices() const -{ - return myIndices; -} diff --git a/src/NMTDS_NEW/NMTDS_BndSphereTree.hxx b/src/NMTDS_NEW/NMTDS_BndSphereTree.hxx deleted file mode 100644 index 1721f1dc0..000000000 --- a/src/NMTDS_NEW/NMTDS_BndSphereTree.hxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_BndSphereTree.hxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef NMTDS_BndSphereTree_HeaderFile -#define NMTDS_BndSphereTree_HeaderFile - -#include -#include -#include -#include - -typedef NCollection_UBTree NMTDS_BndSphereTree; - - class NMTDS_BndSphereTreeSelector : public NMTDS_BndSphereTree::Selector { - public: - Standard_EXPORT NMTDS_BndSphereTreeSelector(); - Standard_EXPORT virtual Standard_Boolean Reject(const NMTDS_BndSphere&) const; - Standard_EXPORT virtual Standard_Boolean Accept(const Standard_Integer &); - Standard_EXPORT virtual ~NMTDS_BndSphereTreeSelector(); - - Standard_EXPORT void Clear(); - Standard_EXPORT void SetBox(const NMTDS_BndSphere&); - Standard_EXPORT const TColStd_ListOfInteger& Indices() const; - - protected: - NMTDS_BndSphere myBox; - TColStd_MapOfInteger myFence; - TColStd_ListOfInteger myIndices; - - }; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_BoxBndTree.cxx b/src/NMTDS_NEW/NMTDS_BoxBndTree.cxx deleted file mode 100644 index 055007096..000000000 --- a/src/NMTDS_NEW/NMTDS_BoxBndTree.cxx +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_BoxBndTree.cxx -// Created: Tue Oct 17 13:04:11 2006 -// Author: Peter KURNEV -// -// -#include -//======================================================================= -//function : -//purpose : -//======================================================================= - NMTDS_BoxBndTreeSelector::NMTDS_BoxBndTreeSelector() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - NMTDS_BoxBndTreeSelector::~NMTDS_BoxBndTreeSelector() -{ -} -//======================================================================= -//function : Reject -//purpose : -//======================================================================= - Standard_Boolean NMTDS_BoxBndTreeSelector::Reject (const Bnd_Box& aBox) const -{ - Standard_Boolean bRet; - // - bRet=myBox.IsOut(aBox); - return bRet; -} -//======================================================================= -//function : Accept -//purpose : -//======================================================================= - Standard_Boolean NMTDS_BoxBndTreeSelector::Accept (const Standard_Integer& aIndex) -{ - Standard_Boolean bRet=Standard_False; - // - if (myFence.Add(aIndex)) { - myIndices.Append(aIndex); - bRet=!bRet; - } - return bRet; -} -//======================================================================= -//function : SetBox -//purpose : -//======================================================================= - void NMTDS_BoxBndTreeSelector::SetBox(const Bnd_Box& aBox) -{ - myBox=aBox; -} -//======================================================================= -//function : Clear -//purpose : -//======================================================================= - void NMTDS_BoxBndTreeSelector::Clear() -{ - myFence.Clear(); - myIndices.Clear(); -} -//======================================================================= -//function : Indices -//purpose : -//======================================================================= - const TColStd_ListOfInteger& NMTDS_BoxBndTreeSelector::Indices() const -{ - return myIndices; -} diff --git a/src/NMTDS_NEW/NMTDS_BoxBndTree.hxx b/src/NMTDS_NEW/NMTDS_BoxBndTree.hxx deleted file mode 100644 index 9ab98bb43..000000000 --- a/src/NMTDS_NEW/NMTDS_BoxBndTree.hxx +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_BoxBndTree.hxx -// Created: Tue Oct 17 12:50:31 2006 -// Author: Peter KURNEV -// -// -#ifndef NMTDS_BoxBndTree_HeaderFile -#define NMTDS_BoxBndTree_HeaderFile - -#include -#include -#include -#include - -typedef NCollection_UBTree NMTDS_BoxBndTree; - - class NMTDS_BoxBndTreeSelector : public NMTDS_BoxBndTree::Selector { - public: - Standard_EXPORT NMTDS_BoxBndTreeSelector(); - Standard_EXPORT virtual Standard_Boolean Reject(const Bnd_Box&) const; - Standard_EXPORT virtual Standard_Boolean Accept(const Standard_Integer &); - Standard_EXPORT virtual ~NMTDS_BoxBndTreeSelector(); - - Standard_EXPORT void Clear(); - Standard_EXPORT void SetBox(const Bnd_Box&); - Standard_EXPORT const TColStd_ListOfInteger& Indices() const; - - protected: - Bnd_Box myBox; - TColStd_MapOfInteger myFence; - TColStd_ListOfInteger myIndices; - - }; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_CArray1OfIndexRange.hxx b/src/NMTDS_NEW/NMTDS_CArray1OfIndexRange.hxx deleted file mode 100644 index b2451b241..000000000 --- a/src/NMTDS_NEW/NMTDS_CArray1OfIndexRange.hxx +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_BndSphere.hxx -// Created: -// Author: Peter KURNEV -// - -#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile -#define _NMTDS_CArray1OfIndexRange_HeaderFile - -#include -#include -#include -#include -#include -#include - -class Standard_OutOfRange; -class Standard_OutOfMemory; - - - -//======================================================================= -//function : NMTDS_CArray1OfIndexRange -//purpose : -//======================================================================= -class NMTDS_CArray1OfIndexRange { - 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; - - Standard_EXPORT - void Purge() ; - - 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; - - - Standard_Address myStart; - Standard_Integer myLength; - Standard_Integer myFactLength; - Standard_Integer myBlockLength; - Standard_Boolean myIsAllocated; -}; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx b/src/NMTDS_NEW/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx deleted file mode 100644 index e139ab938..000000000 --- a/src/NMTDS_NEW/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx -// Created: Mon Feb 20 09:31:43 2012 -// Author: -// - - -#ifndef NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile -#define NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger_HeaderFile - -#ifndef NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTDS_NEW/NMTDS_DataMapOfIntegerMapOfInteger.hxx b/src/NMTDS_NEW/NMTDS_DataMapOfIntegerMapOfInteger.hxx deleted file mode 100644 index 69278c1a5..000000000 --- a/src/NMTDS_NEW/NMTDS_DataMapOfIntegerMapOfInteger.hxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapOfIntegerMapOfInteger.hxx -// Created: Mon Feb 20 09:27:40 2012 -// Author: -// - - -#ifndef NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile -#define NMTDS_DataMapOfIntegerMapOfInteger_HeaderFile - -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_DataMap NMTDS_DataMapOfIntegerMapOfInteger; -typedef NMTDS_DataMapOfIntegerMapOfInteger::Iterator NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger; - -#undef _NCollection_MapHasher - - -#endif diff --git a/src/NMTDS_NEW/NMTDS_IndexRange.cxx b/src/NMTDS_NEW/NMTDS_IndexRange.cxx deleted file mode 100644 index 83969f5ae..000000000 --- a/src/NMTDS_NEW/NMTDS_IndexRange.cxx +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_IndexRange.cxx -// Created: Fri Nov 28 10:34:59 2003 -// Author: Peter KURNEV -// -// -#include - -//======================================================================= -//function :NMTDS_IndexRange::NMTDS_IndexRange -//purpose : -//======================================================================= - NMTDS_IndexRange::NMTDS_IndexRange() -: - myFirst(0), - myLast(0) -{ -} -//======================================================================= -//function :SetFirst -//purpose : -//======================================================================= - void NMTDS_IndexRange::SetFirst(const Standard_Integer aFirst) -{ - myFirst=aFirst; -} -//======================================================================= -//function :First -//purpose : -//======================================================================= - Standard_Integer NMTDS_IndexRange::First()const -{ - return myFirst; -} -//======================================================================= -//function :SetLast -//purpose : -//======================================================================= - void NMTDS_IndexRange::SetLast(const Standard_Integer aLast) -{ - myLast=aLast; -} -//======================================================================= -//function :Last -//purpose : -//======================================================================= - Standard_Integer NMTDS_IndexRange::Last()const -{ - return myLast; -} -//======================================================================= -//function :IsInRange -//purpose : -//======================================================================= - Standard_Boolean NMTDS_IndexRange::IsInRange(const Standard_Integer aIndex)const -{ - return (Standard_Boolean)(aIndex>=myFirst && aIndex<=myLast); -} diff --git a/src/NMTDS_NEW/NMTDS_IndexRange.hxx b/src/NMTDS_NEW/NMTDS_IndexRange.hxx deleted file mode 100644 index 84b055745..000000000 --- a/src/NMTDS_NEW/NMTDS_IndexRange.hxx +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_IndexRange.hxx -// Created: -// Author: Peter KURNEV -// -// - -#ifndef _NMTDS_IndexRange_HeaderFile -#define _NMTDS_IndexRange_HeaderFile - -#include -#include -#include -#include - -//======================================================================= -//class : NMTDS_IndexRange -//purpose : -//======================================================================= -class NMTDS_IndexRange { - 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; - -protected: - Standard_Integer myFirst; - Standard_Integer myLast; -}; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_IndexedDataMapOfIntegerShape.hxx b/src/NMTDS_NEW/NMTDS_IndexedDataMapOfIntegerShape.hxx deleted file mode 100644 index 8ae674ea8..000000000 --- a/src/NMTDS_NEW/NMTDS_IndexedDataMapOfIntegerShape.hxx +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IndexedDataMapOfIntegerShape.hxx -// Created: Mon Feb 20 09:20:07 2012 -// Author: -// - - -#ifndef NMTDS_IndexedDataMapOfIntegerShape_HeaderFile -#define NMTDS_IndexedDataMapOfIntegerShape_HeaderFile - -#include -#include -#include - -#define _NCollection_MapHasher -#include - - -typedef NCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerShape; - -#undef _NCollection_MapHasher - - - -#endif diff --git a/src/NMTDS_NEW/NMTDS_IndexedDataMapOfShapeBndSphere.hxx b/src/NMTDS_NEW/NMTDS_IndexedDataMapOfShapeBndSphere.hxx deleted file mode 100644 index 23a1df289..000000000 --- a/src/NMTDS_NEW/NMTDS_IndexedDataMapOfShapeBndSphere.hxx +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IndexedDataMapOfShapeBndSphere.hxx -// Created: Mon Feb 20 09:17:01 2012 -// Author: -// - - -#ifndef NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile -#define NMTDS_IndexedDataMapOfShapeBndSphere_HeaderFile - -#include -#include -#include - -#define _NCollection_MapHasher -#include - - - -typedef NCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBndSphere; - -#undef _NCollection_MapHasher - - - - -#endif diff --git a/src/NMTDS_NEW/NMTDS_IndexedDataMapOfShapeBox.hxx b/src/NMTDS_NEW/NMTDS_IndexedDataMapOfShapeBox.hxx deleted file mode 100644 index 7c50c3925..000000000 --- a/src/NMTDS_NEW/NMTDS_IndexedDataMapOfShapeBox.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IndexedDataMapOfShapeBox.hxx -// Created: Mon Feb 20 09:17:01 2012 -// Author: -// - - -#ifndef NMTDS_IndexedDataMapOfShapeBox_HeaderFile -#define NMTDS_IndexedDataMapOfShapeBox_HeaderFile - -#include -#include -#include - -#define _NCollection_MapHasher -#include - - -typedef NCollection_IndexedDataMap NMTDS_IndexedDataMapOfShapeBox; - -#undef _NCollection_MapHasher - - - - -#endif diff --git a/src/NMTDS_NEW/NMTDS_InterfPool.cxx b/src/NMTDS_NEW/NMTDS_InterfPool.cxx deleted file mode 100644 index 025946bab..000000000 --- a/src/NMTDS_NEW/NMTDS_InterfPool.cxx +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_InterfPool.cxx -// Author: Peter KURNEV - -#include - -#include -#include -#include -#include - -#include - -static - Standard_Integer TypeToInteger(const NMTDS_InterfType aType); - -//======================================================================= -//function : -//purpose : -//======================================================================= -NMTDS_InterfPool::NMTDS_InterfPool() -{ - myMaxInd=6; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - NMTDS_InterfPool::~NMTDS_InterfPool() -{ -} -//======================================================================= -//function : Add -//purpose : -//======================================================================= -Standard_Boolean NMTDS_InterfPool::Add (const NMTDS_PairBoolean& aPKB, - const NMTDS_InterfType aType) -{ - Standard_Boolean bRet; - Standard_Integer iType; - // - bRet=Standard_False; - // - iType=TypeToInteger(aType); - if (iType>-1 && iTypeClear(); - // - for (i=0; iAppend(aPKB); - } - } - return myList; -} -//======================================================================= -//function : Get -//purpose : -//======================================================================= -const NMTDS_ListOfPairBoolean& NMTDS_InterfPool::Get - (const Standard_Integer aInd)const -{ - Standard_Integer i, n1, n2; - NMTDS_ListOfPairBoolean* pL; - // - pL=(NMTDS_ListOfPairBoolean*)&myList; - pL->Clear(); - // - for (i=0; iAppend(aPKB); - } - } - } - return myList; -} -//======================================================================= -//function : Get -//purpose : -//======================================================================= -const NMTDS_ListOfPairBoolean& NMTDS_InterfPool::Get - (const NMTDS_InterfType aType)const -{ - Standard_Integer iType; - NMTDS_ListOfPairBoolean* pL; - // - pL=(NMTDS_ListOfPairBoolean*)&myList; - pL->Clear(); - // - iType=TypeToInteger(aType); - if (iType>-1 && iTypeAppend(aPKB); - } - } - return myList; -} -//======================================================================= -//function : Get -//purpose : -//======================================================================= -const NMTDS_ListOfPairBoolean& NMTDS_InterfPool::Get - (const Standard_Integer aInd, - const NMTDS_InterfType aType)const -{ - Standard_Integer n1, n2; - NMTDS_ListOfPairBoolean *pL, aLPKB; - NMTDS_ListIteratorOfListOfPairBoolean aIt; - // - aLPKB=Get(aType); - // - pL=(NMTDS_ListOfPairBoolean*)&myList; - pL->Clear(); - // - aIt.Initialize (aLPKB); - for (; aIt.More(); aIt.Next()) { - const NMTDS_PairBoolean& aPKB=aIt.Value(); - aPKB.Ids(n1, n2); - if(n1==aInd || n2==aInd) { - pL->Append(aPKB); - } - } - return myList; -} -//////////////////// -//=========================================================================== -//function : SSInterferences -//purpose : -//=========================================================================== -BOPTools_CArray1OfSSInterference& NMTDS_InterfPool::SSInterferences() -{ - return mySSInterferences; -} -//=========================================================================== -//function : ESInterferences -//purpose : -//=========================================================================== -BOPTools_CArray1OfESInterference& NMTDS_InterfPool::ESInterferences() -{ - return myESInterferences; -} -//=========================================================================== -//function : VSInterferences -//purpose : -//=========================================================================== -BOPTools_CArray1OfVSInterference& NMTDS_InterfPool::VSInterferences() -{ - return myVSInterferences; -} -//=========================================================================== -//function : EEInterferences -//purpose : -//=========================================================================== -BOPTools_CArray1OfEEInterference& NMTDS_InterfPool::EEInterferences() -{ - return myEEInterferences; -} -//=========================================================================== -//function : VEInterferences -//purpose : -//=========================================================================== -BOPTools_CArray1OfVEInterference& NMTDS_InterfPool::VEInterferences() -{ - return myVEInterferences; -} -//=========================================================================== -//function : VVInterferences -//purpose : -//=========================================================================== -BOPTools_CArray1OfVVInterference& NMTDS_InterfPool::VVInterferences() -{ - return myVVInterferences; -} - -//modified by NIZNHY-PKV Mon Dec 12 09:07:54 2011f -//======================================================================= -//function : Purge -//purpose : -//======================================================================= -void NMTDS_InterfPool::Purge() -{ -#if OCC_VERSION_LARGE > 0x06050200 - myVVInterferences.Purge(); - myVEInterferences.Purge(); - myEEInterferences.Purge(); - myVSInterferences.Purge(); - myESInterferences.Purge(); - mySSInterferences.Purge(); -#endif -} -//modified by NIZNHY-PKV Mon Dec 12 09:07:58 2011t - -//======================================================================= -//function : TypeToInteger -//purpose : -//======================================================================= -Standard_Integer TypeToInteger(const NMTDS_InterfType aType) -{ - return (Standard_Integer)aType; -} diff --git a/src/NMTDS_NEW/NMTDS_InterfPool.hxx b/src/NMTDS_NEW/NMTDS_InterfPool.hxx deleted file mode 100644 index 71dc6c2ae..000000000 --- a/src/NMTDS_NEW/NMTDS_InterfPool.hxx +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_InterfPool.hxx -// -// Author: Peter KURNEV - -#ifndef _NMTDS_InterfPool_HeaderFile -#define _NMTDS_InterfPool_HeaderFile - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//class : NMTDS_InterfPool -//purpose : -//======================================================================= -class NMTDS_InterfPool { - public: - Standard_EXPORT - NMTDS_InterfPool(); - Standard_EXPORT - virtual ~NMTDS_InterfPool(); - - Standard_EXPORT - Standard_Boolean Add(const NMTDS_PairBoolean& aPKB, - const NMTDS_InterfType aType) ; - - Standard_EXPORT - Standard_Boolean Add(const Standard_Integer aInd1, - const Standard_Integer aInd2, - const NMTDS_InterfType aType) ; - - Standard_EXPORT - Standard_Boolean Add(const Standard_Integer aInd1, - const Standard_Integer aInd2, - const Standard_Boolean bFlag, - const NMTDS_InterfType aType) ; - - Standard_EXPORT - Standard_Boolean Contains(const NMTDS_PairBoolean& aPKB) const; - - Standard_EXPORT - Standard_Boolean Contains(const Standard_Integer aInd1, - const Standard_Integer aInd2) const; - - Standard_EXPORT - const NMTDS_ListOfPairBoolean& Get() const; - - Standard_EXPORT - const NMTDS_ListOfPairBoolean& Get(const NMTDS_InterfType aType) const; - - Standard_EXPORT - const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd) const; - - Standard_EXPORT - const NMTDS_ListOfPairBoolean& Get(const Standard_Integer aInd, - const NMTDS_InterfType aType) const; - - //! Returns the reference to array Of F/F interferences
- Standard_EXPORT BOPTools_CArray1OfSSInterference& SSInterferences() ; - - //! Returns the reference to array Of E/F interferences
- Standard_EXPORT BOPTools_CArray1OfESInterference& ESInterferences() ; - - //! Returns the reference to array Of V/F interferences
- Standard_EXPORT BOPTools_CArray1OfVSInterference& VSInterferences() ; - - //! Returns the reference to arrray Of E/E interferences
- Standard_EXPORT BOPTools_CArray1OfEEInterference& EEInterferences() ; - - //! Returns the reference to arrray Of V/E interferences
- Standard_EXPORT BOPTools_CArray1OfVEInterference& VEInterferences() ; - - //! Returns the reference to arrray Of V/V interferences
- Standard_EXPORT BOPTools_CArray1OfVVInterference& VVInterferences() ; - - Standard_EXPORT void Purge() ; - -protected: - NMTDS_MapOfPairBoolean myTable[6]; - NMTDS_ListOfPairBoolean myList; - Standard_Integer myMaxInd; - BOPTools_CArray1OfSSInterference mySSInterferences; - BOPTools_CArray1OfESInterference myESInterferences; - BOPTools_CArray1OfVSInterference myVSInterferences; - BOPTools_CArray1OfEEInterference myEEInterferences; - BOPTools_CArray1OfVEInterference myVEInterferences; - BOPTools_CArray1OfVVInterference myVVInterferences; - -private: -}; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_InterfType.hxx b/src/NMTDS_NEW/NMTDS_InterfType.hxx deleted file mode 100644 index 5bf1e72a8..000000000 --- a/src/NMTDS_NEW/NMTDS_InterfType.hxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_InterfType.hxx -// Created: -// Author: Peter KURNEV -// - - -#ifndef _NMTDS_InterfType_HeaderFile -#define _NMTDS_InterfType_HeaderFile - - -enum NMTDS_InterfType { -NMTDS_TI_VV, -NMTDS_TI_VE, -NMTDS_TI_VF, -NMTDS_TI_EE, -NMTDS_TI_EF, -NMTDS_TI_FF, -NMTDS_TI_UNKNOWN -}; - -#ifndef _Standard_PrimitiveTypes_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTDS_NEW/NMTDS_Iterator.cxx b/src/NMTDS_NEW/NMTDS_Iterator.cxx deleted file mode 100644 index 00bd62623..000000000 --- a/src/NMTDS_NEW/NMTDS_Iterator.cxx +++ /dev/null @@ -1,468 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_Iterator.cxx -// Author: Peter KURNEV - -#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 - -//======================================================================= -//function : NMTDS_Iterator -//purpose : -//======================================================================= -NMTDS_Iterator::NMTDS_Iterator() -{ - myDS=NULL; - myLength=0; -} -//======================================================================= -//function : ~NMTDS_Iterator -//purpose : -//======================================================================= -NMTDS_Iterator::~NMTDS_Iterator() -{ -} -//======================================================================= -// function: SetDS -// purpose: -//======================================================================= -void NMTDS_Iterator::SetDS(const NMTDS_PShapesDataStructure& aDS) -{ - myDS=aDS; -} -//======================================================================= -// function: DS -// purpose: -//======================================================================= -const NMTDS_ShapesDataStructure& NMTDS_Iterator::DS()const -{ - return *myDS; -} -//======================================================================= -// function: ExpectedLength -// purpose: -//======================================================================= -Standard_Integer NMTDS_Iterator::ExpectedLength() const -{ - return myLength; -} -//======================================================================= -// function: BlockLength -// purpose: -//======================================================================= -Standard_Integer NMTDS_Iterator::BlockLength() const -{ - Standard_Integer aNbIIs, iTresh; - Standard_Real aCfPredict=.5; - - aNbIIs=ExpectedLength(); - - if (aNbIIs<=1) { - return 1; - } - //modified by NIZNHY-PKV Mon Dec 12 08:50:50 2011f - iTresh=1000; - if (aNbIIs>iTresh) { - aNbIIs=iTresh; - return aNbIIs; - } - //modified by NIZNHY-PKV Mon Dec 12 08:50:54 2011t - // - aNbIIs=(Standard_Integer) (aCfPredict*(Standard_Real)aNbIIs); - return aNbIIs; -} -//======================================================================= -// function: Initialize -// purpose: -//======================================================================= -void NMTDS_Iterator::Initialize(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) -{ - Standard_Integer iX; - // - iX=NMTDS_Tools::TypeToInteger(aType1, aType2); - if (iX>=0) { - myIterator.Initialize(myLists[iX]); - myLength=myLists[iX].Extent(); - } - else { - myIterator.Initialize(myEmptyList); - myLength=0; - } -} -//======================================================================= -// function: More -// purpose: -//======================================================================= -Standard_Boolean NMTDS_Iterator::More()const -{ - return myIterator.More(); -} -//======================================================================= -// function: Next -// purpose: -//======================================================================= -void NMTDS_Iterator::Next() -{ - myIterator.Next(); -} -//======================================================================= -// function: Current -// purpose: -//======================================================================= -void NMTDS_Iterator::Current(Standard_Integer& aIndex1, - Standard_Integer& aIndex2, - Standard_Boolean& aWithSubShape) const -{ - const NMTDS_PairBoolean& aPKB=myIterator.Value(); - aPKB.Ids(aIndex1, aIndex2); - aWithSubShape=aPKB.Flag(); -} -//======================================================================= -// function: SDVertices -// purpose: -//======================================================================= -const TColStd_DataMapOfIntegerListOfInteger& NMTDS_Iterator::SDVertices()const -{ - return myMVSD; -} -//======================================================================= -// function: Prepare -// purpose: -//======================================================================= -void NMTDS_Iterator::Prepare() -{ - Standard_Integer i; - // - myLength=0; - for (i=0; i<6; ++i) { - myLists[i].Clear(); - } - myMVSD.Clear(); - // - if (myDS==NULL){ - return; - } - Intersect(); -} -//======================================================================= -// function: Intersect -// purpose: -//======================================================================= -void NMTDS_Iterator::Intersect() -{ - Standard_Boolean bFlag; - Standard_Integer aNb, i, aNbB, aNbR, iFlag; - Standard_Integer i1, i2, aNbSD, iX, j, iDS, jB, iR, k, aNbLV, aNbLV1; - TColStd_ListIteratorOfListOfInteger aIt; - TColStd_DataMapOfIntegerInteger aMII; - TColStd_DataMapOfIntegerListOfInteger aMVSD; - TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aItVSD; - TopTools_DataMapOfShapeInteger aMSI; - TopAbs_ShapeEnum aTi, aTj; - NMTDS_PairBoolean aPKXB; - NMTDS_MapOfPairBoolean aMPKXB; - NMTDS_IndexedDataMapOfShapeBox aMSB; - // - NMTDS_BoxBndTreeSelector aSelector; - NMTDS_BoxBndTree aBBTree; - NCollection_UBTreeFiller aTreeFiller(aBBTree); - // - const NMTDS_CArray1OfIndexRange& aRanges=myDS->Ranges(); - aNbR=aRanges.Extent(); - // - aNb=myDS->NumberOfShapesOfTheObject(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aS=myDS->Shape(i); - aTi=aS.ShapeType(); - if (NMTDS_Tools::HasBRep(aTi)) { - Bnd_Box aBoxEx; - // - myDS->ComputeBoxEx(i, aBoxEx); - aMSI.Bind(aS, i); - aMSB.Add(aS, aBoxEx); - } - } - // - aNbB=aMSB.Extent(); - // - for (i=1; i<=aNbB; ++i) { - const TopoDS_Shape& aS=aMSB.FindKey(i); - const Bnd_Box& aBoxEx=aMSB(i); - // - aTreeFiller.Add(i, aBoxEx); - // - iDS=aMSI.Find(aS); - aMII.Bind(i, iDS); - } - // - aTreeFiller.Fill(); - // - for (iR=1; iRShape(i); - aTi=aSi.ShapeType(); - if (!NMTDS_Tools::HasBRep(aTi)){ - continue; - } - const Bnd_Box& aBoxEx=aMSB.FindFromKey(aSi); - aSelector.Clear(); - aSelector.SetBox(aBoxEx); - // - aNbSD=aBBTree.Select(aSelector); - // - if (!aNbSD){ - continue; - } - // - const TColStd_ListOfInteger& aLI=aSelector.Indices(); - // - k=0; - TColStd_ListOfInteger aLV; - // - aIt.Initialize(aLI); - for (; aIt.More(); aIt.Next()) { - jB=aIt.Value(); // box index in MII - j=aMII.Find(jB); // DS index - if (j>=i1 && j<=i2) { - continue;// same range - } - // - aPKXB.SetIds(i, j); - // - if (aMPKXB.Add(aPKXB)) { - bFlag=Standard_False;// Bounding boxes are intersected - const Bnd_Box& aBoxi=myDS->GetBoundingBox(i); - const Bnd_Box& aBoxj=myDS->GetBoundingBox(j); - if (aBoxi.IsOut(aBoxj)) { - bFlag=!bFlag; //Bounding boxes of Sub-shapes are intersected - } - const TopoDS_Shape& aSj=myDS->Shape(j); - aTj=aSj.ShapeType(); - iX=NMTDS_Tools::TypeToInteger(aTi, aTj); - //bFlag=(iStatus==2); - aPKXB.SetFlag(bFlag); - myLists[iX].Append(aPKXB); - // - // VSD prepare - if (iX==5) { //VV - aLV.Append(j); - } - }// if (aMPKXB.Add(aPKXB)) { - }// for (; aIt.More(); aIt.Next()) { - // - // VSD treatment - aNbLV=aLV.Extent(); - if (aNbLV) { - TColStd_ListOfInteger aLV1; - // - const TopoDS_Vertex& aVi=TopoDS::Vertex(aSi); - aIt.Initialize(aLV); - for (; aIt.More(); aIt.Next()) { - j=aIt.Value(); - const TopoDS_Shape& aSj=myDS->Shape(j); - const TopoDS_Vertex& aVj=TopoDS::Vertex(aSj); - iFlag=NMTDS_Tools::ComputeVV(aVi, aVj); - if (!iFlag) { - aLV1.Append(j); - } - else { - aPKXB.SetIds(i, j); - aMPKXB.Remove(aPKXB); - } - } - // - aNbLV1=aLV1.Extent(); - if (aNbLV1) { - aMVSD.Bind(i, aLV1); - } - } - }//for (i=i1; i<=i2; ++i) { - }//for (iR=1; iR -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//class : NMTDS_Iterator -//purpose : -//======================================================================= -class NMTDS_Iterator { - public: - Standard_EXPORT - NMTDS_Iterator(); - - Standard_EXPORT - virtual ~NMTDS_Iterator(); - - Standard_EXPORT - void SetDS(const NMTDS_PShapesDataStructure& pDS) ; - - Standard_EXPORT - const NMTDS_ShapesDataStructure& DS() const; - - Standard_EXPORT - void Initialize(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) ; - - Standard_EXPORT - Standard_Boolean More() const; - - Standard_EXPORT - void Next() ; - - Standard_EXPORT - void Current(Standard_Integer& aIndex1, - Standard_Integer& aIndex2, - Standard_Boolean& aWithSubShape) const; - - Standard_EXPORT - virtual void Prepare() ; - - Standard_EXPORT - Standard_Integer ExpectedLength() const; - - Standard_EXPORT - Standard_Integer BlockLength() const; - - Standard_EXPORT - const TColStd_DataMapOfIntegerListOfInteger& SDVertices() const; - - Standard_EXPORT - static void FillMVSD(const TColStd_DataMapOfIntegerListOfInteger& aMVSD1, - TColStd_DataMapOfIntegerListOfInteger& aMVSD2) ; - -protected: - Standard_EXPORT - virtual void Intersect() ; - // - - NMTDS_PShapesDataStructure myDS; - NMTDS_ListOfPairBoolean myLists[6]; - NMTDS_ListIteratorOfListOfPairBoolean myIterator; - NMTDS_ListOfPairBoolean myEmptyList; - Standard_Integer myLength; - TColStd_DataMapOfIntegerListOfInteger myMVSD; -}; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_IteratorCheckerSI.cxx b/src/NMTDS_NEW/NMTDS_IteratorCheckerSI.cxx deleted file mode 100644 index 275333e9d..000000000 --- a/src/NMTDS_NEW/NMTDS_IteratorCheckerSI.cxx +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IteratorChecker.hxx -// Author: Peter KURNEV - -#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 - -//======================================================================= -//function : -//purpose : -//======================================================================= -NMTDS_IteratorCheckerSI::NMTDS_IteratorCheckerSI() -: - NMTDS_Iterator() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -NMTDS_IteratorCheckerSI::~NMTDS_IteratorCheckerSI() -{ -} -//======================================================================= -// function: Intersect -// purpose: -//======================================================================= -void NMTDS_IteratorCheckerSI::Intersect() -{ - Standard_Boolean bFlag; - Standard_Integer aNbS, i, aNbA, aNbB, iFlag; - Standard_Integer aNbSD, iX, j, iDS, jB, k, aNbLV; - TColStd_ListIteratorOfListOfInteger aIt; - TColStd_DataMapOfIntegerInteger aMII; - TColStd_DataMapOfIntegerListOfInteger aMVSD; - TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aItVSD; - TopTools_DataMapOfShapeInteger aMSI; - TopAbs_ShapeEnum aTi, aTj; - NMTDS_PairBoolean aPKXB; - NMTDS_MapOfPairBoolean aMPKXB; - NMTDS_IndexedDataMapOfShapeBox aMSB; - NMTDS_MapOfPairBoolean aMPA;//myPairsAvoid - // - NMTDS_BoxBndTreeSelector aSelector; - NMTDS_BoxBndTree aBBTree; - NCollection_UBTreeFiller aTreeFiller(aBBTree); - // - aNbS=myDS->NumberOfShapesOfTheObject(); - // - // myPairsAvoid, aMSI, aMSB - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aSi=myDS->Shape(i); - aTi=aSi.ShapeType(); - if (NMTDS_Tools::HasBRep(aTi)) { - if (aTi!=TopAbs_VERTEX) { - TColStd_IndexedMapOfInteger aMA; - // - myDS->GetAllSuccessors(i, aMA); - // - aNbA=aMA.Extent(); - for (j=1; j<=aNbA; ++j) { - iX=aMA(j); - aPKXB.Clear(); - aPKXB.SetIds(i, iX); - aMPA.Add(aPKXB); - } - } - else { - aPKXB.Clear(); - aPKXB.SetIds(i, i); - aMPA.Add(aPKXB); - } - // - Bnd_Box aBoxEx; - // - myDS->ComputeBoxEx(i, aBoxEx); - aMSI.Bind(aSi, i); - aMSB.Add(aSi, aBoxEx); - } - } - // - // aMII - aNbB=aMSB.Extent(); - for (i=1; i<=aNbB; ++i) { - const TopoDS_Shape& aS=aMSB.FindKey(i); - const Bnd_Box& aBoxEx=aMSB(i); - // - aTreeFiller.Add(i, aBoxEx); - // - iDS=aMSI.Find(aS); - aMII.Bind(i, iDS); - } - // - aTreeFiller.Fill(); - // - for (i=1; i<=aNbS; ++i) { - const TopoDS_Shape& aSi=myDS->Shape(i); - aTi=aSi.ShapeType(); - if (!NMTDS_Tools::HasBRep(aTi)){ - continue; - } - const Bnd_Box& aBoxEx=aMSB.FindFromKey(aSi); - aSelector.Clear(); - aSelector.SetBox(aBoxEx); - // - aNbSD=aBBTree.Select(aSelector); - if (!aNbSD){ - continue; - } - // - const TColStd_ListOfInteger& aLI=aSelector.Indices(); - // - k=0; - TColStd_ListOfInteger aLV; - // - aIt.Initialize(aLI); - for (; aIt.More(); aIt.Next()) { - jB=aIt.Value(); // box index in MII - j=aMII.Find(jB); // DS index - // - aPKXB.SetIds(i, j); - if (aMPA.Contains(aPKXB)) { - continue; - } - // - if (aMPKXB.Add(aPKXB)) { - bFlag=Standard_False;// Bounding boxes are intersected - const Bnd_Box& aBoxi=myDS->GetBoundingBox(i); - const Bnd_Box& aBoxj=myDS->GetBoundingBox(j); - if (aBoxi.IsOut(aBoxj)) { - bFlag=!bFlag; //Bounding boxes of Sub-shapes are intersected - } - const TopoDS_Shape& aSj=myDS->Shape(j); - aTj=aSj.ShapeType(); - iX=NMTDS_Tools::TypeToInteger(aTi, aTj); - //bFlag=(iStatus==2); - aPKXB.SetFlag(bFlag); - myLists[iX].Append(aPKXB); - // - // VSD prepare - if (iX==5) { //VV - aLV.Append(j); - } - }// if (aMPKXB.Add(aPKXB)) { - }// for (; aIt.More(); aIt.Next()) { - // - // VSD treatment - aNbLV=aLV.Extent(); - if (aNbLV) { - TColStd_ListOfInteger aLV1; - // - const TopoDS_Vertex& aVi=TopoDS::Vertex(aSi); - aIt.Initialize(aLV); - for (; aIt.More(); aIt.Next()) { - j=aIt.Value(); - const TopoDS_Shape& aSj=myDS->Shape(j); - const TopoDS_Vertex& aVj=TopoDS::Vertex(aSj); - iFlag=NMTDS_Tools::ComputeVV(aVi, aVj); - if (!iFlag) { - aLV1.Append(j); - } - else { - aPKXB.SetIds(i, j); - aMPKXB.Remove(aPKXB); - } - } - aMVSD.Bind(i, aLV1); - } - }//for (i=1; i<=aNbS; ++i) { - // - // - // 2. Chains - //================= - myMVSD.Clear(); - NMTDS_Iterator::FillMVSD(aMVSD, myMVSD); -} - diff --git a/src/NMTDS_NEW/NMTDS_IteratorCheckerSI.hxx b/src/NMTDS_NEW/NMTDS_IteratorCheckerSI.hxx deleted file mode 100644 index 3278a86c4..000000000 --- a/src/NMTDS_NEW/NMTDS_IteratorCheckerSI.hxx +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IteratorChecker.cxx -// Author: Peter KURNEV - -#ifndef _NMTDS_IteratorCheckerSI_HeaderFile -#define _NMTDS_IteratorCheckerSI_HeaderFile - -#include -#include -#include - -//======================================================================= -//class : NMTDS_IteratorCheckerSI -//purpose : -//======================================================================= -class NMTDS_IteratorCheckerSI : public NMTDS_Iterator { - public: - - Standard_EXPORT - NMTDS_IteratorCheckerSI(); - Standard_EXPORT - virtual ~NMTDS_IteratorCheckerSI(); - -protected: - Standard_EXPORT - virtual void Intersect() ; -}; -#endif diff --git a/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx deleted file mode 100644 index b2738719c..000000000 --- a/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - - -#ifndef NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#define NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile - -#ifndef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPair.hxx b/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPair.hxx deleted file mode 100644 index 958ce936b..000000000 --- a/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPair.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListIteratorOfListOfPair.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - - -#ifndef NMTDS_ListIteratorOfListOfPair_HeaderFile -#define NMTDS_ListIteratorOfListOfPair_HeaderFile - -#ifndef NMTDS_ListOfPair_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPairBoolean.hxx b/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPairBoolean.hxx deleted file mode 100644 index 4353f75be..000000000 --- a/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPairBoolean.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListIteratorOfListOfPairBoolean.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - - -#ifndef NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile -#define NMTDS_ListIteratorOfListOfPairBoolean_HeaderFile - -#ifndef NMTDS_ListOfPairBoolean_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPassKey.hxx b/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPassKey.hxx deleted file mode 100644 index 8f7980ea2..000000000 --- a/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPassKey.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListIteratorOfListOfPassKey.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - - -#ifndef NMTDS_ListIteratorOfListOfPassKey_HeaderFile -#define NMTDS_ListIteratorOfListOfPassKey_HeaderFile - -#ifndef NMTDS_ListOfPassKey_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx b/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx deleted file mode 100644 index 908b61d72..000000000 --- a/src/NMTDS_NEW/NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListIteratorOfListOfPassKeyBoolean.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - - -#ifndef NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile -#define NMTDS_ListIteratorOfListOfPassKeyBoolean_HeaderFile - -#ifndef NMTDS_ListOfPassKeyBoolean_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTDS_NEW/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS_NEW/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx deleted file mode 100644 index f89d3e3ac..000000000 --- a/src/NMTDS_NEW/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - - -#ifndef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile -#define NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile - -#include -#include - -typedef NCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors; -typedef NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors::Iterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_ListOfPair.hxx b/src/NMTDS_NEW/NMTDS_ListOfPair.hxx deleted file mode 100644 index 400cd66fb..000000000 --- a/src/NMTDS_NEW/NMTDS_ListOfPair.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListOfPair.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - - -#ifndef NMTDS_ListOfPair_HeaderFile -#define NMTDS_ListOfPair_HeaderFile - -#include -#include - -typedef NCollection_List NMTDS_ListOfPair; -typedef NMTDS_ListOfPair::Iterator NMTDS_ListIteratorOfListOfPair; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_ListOfPairBoolean.hxx b/src/NMTDS_NEW/NMTDS_ListOfPairBoolean.hxx deleted file mode 100644 index e45f4b91a..000000000 --- a/src/NMTDS_NEW/NMTDS_ListOfPairBoolean.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListOfPairBoolean.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - - -#ifndef NMTDS_ListOfPairBoolean_HeaderFile -#define NMTDS_ListOfPairBoolean_HeaderFile - -#include -#include - -typedef NCollection_List NMTDS_ListOfPairBoolean; -typedef NMTDS_ListOfPairBoolean::Iterator NMTDS_ListIteratorOfListOfPairBoolean; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_ListOfPassKey.hxx b/src/NMTDS_NEW/NMTDS_ListOfPassKey.hxx deleted file mode 100644 index 3c920f215..000000000 --- a/src/NMTDS_NEW/NMTDS_ListOfPassKey.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListOfPassKey.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - - -#ifndef NMTDS_ListOfPassKey_HeaderFile -#define NMTDS_ListOfPassKey_HeaderFile - -#include -#include - -typedef NCollection_List NMTDS_ListOfPassKey; -typedef NMTDS_ListOfPassKey::Iterator NMTDS_ListIteratorOfListOfPassKey; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_ListOfPassKeyBoolean.hxx b/src/NMTDS_NEW/NMTDS_ListOfPassKeyBoolean.hxx deleted file mode 100644 index 402b6f1d7..000000000 --- a/src/NMTDS_NEW/NMTDS_ListOfPassKeyBoolean.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListOfPassKeyBoolean.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - - -#ifndef NMTDS_ListOfPassKeyBoolean_HeaderFile -#define NMTDS_ListOfPassKeyBoolean_HeaderFile - -#include -#include - -typedef NCollection_List NMTDS_ListOfPassKeyBoolean; -typedef NMTDS_ListOfPassKeyBoolean::Iterator NMTDS_ListIteratorOfListOfPassKeyBoolean; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPairBoolean.hxx b/src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPairBoolean.hxx deleted file mode 100644 index 5bce39236..000000000 --- a/src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPairBoolean.hxx +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_MapIteratorOfMapOfPairBoolean.hxx -// Created: Mon Feb 20 08:22:39 2012 -// Author: -// - - -#ifndef NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile -#define NMTDS_MapIteratorOfMapOfPairBoolean_HeaderFile - -#ifndef NMTDS_MapOfPairBoolean_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPassKey.hxx b/src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPassKey.hxx deleted file mode 100644 index b96214eda..000000000 --- a/src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPassKey.hxx +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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: NMRCol_MapIteratorOfMapOfPassKey.hxx -// Created: Mon Feb 20 08:22:39 2012 -// Author: -// - - -#ifndef NMRCol_MapIteratorOfMapOfPassKey_HeaderFile -#define NMRCol_MapIteratorOfMapOfPassKey_HeaderFile - -#ifndef NMTDS_MapOfPassKey_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx b/src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx deleted file mode 100644 index db4dc221d..000000000 --- a/src/NMTDS_NEW/NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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: NMRCol_MapIteratorOfMapOfPassKeyBoolean.hxx -// Created: Mon Feb 20 08:22:39 2012 -// Author: -// - - -#ifndef NMRCol_MapIteratorOfMapOfPassKeyBoolean_HeaderFile -#define NMRCol_MapIteratorOfMapOfPassKeyBoolean_HeaderFile - -#ifndef NMTDS_MapOfPassKeyBoolean_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTDS_NEW/NMTDS_MapOfPairBoolean.hxx b/src/NMTDS_NEW/NMTDS_MapOfPairBoolean.hxx deleted file mode 100644 index 0fdb9c41d..000000000 --- a/src/NMTDS_NEW/NMTDS_MapOfPairBoolean.hxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_MapOfPairBoolean.hxx -// Created: Mon Feb 20 08:19:07 2012 -// Author: -// - - -#ifndef NMTDS_MapOfPairBoolean_HeaderFile -#define NMTDS_MapOfPairBoolean_HeaderFile - -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_Map NMTDS_MapOfPairBoolean; -typedef NMTDS_MapOfPairBoolean::Iterator NMTDS_MapIteratorOfMapOfPairBoolean; - -#undef _NCollection_MapHasher - -#endif diff --git a/src/NMTDS_NEW/NMTDS_MapOfPassKey.hxx b/src/NMTDS_NEW/NMTDS_MapOfPassKey.hxx deleted file mode 100644 index 4648a43cf..000000000 --- a/src/NMTDS_NEW/NMTDS_MapOfPassKey.hxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_MapOfPassKey.hxx -// Created: Mon Feb 20 08:19:07 2012 -// Author: -// - - -#ifndef NMTDS_MapOfPassKey_HeaderFile -#define NMTDS_MapOfPassKey_HeaderFile - -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_Map NMTDS_MapOfPassKey; -typedef NMTDS_MapOfPassKey::Iterator NMTDS_MapIteratorOfMapOfPassKey; - -#undef _NCollection_MapHasher - -#endif diff --git a/src/NMTDS_NEW/NMTDS_MapOfPassKeyBoolean.hxx b/src/NMTDS_NEW/NMTDS_MapOfPassKeyBoolean.hxx deleted file mode 100644 index bbc2596e6..000000000 --- a/src/NMTDS_NEW/NMTDS_MapOfPassKeyBoolean.hxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_MapOfPassKeyBoolean.hxx -// Created: Mon Feb 20 08:19:07 2012 -// Author: -// - - -#ifndef NMTDS_MapOfPassKeyBoolean_HeaderFile -#define NMTDS_MapOfPassKeyBoolean_HeaderFile - -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_Map NMTDS_MapOfPassKeyBoolean; -typedef NMTDS_MapOfPassKeyBoolean::Iterator NMTDS_MapIteratorOfMapOfPassKeyBoolean; - -#undef _NCollection_MapHasher - -#endif diff --git a/src/NMTDS_NEW/NMTDS_PInterfPool.hxx b/src/NMTDS_NEW/NMTDS_PInterfPool.hxx deleted file mode 100644 index 68a45c7dc..000000000 --- a/src/NMTDS_NEW/NMTDS_PInterfPool.hxx +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PInterfPool.hxx -// Author: Peter KURNEV - -#ifndef _NMTDS_PInterfPool_HeaderFile -#define _NMTDS_PInterfPool_HeaderFile - -class NMTDS_InterfPool; - -typedef NMTDS_InterfPool* NMTDS_PInterfPool; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_PIterator.hxx b/src/NMTDS_NEW/NMTDS_PIterator.hxx deleted file mode 100644 index 8c745d979..000000000 --- a/src/NMTDS_NEW/NMTDS_PIterator.hxx +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PIterator.hxx -// Author: Peter KURNEV - -#ifndef _NMTDS_PIterator_HeaderFile -#define _NMTDS_PIterator_HeaderFile - -class NMTDS_Iterator; - -typedef NMTDS_Iterator* NMTDS_PIterator; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_PShapesDataStructure.hxx b/src/NMTDS_NEW/NMTDS_PShapesDataStructure.hxx deleted file mode 100644 index 66c380da6..000000000 --- a/src/NMTDS_NEW/NMTDS_PShapesDataStructure.hxx +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PShapesDataStructure.hxx -// Author: Peter KURNEV - -#ifndef _NMTDS_PShapesDataStructure_HeaderFile -#define _NMTDS_PShapesDataStructure_HeaderFile - -class NMTDS_ShapesDataStructure; - -typedef NMTDS_ShapesDataStructure* NMTDS_PShapesDataStructure; - -#endif diff --git a/src/NMTDS_NEW/NMTDS_Pair.cxx b/src/NMTDS_NEW/NMTDS_Pair.cxx deleted file mode 100644 index 5e2fd50bc..000000000 --- a/src/NMTDS_NEW/NMTDS_Pair.cxx +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_Pair.cxx -// Author: Peter KURNEV - -#include - -#include -#include -#include -#include - -#ifdef WNT -#pragma warning( disable : 4101) -#endif - -static - Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv); - -//======================================================================= -//function : -//purpose : -//======================================================================= -NMTDS_Pair::NMTDS_Pair() -{ - Clear(); -} -//======================================================================= -//function : -//purpose : -//======================================================================= -NMTDS_Pair::NMTDS_Pair(const NMTDS_Pair& aOther) -{ - myId1=aOther.myId1; - myId2=aOther.myId2; -} -//======================================================================= -//function :operator = -//purpose : -//======================================================================= - NMTDS_Pair& NMTDS_Pair::operator =(const NMTDS_Pair& aOther) -{ - myId1=aOther.myId1; - myId2=aOther.myId2; - return *this; -} -//======================================================================= -//function :~ -//purpose : -//======================================================================= - NMTDS_Pair::~NMTDS_Pair() -{ -} -//======================================================================= -//function :Clear -//purpose : -//======================================================================= - void NMTDS_Pair::Clear() -{ - myId1=0; - myId2=0; -} -//======================================================================= -//function :SetIds -//purpose : -//======================================================================= - void NMTDS_Pair::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2) -{ - Clear(); - myId1=aId1; - myId2=aId2; - if (aId1>aId2) { - myId1=aId2; - myId2=aId1; - } -} -//======================================================================= -//function :Ids -//purpose : -//======================================================================= - void NMTDS_Pair::Ids(Standard_Integer& aId1, - Standard_Integer& aId2) const -{ - aId1=myId1; - aId2=myId2; -} -//======================================================================= -//function :IsEqual -//purpose : -//======================================================================= - Standard_Boolean NMTDS_Pair::IsEqual(const NMTDS_Pair& aOther) const -{ - - Standard_Boolean bRet; - // - bRet=(myId1==aOther.myId1 && myId2==aOther.myId2);//ZZ - return bRet; -} -//======================================================================= -//function : HashCode -//purpose : -//======================================================================= - Standard_Integer NMTDS_Pair::HashCode(const Standard_Integer aUpper) const -{ - Standard_Integer aSum; - // - aSum=0; - aSum+=NormalizedId(myId1, 2); - aSum+=NormalizedId(myId2, 2); - return ::HashCode(aSum, aUpper); -} -//======================================================================= -// 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/NMTDS_NEW/NMTDS_Pair.hxx b/src/NMTDS_NEW/NMTDS_Pair.hxx deleted file mode 100644 index d0a4de9f9..000000000 --- a/src/NMTDS_NEW/NMTDS_Pair.hxx +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_Pair.hxx -// Author: Peter KURNEV - -#ifndef _NMTDS_Pair_HeaderFile -#define _NMTDS_Pair_HeaderFile - -#include -#include -#include -#include - -//======================================================================= -//function : NMTDS_Pair -//purpose : -//======================================================================= -class NMTDS_Pair { - public: - Standard_EXPORT - NMTDS_Pair(); - - Standard_EXPORT - virtual ~NMTDS_Pair(); - - Standard_EXPORT - NMTDS_Pair(const NMTDS_Pair& Other); - - Standard_EXPORT - NMTDS_Pair& operator =(const NMTDS_Pair& Other); - - Standard_EXPORT - void Clear() ; - - Standard_EXPORT - void SetIds(const Standard_Integer aI1, - const Standard_Integer aI2) ; - - Standard_EXPORT - void Ids(Standard_Integer& aI1, - Standard_Integer& aI2) const; - - Standard_EXPORT - Standard_Boolean IsEqual(const NMTDS_Pair& aOther) const; - - Standard_EXPORT - Standard_Integer HashCode(const Standard_Integer Upper) const; - -protected: -Standard_Integer myId1; -Standard_Integer myId2; -}; -#endif diff --git a/src/NMTDS_NEW/NMTDS_PairBoolean.cxx b/src/NMTDS_NEW/NMTDS_PairBoolean.cxx deleted file mode 100644 index 9067d5c94..000000000 --- a/src/NMTDS_NEW/NMTDS_PairBoolean.cxx +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PairBoolean.cxx -// Author: Peter KURNEV - -#include - -//======================================================================= -//function : -//purpose : -//======================================================================= - NMTDS_PairBoolean::NMTDS_PairBoolean() -: - myFlag(Standard_False), - NMTDS_Pair() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - NMTDS_PairBoolean::~NMTDS_PairBoolean() -{ -} -//======================================================================= -//function :operator = -//purpose : -//======================================================================= - NMTDS_PairBoolean& NMTDS_PairBoolean::operator =(const NMTDS_PairBoolean& anOther) -{ - myFlag=anOther.myFlag; - NMTDS_Pair::operator =(anOther); - return *this; -} -//======================================================================= -//function :SetFlag -//purpose : -//======================================================================= - void NMTDS_PairBoolean::SetFlag(const Standard_Boolean aFlag) -{ - myFlag=aFlag; -} -//======================================================================= -//function :Flag -//purpose : -//======================================================================= - Standard_Boolean NMTDS_PairBoolean::Flag()const -{ - return myFlag; -} diff --git a/src/NMTDS_NEW/NMTDS_PairBoolean.hxx b/src/NMTDS_NEW/NMTDS_PairBoolean.hxx deleted file mode 100644 index 308c8fc05..000000000 --- a/src/NMTDS_NEW/NMTDS_PairBoolean.hxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PairBoolean.hxx -// Author: Peter KURNEV - -#ifndef _NMTDS_PairBoolean_HeaderFile -#define _NMTDS_PairBoolean_HeaderFile - -#include -#include -#include -#include - -//======================================================================= -//class : NMTDS_PairBoolean -//purpose : -//======================================================================= -class NMTDS_PairBoolean : public NMTDS_Pair { - public: - Standard_EXPORT - NMTDS_PairBoolean(); - - Standard_EXPORT - virtual ~NMTDS_PairBoolean(); - - Standard_EXPORT - void SetFlag(const Standard_Boolean aFlag) ; - - Standard_EXPORT - NMTDS_PairBoolean& operator =(const NMTDS_PairBoolean& Other); - - Standard_EXPORT - Standard_Boolean Flag() const; - -protected: - Standard_Boolean myFlag; -}; -#endif diff --git a/src/NMTDS_NEW/NMTDS_PairMapHasher.cxx b/src/NMTDS_NEW/NMTDS_PairMapHasher.cxx deleted file mode 100644 index 3dadcc181..000000000 --- a/src/NMTDS_NEW/NMTDS_PairMapHasher.cxx +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PairMapHasher.cxx -// Author: Peter KURNEV - -#include - -//======================================================================= -//function : HashCode -//purpose : -//======================================================================= -Standard_Integer NMTDS_PairMapHasher::HashCode(const NMTDS_Pair& aPK, - const Standard_Integer Upper) -{ - return aPK.HashCode(Upper); -} -//======================================================================= -//function :IsEqual -//purpose : -//======================================================================= -Standard_Boolean NMTDS_PairMapHasher::IsEqual(const NMTDS_Pair& aPK1, - const NMTDS_Pair& aPK2) -{ - return aPK1.IsEqual(aPK2); -} diff --git a/src/NMTDS_NEW/NMTDS_PairMapHasher.hxx b/src/NMTDS_NEW/NMTDS_PairMapHasher.hxx deleted file mode 100644 index 19dfea723..000000000 --- a/src/NMTDS_NEW/NMTDS_PairMapHasher.hxx +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PairMapHasher.cxx -// Author: Peter KURNEV - -#ifndef _NMTDS_PairMapHasher_HeaderFile -#define _NMTDS_PairMapHasher_HeaderFile - -#include -#include -#include -#include -#include - -//======================================================================= -//class : NMTDS_PairMapHasher -//purpose : -//======================================================================= -class NMTDS_PairMapHasher { - public: - Standard_EXPORT - static Standard_Integer HashCode(const NMTDS_Pair& aPKey, - const Standard_Integer Upper) ; - - Standard_EXPORT - static Standard_Boolean IsEqual(const NMTDS_Pair& aPKey1, - const NMTDS_Pair& aPKey2) ; -}; -#endif diff --git a/src/NMTDS_NEW/NMTDS_PassKey.cxx b/src/NMTDS_NEW/NMTDS_PassKey.cxx deleted file mode 100644 index 4d8aa41aa..000000000 --- a/src/NMTDS_NEW/NMTDS_PassKey.cxx +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PassKey.cxx -// Created: -// Author: Peter KURNEV -// -// -#include - -#include -#include -#include -#include - -#ifdef WNT -#pragma warning( disable : 4101) -#endif - -static - Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv); - -//======================================================================= -//function : -//purpose : -//======================================================================= - NMTDS_PassKey::NMTDS_PassKey() -{ - Clear(); -} -//======================================================================= -//function : -//purpose : -//======================================================================= - NMTDS_PassKey::NMTDS_PassKey(const NMTDS_PassKey& aOther) -{ - myNbIds=aOther.myNbIds; - mySum=aOther.mySum; - myMap=aOther.myMap; -} -//======================================================================= -//function :operator = -//purpose : -//======================================================================= - NMTDS_PassKey& NMTDS_PassKey::operator =(const NMTDS_PassKey& aOther) -{ - myNbIds=aOther.myNbIds; - mySum=aOther.mySum; - myMap=aOther.myMap; - return *this; -} -//======================================================================= -//function :~ -//purpose : -//======================================================================= - NMTDS_PassKey::~NMTDS_PassKey() -{ -} -//======================================================================= -//function :Clear -//purpose : -//======================================================================= - void NMTDS_PassKey::Clear() -{ - myNbIds=0; - mySum=0; - myMap.Clear(); -} -//======================================================================= -//function :SetIds -//purpose : -//======================================================================= - void NMTDS_PassKey::SetIds(const Standard_Integer aId1) - -{ - Clear(); - myNbIds=1; - myMap.Add(aId1); - mySum=NormalizedId(aId1, myNbIds); -} -//======================================================================= -//function :SetIds -//purpose : -//======================================================================= - void NMTDS_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2) -{ - TColStd_ListOfInteger aLI; - // - aLI.Append(aId1); - aLI.Append(aId2); - SetIds(aLI); -} -//======================================================================= -//function :SetIds -//purpose : -//======================================================================= - void NMTDS_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2, - const Standard_Integer aId3) -{ - TColStd_ListOfInteger aLI; - // - aLI.Append(aId1); - aLI.Append(aId2); - aLI.Append(aId3); - SetIds(aLI); -} -//======================================================================= -//function :SetIds -//purpose : -//======================================================================= - void NMTDS_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2, - const Standard_Integer aId3, - const Standard_Integer aId4) -{ - TColStd_ListOfInteger aLI; - // - aLI.Append(aId1); - aLI.Append(aId2); - aLI.Append(aId3); - aLI.Append(aId4); - SetIds(aLI); -} -//======================================================================= -//function :SetIds -//purpose : -//======================================================================= - void NMTDS_PassKey::SetIds(const TColStd_ListOfInteger& aLI) -{ - Standard_Integer i, aId, aIdN; - TColStd_ListIteratorOfListOfInteger aIt; - // - Clear(); - aIt.Initialize(aLI); - 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; - } -} - -//======================================================================= -//function :NbIds -//purpose : -//======================================================================= - Standard_Integer NMTDS_PassKey::NbIds()const -{ - return myNbIds; -} -//======================================================================= -//function :Id -//purpose : -//======================================================================= - Standard_Integer NMTDS_PassKey::Id(const Standard_Integer aIndex) const -{ - if (aIndex<1 || aIndex>myNbIds) { - return -1; - } - return myMap(aIndex); -} -//======================================================================= -//function :Ids -//purpose : -//======================================================================= - void NMTDS_PassKey::Ids(Standard_Integer& aId1, - Standard_Integer& aId2) const -{ - aId1=0; - aId2=0; - if (myNbIds>1) { - aId1=myMap(1); - aId2=myMap(2); - } -} -//======================================================================= -//function :IsEqual -//purpose : -//======================================================================= - Standard_Boolean NMTDS_PassKey::IsEqual(const NMTDS_PassKey& aOther) const -{ - Standard_Boolean bRet; - Standard_Integer i, aId; - // - bRet=Standard_False; - // - if (myNbIds!=aOther.myNbIds) { - return bRet; - } - for (i=1; i<=myNbIds; ++i) { - aId=myMap(i); - if (!aOther.myMap.Contains(aId)) { - return bRet; - } - } - return !bRet; -} -//======================================================================= -//function : HashCode -//purpose : -//======================================================================= - Standard_Integer NMTDS_PassKey::HashCode(const Standard_Integer aUpper) const -{ - return ::HashCode(mySum, aUpper); -} -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - void NMTDS_PassKey::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; -} -/* -//========= -//======================================================================= -//function : Contains -//purpose : -//======================================================================= - Standard_Boolean NMTDS_PassKey::Contains(const Standard_Integer aId) const -{ - return myMap.Contains(aId); -} -//======================================================================= -//function :Contains -//purpose : -//======================================================================= - Standard_Boolean NMTDS_PassKey::Contains(const NMTDS_PassKey& aOther) const -{ - Standard_Boolean bRet; - Standard_Integer i, aId; - // - bRet=Standard_False; - // - if (myNbIds -// -#ifndef _NMTDS_PassKey_HeaderFile -#define _NMTDS_PassKey_HeaderFile - -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : NMTDS_PassKey -//purpose : -//======================================================================= -class NMTDS_PassKey { - public: - Standard_EXPORT - NMTDS_PassKey(); - - Standard_EXPORT - virtual ~NMTDS_PassKey(); - - Standard_EXPORT - NMTDS_PassKey(const NMTDS_PassKey& Other); - - Standard_EXPORT - NMTDS_PassKey& operator =(const NMTDS_PassKey& Other); - - Standard_EXPORT - void Clear() ; - - 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 NMTDS_PassKey& aOther) const; - - Standard_EXPORT - Standard_Integer HashCode(const Standard_Integer Upper) const; - - Standard_EXPORT - Standard_Integer Id(const Standard_Integer aIndex) const; - - Standard_EXPORT - void Ids(Standard_Integer& aI1,Standard_Integer& aI2) const; - - Standard_EXPORT - void Dump(const Standard_Integer aHex = 0) const; - -protected: - Standard_Integer myNbIds; - Standard_Integer mySum; - TColStd_IndexedMapOfInteger myMap; -}; -#endif diff --git a/src/NMTDS_NEW/NMTDS_PassKeyBoolean.cxx b/src/NMTDS_NEW/NMTDS_PassKeyBoolean.cxx deleted file mode 100644 index dc0c77704..000000000 --- a/src/NMTDS_NEW/NMTDS_PassKeyBoolean.cxx +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PassKeyBoolean.cxx -// Created: Mon May 15 14:31:05 2006 -// Author: Peter KURNEV -// -// -#include - -//======================================================================= -//function : -//purpose : -//======================================================================= - NMTDS_PassKeyBoolean::NMTDS_PassKeyBoolean() -: - myFlag(Standard_False), - NMTDS_PassKey() -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - NMTDS_PassKeyBoolean::~NMTDS_PassKeyBoolean() -{ -} -//======================================================================= -//function :operator = -//purpose : -//======================================================================= - NMTDS_PassKeyBoolean& NMTDS_PassKeyBoolean::operator =(const NMTDS_PassKeyBoolean& anOther) -{ - myFlag=anOther.myFlag; - NMTDS_PassKey::operator =(anOther); - return *this; -} -//======================================================================= -//function :SetFlag -//purpose : -//======================================================================= - void NMTDS_PassKeyBoolean::SetFlag(const Standard_Boolean aFlag) -{ - myFlag=aFlag; -} -//======================================================================= -//function :Flag -//purpose : -//======================================================================= - Standard_Boolean NMTDS_PassKeyBoolean::Flag()const -{ - return myFlag; -} diff --git a/src/NMTDS_NEW/NMTDS_PassKeyBoolean.hxx b/src/NMTDS_NEW/NMTDS_PassKeyBoolean.hxx deleted file mode 100644 index 210efb63f..000000000 --- a/src/NMTDS_NEW/NMTDS_PassKeyBoolean.hxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PassKeyBoolean.hxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef _NMTDS_PassKeyBoolean_HeaderFile -#define _NMTDS_PassKeyBoolean_HeaderFile - -#include -#include -#include -#include - -//======================================================================= -//class : NMTDS_PassKeyBoolean -//purpose : -//======================================================================= -class NMTDS_PassKeyBoolean : public NMTDS_PassKey { - public: - Standard_EXPORT - NMTDS_PassKeyBoolean(); - - Standard_EXPORT - virtual ~NMTDS_PassKeyBoolean(); - - Standard_EXPORT - void SetFlag(const Standard_Boolean aFlag) ; - - Standard_EXPORT - NMTDS_PassKeyBoolean& operator =(const NMTDS_PassKeyBoolean& Other); - - Standard_EXPORT - Standard_Boolean Flag() const; - - protected: - Standard_Boolean myFlag; -}; -#endif diff --git a/src/NMTDS_NEW/NMTDS_PassKeyMapHasher.cxx b/src/NMTDS_NEW/NMTDS_PassKeyMapHasher.cxx deleted file mode 100644 index 3b55d93db..000000000 --- a/src/NMTDS_NEW/NMTDS_PassKeyMapHasher.cxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PassKeyMapHasher.cxx -// Created: -// Author: Peter KURNEV -// -// -#include - -//======================================================================= -//function : HashCode -//purpose : -//======================================================================= - Standard_Integer NMTDS_PassKeyMapHasher::HashCode(const NMTDS_PassKey& aPK, - const Standard_Integer Upper) -{ - return aPK.HashCode(Upper); -} -//======================================================================= -//function :IsEqual -//purpose : -//======================================================================= - Standard_Boolean NMTDS_PassKeyMapHasher::IsEqual(const NMTDS_PassKey& aPK1, - const NMTDS_PassKey& aPK2) -{ - return aPK1.IsEqual(aPK2); -} diff --git a/src/NMTDS_NEW/NMTDS_PassKeyMapHasher.hxx b/src/NMTDS_NEW/NMTDS_PassKeyMapHasher.hxx deleted file mode 100644 index 1ad371c3e..000000000 --- a/src/NMTDS_NEW/NMTDS_PassKeyMapHasher.hxx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_PassKeyMapHasher.hxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef _NMTDS_PassKeyMapHasher_HeaderFile -#define _NMTDS_PassKeyMapHasher_HeaderFile - -#include -#include -#include -#include -#include - - -//======================================================================= -//function : NMTDS_PassKeyMapHasher -//purpose : -//======================================================================= -class NMTDS_PassKeyMapHasher { - public: - Standard_EXPORT - static Standard_Integer HashCode(const NMTDS_PassKey& aPKey, - const Standard_Integer Upper) ; - - Standard_EXPORT - static Standard_Boolean IsEqual(const NMTDS_PassKey& aPKey1, - const NMTDS_PassKey& aPKey2) ; -}; -#endif diff --git a/src/NMTDS_NEW/NMTDS_PassKeyShape.cxx b/src/NMTDS_NEW/NMTDS_PassKeyShape.cxx deleted file mode 100644 index 5010c582a..000000000 --- a/src/NMTDS_NEW/NMTDS_PassKeyShape.cxx +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_PassKeyShape.cxx -// Created: -// Author: Peter KURNEV -// -// -#include - -#include -#include -#include - - -static - Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv); -//======================================================================= -//function : -//purpose : -//======================================================================= - NMTDS_PassKeyShape::NMTDS_PassKeyShape() -{ - myUpper=432123; -} -//======================================================================= -//function : -//purpose : -//======================================================================= - NMTDS_PassKeyShape::NMTDS_PassKeyShape(const NMTDS_PassKeyShape& aOther) -{ - myUpper=432123; - myNbIds=aOther.myNbIds; - mySum=aOther.mySum; - myMap=aOther.myMap; -} -//======================================================================= -//function :~ -//purpose : -//======================================================================= - NMTDS_PassKeyShape::~NMTDS_PassKeyShape() -{ -} -//======================================================================= -//function :Assign -//purpose : -//======================================================================= - NMTDS_PassKeyShape& NMTDS_PassKeyShape::Assign(const NMTDS_PassKeyShape& aOther) -{ - myUpper=432123; - myNbIds=aOther.myNbIds; - mySum=aOther.mySum; - myMap=aOther.myMap; - return *this; -} -//======================================================================= -//function :Clear -//purpose : -//======================================================================= - void NMTDS_PassKeyShape::Clear() -{ - myNbIds=0; - mySum=0; - myMap.Clear(); -} -//======================================================================= -//function :SetShapes -//purpose : -//======================================================================= - void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1) - -{ - Standard_Integer aHC; - // - Clear(); - myNbIds=1; - myMap.Add(aS1); - aHC=aS1.HashCode(myUpper); - mySum=NormalizedId(aHC, myNbIds); -} -//======================================================================= -//function :SetShapes -//purpose : -//======================================================================= - void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) -{ - TopTools_ListOfShape aLS; - // - aLS.Append(aS1); - aLS.Append(aS2); - SetShapes(aLS); -} -//======================================================================= -//function :SetShapes -//purpose : -//======================================================================= - void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2, - const TopoDS_Shape& aS3) -{ - TopTools_ListOfShape aLS; - // - aLS.Append(aS1); - aLS.Append(aS2); - aLS.Append(aS3); - SetShapes(aLS); -} -//======================================================================= -//function :SetShapes -//purpose : -//======================================================================= - void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2, - const TopoDS_Shape& aS3, - const TopoDS_Shape& aS4) -{ - TopTools_ListOfShape aLS; - // - aLS.Append(aS1); - aLS.Append(aS2); - aLS.Append(aS3); - aLS.Append(aS4); - SetShapes(aLS); -} -//======================================================================= -//function :SetShapes -//purpose : -//======================================================================= - void NMTDS_PassKeyShape::SetShapes(const TopTools_ListOfShape& aLS) -{ - Standard_Integer i, aId, aIdN; - TopTools_ListIteratorOfListOfShape aIt; - // - Clear(); - aIt.Initialize(aLS); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aS=aIt.Value(); - 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; - } -} -//======================================================================= -//function :NbIds -//purpose : -//======================================================================= - Standard_Integer NMTDS_PassKeyShape::NbIds()const -{ - return myNbIds; -} -//======================================================================= -//function :IsEqual -//purpose : -//======================================================================= - Standard_Boolean NMTDS_PassKeyShape::IsEqual(const NMTDS_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 NMTDS_PassKeyShape::HashCode(const Standard_Integer aUpper) const -{ - return ::HashCode(mySum, aUpper); -} -//======================================================================= -//function : Dump -//purpose : -//======================================================================= - void NMTDS_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/NMTDS_NEW/NMTDS_PassKeyShape.hxx b/src/NMTDS_NEW/NMTDS_PassKeyShape.hxx deleted file mode 100644 index 1498499bf..000000000 --- a/src/NMTDS_NEW/NMTDS_PassKeyShape.hxx +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_PassKeyShape.hxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef _NMTDS_PassKeyShape_HeaderFile -#define _NMTDS_PassKeyShape_HeaderFile - -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : NMTDS_PassKeyShape -//purpose : -//======================================================================= -class NMTDS_PassKeyShape { - public: - Standard_EXPORT - NMTDS_PassKeyShape(); - - Standard_EXPORT - virtual ~NMTDS_PassKeyShape(); - - Standard_EXPORT - NMTDS_PassKeyShape(const NMTDS_PassKeyShape& Other); - - Standard_EXPORT - NMTDS_PassKeyShape& Assign(const NMTDS_PassKeyShape& Other) ; - - NMTDS_PassKeyShape& operator =(const NMTDS_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 NMTDS_PassKeyShape& aOther) const; - - Standard_EXPORT - Standard_Integer HashCode(const Standard_Integer Upper) const; - - Standard_EXPORT - void Dump(const Standard_Integer aHex = 0) const; - - protected: - Standard_Integer myNbIds; - Standard_Integer mySum; - Standard_Integer myUpper; - TopTools_IndexedMapOfShape myMap; -}; -#endif diff --git a/src/NMTDS_NEW/NMTDS_PassKeyShapeMapHasher.cxx b/src/NMTDS_NEW/NMTDS_PassKeyShapeMapHasher.cxx deleted file mode 100644 index 4ff71d48e..000000000 --- a/src/NMTDS_NEW/NMTDS_PassKeyShapeMapHasher.cxx +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_PassKeyMapHasher.cxx -// Created: -// Author: Peter KURNEV -// -// -#include - -//======================================================================= -//function : HashCode -//purpose : -//======================================================================= - Standard_Integer NMTDS_PassKeyShapeMapHasher::HashCode(const NMTDS_PassKeyShape& aPK, - const Standard_Integer Upper) -{ - return aPK.HashCode(Upper); -} -//======================================================================= -//function :IsEqual -//purpose : -//======================================================================= - Standard_Boolean NMTDS_PassKeyShapeMapHasher::IsEqual(const NMTDS_PassKeyShape& aPK1, - const NMTDS_PassKeyShape& aPK2) -{ - return aPK1.IsEqual(aPK2); -} diff --git a/src/NMTDS_NEW/NMTDS_PassKeyShapeMapHasher.hxx b/src/NMTDS_NEW/NMTDS_PassKeyShapeMapHasher.hxx deleted file mode 100644 index a674091db..000000000 --- a/src/NMTDS_NEW/NMTDS_PassKeyShapeMapHasher.hxx +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_PassKeyMapHasher.cxx -// Created: -// Author: Peter KURNEV -// -// -#ifndef _NMTDS_PassKeyShapeMapHasher_HeaderFile -#define _NMTDS_PassKeyShapeMapHasher_HeaderFile - -#include -#include -#include -#include -#include - -//======================================================================= -//function : NMTDS_PassKeyShapeMapHasher -//purpose : -//======================================================================= -class NMTDS_PassKeyShapeMapHasher { - public: - Standard_EXPORT - static Standard_Integer HashCode(const NMTDS_PassKeyShape& aPKey, - const Standard_Integer Upper) ; - - Standard_EXPORT - static Standard_Boolean IsEqual(const NMTDS_PassKeyShape& aPKey1, - const NMTDS_PassKeyShape& aPKey2) ; -}; -#endif diff --git a/src/NMTDS_NEW/NMTDS_ShapesDataStructure.cxx b/src/NMTDS_NEW/NMTDS_ShapesDataStructure.cxx deleted file mode 100644 index ef679ed2f..000000000 --- a/src/NMTDS_NEW/NMTDS_ShapesDataStructure.cxx +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTDS_ShapesDataStructure.cxx -// Author: Peter KURNEV - -#include -#include -#include -#include -#include -#include -#include -#include -// -#include -#include -#include -#include - - -static - void ComputeBoxExS(const Standard_Integer aIx, - const NMTDS_ShapesDataStructure* pDS, - Bnd_Box& aBoxEx); -static - void GetAllSuccessorsS(const Standard_Integer nS, - const NMTDS_ShapesDataStructure* myDS, - TColStd_IndexedMapOfInteger& aMA); - -//=========================================================================== -//function : NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure -//purpose : -//=========================================================================== -NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure() -: - BooleanOperations_ShapesDataStructure() -{} -//=========================================================================== -//function : SetCompositeShape -//purpose : -//=========================================================================== -void NMTDS_ShapesDataStructure::SetCompositeShape(const TopoDS_Shape& aS) -{ - myCompositeShape=aS; -} -//=========================================================================== -//function : CompositeShape -//purpose : -//=========================================================================== -const TopoDS_Shape& NMTDS_ShapesDataStructure::CompositeShape()const -{ - return myCompositeShape; -} -//=========================================================================== -//function : Ranges -//purpose : -//=========================================================================== -const NMTDS_CArray1OfIndexRange& NMTDS_ShapesDataStructure::Ranges()const -{ - return myRanges; -} -//=========================================================================== -//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); - } - } -} -//=========================================================================== -//function : Init -//purpose : -//=========================================================================== -void NMTDS_ShapesDataStructure::Init() -{ - Standard_Integer i, j, aNbSx, aNbS, aShift, aNbRanges; - Standard_Integer iFirst, iLast; - NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors aLx; - NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors aLit; - TopoDS_Iterator anIt; - BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aMSA; - // - anIt.Initialize(myCompositeShape); - for (; anIt.More(); anIt.Next()) { - const TopoDS_Shape& aSx=anIt.Value(); - BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aMS; - // - if (!aMSA.Contains(aSx)) { - FillMap(aSx, aMSA, aMS); - aLx.Append(aMS); - } - } - aNbS=aMSA.Extent(); - // - // Fill myRanges - i=aLx.Extent(); - myRanges.Resize(i); - aLit.Initialize(aLx); - for (i=1; aLit.More(); aLit.Next(), ++i) { - const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aMSx=aLit.Value(); - aNbSx=aMSx.Extent(); - if (i==1) { - iFirst=1; - iLast=aNbSx; - myRanges(i).SetFirst(iFirst); - myRanges(i).SetLast(iLast); - continue; - } - iFirst=myRanges(i-1).Last()+1; - iLast=iFirst+aNbSx-1; - myRanges(i).SetFirst(iFirst); - myRanges(i).SetLast(iLast); - } - // - myNumberOfShapesOfTheObject=aNbS; - myNumberOfShapesOfTheTool=0; - myLength=2*aNbS; - // - // Allocate the whole Table - myListOfShapeAndInterferences = (BooleanOperations_PShapeAndInterferences) - Standard::Allocate(myLength*sizeof(BooleanOperations_ShapeAndInterferences)); - // - // Fill the table - - 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); - } - // myShapeIndexMap - myShapeIndexMap.Clear(); - // - //modified by NIZNHY-PKV Mon Dec 12 09:01:53 2011f - aNbRanges=myRanges.Extent(); - for (i=1; i<=aNbRanges; ++i){ - const NMTDS_IndexRange& aR=myRanges(i); - iFirst=aR.First(); - iLast =aR.Last(); - for (j=iFirst; j<=iLast; ++j) { - const TopoDS_Shape& aS=Shape(j); - myShapeIndexMap.Bind(aS, j); - } - } - //modified by NIZNHY-PKV Mon Dec 12 09:02:00 2011t - // - // myRefEdges - iLast=myNumberOfShapesOfTheObject+myNumberOfShapesOfTheTool; - myRefEdges.Resize(iLast); - - for (i=1; i<=iLast; ++i) { - const TopoDS_Shape& aS=Shape(i); - myRefEdges(i)=0; - if (aS.ShapeType()==TopAbs_EDGE) { - myNbEdges++; - myRefEdges(i)=myNbEdges; - } - } -} -//=========================================================================== -//function : ShapeRangeIndex -//purpose : -//=========================================================================== -Standard_Integer NMTDS_ShapesDataStructure::ShapeRangeIndex - (const Standard_Integer aId)const -{ - Standard_Boolean bFound; - Standard_Integer i, aNbR, aIdx, aNbS, aZero=0; - // - aNbS=myNumberOfShapesOfTheObject+myNumberOfShapesOfTheTool; - - aIdx=aId; - if (aIdx > aNbS || aIdx < 1){ - return aZero; - } - // - if (aIdx > myNumberOfShapesOfTheObject) { - aIdx-=myNumberOfShapesOfTheObject; - } - // - aNbR=myRanges.Extent(); - for (i=1; i<=aNbR; ++i) { - const NMTDS_IndexRange& aRange=myRanges(i); - bFound=aRange.IsInRange(aIdx); - if (bFound) { - return i; - } - } - return aZero; -} -//=========================================================================== -//function : Rank -//purpose : -//=========================================================================== -Standard_Integer NMTDS_ShapesDataStructure::Rank - (const Standard_Integer aId)const -{ - Standard_Boolean bFound; - Standard_Integer i, aNbR, aNbS, aZero=0; - // - aNbS=myNumberOfShapesOfTheObject; - - if (aId > aNbS || aId < 1){ - return aZero; - } - // - aNbR=myRanges.Extent(); - for (i=1; i<=aNbR; ++i) { - const NMTDS_IndexRange& aRange=myRanges(i); - bFound=aRange.IsInRange(aId); - if (bFound) { - return i; - } - } - return aZero; -} -//=========================================================================== -//function : ShapeIndex -//purpose : -//=========================================================================== -Standard_Integer NMTDS_ShapesDataStructure::ShapeIndex - (const TopoDS_Shape& aS, - const Standard_Integer aRank)const -{ - Standard_Address pIndex; - Standard_Integer aIndex; - // - aIndex=0; - // - //modified by NIZNHY-PKV Mon Dec 12 09:02:48 2011f - pIndex=myShapeIndexMap.Find1(aS); - if (pIndex) { - aIndex=*((Standard_Integer*)pIndex); - } - //modified by NIZNHY-PKV Mon Dec 12 09:02:54 2011t - return aIndex; -} - -//======================================================================= -//function : ComputeBoxEx -//purpose : -//======================================================================= -void NMTDS_ShapesDataStructure::ComputeBoxEx - (const Standard_Integer aIx, - Bnd_Box& aBoxEx)const -{ - ComputeBoxExS(aIx, this, aBoxEx); -} -//======================================================================= -//function : GetAllSuccessors -//purpose : -//======================================================================= -void NMTDS_ShapesDataStructure::GetAllSuccessors - (const Standard_Integer nS, - TColStd_IndexedMapOfInteger& aMA)const -{ - GetAllSuccessorsS(nS, this, aMA); -} -//======================================================================= -//function : GetAllSuccessorsS -//purpose : -//======================================================================= -void GetAllSuccessorsS(const Standard_Integer nS, - const NMTDS_ShapesDataStructure* myDS, - TColStd_IndexedMapOfInteger& aMA) -{ - TopAbs_ShapeEnum aT; - Standard_Integer i, nSx, aNbSuccessors, *pSuccessors; - Standard_Address xSuccessors; - // - const TopoDS_Shape& aS=myDS->Shape(nS); - aT=aS.ShapeType(); - if(NMTDS_Tools::HasBRep(aT)) { - aMA.Add(nS); - // - if (aT==TopAbs_VERTEX) { - return; - } - } - // - myDS->GetSuccessors(nS, xSuccessors, aNbSuccessors); - pSuccessors=(Standard_Integer*)xSuccessors; - for (i=0; iGetBoundingBox(aIx); - aBoxEx.Add(aBox); - // - aNbS=pDS->NumberOfSuccessors(aIx); - for (i=1; i<=aNbS; ++i) { - Bnd_Box aBoxS; - iS=pDS->GetSuccessor(aIx, i); - ComputeBoxExS(iS, pDS, aBoxS); - aBoxEx.Add(aBoxS); - } -} diff --git a/src/NMTDS_NEW/NMTDS_ShapesDataStructure.hxx b/src/NMTDS_NEW/NMTDS_ShapesDataStructure.hxx deleted file mode 100644 index e574b92ec..000000000 --- a/src/NMTDS_NEW/NMTDS_ShapesDataStructure.hxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - - -#ifndef _NMTDS_ShapesDataStructure_HeaderFile -#define _NMTDS_ShapesDataStructure_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//class : NMTDS_ShapesDataStructure -//purpose : -//======================================================================= -class NMTDS_ShapesDataStructure : public BooleanOperations_ShapesDataStructure -{ - public: - Standard_EXPORT - 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; - - Standard_EXPORT - void GetAllSuccessors(const Standard_Integer anIndex, - TColStd_IndexedMapOfInteger& aScrs) const; - - Standard_EXPORT - void ComputeBoxEx(const Standard_Integer anIndex, - Bnd_Box& aBox) const; - - - protected: - TopoDS_Shape myCompositeShape; - NMTDS_CArray1OfIndexRange myRanges; - TopTools_DataMapOfShapeInteger myShapeIndexMap; -}; -#endif diff --git a/src/NMTDS_NEW/NMTDS_Tools.cxx b/src/NMTDS_NEW/NMTDS_Tools.cxx deleted file mode 100644 index f34ce68e5..000000000 --- a/src/NMTDS_NEW/NMTDS_Tools.cxx +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_Tools.cxx -// Created: Tue Feb 20 14:57:28 2007 -// Author: Peter KURNEV - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void CopySource(const TopoDS_Shape& aS, - TopTools_IndexedDataMapOfShapeShape& aMapSS, - TopoDS_Shape& aSC); - -//======================================================================= -//function : CopyShape -//purpose : -//======================================================================= - void NMTDS_Tools::CopyShape(const TopoDS_Shape& aS, - TopoDS_Shape& aSC) -{ - TopTools_IndexedDataMapOfShapeShape aMapSS; - // - CopySource(aS, aMapSS, aSC); -} -//======================================================================= -//function : CopyShape -//purpose : -//======================================================================= - void NMTDS_Tools::CopyShape(const TopoDS_Shape& aS, - TopoDS_Shape& aSC, - TopTools_IndexedDataMapOfShapeShape& aMapSS) -{ - CopySource(aS, aMapSS, aSC); -} -//======================================================================= -//function : CopySource -//purpose : -//======================================================================= -void CopySource(const TopoDS_Shape& aS, - TopTools_IndexedDataMapOfShapeShape& aMapSS, - TopoDS_Shape& aSC) -{ - Standard_Boolean bFree; - TopAbs_ShapeEnum aT; - TopoDS_Iterator aIt; - TopoDS_Shape aSF; - BRep_Builder BB; - // - aT=aS.ShapeType(); - // - if (aMapSS.Contains(aS)) { - aSC=aMapSS.ChangeFromKey(aS); - aSC.Orientation(aS.Orientation()); - return; - } - else { - aSC=aS.EmptyCopied(); - aMapSS.Add(aS, aSC); - } - // - bFree=aSC.Free(); - aSC.Free(Standard_True); - aSF=aS; - if (aT==TopAbs_EDGE){ - TopAbs_Orientation aOr; - // - aOr=aS.Orientation(); - if(aOr==TopAbs_INTERNAL) { - aSF.Orientation(TopAbs_FORWARD); - } - } - aIt.Initialize(aSF); - for (; aIt.More(); aIt.Next()) { - TopoDS_Shape aSCx; - // - const TopoDS_Shape& aSx=aIt.Value(); - // - CopySource (aSx, aMapSS, aSCx); - // - aSCx.Orientation(aSx.Orientation()); - BB.Add(aSC, aSCx); - } - aSC.Free(bFree); -} -//======================================================================= -// function: ComputeVV -// purpose: -//======================================================================= - Standard_Integer NMTDS_Tools::ComputeVV(const TopoDS_Vertex& aV1, - const TopoDS_Vertex& aV2) -{ - Standard_Real aTolV1, aTolV2, aTolSum, aTolSum2, aD2; - gp_Pnt aP1, aP2; - // - aTolV1=BRep_Tool::Tolerance(aV1); - aTolV2=BRep_Tool::Tolerance(aV2); - aTolSum=aTolV1+aTolV2; - aTolSum2=aTolSum*aTolSum; - // - aP1=BRep_Tool::Pnt(aV1); - aP2=BRep_Tool::Pnt(aV2); - // - aD2=aP1.SquareDistance(aP2); - if (aD2>aTolSum2) { - return -1; - } - return 0; -} -//======================================================================= -// function: HasBRep -// purpose: -//======================================================================= - Standard_Boolean NMTDS_Tools::HasBRep(const TopAbs_ShapeEnum aTi) -{ - return (aTi==TopAbs_VERTEX || aTi==TopAbs_EDGE || aTi==TopAbs_FACE); -} -//======================================================================= -//function : TypeToInteger -//purpose : -//======================================================================= - Standard_Integer NMTDS_Tools::TypeToInteger(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) -{ - Standard_Integer iRet, iT1, iT2, iX; - // - iRet=-1; - iT1=(Standard_Integer)aType1; - iT2=(Standard_Integer)aType2; - // - iX=iT2*10+iT1; - switch (iX) { - case 77: - iRet=5; // VV - break; - case 76: - case 67: - iRet=4; // VE - break; - case 74: - case 47: - iRet=2; // VF - break; - case 66: - iRet=3; // EE - break; - case 64: - case 46: - iRet=1; // EF - break; - case 44: - iRet=0; // FF - break; - default: - break; - } - return iRet; -} diff --git a/src/NMTDS_NEW/NMTDS_Tools.hxx b/src/NMTDS_NEW/NMTDS_Tools.hxx deleted file mode 100644 index e30d8924c..000000000 --- a/src/NMTDS_NEW/NMTDS_Tools.hxx +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_Tools.hxx -// Created: -// Author: Peter KURNEV - -#ifndef _NMTDS_Tools_HeaderFile -#define _NMTDS_Tools_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : NMTDS_Tools -//purpose : -//======================================================================= -class NMTDS_Tools -{ - public: - Standard_EXPORT - static Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aT1, - const TopAbs_ShapeEnum aT2) ; - - Standard_EXPORT - static Standard_Boolean HasBRep(const TopAbs_ShapeEnum aT) ; - - Standard_EXPORT - static Standard_Integer ComputeVV(const TopoDS_Vertex& aV1, - const TopoDS_Vertex& aV2) ; - - Standard_EXPORT - static void CopyShape(const TopoDS_Shape& aS, - TopoDS_Shape& aSC) ; - - Standard_EXPORT - static void CopyShape(const TopoDS_Shape& aS, - TopoDS_Shape& aSC, - TopTools_IndexedDataMapOfShapeShape& aMSS) ; -}; -#endif diff --git a/src/NMTTools_NEW/FILES b/src/NMTTools/FILES similarity index 100% rename from src/NMTTools_NEW/FILES rename to src/NMTTools/FILES diff --git a/src/NMTTools/Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx b/src/NMTTools/Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx deleted file mode 100644 index 99ada9439..000000000 --- a/src/NMTTools/Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile -#define _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo); - -class Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) : public Handle(TCollection_MapNode) { - public: - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)():Handle(TCollection_MapNode)() {} - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)(const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)(const NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& operator=(const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)& operator=(const NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo* operator->() const - { - return (NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)(); - - Standard_EXPORT static const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTTools/Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx b/src/NMTTools/Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx deleted file mode 100644 index 395931954..000000000 --- a/src/NMTTools/Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#define _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock); - -class Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) : public Handle(TCollection_MapNode) { - public: - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)():Handle(TCollection_MapNode)() {} - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)(const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)(const NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)& operator=(const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)& operator=(const NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock* operator->() const - { - return (NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)(); - - Standard_EXPORT static const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx deleted file mode 100644 index bcc2a43be..000000000 --- a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile -#define _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger); - -class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) : public Handle(TCollection_MapNode) { - public: - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)():Handle(TCollection_MapNode)() {} - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& operator=(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& operator=(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* operator->() const - { - return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(); - - Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx deleted file mode 100644 index 0defab332..000000000 --- a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile -#define _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape); - -class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) : public Handle(TCollection_MapNode) { - public: - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)():Handle(TCollection_MapNode)() {} - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& operator=(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& operator=(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* operator->() const - { - return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(); - - Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx deleted file mode 100644 index 23400bc54..000000000 --- a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile -#define _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock); - -class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) : public Handle(TCollection_MapNode) { - public: - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)():Handle(TCollection_MapNode)() {} - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& operator=(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& operator=(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* operator->() const - { - return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(); - - Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx b/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx deleted file mode 100644 index 6013342fa..000000000 --- a/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile -#define _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTTools_ListNodeOfListOfCommonBlock; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock); - -class Handle(NMTTools_ListNodeOfListOfCommonBlock) : public Handle(TCollection_MapNode) { - public: - Handle(NMTTools_ListNodeOfListOfCommonBlock)():Handle(TCollection_MapNode)() {} - Handle(NMTTools_ListNodeOfListOfCommonBlock)(const Handle(NMTTools_ListNodeOfListOfCommonBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTTools_ListNodeOfListOfCommonBlock)(const NMTTools_ListNodeOfListOfCommonBlock* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTTools_ListNodeOfListOfCommonBlock)& operator=(const Handle(NMTTools_ListNodeOfListOfCommonBlock)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTTools_ListNodeOfListOfCommonBlock)& operator=(const NMTTools_ListNodeOfListOfCommonBlock* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTTools_ListNodeOfListOfCommonBlock* operator->() const - { - return (NMTTools_ListNodeOfListOfCommonBlock *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCommonBlock)(); - - Standard_EXPORT static const Handle(NMTTools_ListNodeOfListOfCommonBlock) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx b/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx deleted file mode 100644 index e0e754b7c..000000000 --- a/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile -#define _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTTools_ListNodeOfListOfCoupleOfShape; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape); - -class Handle(NMTTools_ListNodeOfListOfCoupleOfShape) : public Handle(TCollection_MapNode) { - public: - Handle(NMTTools_ListNodeOfListOfCoupleOfShape)():Handle(TCollection_MapNode)() {} - Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(const Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(const NMTTools_ListNodeOfListOfCoupleOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& operator=(const Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& operator=(const NMTTools_ListNodeOfListOfCoupleOfShape* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTTools_ListNodeOfListOfCoupleOfShape* operator->() const - { - return (NMTTools_ListNodeOfListOfCoupleOfShape *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(); - - Standard_EXPORT static const Handle(NMTTools_ListNodeOfListOfCoupleOfShape) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTTools/Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx b/src/NMTTools/Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx deleted file mode 100644 index 99cac7c03..000000000 --- a/src/NMTTools/Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _Handle_NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile -#define _Handle_NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class NMTTools_StdMapNodeOfMapOfPaveBlock; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_StdMapNodeOfMapOfPaveBlock); - -class Handle(NMTTools_StdMapNodeOfMapOfPaveBlock) : public Handle(TCollection_MapNode) { - public: - Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)():Handle(TCollection_MapNode)() {} - Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)(const Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)(const NMTTools_StdMapNodeOfMapOfPaveBlock* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)& operator=(const Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)& operator=(const NMTTools_StdMapNodeOfMapOfPaveBlock* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - NMTTools_StdMapNodeOfMapOfPaveBlock* operator->() const - { - return (NMTTools_StdMapNodeOfMapOfPaveBlock *)ControlAccess(); - } - -// Standard_EXPORT ~Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)(); - - Standard_EXPORT static const Handle(NMTTools_StdMapNodeOfMapOfPaveBlock) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/NMTTools/Makefile.am b/src/NMTTools/Makefile.am index 8fd58605e..f498dad8a 100644 --- a/src/NMTTools/Makefile.am +++ b/src/NMTTools/Makefile.am @@ -27,62 +27,30 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am # header files salomeinclude_HEADERS = \ - Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx \ - Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \ - Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx \ - Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx \ - Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx \ - Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx \ - Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx \ - Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx \ NMTTools_CheckerSI.hxx \ - NMTTools_CheckerSI.ixx \ - NMTTools_CheckerSI.jxx \ NMTTools_CommonBlockAPI.hxx \ - NMTTools_CommonBlockAPI.ixx \ - NMTTools_CommonBlockAPI.jxx \ NMTTools_CommonBlock.hxx \ - NMTTools_CommonBlock.ixx \ - NMTTools_CommonBlock.jxx \ NMTTools_CommonBlockPool.hxx \ NMTTools_CoupleOfShape.hxx \ - NMTTools_CoupleOfShape.ixx \ - NMTTools_CoupleOfShape.jxx \ NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx \ NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx \ - NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx \ - NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx \ NMTTools_DataMapOfIntegerFaceInfo.hxx \ NMTTools_DataMapOfIntegerListOfPaveBlock.hxx \ NMTTools_DEProcessor.hxx \ - NMTTools_DEProcessor.ixx \ - NMTTools_DEProcessor.jxx \ NMTTools_FaceInfo.hxx \ - NMTTools_FaceInfo.ixx \ - NMTTools_FaceInfo.jxx \ NMTTools_FaceInfo.lxx \ - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx \ - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx \ - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx \ NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx \ NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx \ NMTTools_IndexedDataMapOfShapePaveBlock.hxx \ NMTTools_ListIteratorOfListOfCommonBlock.hxx \ NMTTools_ListIteratorOfListOfCoupleOfShape.hxx \ - NMTTools_ListNodeOfListOfCommonBlock.hxx \ - NMTTools_ListNodeOfListOfCoupleOfShape.hxx \ NMTTools_ListOfCommonBlock.hxx \ NMTTools_ListOfCoupleOfShape.hxx \ NMTTools_MapIteratorOfMapOfPaveBlock.hxx \ NMTTools_MapOfPaveBlock.hxx \ NMTTools_PaveFiller.hxx \ - NMTTools_PaveFiller.ixx \ - NMTTools_PaveFiller.jxx \ NMTTools_PPaveFiller.hxx \ - NMTTools_Tools.hxx \ - NMTTools_Tools.ixx \ - NMTTools_Tools.jxx \ - NMTTools_StdMapNodeOfMapOfPaveBlock.hxx + NMTTools_Tools.hxx # Libraries targets lib_LTLIBRARIES = libNMTTools.la @@ -92,30 +60,10 @@ dist_libNMTTools_la_SOURCES = \ NMTTools_CheckerSI_1.cxx \ NMTTools_CommonBlockAPI.cxx \ NMTTools_CommonBlock.cxx \ - NMTTools_CommonBlockPool_0.cxx \ + NMTTools_CommonBlockPool.cxx \ NMTTools_CoupleOfShape.cxx \ - NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_0.cxx \ - NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx \ - NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_0.cxx \ - NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx \ - NMTTools_DataMapOfIntegerFaceInfo_0.cxx \ - NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx \ NMTTools_DEProcessor.cxx \ NMTTools_FaceInfo.cxx \ - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx \ - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx \ - NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx \ - NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx \ - NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx \ - NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx \ - NMTTools_ListIteratorOfListOfCommonBlock_0.cxx \ - NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx \ - NMTTools_ListNodeOfListOfCommonBlock_0.cxx \ - NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx \ - NMTTools_ListOfCommonBlock_0.cxx \ - NMTTools_ListOfCoupleOfShape_0.cxx \ - NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx \ - NMTTools_MapOfPaveBlock_0.cxx \ NMTTools_PaveFiller_0.cxx \ NMTTools_PaveFiller_1.cxx \ NMTTools_PaveFiller_2.cxx \ @@ -127,8 +75,7 @@ dist_libNMTTools_la_SOURCES = \ NMTTools_PaveFiller_8.cxx \ NMTTools_PaveFiller_9.cxx \ NMTTools_PaveFiller.cxx \ - NMTTools_Tools.cxx \ - NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx + NMTTools_Tools.cxx # additional information to compile and link file @@ -143,15 +90,9 @@ libNMTTools_la_LDFLAGS = \ $(CAS_LDPATH) -lTKBool -lTKBO \ $(KERNEL_LDFLAGS) -CDL_FILES = \ - NMTTools.cdl \ - NMTTools_CheckerSI.cdl \ - NMTTools_CommonBlock.cdl \ - NMTTools_CommonBlockAPI.cdl \ - NMTTools_CoupleOfShape.cdl \ - NMTTools_DEProcessor.cdl \ - NMTTools_FaceInfo.cdl \ - NMTTools_PaveFiller.cdl \ - NMTTools_Tools.cdl +CDL_FILES = \ + NMTTools.cdl -EXTRA_DIST += $(CDL_FILES) +EXTRA_DIST += \ + $(CDL_FILES) \ + FILES diff --git a/src/NMTTools/NMTTools.cdl b/src/NMTTools/NMTTools.cdl index ea6271c38..e3ce88466 100644 --- a/src/NMTTools/NMTTools.cdl +++ b/src/NMTTools/NMTTools.cdl @@ -25,76 +25,105 @@ -- Author: Peter KURNEV -- -- -package NMTTools +package NMTTools - ---Purpose: + ---Purpose: + +uses -uses - TCollection, TColStd, - gp, - TopAbs, - TopoDS, - TopTools, + gp, + TopAbs, + TopoDS, + TopTools, Geom2d, BooleanOperations, BOPTColStd, IntTools, - BOPTools, - + BOPTools, NMTDS -is - class PaveFiller; - class Tools; - class CommonBlock; - class CommonBlockAPI; - class DEProcessor; - class CoupleOfShape; - class CheckerSI; - class FaceInfo; - - pointer PPaveFiller to PaveFiller from NMTTools; - - class ListOfCommonBlock instantiates - List from TCollection(CommonBlock from NMTTools); - - class CommonBlockPool instantiates - CArray1 from BOPTColStd (ListOfCommonBlock from NMTTools); - - class IndexedDataMapOfIndexedMapOfInteger instantiates - IndexedDataMap from TCollection (Integer from Standard, - IndexedMapOfInteger from TColStd, - MapIntegerHasher from TColStd); - - class IndexedDataMapOfShapePaveBlock instantiates - IndexedDataMap from TCollection (Shape from TopoDS, - PaveBlock from BOPTools, - ShapeMapHasher from TopTools); - - class IndexedDataMapOfShapeIndexedMapOfShape instantiates - IndexedDataMap from TCollection (Shape from TopoDS, - IndexedMapOfShape from TopTools, - ShapeMapHasher from TopTools); - - class ListOfCoupleOfShape instantiates - List from TCollection(CoupleOfShape from NMTTools); +is + imported CoupleOfShape from NMTTools; + imported CommonBlock from NMTTools; + imported CommonBlockAPI from NMTTools; + imported FaceInfo from NMTTools; + imported Tools from NMTTools; + imported PaveFiller from NMTTools; + imported PPaveFiller from NMTTools; + imported DEProcessor from NMTTools; + imported CheckerSI from NMTTools; + -- + imported ListOfCommonBlock from NMTTools; + imported ListIteratorOfListOfCommonBlock from NMTTools; + + imported ListOfCoupleOfShape from NMTTools; + imported ListIteratorOfListOfCoupleOfShape from NMTTools; + + imported MapOfPaveBlock from NMTTools; + imported MapIteratorOfMapOfPaveBlock from NMTTools; + + imported IndexedDataMapOfIndexedMapOfInteger from NMTTools; + imported IndexedDataMapOfShapePaveBlock from NMTTools; + imported IndexedDataMapOfShapeIndexedMapOfShape from NMTTools; + + imported DataMapOfIntegerListOfPaveBlock from NMTTools; + imported DataMapIteratorOfDataMapOfIntegerListOfPaveBlock from NMTTools; + + imported DataMapOfIntegerFaceInfo from NMTTools; + imported DataMapIteratorOfDataMapOfIntegerFaceInfo from NMTTools; + + imported CommonBlockPool from NMTTools; + + -- + --class PaveFiller; + --class Tools; + --class CommonBlock; + --class CommonBlockAPI; + --class FaceInfo; + --class CoupleOfShape; + --class CheckerSI; + --class DEProcessor; + --pointer PPaveFiller to PaveFiller from NMTTools; + -- + --class ListOfCommonBlock instantiates + -- List from TCollection(CommonBlock from NMTTools); + + --class ListOfCoupleOfShape instantiates + -- List from TCollection(CoupleOfShape from NMTTools); +-- + --class MapOfPaveBlock instantiates + -- Map from TCollection (PaveBlock from BOPTools, + -- PaveBlockMapHasher from BOPTools); +-- + --class IndexedDataMapOfIndexedMapOfInteger instantiates + -- IndexedDataMap from TCollection (Integer from Standard, + -- IndexedMapOfInteger from TColStd, + -- MapIntegerHasher from TColStd); + + --class IndexedDataMapOfShapePaveBlock instantiates + -- IndexedDataMap from TCollection (Shape from TopoDS, + -- PaveBlock from BOPTools, + -- ShapeMapHasher from TopTools); + + --class IndexedDataMapOfShapeIndexedMapOfShape instantiates + -- IndexedDataMap from TCollection (Shape from TopoDS, + -- IndexedMapOfShape from TopTools, + -- ShapeMapHasher from TopTools); + +-- + --class DataMapOfIntegerListOfPaveBlock instantiates + -- DataMap from TCollection(Integer from Standard, + -- ListOfPaveBlock from BOPTools, + -- MapIntegerHasher from TColStd); + --class DataMapOfIntegerFaceInfo instantiates + -- DataMap from TCollection(Integer from Standard, + -- FaceInfo from NMTTools, + -- MapIntegerHasher from TColStd); -- - 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); - - class DataMapOfIntegerFaceInfo instantiates - DataMap from TCollection(Integer from Standard, - FaceInfo from NMTTools, - MapIntegerHasher from TColStd); - + --class CommonBlockPool instantiates + -- CArray1 from BOPTColStd (ListOfCommonBlock from NMTTools); -- end NMTTools; diff --git a/src/NMTTools/NMTTools.pro b/src/NMTTools/NMTTools.pro deleted file mode 100644 index 35300f1fb..000000000 --- a/src/NMTTools/NMTTools.pro +++ /dev/null @@ -1,127 +0,0 @@ -# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it 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 -# - -TEMPLATE = lib -TARGET = NMTTools -DESTDIR = ../../lib -MOC_DIR = ../../moc -OBJECTS_DIR = ../../obj/$$TARGET - -CASROOT = $$(CASROOT) -CAS_CPPFLAGS = $${CASROOT}/inc - -KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome - -STDLIB = -lstdc++ - -CAS_LDPATH = -L$$(CASROOT)/Linux/lib - -KERNEL_LDFLAGS = -L$$(KERNEL_ROOT_DIR)/lib/salome - -INCLUDEPATH += $${CAS_CPPFLAGS} $${KERNEL_CXXFLAGS} ../NMTDS - -LIBS += -L$$(GEOM_ROOT_DIR)/lib -lNMTDS $${STDLIB} $${CAS_LDPATH} -lTKBool -lTKBO $${KERNEL_LDFLAGS} - -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - -win32:DEFINES += WIN32 -DEFINES += OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS - -HEADERS = Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx -HEADERS += Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx -HEADERS += Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx -HEADERS += Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx -HEADERS += Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx -HEADERS += Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx -HEADERS += Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx -HEADERS += NMTTools_CommonBlockAPI.hxx -HEADERS += NMTTools_CommonBlock.hxx -HEADERS += NMTTools_CommonBlockPool.hxx -HEADERS += NMTTools_CoupleOfShape.hxx -HEADERS += NMTTools_DEProcessor.hxx -HEADERS += NMTTools_DSFiller.hxx -HEADERS += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx -HEADERS += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx -HEADERS += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx -HEADERS += NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx -HEADERS += NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx -HEADERS += NMTTools_IndexedDataMapOfShapePaveBlock.hxx -HEADERS += NMTTools_ListIteratorOfListOfCommonBlock.hxx -HEADERS += NMTTools_ListIteratorOfListOfCoupleOfShape.hxx -HEADERS += NMTTools_ListNodeOfListOfCommonBlock.hxx -HEADERS += NMTTools_ListNodeOfListOfCoupleOfShape.hxx -HEADERS += NMTTools_ListOfCommonBlock.hxx -HEADERS += NMTTools_ListOfCoupleOfShape.hxx -HEADERS += NMTTools_PaveFiller.hxx -HEADERS += NMTTools_PCurveMaker.hxx -HEADERS += NMTTools_PDSFiller.hxx -HEADERS += NMTTools_PPaveFiller.hxx -HEADERS += NMTTools_Tools.hxx -HEADERS += Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx -HEADERS += Handle_NMTTools_StdMapNodeOfMapOfPaveBlock.hxx -HEADERS += NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx -HEADERS += NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx -HEADERS += NMTTools_DataMapOfIntegerListOfPaveBlock.hxx -HEADERS += NMTTools_MapIteratorOfMapOfPaveBlock.hxx -HEADERS += NMTTools_MapOfPaveBlock.hxx -HEADERS += NMTTools_StdMapNodeOfMapOfPaveBlock.hxx - -SOURCES = NMTTools_CommonBlockAPI.cxx -SOURCES += NMTTools_CommonBlock.cxx -SOURCES += NMTTools_CommonBlockPool_0.cxx -SOURCES += NMTTools_CoupleOfShape.cxx -SOURCES += NMTTools_DEProcessor.cxx -SOURCES += NMTTools_DSFiller.cxx -SOURCES += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx -SOURCES += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx -SOURCES += NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx -SOURCES += NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx -SOURCES += NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx -SOURCES += NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx -SOURCES += NMTTools_ListIteratorOfListOfCommonBlock_0.cxx -SOURCES += NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx -SOURCES += NMTTools_ListNodeOfListOfCommonBlock_0.cxx -SOURCES += NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx -SOURCES += NMTTools_ListOfCommonBlock_0.cxx -SOURCES += NMTTools_ListOfCoupleOfShape_0.cxx -SOURCES += NMTTools_PaveFiller_0.cxx -SOURCES += NMTTools_PaveFiller_1.cxx -SOURCES += NMTTools_PaveFiller_2.cxx -SOURCES += NMTTools_PaveFiller_3.cxx -SOURCES += NMTTools_PaveFiller_4.cxx -SOURCES += NMTTools_PaveFiller_5.cxx -SOURCES += NMTTools_PaveFiller_6.cxx -SOURCES += NMTTools_PaveFiller_7.cxx -SOURCES += NMTTools_PaveFiller_8.cxx -SOURCES += NMTTools_PaveFiller_9.cxx -SOURCES += NMTTools_PaveFiller.cxx -SOURCES += NMTTools_PCurveMaker.cxx -SOURCES += NMTTools_Tools.cxx -SOURCES += NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx -SOURCES += NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx -SOURCES += NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx -SOURCES += NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx -SOURCES += NMTTools_MapOfPaveBlock_0.cxx -SOURCES += NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx - -includes.files = $$HEADERS -includes.path = ../../include - -INSTALLS += includes diff --git a/src/NMTTools/NMTTools_CheckerSI.cdl b/src/NMTTools/NMTTools_CheckerSI.cdl deleted file mode 100644 index 3f851d1ed..000000000 --- a/src/NMTTools/NMTTools_CheckerSI.cdl +++ /dev/null @@ -1,64 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- This library is free software; you can redistribute it and/or --- modify it 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_CheckerSI.cdl --- Created: Mon Feb 19 11:23:55 2007 --- Author: Peter KURNEV --- -class CheckerSI from NMTTools - inherits PaveFiller from NMTTools - ---Purpose: - -uses - ShapeEnum from TopAbs - ---raises - -is - - Create - returns CheckerSI from NMTTools; - ---C++: alias "Standard_EXPORT virtual ~NMTTools_CheckerSI();" - - Perform (me:out) - is redefined; - - Init (me:out) - is redefined protected; - - Clear (me:out) - is redefined protected; - - PreparePaveBlocks (me:out; - nE:Integer from Standard) - is redefined protected; - - PreparePaveBlocks (me:out; - aType1: ShapeEnum from TopAbs; - aType2: ShapeEnum from TopAbs) - is redefined protected; - - StopStatus(me) - returns Integer from Standard; - - -fields - myStopStatus: Integer from Standard is protected; - -end CheckerSI; diff --git a/src/NMTTools/NMTTools_CheckerSI.cxx b/src/NMTTools/NMTTools_CheckerSI.cxx index 0eb582276..dd724ba6a 100644 --- a/src/NMTTools/NMTTools_CheckerSI.cxx +++ b/src/NMTTools/NMTTools_CheckerSI.cxx @@ -20,56 +20,53 @@ // File: NMTTools_CheckerSI.cxx // Created: Mon Feb 19 11:32:08 2007 // Author: Peter KURNEV - -#include - -#include +// +#include #include #include #include - -#include - +#include #include //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= -NMTTools_CheckerSI::NMTTools_CheckerSI() - : NMTTools_PaveFiller() + NMTTools_CheckerSI::NMTTools_CheckerSI() +: + NMTTools_PaveFiller() { myStopStatus=0; } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= -NMTTools_CheckerSI::~NMTTools_CheckerSI() + NMTTools_CheckerSI::~NMTTools_CheckerSI() { } //======================================================================= //function : Clear -//purpose : +//purpose : //======================================================================= -void NMTTools_CheckerSI::Clear() + void NMTTools_CheckerSI::Clear() { NMTTools_PaveFiller::Clear(); } //======================================================================= //function : StopStatus -//purpose : +//purpose : //======================================================================= -Standard_Integer NMTTools_CheckerSI::StopStatus()const + Standard_Integer NMTTools_CheckerSI::StopStatus()const { return myStopStatus; } //======================================================================= //function : Init -//purpose : +//purpose : //======================================================================= -void NMTTools_CheckerSI::Init() + void NMTTools_CheckerSI::Init() { myIsDone=Standard_False; if (myCompositeShape.IsNull()) { @@ -91,20 +88,17 @@ void NMTTools_CheckerSI::Init() myNbSources=myDS->NumberOfShapesOfTheObject()+ myDS->NumberOfShapesOfTheTool(); myNbEdges=myDS->NbEdges(); - // 4. + // 4 myIP=new NMTDS_InterfPool; // - // 5. -#if OCC_VERSION_LARGE > 0x06050200 - // In OCCT6.5.3 class IntTools_Context become a handle + // 5 myContext=new IntTools_Context; -#endif } //======================================================================= //function : Perform -//purpose : +//purpose : //======================================================================= -void NMTTools_CheckerSI::Perform() + void NMTTools_CheckerSI::Perform() { myIsDone=Standard_False; myStopStatus=0; @@ -174,7 +168,7 @@ void NMTTools_CheckerSI::Perform() // MakePCurves(); // - // 7. Postprocessing + // 7. Postprocessing UpdatePaveBlocks(); // NMTTools_DEProcessor aDEP(*this); diff --git a/src/NMTTools/NMTTools_CheckerSI.hxx b/src/NMTTools/NMTTools_CheckerSI.hxx index 254092d6b..ff9000ad5 100644 --- a/src/NMTTools/NMTTools_CheckerSI.hxx +++ b/src/NMTTools/NMTTools_CheckerSI.hxx @@ -17,102 +17,53 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_CheckerSI.hxx +// Created: Mon Feb 19 11:32:08 2007 +// Author: Peter KURNEV +// #ifndef _NMTTools_CheckerSI_HeaderFile #define _NMTTools_CheckerSI_HeaderFile -#ifndef _Standard_Integer_HeaderFile +#include +#include #include -#endif -#ifndef _NMTTools_PaveFiller_HeaderFile #include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile #include -#endif - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTTools_CheckerSI : public NMTTools_PaveFiller { - -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 - // - - -Standard_EXPORT NMTTools_CheckerSI(); -Standard_EXPORT virtual ~NMTTools_CheckerSI(); - - -Standard_EXPORT virtual void Perform() ; - - -Standard_EXPORT Standard_Integer StopStatus() const; +//======================================================================= +//class : NMTTools_CheckerSI +//purpose : +//======================================================================= +class NMTTools_CheckerSI : public NMTTools_PaveFiller +{ + public: + Standard_EXPORT + NMTTools_CheckerSI(); + Standard_EXPORT + virtual ~NMTTools_CheckerSI(); + Standard_EXPORT + virtual void Perform() ; + Standard_EXPORT + Standard_Integer StopStatus() const; -protected: + protected: + Standard_EXPORT + virtual void Init() ; - // Methods PROTECTED - // + Standard_EXPORT + virtual void Clear() ; + Standard_EXPORT + virtual void PreparePaveBlocks(const Standard_Integer nE) ; -Standard_EXPORT virtual void Init() ; - - -Standard_EXPORT virtual void Clear() ; - - -Standard_EXPORT virtual void PreparePaveBlocks(const Standard_Integer nE) ; - - -Standard_EXPORT virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ; - - - // Fields PROTECTED - // -Standard_Integer myStopStatus; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT + virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1, + const TopAbs_ShapeEnum aType2) ; + Standard_Integer myStopStatus; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTTools/NMTTools_CheckerSI.ixx b/src/NMTTools/NMTTools_CheckerSI.ixx deleted file mode 100644 index e6edb42a9..000000000 --- a/src/NMTTools/NMTTools_CheckerSI.ixx +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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 -// - -#include - - - - diff --git a/src/NMTTools/NMTTools_CheckerSI.jxx b/src/NMTTools/NMTTools_CheckerSI.jxx deleted file mode 100644 index b6ea6678b..000000000 --- a/src/NMTTools/NMTTools_CheckerSI.jxx +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_CheckerSI_HeaderFile -#include -#endif diff --git a/src/NMTTools/NMTTools_CheckerSI_1.cxx b/src/NMTTools/NMTTools_CheckerSI_1.cxx index 7b7c7b65b..eb00dec0f 100755 --- a/src/NMTTools/NMTTools_CheckerSI_1.cxx +++ b/src/NMTTools/NMTTools_CheckerSI_1.cxx @@ -21,7 +21,7 @@ // Created: Mon Feb 19 11:32:08 2007 // Author: Peter KURNEV // -#include +#include #include #include @@ -52,16 +52,16 @@ static //======================================================================= // function: PreparePaveBlocks -// purpose: +// purpose: //======================================================================= - void NMTTools_CheckerSI::PreparePaveBlocks(const TopAbs_ShapeEnum aType1, + void NMTTools_CheckerSI::PreparePaveBlocks(const TopAbs_ShapeEnum aType1, const TopAbs_ShapeEnum aType2) { NMTTools_PaveFiller::PreparePaveBlocks(aType1, aType2); } //======================================================================= // function: PreparePaveBlocks -// purpose: +// purpose: //======================================================================= void NMTTools_CheckerSI::PreparePaveBlocks(const Standard_Integer nE) { @@ -75,7 +75,7 @@ static TopoDS_Vertex aV1, aV2; // BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); - // Edge + // Edge aE=TopoDS::Edge(myDS->Shape(nE)); if (BRep_Tool::Degenerated(aE)) { myIsDone=Standard_True; @@ -83,7 +83,7 @@ static } // BOPTools_PaveSet& aPS=myPavePool(myDS->RefEdge(nE)); - + BOPTools_PaveBlockIterator aPBIt(nE, aPS); for (; aPBIt.More(); aPBIt.Next()) { BOPTools_PaveBlock& aPB=aPBIt.Value(); @@ -96,7 +96,7 @@ static // const BOPTools_Pave& aPave2=aPB.Pave2(); nV2=aPave2.Index(); - aV2=TopoDS::Vertex(myDS->Shape(nV2)); + aV2=TopoDS::Vertex(myDS->Shape(nV2)); aT2=aPave2.Param(); // bIsValid=Standard_True; @@ -121,13 +121,13 @@ static } aPB.SetShrunkRange(aSR); aLPB.Append(aPB); - } //for (; aPBIt.More(); aPBIt.Next()) + } //for (; aPBIt.More(); aPBIt.Next()) myIsDone=Standard_True; } //======================================================================= //function : IsValid -//purpose : +//purpose : //======================================================================= Standard_Boolean IsValid(const TopoDS_Edge& aE, const TopoDS_Vertex& aV, diff --git a/src/NMTTools/NMTTools_CommonBlock.cdl b/src/NMTTools/NMTTools_CommonBlock.cdl deleted file mode 100644 index 74fd31500..000000000 --- a/src/NMTTools/NMTTools_CommonBlock.cdl +++ /dev/null @@ -1,108 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTTools_CommonBlock.cdl --- Created: Tue Dec 9 12:11:48 2003 --- Author: Peter KURNEV --- --- -class CommonBlock from NMTTools - - ---Purpose: - -uses - ListOfInteger from TColStd, - PaveBlock from BOPTools, - ListOfPaveBlock from BOPTools - ---raises - -is - Create - returns CommonBlock from NMTTools; - - AddPaveBlock(me:out; - aPB : PaveBlock from BOPTools); - - AddFace(me:out; - aF : Integer from Standard); - - AddFaces(me:out; - aLF: ListOfInteger from TColStd); - - PaveBlocks(me) - returns ListOfPaveBlock from BOPTools; - ---C++: return const & - - Faces (me) - returns ListOfInteger from TColStd; - ---C++: return const & - - PaveBlock1 (me) - returns PaveBlock from BOPTools; - ---C++: return const & - - PaveBlock1 (me:out; - anIx: Integer from Standard) - returns PaveBlock from BOPTools; - ---C++: return & - - PaveBlockOnEdge (me:out; - anIndex: Integer from Standard) - returns PaveBlock from BOPTools; - ---C++: return & - - IsPaveBlockOnFace (me; - anIndex: Integer from Standard) - returns Boolean from Standard; - - IsPaveBlockOnEdge (me; - anIndex: Integer from Standard) - returns Boolean from Standard; - - IsEqual (me; - aCB:CommonBlock from NMTTools) - returns Boolean from Standard; - - Contains(me; - aPB:PaveBlock from BOPTools) - returns Boolean from Standard; - --- SetEdge (me:out; --- anEdge:Integer from Standard); - --- Edge (me) --- returns Integer from Standard; - -fields - myPaveBlocks: ListOfPaveBlock from BOPTools is protected; - myFaces : ListOfInteger from TColStd is protected; - -end CommonBlock; - - - - - - - - diff --git a/src/NMTTools/NMTTools_CommonBlock.cxx b/src/NMTTools/NMTTools_CommonBlock.cxx index b6a4f7b34..701bf3790 100644 --- a/src/NMTTools/NMTTools_CommonBlock.cxx +++ b/src/NMTTools/NMTTools_CommonBlock.cxx @@ -25,21 +25,21 @@ // Author: Peter KURNEV // // -#include +#include #include #include //======================================================================= // function: NMTTools_CommonBlock::NMTTools_CommonBlock() -// purpose: +// purpose: //======================================================================= NMTTools_CommonBlock::NMTTools_CommonBlock() { } //======================================================================= // function: AddPaveBlock -// purpose: +// purpose: //======================================================================= void NMTTools_CommonBlock::AddPaveBlock(const BOPTools_PaveBlock& aPB) { @@ -47,7 +47,7 @@ } //======================================================================= // function: AddFace -// purpose: +// purpose: //======================================================================= void NMTTools_CommonBlock::AddFace(const Standard_Integer aF) { @@ -55,7 +55,7 @@ } //======================================================================= // function: AddFaces -// purpose: +// purpose: //======================================================================= void NMTTools_CommonBlock::AddFaces(const TColStd_ListOfInteger& aLF) { @@ -67,7 +67,7 @@ } //======================================================================= // function: PaveBlocks -// purpose: +// purpose: //======================================================================= const BOPTools_ListOfPaveBlock& NMTTools_CommonBlock::PaveBlocks()const { @@ -75,7 +75,7 @@ } //======================================================================= // function: Faces -// purpose: +// purpose: //======================================================================= const TColStd_ListOfInteger& NMTTools_CommonBlock::Faces()const { @@ -83,7 +83,7 @@ } //======================================================================= // function: PaveBlock1 -// purpose: +// purpose: //======================================================================= const BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlock1()const { @@ -91,7 +91,7 @@ } //======================================================================= // function: PaveBlock1 -// purpose: +// purpose: //======================================================================= BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlock1(const Standard_Integer aIx) { @@ -99,7 +99,7 @@ } //======================================================================= // function: PaveBlockOnEdge -// purpose: +// purpose: //======================================================================= BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlockOnEdge(const Standard_Integer aIx) { @@ -118,7 +118,7 @@ } //======================================================================= // function: IsPaveBlockOnFace -// purpose: +// purpose: //======================================================================= Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnFace(const Standard_Integer aIx)const { @@ -136,7 +136,7 @@ } //======================================================================= // function: IsPaveBlockOnEdge -// purpose: +// purpose: //======================================================================= Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnEdge(const Standard_Integer aIx)const { @@ -155,7 +155,7 @@ } //======================================================================= // function: IsEqual -// purpose: +// purpose: //======================================================================= Standard_Boolean NMTTools_CommonBlock::IsEqual(const NMTTools_CommonBlock& aOther)const { @@ -189,7 +189,7 @@ } //======================================================================= // function: Contains -// purpose: +// purpose: //======================================================================= Standard_Boolean NMTTools_CommonBlock::Contains(const BOPTools_PaveBlock& aPBx)const { @@ -215,7 +215,7 @@ /* //======================================================================= // function: SetEdge -// purpose: +// purpose: //======================================================================= void NMTTools_CommonBlock::SetEdge(const Standard_Integer anEdge) { @@ -229,7 +229,7 @@ } //======================================================================= // function: Edge -// purpose: +// purpose: //======================================================================= Standard_Integer NMTTools_CommonBlock::Edge()const { diff --git a/src/NMTTools/NMTTools_CommonBlock.hxx b/src/NMTTools/NMTTools_CommonBlock.hxx index f8f3f660b..94dc4d9b2 100644 --- a/src/NMTTools/NMTTools_CommonBlock.hxx +++ b/src/NMTTools/NMTTools_CommonBlock.hxx @@ -20,126 +20,72 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_CommonBlock.hxx +// Created: Tue Dec 9 12:23:29 2003 +// Author: Peter KURNEV +// +// + #ifndef _NMTTools_CommonBlock_HeaderFile #define _NMTTools_CommonBlock_HeaderFile -#ifndef _BOPTools_ListOfPaveBlock_HeaderFile +#include +#include #include -#endif -#ifndef _TColStd_ListOfInteger_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -class BOPTools_PaveBlock; -class TColStd_ListOfInteger; -class BOPTools_ListOfPaveBlock; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif +#include +//======================================================================= +//function : NMTTools_CommonBlock +//purpose : +//======================================================================= class NMTTools_CommonBlock { + public: + Standard_EXPORT + NMTTools_CommonBlock(); -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 - // - - -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 + void AddPaveBlock(const BOPTools_PaveBlock& aPB) ; -Standard_EXPORT const TColStd_ListOfInteger& Faces() const; + Standard_EXPORT + void AddFace(const Standard_Integer aF) ; + Standard_EXPORT + void AddFaces(const TColStd_ListOfInteger& aLF) ; -Standard_EXPORT const BOPTools_PaveBlock& PaveBlock1() const; + Standard_EXPORT + const BOPTools_ListOfPaveBlock& PaveBlocks() const; + Standard_EXPORT + const TColStd_ListOfInteger& Faces() const; -Standard_EXPORT BOPTools_PaveBlock& PaveBlock1(const Standard_Integer anIx) ; + 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 + BOPTools_PaveBlock& PaveBlockOnEdge(const Standard_Integer anIndex) ; + Standard_EXPORT + Standard_Boolean IsPaveBlockOnFace(const Standard_Integer anIndex) const; -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 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; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -BOPTools_ListOfPaveBlock myPaveBlocks; -TColStd_ListOfInteger myFaces; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - + Standard_EXPORT + Standard_Boolean Contains(const BOPTools_PaveBlock& aPB) const; + protected: + BOPTools_ListOfPaveBlock myPaveBlocks; + TColStd_ListOfInteger myFaces; }; - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTTools/NMTTools_CommonBlock.ixx b/src/NMTTools/NMTTools_CommonBlock.ixx deleted file mode 100644 index c87a4b4bd..000000000 --- a/src/NMTTools/NMTTools_CommonBlock.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTTools/NMTTools_CommonBlock.jxx b/src/NMTTools/NMTTools_CommonBlock.jxx deleted file mode 100644 index 0d105e59a..000000000 --- a/src/NMTTools/NMTTools_CommonBlock.jxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _BOPTools_PaveBlock_HeaderFile -#include -#endif -#ifndef _TColStd_ListOfInteger_HeaderFile -#include -#endif -#ifndef _BOPTools_ListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_CommonBlock_HeaderFile -#include -#endif diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.cdl b/src/NMTTools/NMTTools_CommonBlockAPI.cdl deleted file mode 100644 index 4a7165ba4..000000000 --- a/src/NMTTools/NMTTools_CommonBlockAPI.cdl +++ /dev/null @@ -1,74 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTTools_CommonBlockAPI.cdl --- Created: Mon Dec 15 11:35:46 2003 --- Author: Peter KURNEV --- --- -class CommonBlockAPI from NMTTools - - ---Purpose: - -uses - ListOfCommonBlock from NMTTools, - ListOfPaveBlock from BOPTools, - PaveBlock from BOPTools, - CommonBlock from NMTTools - ---raises - -is - Create (aList:ListOfCommonBlock from NMTTools) - returns CommonBlockAPI from NMTTools; - - List(me) - returns ListOfCommonBlock from NMTTools; - ---C++: return const & - ---Purpose: - --- Selector - --- - CommonPaveBlocks(me; - anE:Integer from Standard) - returns ListOfPaveBlock from BOPTools; - ---C++: return const & - ---Purpose: - --- Returns all PaveBlock-s (from the list) that are - --- common for the given edge with DS-index - --- - IsCommonBlock (me; - aPB: PaveBlock from BOPTools) - returns Boolean from Standard; - ---Purpose: - --- Returns TRUE if given PaveBlock is - --- common for the Blocks from the list - - CommonBlock(me; - aPB: PaveBlock from BOPTools) - returns CommonBlock from NMTTools; - ---C++: return & - -fields - myListOfCommonBlock :Address from Standard; - myListOfPaveBlock :ListOfPaveBlock from BOPTools; - -end CommonBlockAPI; diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.cxx b/src/NMTTools/NMTTools_CommonBlockAPI.cxx index 5baf7a803..4593ef860 100644 --- a/src/NMTTools/NMTTools_CommonBlockAPI.cxx +++ b/src/NMTTools/NMTTools_CommonBlockAPI.cxx @@ -25,7 +25,7 @@ // Author: Peter KURNEV // // -#include +#include #include #include @@ -37,7 +37,7 @@ //======================================================================= // function: NMTTools_CommonBlockAPI::NMTTools_CommonBlockAPI -// purpose: +// purpose: //======================================================================= NMTTools_CommonBlockAPI::NMTTools_CommonBlockAPI (const NMTTools_ListOfCommonBlock& aLCB) { @@ -45,7 +45,7 @@ } //======================================================================= // function: List -// purpose: +// purpose: //======================================================================= const NMTTools_ListOfCommonBlock& NMTTools_CommonBlockAPI::List () const { @@ -85,7 +85,7 @@ } //======================================================================= // function: IsCommonBlock -// purpose: +// purpose: //======================================================================= Standard_Boolean NMTTools_CommonBlockAPI::IsCommonBlock(const BOPTools_PaveBlock& aPB) const { @@ -107,7 +107,7 @@ //======================================================================= // function: CommonBlock -// purpose: +// purpose: //======================================================================= NMTTools_CommonBlock& NMTTools_CommonBlockAPI::CommonBlock(const BOPTools_PaveBlock& aPB)const { @@ -120,7 +120,7 @@ // anItCB.Initialize(*pLCB); for (; anItCB.More(); anItCB.Next()) { - NMTTools_CommonBlock& aCB=anItCB.Value(); + NMTTools_CommonBlock& aCB=anItCB.ChangeValue(); // const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks(); anItPB.Initialize(aLPB); diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.hxx b/src/NMTTools/NMTTools_CommonBlockAPI.hxx index 7660db7e5..d9c4aa4e7 100644 --- a/src/NMTTools/NMTTools_CommonBlockAPI.hxx +++ b/src/NMTTools/NMTTools_CommonBlockAPI.hxx @@ -20,108 +20,55 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_CommonBlockAPI.hxx +// Created: Mon Dec 15 11:38:04 2003 +// Author: Peter KURNEV +// +// #ifndef _NMTTools_CommonBlockAPI_HeaderFile #define _NMTTools_CommonBlockAPI_HeaderFile -#ifndef _Standard_Address_HeaderFile +#include +#include #include -#endif -#ifndef _BOPTools_ListOfPaveBlock_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -class NMTTools_ListOfCommonBlock; -class BOPTools_ListOfPaveBlock; -class BOPTools_PaveBlock; -class NMTTools_CommonBlock; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTTools_CommonBlockAPI { - -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 - // - - -Standard_EXPORT NMTTools_CommonBlockAPI(const NMTTools_ListOfCommonBlock& aList); - +#include +#include +#include +#include + +//======================================================================= +//class : NMTTools_CommonBlockAPI +//purpose : +//======================================================================= +class NMTTools_CommonBlockAPI +{ + public: + Standard_EXPORT + NMTTools_CommonBlockAPI(const NMTTools_ListOfCommonBlock& aList); //! Selector
-Standard_EXPORT const NMTTools_ListOfCommonBlock& List() const; - + 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; - + 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; - - - - + Standard_EXPORT + Standard_Boolean IsCommonBlock(const BOPTools_PaveBlock& aPB) const; + Standard_EXPORT + NMTTools_CommonBlock& CommonBlock(const BOPTools_PaveBlock& aPB) const; protected: +//private: - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // Standard_Address myListOfCommonBlock; BOPTools_ListOfPaveBlock myListOfPaveBlock; - - }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.ixx b/src/NMTTools/NMTTools_CommonBlockAPI.ixx deleted file mode 100644 index 71403dc0a..000000000 --- a/src/NMTTools/NMTTools_CommonBlockAPI.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.jxx b/src/NMTTools/NMTTools_CommonBlockAPI.jxx deleted file mode 100644 index 58409071f..000000000 --- a/src/NMTTools/NMTTools_CommonBlockAPI.jxx +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_ListOfCommonBlock_HeaderFile -#include -#endif -#ifndef _BOPTools_ListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _BOPTools_PaveBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_CommonBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_CommonBlockAPI_HeaderFile -#include -#endif diff --git a/src/NMTTools_NEW/NMTTools_CommonBlockPool.cxx b/src/NMTTools/NMTTools_CommonBlockPool.cxx similarity index 100% rename from src/NMTTools_NEW/NMTTools_CommonBlockPool.cxx rename to src/NMTTools/NMTTools_CommonBlockPool.cxx diff --git a/src/NMTTools/NMTTools_CommonBlockPool.hxx b/src/NMTTools/NMTTools_CommonBlockPool.hxx index 734d947c8..57a95d332 100644 --- a/src/NMTTools/NMTTools_CommonBlockPool.hxx +++ b/src/NMTTools/NMTTools_CommonBlockPool.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -20,137 +17,106 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_CommonBlockPool.hxx +// Created: +// Author: Peter KURNEV +// +// + #ifndef _NMTTools_CommonBlockPool_HeaderFile #define _NMTTools_CommonBlockPool_HeaderFile -#include - -#ifndef _Standard_Address_HeaderFile +#include +#include #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif +#include class Standard_OutOfRange; class Standard_OutOfMemory; -class NMTTools_ListOfCommonBlock; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTTools_CommonBlockPool { - -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 - // -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() +//======================================================================= +//class : NMTTools_CommonBlockPool +//purpose : +//======================================================================= +class NMTTools_CommonBlockPool { - Destroy(); -} + 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() ; -Standard_EXPORT Standard_Integer Length() const; + ~NMTTools_CommonBlockPool() { + Destroy(); + } + Standard_EXPORT + Standard_Integer Length() const; -Standard_EXPORT Standard_Integer Extent() const; + Standard_EXPORT + Standard_Integer Extent() const; + Standard_EXPORT + Standard_Integer FactLength() 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 Standard_Integer Append(const NMTTools_ListOfCommonBlock& Value) ; + 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 void Remove(const Standard_Integer Index) ; + Standard_EXPORT + NMTTools_ListOfCommonBlock& ChangeValue(const Standard_Integer Index) ; + NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) { + return ChangeValue(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 + void SetBlockLength(const Standard_Integer aBL) ; + Standard_EXPORT + Standard_Integer BlockLength() const; - -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; - -#if OCC_VERSION_LARGE > 0x06050200 -Standard_EXPORT void Purge(); -#endif + Standard_EXPORT + void Purge() ; protected: - // Methods PROTECTED - // - - // Fields PROTECTED - // - -private: - - // Methods PRIVATE - // -Standard_EXPORT NMTTools_CommonBlockPool(const NMTTools_CommonBlockPool& AnArray); +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 + NMTTools_CommonBlockPool& Assign(const NMTTools_CommonBlockPool& Other) ; -Standard_EXPORT Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const; + NMTTools_CommonBlockPool& operator =(const NMTTools_CommonBlockPool& Other) { + return Assign(Other); + } - // Fields PRIVATE - // -Standard_Address myStart; -Standard_Integer myLength; -Standard_Integer myFactLength; -Standard_Integer myBlockLength; -Standard_Boolean myIsAllocated; + Standard_EXPORT + Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const; + Standard_Address myStart; + Standard_Integer myLength; + Standard_Integer myFactLength; + Standard_Integer myBlockLength; + Standard_Boolean myIsAllocated; }; - -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/NMTTools/NMTTools_CommonBlockPool_0.cxx b/src/NMTTools/NMTTools_CommonBlockPool_0.cxx deleted file mode 100644 index 7de6a1e61..000000000 --- a/src/NMTTools/NMTTools_CommonBlockPool_0.cxx +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_OutOfMemory_HeaderFile -#include -#endif -#ifndef _NMTTools_ListOfCommonBlock_HeaderFile -#include -#endif - - -#define Array1Item NMTTools_ListOfCommonBlock -#define Array1Item_hxx -#define BOPTColStd_CArray1 NMTTools_CommonBlockPool -#define BOPTColStd_CArray1_hxx -#include - diff --git a/src/NMTTools/NMTTools_CoupleOfShape.cdl b/src/NMTTools/NMTTools_CoupleOfShape.cdl deleted file mode 100644 index 059a73d2a..000000000 --- a/src/NMTTools/NMTTools_CoupleOfShape.cdl +++ /dev/null @@ -1,59 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTTools_CoupleOfShape.cdl --- Created: Wed Jan 28 15:03:39 2004 --- Author: Peter KURNEV --- --- -class CoupleOfShape from NMTTools - - ---Purpose: - -uses - Shape from TopoDS - ---raises - -is - Create - returns CoupleOfShape from NMTTools; - - SetShape1(me:out; - aS: Shape from TopoDS); - - SetShape2(me:out; - aS: Shape from TopoDS); - - Shape1(me) - returns Shape from TopoDS; - ---C++: return const & - - Shape2(me) - returns Shape from TopoDS; - ---C++: return const & - -fields - myShape1:Shape from TopoDS is protected; - myShape2:Shape from TopoDS is protected; - -end CoupleOfShape; diff --git a/src/NMTTools/NMTTools_CoupleOfShape.cxx b/src/NMTTools/NMTTools_CoupleOfShape.cxx index 628929de2..80726d9bd 100644 --- a/src/NMTTools/NMTTools_CoupleOfShape.cxx +++ b/src/NMTTools/NMTTools_CoupleOfShape.cxx @@ -25,17 +25,17 @@ // Author: Peter KURNEV // // -#include +#include //======================================================================= // function: NMTTools_CoupleOfShape::NMTTools_CoupleOfShape -// purpose: +// purpose: //======================================================================= NMTTools_CoupleOfShape::NMTTools_CoupleOfShape() {} //======================================================================= // function: SetShape1 -// purpose: +// purpose: //======================================================================= void NMTTools_CoupleOfShape::SetShape1(const TopoDS_Shape& aS) { @@ -43,7 +43,7 @@ } //======================================================================= // function: SetShape2 -// purpose: +// purpose: //======================================================================= void NMTTools_CoupleOfShape::SetShape2(const TopoDS_Shape& aS) { @@ -51,7 +51,7 @@ } //======================================================================= // function: Shape1 -// purpose: +// purpose: //======================================================================= const TopoDS_Shape& NMTTools_CoupleOfShape::Shape1()const { @@ -59,7 +59,7 @@ } //======================================================================= // function: Shape2 -// purpose: +// purpose: //======================================================================= const TopoDS_Shape& NMTTools_CoupleOfShape::Shape2()const { diff --git a/src/NMTTools/NMTTools_CoupleOfShape.hxx b/src/NMTTools/NMTTools_CoupleOfShape.hxx index b45a83834..fef9a00fe 100644 --- a/src/NMTTools/NMTTools_CoupleOfShape.hxx +++ b/src/NMTTools/NMTTools_CoupleOfShape.hxx @@ -20,91 +20,42 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_CoupleOfShape.hxx +// Created: Wed Jan 28 15:06:11 2004 +// Author: Peter KURNEV +// +// #ifndef _NMTTools_CoupleOfShape_HeaderFile #define _NMTTools_CoupleOfShape_HeaderFile -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -class TopoDS_Shape; - - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - - -class NMTTools_CoupleOfShape { - -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 - // - - -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; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -TopoDS_Shape myShape1; -TopoDS_Shape myShape2; - +#include -private: +//======================================================================= +//class : NMTTools_CoupleOfShape +//purpose : +//======================================================================= +class NMTTools_CoupleOfShape +{ + public: + Standard_EXPORT + NMTTools_CoupleOfShape(); - // Methods PRIVATE - // + Standard_EXPORT + void SetShape1(const TopoDS_Shape& aS) ; + Standard_EXPORT + void SetShape2(const TopoDS_Shape& aS) ; - // Fields PRIVATE - // + Standard_EXPORT + const TopoDS_Shape& Shape1() const; + Standard_EXPORT + const TopoDS_Shape& Shape2() const; + protected: + TopoDS_Shape myShape1; + TopoDS_Shape myShape2; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTTools/NMTTools_CoupleOfShape.ixx b/src/NMTTools/NMTTools_CoupleOfShape.ixx deleted file mode 100644 index ea67f9ffe..000000000 --- a/src/NMTTools/NMTTools_CoupleOfShape.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTTools/NMTTools_CoupleOfShape.jxx b/src/NMTTools/NMTTools_CoupleOfShape.jxx deleted file mode 100644 index 8d29c575d..000000000 --- a/src/NMTTools/NMTTools_CoupleOfShape.jxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _NMTTools_CoupleOfShape_HeaderFile -#include -#endif diff --git a/src/NMTTools/NMTTools_DEProcessor.cdl b/src/NMTTools/NMTTools_DEProcessor.cdl deleted file mode 100644 index 9167eca63..000000000 --- a/src/NMTTools/NMTTools_DEProcessor.cdl +++ /dev/null @@ -1,125 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTTools_DEProcessor.cdl --- Created: Wed Sep 12 12:08:37 2001 --- Author: Peter KURNEV --- --- -class DEProcessor from NMTTools - - ---Purpose: - -- - -- 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 - --- - -uses - - Vertex from TopoDS, - Edge from TopoDS, - Face from TopoDS, - - PPaveFiller from NMTTools, - PaveFiller from NMTTools, - --PDSFiller from NMTTools, - ListOfPaveBlock from BOPTools, - PShapesDataStructure from NMTDS, - IndexedDataMapOfIntegerDEInfo from BOPTools - - -is - --Create (aFiller:out PDSFiller from NMTTools) - -- returns DEProcessor from NMTTools; - ---Purpose: - --- Constructor - --- - Create (aFiller:out PaveFiller from NMTTools) - returns DEProcessor from NMTTools; - ---Purpose: - --- Constructor - --- - Do(me:out); - ---Purpose: - --- Launches the processor - --- - IsDone(me) - returns Boolean from Standard; - ---Purpose: - --- Returns TRUE if it is Ok - --- - --- - --- Private block - --- - --- - FindDegeneratedEdges (me:out) - is protected; - - DoPaves (me:out) - is protected; - - FindPaveBlocks (me:out; - nED:Integer from Standard; - nVD:Integer from Standard; - nFD:Integer from Standard; - aLPB:out ListOfPaveBlock from BOPTools) - is protected; - - FillPaveSet (me:out; - nED:Integer from Standard; - nVD:Integer from Standard; - nFD:Integer from Standard; - aLPB: ListOfPaveBlock from BOPTools) - is protected; - - FillSplitEdgesPool(me:out; - nED:Integer from Standard) - is protected; - - MakeSplitEdges(me:out; - nED:Integer from Standard; - nFD:Integer from Standard) - is protected; - - MakeSplitEdge (me:out; - aS1: Edge from TopoDS; - aF : Face from TopoDS; - aV1: Vertex from TopoDS; - aP1: Real from Standard; - aV2: Vertex from TopoDS; - aP2: Real from Standard; - aNewEdge:out Edge from TopoDS) - is protected; - -fields - - --myDSFiller: PDSFiller from NMTTools is protected; - myFiller : PPaveFiller from NMTTools is protected; - myDS : PShapesDataStructure from NMTDS is protected; - myIsDone : Boolean from Standard is protected; - myDEMap : IndexedDataMapOfIntegerDEInfo from BOPTools is protected; - -end DEProcessor; diff --git a/src/NMTTools/NMTTools_DEProcessor.cxx b/src/NMTTools/NMTTools_DEProcessor.cxx index 419acdc15..7a1501a38 100644 --- a/src/NMTTools/NMTTools_DEProcessor.cxx +++ b/src/NMTTools/NMTTools_DEProcessor.cxx @@ -25,7 +25,7 @@ // Author: Peter KURNEV // // -#include +#include #include @@ -91,8 +91,8 @@ #include //======================================================================= -// function: -// purpose: +// function: +// purpose: //======================================================================= NMTTools_DEProcessor::NMTTools_DEProcessor(NMTTools_PaveFiller& aPaveFiller) : @@ -103,7 +103,7 @@ } //======================================================================= // function: IsDone -// purpose: +// purpose: //======================================================================= Standard_Boolean NMTTools_DEProcessor::IsDone() const { @@ -111,7 +111,7 @@ } //======================================================================= // function: Do -// purpose: +// purpose: //======================================================================= void NMTTools_DEProcessor::Do() { @@ -131,7 +131,7 @@ } //======================================================================= // function: FindDegeneratedEdges -// purpose: +// purpose: //======================================================================= void NMTTools_DEProcessor::FindDegeneratedEdges() { @@ -151,7 +151,7 @@ const TopoDS_Shape aS=myDS->Shape(i); if (aS.ShapeType()==TopAbs_EDGE) { const TopoDS_Edge& aE=TopoDS::Edge(aS); - + if (BRep_Tool::Degenerated(aE)) { iRankE=myDS->Rank(i); aV=TopExp::FirstVertex(aE); @@ -182,7 +182,7 @@ } //======================================================================= // function: DoPaves -// purpose: +// purpose: //======================================================================= void NMTTools_DEProcessor::DoPaves() { @@ -202,7 +202,7 @@ TColStd_ListIteratorOfListOfInteger anIt(nLF); for (; anIt.More(); anIt.Next()) { nFD=anIt.Value(); - + BOPTools_ListOfPaveBlock aLPB; FindPaveBlocks(nED, nVD, nFD, aLPB); // @@ -213,7 +213,7 @@ // FillPaveSet (nED, nVD, nFD, aLPB); } - // + // // Fill aSplitEdges for the edge nED FillSplitEdgesPool(nED); // @@ -224,7 +224,7 @@ } //======================================================================= // function: FindPaveBlocks -// purpose: +// purpose: //======================================================================= void NMTTools_DEProcessor::FindPaveBlocks(const Standard_Integer , const Standard_Integer nVD, @@ -245,7 +245,7 @@ continue; } // - // Split Parts + // Split Parts const BOPTools_ListOfPaveBlock& aLPBSplits=aFF.PaveBlocks(); anIt.Initialize(aLPBSplits); for (; anIt.More(); anIt.Next()) { @@ -267,7 +267,7 @@ } // // Section Parts - Standard_Integer j, aNbCurves; + Standard_Integer j, aNbCurves; // BOPTools_SequenceOfCurves& aSC=aFF.Curves(); aNbCurves=aSC.Length(); @@ -298,7 +298,7 @@ } //======================================================================= // function: FillPaveSet -// purpose: +// purpose: //======================================================================= void NMTTools_DEProcessor::FillPaveSet (const Standard_Integer nED, const Standard_Integer nVD, @@ -313,7 +313,7 @@ // aDT=Precision::PConfusion(); // - BOPTools_PaveSet& aPaveSet= + BOPTools_PaveSet& aPaveSet= (myFiller->ChangePavePool()).ChangeValue(myDS->RefEdge(nED)); // // Clear aPaveSet, aSplitEdges @@ -341,13 +341,13 @@ BOPTools_Pave aPave2 (nVD, aTD2, BooleanOperations_UnknownInterference); aPaveSet.Append(aPave2); // - // Fill other paves + // Fill other paves BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB); for (; anIt.More(); anIt.Next()) { const BOPTools_PaveBlock& aPB=anIt.Value(); nE=aPB.Edge(); const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE)); - + Handle(Geom2d_Curve) aC2D=BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2); // // Intersection @@ -367,7 +367,7 @@ bIsDone=aGInter.IsDone(); if(bIsDone) { aNbPoints=aGInter.NbPoints(); - if (aNbPoints) { + if (aNbPoints) { for (j=1; j<=aNbPoints; ++j) { aP2D=aGInter.Point(j).Value(); Handle(Geom2d_Line) aCLDE; @@ -384,7 +384,7 @@ } //aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1); //modified by NIZNHY-PKV Thu Mar 20 17:37:37 2008t - + if (aCLDE.IsNull()) { continue; } @@ -393,10 +393,10 @@ aX=ElCLib::Parameter(aLDE, aP2D); // if (fabs (aX-aTD1) < aDT || fabs (aX-aTD2) < aDT) { - continue; + continue; } if (aX < aTD1 || aX > aTD2) { - continue; + continue; } // bRejectFlag=Standard_False; @@ -411,7 +411,7 @@ } } if (bRejectFlag) { - continue; + continue; } // BOPTools_Pave aPave(nVD, aX, BooleanOperations_UnknownInterference); @@ -423,7 +423,7 @@ } //======================================================================= // function: FillSplitEdgesPool -// purpose: +// purpose: //======================================================================= void NMTTools_DEProcessor::FillSplitEdgesPool (const Standard_Integer nED) { @@ -437,7 +437,7 @@ const BOPTools_PavePool& aPavePool=myFiller->PavePool(); BOPTools_PavePool* pPavePool=(BOPTools_PavePool*) &aPavePool; BOPTools_PaveSet& aPaveSet= pPavePool->ChangeValue(myDS->RefEdge(nED)); - + BOPTools_PaveBlockIterator aPBIt(nED, aPaveSet); for (; aPBIt.More(); aPBIt.Next()) { BOPTools_PaveBlock& aPB=aPBIt.Value(); @@ -446,7 +446,7 @@ } //======================================================================= // function: MakeSplitEdges -// purpose: +// purpose: //======================================================================= void NMTTools_DEProcessor::MakeSplitEdges (const Standard_Integer nED, const Standard_Integer nFD) @@ -504,30 +504,30 @@ aPBIt.Initialize(aSplitEdges); for (; aPBIt.More(); aPBIt.Next()) { BOPTools_PaveBlock& aPB=aPBIt.Value(); - + const BOPTools_Pave& aPave1=aPB.Pave1(); nV1=aPave1.Index(); t1=aPave1.Param(); aV1=TopoDS::Vertex(myDS->GetShape(nV1)); aV1.Orientation(TopAbs_FORWARD); - + const BOPTools_Pave& aPave2=aPB.Pave2(); nV2=aPave2.Index(); t2=aPave2.Param(); aV2=TopoDS::Vertex(myDS->GetShape(nV2)); aV2.Orientation(TopAbs_REVERSED); - - MakeSplitEdge(aDE, aDF, aV1, t1, aV2, t2, aESplit); + + MakeSplitEdge(aDE, aDF, aV1, t1, aV2, t2, aESplit); // // Add Split Part of the Original Edge to the DS BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - + anASSeq.SetNewSuccessor(nV1); anASSeq.SetNewOrientation(aV1.Orientation()); - + anASSeq.SetNewSuccessor(nV2); anASSeq.SetNewOrientation(aV2.Orientation()); - + myDS->InsertShapeAndAncestorsSuccessors(aESplit, anASSeq); aNewShapeIndex=myDS->NumberOfInsertedShapes(); myDS->SetState(aNewShapeIndex, BooleanOperations_UNKNOWN); @@ -539,7 +539,7 @@ } //======================================================================= // function: MakeSplitEdge -// purpose: +// purpose: //======================================================================= void NMTTools_DEProcessor::MakeSplitEdge (const TopoDS_Edge& aE, const TopoDS_Face& aF, diff --git a/src/NMTTools/NMTTools_DEProcessor.hxx b/src/NMTTools/NMTTools_DEProcessor.hxx index 92acad02a..e2ee6e089 100644 --- a/src/NMTTools/NMTTools_DEProcessor.hxx +++ b/src/NMTTools/NMTTools_DEProcessor.hxx @@ -20,40 +20,23 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_DEProcessor.hxx +// Created: Wed Sep 12 12:10:52 2001 +// Author: Peter KURNEV +// + #ifndef _NMTTools_DEProcessor_HeaderFile #define _NMTTools_DEProcessor_HeaderFile -#ifndef _NMTTools_PPaveFiller_HeaderFile +#include +#include #include -#endif -#ifndef _NMTDS_PShapesDataStructure_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _BOPTools_IndexedDataMapOfIntegerDEInfo_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile +#include #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif -class NMTTools_PaveFiller; -class BOPTools_ListOfPaveBlock; -class TopoDS_Edge; -class TopoDS_Face; -class TopoDS_Vertex; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif //!
@@ -64,97 +47,71 @@ class TopoDS_Vertex; //! 2. Split parts
//! 3. States (3D) for split parts
//!
+//======================================================================= +//class : NMTTools_DEProcessor +//purpose : +//======================================================================= class NMTTools_DEProcessor { - 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 - // //! Constructor
//!
//! Constructor
//!
-Standard_EXPORT NMTTools_DEProcessor(NMTTools_PaveFiller& aFiller); - + Standard_EXPORT + NMTTools_DEProcessor(NMTTools_PaveFiller& aFiller); //! Launches the processor
-Standard_EXPORT void Do() ; - + Standard_EXPORT + void Do() ; //! Returns TRUE if it is Ok
-Standard_EXPORT Standard_Boolean IsDone() const; - - + Standard_EXPORT + Standard_Boolean IsDone() const; 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) ; - - - // Fields PROTECTED - // -NMTTools_PPaveFiller myFiller; -NMTDS_PShapesDataStructure myDS; -Standard_Boolean myIsDone; -BOPTools_IndexedDataMapOfIntegerDEInfo myDEMap; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + 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) ; + + + NMTTools_PPaveFiller myFiller; + NMTDS_PShapesDataStructure myDS; + Standard_Boolean myIsDone; + BOPTools_IndexedDataMapOfIntegerDEInfo myDEMap; }; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTTools/NMTTools_DEProcessor.ixx b/src/NMTTools/NMTTools_DEProcessor.ixx deleted file mode 100644 index 037ed882e..000000000 --- a/src/NMTTools/NMTTools_DEProcessor.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTTools/NMTTools_DEProcessor.jxx b/src/NMTTools/NMTTools_DEProcessor.jxx deleted file mode 100644 index 234508d56..000000000 --- a/src/NMTTools/NMTTools_DEProcessor.jxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_PaveFiller_HeaderFile -#include -#endif -#ifndef _BOPTools_ListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _TopoDS_Edge_HeaderFile -#include -#endif -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _TopoDS_Vertex_HeaderFile -#include -#endif -#ifndef _NMTTools_DEProcessor_HeaderFile -#include -#endif diff --git a/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx b/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx index 7906e745f..1117b0d7d 100644 --- a/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx +++ b/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,100 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx +// Created: Mon Feb 20 12:24:47 2012 +// Author: +// -#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile -#define _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class NMTTools_FaceInfo; -class TColStd_MapIntegerHasher; -class NMTTools_DataMapOfIntegerFaceInfo; -class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo; +#ifndef NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile +#define NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include +#ifndef NMTTools_DataMapOfIntegerFaceInfo_HeaderFile +#include #endif - -class NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo : public TCollection_BasicMapIterator { - -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 - // - - -Standard_EXPORT NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo(); - - -Standard_EXPORT NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo(const NMTTools_DataMapOfIntegerFaceInfo& aMap); - - -Standard_EXPORT void Initialize(const NMTTools_DataMapOfIntegerFaceInfo& aMap) ; - - -Standard_EXPORT const Standard_Integer& Key() const; - - -Standard_EXPORT const NMTTools_FaceInfo& Value() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_0.cxx b/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_0.cxx deleted file mode 100644 index 1545f9537..000000000 --- a/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_0.cxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTTools_FaceInfo_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile -#include -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem NMTTools_FaceInfo -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_() -#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo -#define TCollection_DataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx b/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx index 5f0f0f1ef..415d7db84 100644 --- a/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx +++ b/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,100 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx +// Created: Mon Feb 20 12:04:52 2012 +// Author: +// -#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#define _NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class BOPTools_ListOfPaveBlock; -class TColStd_MapIntegerHasher; -class NMTTools_DataMapOfIntegerListOfPaveBlock; -class NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock; +#ifndef NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile +#define NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include +#ifndef NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile +#include #endif - -class NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock : public TCollection_BasicMapIterator { - -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 - // - - -Standard_EXPORT NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock(); - - -Standard_EXPORT NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock(const NMTTools_DataMapOfIntegerListOfPaveBlock& aMap); - - -Standard_EXPORT void Initialize(const NMTTools_DataMapOfIntegerListOfPaveBlock& aMap) ; - - -Standard_EXPORT const Standard_Integer& Key() const; - - -Standard_EXPORT const BOPTools_ListOfPaveBlock& Value() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx b/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx deleted file mode 100644 index bb8c4fcf7..000000000 --- a/src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_0.cxx +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _BOPTools_ListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#include -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem BOPTools_ListOfPaveBlock -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_Type_() -#define TCollection_DataMap NMTTools_DataMapOfIntegerListOfPaveBlock -#define TCollection_DataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx deleted file mode 100644 index 81562e69a..000000000 --- a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo.hxx +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile -#define _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile -#include -#endif - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _NMTTools_FaceInfo_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class NMTTools_FaceInfo; -class TColStd_MapIntegerHasher; -class NMTTools_DataMapOfIntegerFaceInfo; -class NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo; - - - -class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo(const Standard_Integer& K,const NMTTools_FaceInfo& I,const TCollection_MapNodePtr& n); - - Standard_Integer& Key() const; - - NMTTools_FaceInfo& Value() const; -//Standard_EXPORT ~NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Integer myKey; -NMTTools_FaceInfo myValue; - - -}; - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem NMTTools_FaceInfo -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_() -#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_0.cxx b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_0.cxx deleted file mode 100644 index f4b3e9c0d..000000000 --- a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_0.cxx +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _NMTTools_FaceInfo_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile -#include -#endif -//NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::~NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo", - sizeof(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo))) { - _anOtherObject = Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)((Handle(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::DynamicType() const -{ - return STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) ; -} -//Standard_Boolean NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo::~Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo() {} -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem NMTTools_FaceInfo -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_() -#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo -#define TCollection_DataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx deleted file mode 100644 index 397cbc06b..000000000 --- a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#define _NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#include -#endif - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _BOPTools_ListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class BOPTools_ListOfPaveBlock; -class TColStd_MapIntegerHasher; -class NMTTools_DataMapOfIntegerListOfPaveBlock; -class NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock; - - - -class NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock(const Standard_Integer& K,const BOPTools_ListOfPaveBlock& I,const TCollection_MapNodePtr& n); - - Standard_Integer& Key() const; - - BOPTools_ListOfPaveBlock& Value() const; -//Standard_EXPORT ~NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Integer myKey; -BOPTools_ListOfPaveBlock myValue; - - -}; - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem BOPTools_ListOfPaveBlock -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_Type_() -#define TCollection_DataMap NMTTools_DataMapOfIntegerListOfPaveBlock -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx deleted file mode 100644 index 6b9df9564..000000000 --- a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _BOPTools_ListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#include -#endif -//NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock::~NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock", - sizeof(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock))) { - _anOtherObject = Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)((Handle(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock::DynamicType() const -{ - return STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) ; -} -//Standard_Boolean NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock::~Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock() {} -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem BOPTools_ListOfPaveBlock -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_Type_() -#define TCollection_DataMap NMTTools_DataMapOfIntegerListOfPaveBlock -#define TCollection_DataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo.hxx b/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo.hxx index b61ad8d89..7d97931fb 100644 --- a/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo.hxx +++ b/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,140 +16,25 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_DataMapOfIntegerFaceInfo.hxx +// Created: Mon Feb 20 12:21:55 2012 +// Author: +// -#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile -#define _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_NoSuchObject; -class NMTTools_FaceInfo; -class TColStd_MapIntegerHasher; -class NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo; -class NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class NMTTools_DataMapOfIntegerFaceInfo : public TCollection_BasicMap { - -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 - // - - -Standard_EXPORT NMTTools_DataMapOfIntegerFaceInfo(const Standard_Integer NbBuckets = 1); - - -Standard_EXPORT NMTTools_DataMapOfIntegerFaceInfo& Assign(const NMTTools_DataMapOfIntegerFaceInfo& Other) ; - NMTTools_DataMapOfIntegerFaceInfo& operator =(const NMTTools_DataMapOfIntegerFaceInfo& Other) -{ - return Assign(Other); -} - - - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - -Standard_EXPORT void Clear() ; -~NMTTools_DataMapOfIntegerFaceInfo() -{ - Clear(); -} - - - -Standard_EXPORT Standard_Boolean Bind(const Standard_Integer& K,const NMTTools_FaceInfo& I) ; +#ifndef NMTTools_DataMapOfIntegerFaceInfo_HeaderFile +#define NMTTools_DataMapOfIntegerFaceInfo_HeaderFile -Standard_EXPORT Standard_Boolean IsBound(const Standard_Integer& K) const; +#include +#include +#define _NCollection_MapHasher +#include -Standard_EXPORT Standard_Boolean UnBind(const Standard_Integer& K) ; +typedef NCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo; +typedef NMTTools_DataMapOfIntegerFaceInfo::Iterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo; - -Standard_EXPORT const NMTTools_FaceInfo& Find(const Standard_Integer& K) const; - const NMTTools_FaceInfo& operator()(const Standard_Integer& K) const -{ - return Find(K); -} - - - -Standard_EXPORT NMTTools_FaceInfo& ChangeFind(const Standard_Integer& K) ; - NMTTools_FaceInfo& operator()(const Standard_Integer& K) -{ - return ChangeFind(K); -} - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address Find1 (const Standard_Integer& K) const; - Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Integer& K); -#endif - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTTools_DataMapOfIntegerFaceInfo(const NMTTools_DataMapOfIntegerFaceInfo& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// +#undef _NCollection_MapHasher #endif diff --git a/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo_0.cxx b/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo_0.cxx deleted file mode 100644 index b777f78e2..000000000 --- a/src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo_0.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTTools_FaceInfo_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile -#include -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem NMTTools_FaceInfo -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo -#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerFaceInfo_Type_() -#define TCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo -#define TCollection_DataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_DataMapOfIntegerListOfPaveBlock.hxx b/src/NMTTools/NMTTools_DataMapOfIntegerListOfPaveBlock.hxx index d9a89e0ae..805c92eca 100644 --- a/src/NMTTools/NMTTools_DataMapOfIntegerListOfPaveBlock.hxx +++ b/src/NMTTools/NMTTools_DataMapOfIntegerListOfPaveBlock.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,130 +16,26 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_DataMapOfIntegerListOfPaveBlock.hxx +// Created: Mon Feb 20 09:27:40 2012 +// Author: +// -#ifndef _NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile -#define _NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_NoSuchObject; -class BOPTools_ListOfPaveBlock; -class TColStd_MapIntegerHasher; -class NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock; -class NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class NMTTools_DataMapOfIntegerListOfPaveBlock : public TCollection_BasicMap { - -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 - // - - -Standard_EXPORT NMTTools_DataMapOfIntegerListOfPaveBlock(const Standard_Integer NbBuckets = 1); - - -Standard_EXPORT NMTTools_DataMapOfIntegerListOfPaveBlock& Assign(const NMTTools_DataMapOfIntegerListOfPaveBlock& Other) ; - NMTTools_DataMapOfIntegerListOfPaveBlock& operator =(const NMTTools_DataMapOfIntegerListOfPaveBlock& Other) -{ - return Assign(Other); -} - - - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - -Standard_EXPORT void Clear() ; -~NMTTools_DataMapOfIntegerListOfPaveBlock() -{ - Clear(); -} +#ifndef NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile +#define NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile -Standard_EXPORT Standard_Boolean Bind(const Standard_Integer& K,const BOPTools_ListOfPaveBlock& I) ; +#include +#include +#define _NCollection_MapHasher +#include -Standard_EXPORT Standard_Boolean IsBound(const Standard_Integer& K) const; +typedef NCollection_DataMap NMTTools_DataMapOfIntegerListOfPaveBlock; +typedef NMTTools_DataMapOfIntegerListOfPaveBlock::Iterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock; - -Standard_EXPORT Standard_Boolean UnBind(const Standard_Integer& K) ; - - -Standard_EXPORT const BOPTools_ListOfPaveBlock& Find(const Standard_Integer& K) const; - const BOPTools_ListOfPaveBlock& operator()(const Standard_Integer& K) const -{ - return Find(K); -} - - - -Standard_EXPORT BOPTools_ListOfPaveBlock& ChangeFind(const Standard_Integer& K) ; - BOPTools_ListOfPaveBlock& operator()(const Standard_Integer& K) -{ - return ChangeFind(K); -} - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address Find1 (const Standard_Integer& K) const; - Standard_EXPORT Standard_Address ChangeFind1 (const Standard_Integer& K); -#endif - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTTools_DataMapOfIntegerListOfPaveBlock(const NMTTools_DataMapOfIntegerListOfPaveBlock& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// +#undef _NCollection_MapHasher #endif diff --git a/src/NMTTools/NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx b/src/NMTTools/NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx deleted file mode 100644 index 444e0adf5..000000000 --- a/src/NMTTools/NMTTools_DataMapOfIntegerListOfPaveBlock_0.cxx +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _BOPTools_ListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#include -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem BOPTools_ListOfPaveBlock -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock -#define TCollection_DataMapNode_Type_() NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_Type_() -#define TCollection_DataMap NMTTools_DataMapOfIntegerListOfPaveBlock -#define TCollection_DataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_FaceInfo.cdl b/src/NMTTools/NMTTools_FaceInfo.cdl deleted file mode 100644 index 63612bca4..000000000 --- a/src/NMTTools/NMTTools_FaceInfo.cdl +++ /dev/null @@ -1,161 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTTools_FaceInfo.cdl --- Created: Tue Dec 9 12:11:48 2003 --- Author: Peter KURNEV --- --- -class FaceInfo from NMTTools - - ---Purpose: - -uses - MapOfInteger from TColStd, - MapOfPaveBlock from NMTTools ---raises - -is - - Create - returns FaceInfo from NMTTools; - ---C++: inline - ---C++: alias "virtual ~NMTTools_FaceInfo();" - ---Purpose: - --- Empty contructor - --- - - Clear(me:out); - ---Purpose: - --- Clears the contents - - SetIndex(me:out; - theI: Integer from Standard); - ---C++: inline - ---Purpose: - --- Modifier - --- Sets the index of the face - - Index(me) - returns Integer from Standard; - ---C++: inline - ---Purpose: - --- Selector - --- Returns the index of the face - -- - -- In - -- - PaveBlocksIn(me) - returns MapOfPaveBlock from NMTTools; - ---C++: return const & - ---C++: inline - ---Purpose: - --- Selector - --- Returns the pave blocks of the face - --- that have state In - - ChangePaveBlocksIn(me:out) - returns MapOfPaveBlock from NMTTools; - ---C++: return & - ---C++: inline - ---Purpose: - --- Selector/Modifier - --- Returns the pave blocks - -- of the face - --- that have state In - - VerticesIn(me) - returns MapOfInteger from TColStd; - ---C++: return const & - ---C++: inline - ---Purpose: - --- Selector - --- Returns the list of indices for vertices - -- of the face - --- that have state In - - ChangeVerticesIn(me:out) - returns MapOfInteger from TColStd; - ---C++: return & - ---C++: inline - ---Purpose: - --- Selector/Modifier - --- Returns the list of indices for vertices - -- of the face - --- that have state In - -- - -- On - -- - PaveBlocksOn(me) - returns MapOfPaveBlock from NMTTools; - ---C++: return const & - ---C++: inline - ---Purpose: - --- Selector - --- Returns the pave blocks of the face - --- that have state On - - ChangePaveBlocksOn(me:out) - returns MapOfPaveBlock from NMTTools; - ---C++: return & - ---C++: inline - ---Purpose: - --- Selector/Modifier - --- Returns the pave blocks - -- of the face - --- that have state On - VerticesOn(me) - returns MapOfInteger from TColStd; - ---C++: return const & - ---C++: inline - ---Purpose: - --- Selector - --- Returns the list of indices for vertices - -- of the face - --- that have state On - - ChangeVerticesOn(me:out) - returns MapOfInteger from TColStd; - ---C++: return & - ---C++: inline - ---Purpose: - --- Selector/Modifier - --- Returns the list of indices for vertices - -- of the face - --- that have state On - -fields - myIndex : Integer from Standard is protected; - myPaveBlocksIn: MapOfPaveBlock from NMTTools is protected; - myVerticesIn : MapOfInteger from TColStd is protected; - myPaveBlocksOn: MapOfPaveBlock from NMTTools is protected; - myVerticesOn : MapOfInteger from TColStd is protected; - -end FaceInfo; - - - - - - - - diff --git a/src/NMTTools/NMTTools_FaceInfo.cxx b/src/NMTTools/NMTTools_FaceInfo.cxx index 7e50b903d..26bbcdcd9 100644 --- a/src/NMTTools/NMTTools_FaceInfo.cxx +++ b/src/NMTTools/NMTTools_FaceInfo.cxx @@ -25,4 +25,4 @@ // Author: Peter KURNEV // // -#include +#include diff --git a/src/NMTTools/NMTTools_FaceInfo.hxx b/src/NMTTools/NMTTools_FaceInfo.hxx index e60ee29eb..6a37fb79c 100644 --- a/src/NMTTools/NMTTools_FaceInfo.hxx +++ b/src/NMTTools/NMTTools_FaceInfo.hxx @@ -20,156 +20,105 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_FaceInfo.hxx +// Created: Tue Dec 9 12:23:29 2003 +// Author: Peter KURNEV +// +// #ifndef _NMTTools_FaceInfo_HeaderFile #define _NMTTools_FaceInfo_HeaderFile -#ifndef _Standard_Integer_HeaderFile +#include +#include #include -#endif -#ifndef _NMTTools_MapOfPaveBlock_HeaderFile #include -#endif -#ifndef _TColStd_MapOfInteger_HeaderFile #include -#endif -class NMTTools_MapOfPaveBlock; -class TColStd_MapOfInteger; +#include +#include +//======================================================================= +//class : NMTTools_FaceInfo +//purpose : +//======================================================================= +class NMTTools_FaceInfo { + public: -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif + //! Empty contructor
+ //!
+ NMTTools_FaceInfo(); + virtual ~NMTTools_FaceInfo(); -class NMTTools_FaceInfo { + //! Clears the contents
+ Standard_EXPORT void Clear() ; -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 - // - -//! Empty contructor
-//!
-NMTTools_FaceInfo(); -virtual ~NMTTools_FaceInfo(); - - -//! Clears the contents
-Standard_EXPORT void Clear() ; - -//! Modifier
-//! Sets the index of the face
+ //! Modifier
+ //! Sets the index of the face
void SetIndex(const Standard_Integer theI) ; -//! Selector
-//! Returns the index of the face
-//!
-//! In
-//!
+ //! Selector
+ //! Returns the index of the face
+ //!
+ //! In
+ //!
Standard_Integer Index() const; -//! Selector
-//! Returns the pave blocks of the face
-//! that have state In
- const NMTTools_MapOfPaveBlock& PaveBlocksIn() const; + //! Selector
+ //! Returns the pave blocks of the face
+ //! that have state In
+ const NMTTools_MapOfPaveBlock& PaveBlocksIn() const; //! Selector/Modifier
-//! Returns the pave blocks
-//! of the face
-//! that have state In
+ //! Returns the pave blocks
+ //! of the face
+ //! that have state In
NMTTools_MapOfPaveBlock& ChangePaveBlocksIn() ; -//! Selector
-//! Returns the list of indices for vertices
-//! of the face
-//! that have state In
- const TColStd_MapOfInteger& VerticesIn() const; - -//! Selector/Modifier
-//! Returns the list of indices for vertices
-//! of the face
-//! that have state In
-//!
-//! On
-//!
+ //! Selector
+ //! Returns the list of indices for vertices
+ //! of the face
+ //! that have state In
+ const TColStd_MapOfInteger& VerticesIn() const; + + //! Selector/Modifier
+ //! Returns the list of indices for vertices
+ //! of the face
+ //! that have state In
+ //!
+ //! On
+ //!
TColStd_MapOfInteger& ChangeVerticesIn() ; -//! Selector
-//! Returns the pave blocks of the face
-//! that have state On
- const NMTTools_MapOfPaveBlock& PaveBlocksOn() const; + //! Selector
+ //! Returns the pave blocks of the face
+ //! that have state On
+ const NMTTools_MapOfPaveBlock& PaveBlocksOn() const; -//! Selector/Modifier
-//! Returns the pave blocks
-//! of the face
-//! that have state On
+ //! Selector/Modifier
+ //! Returns the pave blocks
+ //! of the face
+ //! that have state On
NMTTools_MapOfPaveBlock& ChangePaveBlocksOn() ; -//! Selector
-//! Returns the list of indices for vertices
-//! of the face
-//! that have state On
- const TColStd_MapOfInteger& VerticesOn() const; + //! Selector
+ //! Returns the list of indices for vertices
+ //! of the face
+ //! that have state On
+ const TColStd_MapOfInteger& VerticesOn() const; -//! Selector/Modifier
-//! Returns the list of indices for vertices
-//! of the face
-//! that have state On
+ //! Selector/Modifier
+ //! Returns the list of indices for vertices
+ //! of the face
+ //! that have state On
TColStd_MapOfInteger& ChangeVerticesOn() ; - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // -Standard_Integer myIndex; -NMTTools_MapOfPaveBlock myPaveBlocksIn; -TColStd_MapOfInteger myVerticesIn; -NMTTools_MapOfPaveBlock myPaveBlocksOn; -TColStd_MapOfInteger myVerticesOn; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - + protected: + Standard_Integer myIndex; + NMTTools_MapOfPaveBlock myPaveBlocksIn; + TColStd_MapOfInteger myVerticesIn; + NMTTools_MapOfPaveBlock myPaveBlocksOn; + TColStd_MapOfInteger myVerticesOn; }; - #include - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTTools/NMTTools_FaceInfo.ixx b/src/NMTTools/NMTTools_FaceInfo.ixx deleted file mode 100644 index d50d43652..000000000 --- a/src/NMTTools/NMTTools_FaceInfo.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTTools/NMTTools_FaceInfo.jxx b/src/NMTTools/NMTTools_FaceInfo.jxx deleted file mode 100644 index 14170b963..000000000 --- a/src/NMTTools/NMTTools_FaceInfo.jxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_MapOfPaveBlock_HeaderFile -#include -#endif -#ifndef _TColStd_MapOfInteger_HeaderFile -#include -#endif -#ifndef _NMTTools_FaceInfo_HeaderFile -#include -#endif diff --git a/src/NMTTools/NMTTools_FaceInfo.lxx b/src/NMTTools/NMTTools_FaceInfo.lxx index b18fb55e7..7a14228cc 100644 --- a/src/NMTTools/NMTTools_FaceInfo.lxx +++ b/src/NMTTools/NMTTools_FaceInfo.lxx @@ -26,8 +26,8 @@ // //======================================================================= -//function : -//purpose : +//function : +//purpose : //======================================================================= inline NMTTools_FaceInfo::NMTTools_FaceInfo() : @@ -36,7 +36,7 @@ inline NMTTools_FaceInfo::NMTTools_FaceInfo() } //======================================================================= //function : ~ -//purpose : +//purpose : //======================================================================= inline NMTTools_FaceInfo::~NMTTools_FaceInfo() { @@ -44,7 +44,7 @@ inline NMTTools_FaceInfo::~NMTTools_FaceInfo() } //======================================================================= //function : Clear -//purpose : +//purpose : //======================================================================= inline void NMTTools_FaceInfo::Clear() { @@ -56,7 +56,7 @@ inline void NMTTools_FaceInfo::Clear() } //======================================================================= //function : SetIndex -//purpose : +//purpose : //======================================================================= inline void NMTTools_FaceInfo::SetIndex(const Standard_Integer theI) { @@ -64,7 +64,7 @@ inline void NMTTools_FaceInfo::Clear() } //======================================================================= //function : Index -//purpose : +//purpose : //======================================================================= inline Standard_Integer NMTTools_FaceInfo::Index()const { @@ -72,7 +72,7 @@ inline void NMTTools_FaceInfo::Clear() } //======================================================================= //function : PaveBlockIn -//purpose : +//purpose : //======================================================================= inline const NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::PaveBlocksIn()const { @@ -80,7 +80,7 @@ inline void NMTTools_FaceInfo::Clear() } //======================================================================= //function : ChangePaveBlocksIn -//purpose : +//purpose : //======================================================================= inline NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::ChangePaveBlocksIn() { @@ -88,7 +88,7 @@ inline void NMTTools_FaceInfo::Clear() } //======================================================================= //function : VerticesIn -//purpose : +//purpose : //======================================================================= inline const TColStd_MapOfInteger& NMTTools_FaceInfo::VerticesIn()const { @@ -96,7 +96,7 @@ inline void NMTTools_FaceInfo::Clear() } //======================================================================= //function : ChangeVerticesIn -//purpose : +//purpose : //======================================================================= inline TColStd_MapOfInteger& NMTTools_FaceInfo::ChangeVerticesIn() { @@ -104,7 +104,7 @@ inline void NMTTools_FaceInfo::Clear() } //======================================================================= //function : PaveBlockOn -//purpose : +//purpose : //======================================================================= inline const NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::PaveBlocksOn()const { @@ -112,7 +112,7 @@ inline void NMTTools_FaceInfo::Clear() } //======================================================================= //function : ChangePaveBlocksOn -//purpose : +//purpose : //======================================================================= inline NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::ChangePaveBlocksOn() { @@ -120,7 +120,7 @@ inline void NMTTools_FaceInfo::Clear() } //======================================================================= //function : VerticesOn -//purpose : +//purpose : //======================================================================= inline const TColStd_MapOfInteger& NMTTools_FaceInfo::VerticesOn()const { @@ -128,7 +128,7 @@ inline void NMTTools_FaceInfo::Clear() } //======================================================================= //function : ChangeVerticesOn -//purpose : +//purpose : //======================================================================= inline TColStd_MapOfInteger& NMTTools_FaceInfo::ChangeVerticesOn() { diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx deleted file mode 100644 index 44cd38099..000000000 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile -#define _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile -#include -#endif - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class TColStd_IndexedMapOfInteger; -class TColStd_MapIntegerHasher; -class NMTTools_IndexedDataMapOfIndexedMapOfInteger; - - - -class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger : public TCollection_MapNode { - -public: - // 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(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Integer myKey1; -Standard_Integer myKey2; -TColStd_IndexedMapOfInteger myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TColStd_IndexedMapOfInteger -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger -#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_() -#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfIndexedMapOfInteger -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx deleted file mode 100644 index e827567d7..000000000 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile -#include -#endif -//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger", - sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger))) { - _anOtherObject = Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)((Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::DynamicType() const -{ - 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() {} -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TColStd_IndexedMapOfInteger -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger -#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_() -#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfIndexedMapOfInteger -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx deleted file mode 100644 index aa403ccd4..000000000 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile -#define _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _TopTools_IndexedMapOfShape_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class TopoDS_Shape; -class TopTools_IndexedMapOfShape; -class TopTools_ShapeMapHasher; -class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape; - - - -class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape : public TCollection_MapNode { - -public: - // 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(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -TopoDS_Shape myKey1; -Standard_Integer myKey2; -TopTools_IndexedMapOfShape myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopTools_IndexedMapOfShape -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape -#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_() -#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapeIndexedMapOfShape -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx deleted file mode 100644 index 52059dbf0..000000000 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_IndexedMapOfShape_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile -#include -#endif -//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape", - sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape))) { - _anOtherObject = Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)((Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::DynamicType() const -{ - 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() {} -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopTools_IndexedMapOfShape -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape -#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_() -#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapeIndexedMapOfShape -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx deleted file mode 100644 index 73b41e7a4..000000000 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile -#define _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _BOPTools_PaveBlock_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -class TopoDS_Shape; -class BOPTools_PaveBlock; -class TopTools_ShapeMapHasher; -class NMTTools_IndexedDataMapOfShapePaveBlock; - - - -class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock : public TCollection_MapNode { - -public: - // 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(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -TopoDS_Shape myKey1; -Standard_Integer myKey2; -BOPTools_PaveBlock myValue; -TCollection_MapNodePtr myNext2; - - -}; - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem BOPTools_PaveBlock -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock -#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_() -#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapePaveBlock -#define TCollection_IndexedDataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_hxx -#undef Handle_TCollection_IndexedDataMapNode -#undef TCollection_IndexedDataMapNode_Type_ -#undef TCollection_IndexedDataMap -#undef TCollection_IndexedDataMap_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx deleted file mode 100644 index d3aa8e898..000000000 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _BOPTools_PaveBlock_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile -#include -#endif -//NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock", - sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock))) { - _anOtherObject = Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)((Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::DynamicType() const -{ - 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() {} -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem BOPTools_PaveBlock -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock -#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_() -#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapePaveBlock -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx b/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx index 98ebbf2bd..479a13158 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,156 +16,27 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx +// Created: Mon Feb 20 09:20:07 2012 +// Author: +// -#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile -#define _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TColStd_IndexedMapOfInteger; -class TColStd_MapIntegerHasher; -class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class NMTTools_IndexedDataMapOfIndexedMapOfInteger : public TCollection_BasicMap { - -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 - // - - -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() ; +#ifndef NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile +#define NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile -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) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const Standard_Integer& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const Standard_Integer& K); -#endif - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other); - - - // Fields PRIVATE - // - - -}; +#include +#include +#include +#define _NCollection_MapHasher +#include +typedef NCollection_IndexedDataMap NMTTools_IndexedDataMapOfIndexedMapOfInteger; +#undef _NCollection_MapHasher -// other Inline functions and methods (like "C++: function call" methods) -// #endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx deleted file mode 100644 index c4a6b83b4..000000000 --- a/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile -#include -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem TColStd_IndexedMapOfInteger -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger -#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_() -#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfIndexedMapOfInteger -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx index 37423cac8..6dbe387cb 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,157 +16,32 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx +// Created: Mon Feb 20 09:20:07 2012 +// Author: +// +// File: NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx +// Created: Mon Feb 20 11:59:23 2012 +// Author: +// -#ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile -#define _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Shape; -class TopTools_IndexedMapOfShape; -class TopTools_ShapeMapHasher; -class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape : public TCollection_BasicMap { - -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 - // - - -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() ; +#ifndef NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile +#define NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile -Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; +#include +#include +#include -Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; +#define _NCollection_MapHasher +#include -Standard_EXPORT const TopTools_IndexedMapOfShape& FindFromIndex(const Standard_Integer I) const; - const TopTools_IndexedMapOfShape& operator ()(const Standard_Integer I) const -{ - return FindFromIndex(I); -} +typedef NCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapeIndexedMapOfShape; +#undef _NCollection_MapHasher -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) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K); #endif -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx deleted file mode 100644 index 84a9d226d..000000000 --- a/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TopTools_IndexedMapOfShape_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem TopTools_IndexedMapOfShape -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape -#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_() -#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapeIndexedMapOfShape -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx index 5c8f35534..db2546036 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,157 +16,25 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // - -#ifndef _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile -#define _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif - -class Standard_DomainError; -class Standard_OutOfRange; -class Standard_NoSuchObject; -class TopoDS_Shape; -class BOPTools_PaveBlock; -class TopTools_ShapeMapHasher; -class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class NMTTools_IndexedDataMapOfShapePaveBlock : public TCollection_BasicMap { - -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 - // - - -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() ; +// File: NMTTools_IndexedDataMapOfShapePaveBlock.hxx +// Created: Mon Feb 20 11:55:34 2012 +// Author: +// -Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; +#ifndef NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile +#define NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile +#include +#include +#include -Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; +#define _NCollection_MapHasher +#include +typedef NCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapePaveBlock; -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) ; - -#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version - Standard_EXPORT Standard_Address FindFromKey1 (const TopoDS_Shape& K) const; - Standard_EXPORT Standard_Address ChangeFromKey1 (const TopoDS_Shape& K); -#endif - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock(const NMTTools_IndexedDataMapOfShapePaveBlock& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// +#undef _NCollection_MapHasher #endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx deleted file mode 100644 index dc3a8b6b9..000000000 --- a/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_OutOfRange_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _BOPTools_PaveBlock_HeaderFile -#include -#endif -#ifndef _TopTools_ShapeMapHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile -#include -#endif - - -#define TheKey TopoDS_Shape -#define TheKey_hxx -#define TheItem BOPTools_PaveBlock -#define TheItem_hxx -#define Hasher TopTools_ShapeMapHasher -#define Hasher_hxx -#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock -#define TCollection_IndexedDataMapNode_hxx -#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock -#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_() -#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapePaveBlock -#define TCollection_IndexedDataMap_hxx -#include - diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx index c27d83824..160530caf 100644 --- a/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx +++ b/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,126 +16,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_ListIteratorOfListOfCommonBlock.hxx +// Created: Mon Feb 20 11:25:23 2012 +// Author: +// -#ifndef _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile -#define _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class NMTTools_ListOfCommonBlock; -class NMTTools_CommonBlock; -class NMTTools_ListNodeOfListOfCommonBlock; - +#ifndef NMTDS_ListIteratorOfListOfCommonBlock_HeaderFile +#define NMTDS_ListIteratorOfListOfCommonBlock_HeaderFile -#ifndef _Standard_HeaderFile -#include +#ifndef NMTTools_ListOfCommonBlock_HeaderFile +#include #endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTTools_ListIteratorOfListOfCommonBlock { - -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 - // - - -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; - - -friend class NMTTools_ListOfCommonBlock; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Address current; -Standard_Address previous; - - -}; - -#define Item NMTTools_CommonBlock -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() -#define TCollection_List NMTTools_ListOfCommonBlock -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx deleted file mode 100644 index 9b50b5a3f..000000000 --- a/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoMoreObject_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTTools_ListOfCommonBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_CommonBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile -#include -#endif - - -#define Item NMTTools_CommonBlock -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() -#define TCollection_List NMTTools_ListOfCommonBlock -#define TCollection_List_hxx -#include - diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx index 67d3d4666..0a1b3ca3d 100644 --- a/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx +++ b/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,126 +16,16 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTDS_ListIteratorOfListOfCoupleOfShape.hxx +// Created: Mon Feb 20 11:25:23 2012 +// Author: +// -#ifndef _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile -#define _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class NMTTools_ListOfCoupleOfShape; -class NMTTools_CoupleOfShape; -class NMTTools_ListNodeOfListOfCoupleOfShape; - +#ifndef NMTDS_ListIteratorOfListOfCoupleOfShape_HeaderFile +#define NMTDS_ListIteratorOfListOfCoupleOfShape_HeaderFile -#ifndef _Standard_HeaderFile -#include +#ifndef NMTTools_ListOfCoupleOfShape_HeaderFile +#include #endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTTools_ListIteratorOfListOfCoupleOfShape { - -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 - // - - -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; - - -friend class NMTTools_ListOfCoupleOfShape; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Address current; -Standard_Address previous; - - -}; - -#define Item NMTTools_CoupleOfShape -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() -#define TCollection_List NMTTools_ListOfCoupleOfShape -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - #endif diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx deleted file mode 100644 index 78ab070b8..000000000 --- a/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoMoreObject_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile -#include -#endif -#ifndef _NMTTools_CoupleOfShape_HeaderFile -#include -#endif -#ifndef _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile -#include -#endif - - -#define Item NMTTools_CoupleOfShape -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() -#define TCollection_List NMTTools_ListOfCoupleOfShape -#define TCollection_List_hxx -#include - diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx deleted file mode 100644 index 89487d9ae..000000000 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile -#define _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile -#include -#endif - -#ifndef _NMTTools_CommonBlock_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class NMTTools_CommonBlock; -class NMTTools_ListOfCommonBlock; -class NMTTools_ListIteratorOfListOfCommonBlock; - - - -class NMTTools_ListNodeOfListOfCommonBlock : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTTools_ListNodeOfListOfCommonBlock(const NMTTools_CommonBlock& I,const TCollection_MapNodePtr& n); - - NMTTools_CommonBlock& Value() const; -//Standard_EXPORT ~NMTTools_ListNodeOfListOfCommonBlock(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -NMTTools_CommonBlock myValue; - - -}; - -#define Item NMTTools_CommonBlock -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() -#define TCollection_List NMTTools_ListOfCommonBlock -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx deleted file mode 100644 index 318fc7999..000000000 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _NMTTools_CommonBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_ListOfCommonBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile -#include -#endif -//NMTTools_ListNodeOfListOfCommonBlock::~NMTTools_ListNodeOfListOfCommonBlock() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTTools_ListNodeOfListOfCommonBlock_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTTools_ListNodeOfListOfCommonBlock", - sizeof(NMTTools_ListNodeOfListOfCommonBlock), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTTools_ListNodeOfListOfCommonBlock) Handle(NMTTools_ListNodeOfListOfCommonBlock)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTTools_ListNodeOfListOfCommonBlock) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock))) { - _anOtherObject = Handle(NMTTools_ListNodeOfListOfCommonBlock)((Handle(NMTTools_ListNodeOfListOfCommonBlock)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTTools_ListNodeOfListOfCommonBlock::DynamicType() const -{ - 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() {} -#define Item NMTTools_CommonBlock -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() -#define TCollection_List NMTTools_ListOfCommonBlock -#define TCollection_List_hxx -#include - diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx deleted file mode 100644 index 95f11486e..000000000 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile -#define _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile -#include -#endif - -#ifndef _NMTTools_CoupleOfShape_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class NMTTools_CoupleOfShape; -class NMTTools_ListOfCoupleOfShape; -class NMTTools_ListIteratorOfListOfCoupleOfShape; - - - -class NMTTools_ListNodeOfListOfCoupleOfShape : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTTools_ListNodeOfListOfCoupleOfShape(const NMTTools_CoupleOfShape& I,const TCollection_MapNodePtr& n); - - NMTTools_CoupleOfShape& Value() const; -//Standard_EXPORT ~NMTTools_ListNodeOfListOfCoupleOfShape(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -NMTTools_CoupleOfShape myValue; - - -}; - -#define Item NMTTools_CoupleOfShape -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() -#define TCollection_List NMTTools_ListOfCoupleOfShape -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx deleted file mode 100644 index 686eb60ed..000000000 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _NMTTools_CoupleOfShape_HeaderFile -#include -#endif -#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile -#include -#endif -#ifndef _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile -#include -#endif -//NMTTools_ListNodeOfListOfCoupleOfShape::~NMTTools_ListNodeOfListOfCoupleOfShape() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTTools_ListNodeOfListOfCoupleOfShape_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTTools_ListNodeOfListOfCoupleOfShape", - sizeof(NMTTools_ListNodeOfListOfCoupleOfShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTTools_ListNodeOfListOfCoupleOfShape) Handle(NMTTools_ListNodeOfListOfCoupleOfShape)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTTools_ListNodeOfListOfCoupleOfShape) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape))) { - _anOtherObject = Handle(NMTTools_ListNodeOfListOfCoupleOfShape)((Handle(NMTTools_ListNodeOfListOfCoupleOfShape)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTTools_ListNodeOfListOfCoupleOfShape::DynamicType() const -{ - 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() {} -#define Item NMTTools_CoupleOfShape -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() -#define TCollection_List NMTTools_ListOfCoupleOfShape -#define TCollection_List_hxx -#include - diff --git a/src/NMTTools/NMTTools_ListOfCommonBlock.hxx b/src/NMTTools/NMTTools_ListOfCommonBlock.hxx index 58ebd9ab8..ebca6d403 100644 --- a/src/NMTTools/NMTTools_ListOfCommonBlock.hxx +++ b/src/NMTTools/NMTTools_ListOfCommonBlock.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,180 +16,18 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_ListOfCommonBlock.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// -#ifndef _NMTTools_ListOfCommonBlock_HeaderFile -#define _NMTTools_ListOfCommonBlock_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class NMTTools_ListIteratorOfListOfCommonBlock; -class NMTTools_CommonBlock; -class NMTTools_ListNodeOfListOfCommonBlock; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTTools_ListOfCommonBlock { - -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 - // - - -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) ; - +#ifndef NMTTools_ListOfCommonBlock_HeaderFile +#define NMTTools_ListOfCommonBlock_HeaderFile -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) ; - - -friend class NMTTools_ListIteratorOfListOfCommonBlock; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTTools_ListOfCommonBlock(const NMTTools_ListOfCommonBlock& Other); - - - // Fields PRIVATE - // -Standard_Address myFirst; -Standard_Address myLast; - - -}; - -#define Item NMTTools_CommonBlock -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() -#define TCollection_List NMTTools_ListOfCommonBlock -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// +#include +#include +typedef NCollection_List NMTTools_ListOfCommonBlock; +typedef NMTTools_ListOfCommonBlock::Iterator NMTTools_ListIteratorOfListOfCommonBlock; #endif diff --git a/src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx b/src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx deleted file mode 100644 index 45f562925..000000000 --- a/src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_CommonBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile -#include -#endif - - -#define Item NMTTools_CommonBlock -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() -#define TCollection_List NMTTools_ListOfCommonBlock -#define TCollection_List_hxx -#include - diff --git a/src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx index a5c7ba46d..6660a46f2 100644 --- a/src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx +++ b/src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,180 +16,18 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_ListOfCoupleOfShape.hxx +// Created: Mon Feb 20 07:27:34 2012 +// Author: +// -#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile -#define _NMTTools_ListOfCoupleOfShape_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class NMTTools_ListIteratorOfListOfCoupleOfShape; -class NMTTools_CoupleOfShape; -class NMTTools_ListNodeOfListOfCoupleOfShape; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTTools_ListOfCoupleOfShape { - -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 - // - - -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) ; - +#ifndef NMTTools_ListOfCoupleOfShape_HeaderFile +#define NMTTools_ListOfCoupleOfShape_HeaderFile -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) ; - - -friend class NMTTools_ListIteratorOfListOfCoupleOfShape; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTTools_ListOfCoupleOfShape(const NMTTools_ListOfCoupleOfShape& Other); - - - // Fields PRIVATE - // -Standard_Address myFirst; -Standard_Address myLast; - - -}; - -#define Item NMTTools_CoupleOfShape -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() -#define TCollection_List NMTTools_ListOfCoupleOfShape -#define TCollection_List_hxx - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// +#include +#include +typedef NCollection_List NMTTools_ListOfCoupleOfShape; +typedef NMTTools_ListOfCoupleOfShape::Iterator NMTTools_ListIteratorOfListOfCoupleOfShape; #endif diff --git a/src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx b/src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx deleted file mode 100644 index a849327f6..000000000 --- a/src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile -#include -#endif -#ifndef _NMTTools_CoupleOfShape_HeaderFile -#include -#endif -#ifndef _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile -#include -#endif - - -#define Item NMTTools_CoupleOfShape -#define Item_hxx -#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_hxx -#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape -#define TCollection_ListIterator_hxx -#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape -#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() -#define TCollection_List NMTTools_ListOfCoupleOfShape -#define TCollection_List_hxx -#include - diff --git a/src/NMTTools/NMTTools_MapIteratorOfMapOfPaveBlock.hxx b/src/NMTTools/NMTTools_MapIteratorOfMapOfPaveBlock.hxx index ac5c8842a..bf94f3757 100644 --- a/src/NMTTools/NMTTools_MapIteratorOfMapOfPaveBlock.hxx +++ b/src/NMTTools/NMTTools_MapIteratorOfMapOfPaveBlock.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -19,94 +16,17 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_MapIteratorOfMapOfPaveBlock.hxx +// Created: Mon Feb 20 11:47:30 2012 +// Author: +// -#ifndef _NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile -#define _NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class BOPTools_PaveBlock; -class BOPTools_PaveBlockMapHasher; -class NMTTools_MapOfPaveBlock; -class NMTTools_StdMapNodeOfMapOfPaveBlock; +#ifndef NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile +#define NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include +#ifndef NMTTools_MapOfPaveBlock_HeaderFile +#include #endif - -class NMTTools_MapIteratorOfMapOfPaveBlock : public TCollection_BasicMapIterator { - -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 - // - - -Standard_EXPORT NMTTools_MapIteratorOfMapOfPaveBlock(); - - -Standard_EXPORT NMTTools_MapIteratorOfMapOfPaveBlock(const NMTTools_MapOfPaveBlock& aMap); - - -Standard_EXPORT void Initialize(const NMTTools_MapOfPaveBlock& aMap) ; - - -Standard_EXPORT const BOPTools_PaveBlock& Key() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - #endif diff --git a/src/NMTTools/NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx b/src/NMTTools/NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx deleted file mode 100644 index 6368221d1..000000000 --- a/src/NMTTools/NMTTools_MapIteratorOfMapOfPaveBlock_0.cxx +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _BOPTools_PaveBlock_HeaderFile -#include -#endif -#ifndef _BOPTools_PaveBlockMapHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_MapOfPaveBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile -#include -#endif - - -#define TheKey BOPTools_PaveBlock -#define TheKey_hxx -#define Hasher BOPTools_PaveBlockMapHasher -#define Hasher_hxx -#define TCollection_StdMapNode NMTTools_StdMapNodeOfMapOfPaveBlock -#define TCollection_StdMapNode_hxx -#define TCollection_MapIterator NMTTools_MapIteratorOfMapOfPaveBlock -#define TCollection_MapIterator_hxx -#define Handle_TCollection_StdMapNode Handle_NMTTools_StdMapNodeOfMapOfPaveBlock -#define TCollection_StdMapNode_Type_() NMTTools_StdMapNodeOfMapOfPaveBlock_Type_() -#define TCollection_Map NMTTools_MapOfPaveBlock -#define TCollection_Map_hxx -#include - diff --git a/src/NMTTools/NMTTools_MapOfPaveBlock.hxx b/src/NMTTools/NMTTools_MapOfPaveBlock.hxx index f67f29d00..9def69219 100644 --- a/src/NMTTools/NMTTools_MapOfPaveBlock.hxx +++ b/src/NMTTools/NMTTools_MapOfPaveBlock.hxx @@ -1,8 +1,5 @@ // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -20,121 +17,24 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifndef _NMTTools_MapOfPaveBlock_HeaderFile -#define _NMTTools_MapOfPaveBlock_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_DomainError; -class BOPTools_PaveBlock; -class BOPTools_PaveBlockMapHasher; -class NMTTools_StdMapNodeOfMapOfPaveBlock; -class NMTTools_MapIteratorOfMapOfPaveBlock; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - -class NMTTools_MapOfPaveBlock : public TCollection_BasicMap { - -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 - // - - -Standard_EXPORT NMTTools_MapOfPaveBlock(const Standard_Integer NbBuckets = 1); - - -Standard_EXPORT NMTTools_MapOfPaveBlock& Assign(const NMTTools_MapOfPaveBlock& Other) ; - NMTTools_MapOfPaveBlock& operator =(const NMTTools_MapOfPaveBlock& Other) -{ - return Assign(Other); -} - - - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; - - -Standard_EXPORT void Clear() ; -~NMTTools_MapOfPaveBlock() -{ - Clear(); -} - +// File: NMTTools_MapOfPaveBlock.hxx +// Created: Mon Feb 20 08:19:07 2012 +// Author: +// -Standard_EXPORT Standard_Boolean Add(const BOPTools_PaveBlock& aKey) ; +#ifndef NMTTools_MapOfPaveBlock_HeaderFile +#define NMTTools_MapOfPaveBlock_HeaderFile +#include +#include -Standard_EXPORT Standard_Boolean Contains(const BOPTools_PaveBlock& aKey) const; +#define _NCollection_MapHasher +#include +typedef NCollection_Map NMTTools_MapOfPaveBlock; +typedef NMTTools_MapOfPaveBlock::Iterator NMTTools_MapIteratorOfMapOfPaveBlock; -Standard_EXPORT Standard_Boolean Remove(const BOPTools_PaveBlock& aKey) ; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - -Standard_EXPORT NMTTools_MapOfPaveBlock(const NMTTools_MapOfPaveBlock& Other); - - - // Fields PRIVATE - // - - -}; - - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - +#undef _NCollection_MapHasher #endif diff --git a/src/NMTTools/NMTTools_MapOfPaveBlock_0.cxx b/src/NMTTools/NMTTools_MapOfPaveBlock_0.cxx deleted file mode 100644 index 4297faa45..000000000 --- a/src/NMTTools/NMTTools_MapOfPaveBlock_0.cxx +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _BOPTools_PaveBlock_HeaderFile -#include -#endif -#ifndef _BOPTools_PaveBlockMapHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile -#include -#endif - - -#define TheKey BOPTools_PaveBlock -#define TheKey_hxx -#define Hasher BOPTools_PaveBlockMapHasher -#define Hasher_hxx -#define TCollection_StdMapNode NMTTools_StdMapNodeOfMapOfPaveBlock -#define TCollection_StdMapNode_hxx -#define TCollection_MapIterator NMTTools_MapIteratorOfMapOfPaveBlock -#define TCollection_MapIterator_hxx -#define Handle_TCollection_StdMapNode Handle_NMTTools_StdMapNodeOfMapOfPaveBlock -#define TCollection_StdMapNode_Type_() NMTTools_StdMapNodeOfMapOfPaveBlock_Type_() -#define TCollection_Map NMTTools_MapOfPaveBlock -#define TCollection_Map_hxx -#include - diff --git a/src/NMTTools/NMTTools_PPaveFiller.hxx b/src/NMTTools/NMTTools_PPaveFiller.hxx index 36c83789f..516d71f52 100644 --- a/src/NMTTools/NMTTools_PPaveFiller.hxx +++ b/src/NMTTools/NMTTools_PPaveFiller.hxx @@ -20,6 +20,11 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_PPaveFiller.hxx +// Created: Tue Dec 9 12:23:29 2003 +// Author: Peter KURNEV +// +// #ifndef _NMTTools_PPaveFiller_HeaderFile #define _NMTTools_PPaveFiller_HeaderFile diff --git a/src/NMTTools/NMTTools_PaveFiller.cdl b/src/NMTTools/NMTTools_PaveFiller.cdl deleted file mode 100644 index a373a3e36..000000000 --- a/src/NMTTools/NMTTools_PaveFiller.cdl +++ /dev/null @@ -1,538 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- --- File: NMTTools_PaveFiller.cdl --- Created: --- Author: Peter KURNEV --- --- -class PaveFiller from NMTTools - - ---Purpose: - -uses - DataMapOfIntegerInteger from TColStd, - ListOfInteger from TColStd, - MapOfInteger from TColStd, - - Pnt from gp, - ShapeEnum from TopAbs, - Vertex from TopoDS, - Face from TopoDS, - Shape from TopoDS, - Edge from TopoDS, - ListOfShape from TopTools, - DataMapOfShapeShape from TopTools, - - Context from IntTools, - ShrunkRange from IntTools, - - IndexedDataMapOfShapeInteger from BooleanOperations, - - PavePool from BOPTools, - PaveBlock from BOPTools, - ListOfPaveBlock from BOPTools, - SplitShapesPool from BOPTools, - Pave from BOPTools, - PaveSet from BOPTools, - Curve from BOPTools, - SSInterference from BOPTools, - IDMapOfPaveBlockIMapOfPaveBlock from BOPTools, - IDMapOfPaveBlockIMapOfInteger from BOPTools, - SSIntersectionAttribute from BOPTools, - - ShapesDataStructure from NMTDS, - PShapesDataStructure from NMTDS, - Iterator from NMTDS, - PIterator from NMTDS, - PInterfPool from NMTDS, - - CommonBlockPool from NMTTools, - CommonBlock from NMTTools, - ListOfCommonBlock from NMTTools, - DataMapOfIntegerFaceInfo from NMTTools, - IndexedDataMapOfIndexedMapOfInteger from NMTTools - ---raises - -is - Create - returns PaveFiller from NMTTools; - ---C++: alias "Standard_EXPORT virtual ~NMTTools_PaveFiller();" - - - - SetCompositeShape (me:out; - aS: Shape from TopoDS); - - CompositeShape(me) - returns Shape from TopoDS; - ---C++: return const& - - - DS(me:out) - returns PShapesDataStructure from NMTDS; - - DSIt(me:out) - returns PIterator from NMTDS; - - IP(me:out) - returns PInterfPool from NMTDS; - -- - Init (me:out) - is virtual protected; - - Clear (me:out) - is virtual protected; - - Perform (me:out) - is virtual; - - PerformVV (me:out) - is virtual protected; - - PerformVE (me:out) - is virtual protected; - - PerformVF (me:out) - is virtual protected; - - PerformEE (me:out) - is virtual protected; - - PerformEF (me:out) - is virtual protected; - - PerformFF (me:out) - is virtual protected; - - MakeSplitEdges(me:out) - is protected; - - PreparePaveBlocks (me:out; - aType1: ShapeEnum from TopAbs; - aType2: ShapeEnum from TopAbs) - is virtual protected; - - CorrectShrunkRanges(me:out; - aSide: Integer from Standard; - aPave: Pave from BOPTools; - aSR : out ShrunkRange from IntTools) - is protected; - - PreparePaveBlocks (me:out; - anE:Integer from Standard) - is virtual protected; - - - PrepareEdges (me:out) - is virtual protected; - - -- - -- Query section - IsDone(me) - returns Boolean from Standard; - - Context(me) - returns Context from IntTools; - ---C++:return const & - - PavePool(me) - returns PavePool from BOPTools; - ---C++:return const & - - ChangePavePool(me:out) - returns PavePool from BOPTools; - ---C++:return & - - CommonBlockPool(me) - returns CommonBlockPool from NMTTools; - ---C++:return const & - - ChangeCommonBlockPool(me:out) - returns CommonBlockPool from NMTTools; - ---C++:return & - - SplitShapesPool(me) - returns SplitShapesPool from BOPTools; - ---C++:return const & - - ChangeSplitShapesPool(me:out) - returns SplitShapesPool from BOPTools; - ---C++:return & - - FindSDVertex (me; - nV: Integer from Standard) - returns Integer from Standard; - - IsSuccessorsComputed (me; - iF1:Integer from Standard; - iF2:Integer from Standard) - returns Boolean from Standard - is protected; - - IsBlocksCoinside (me; - aPB1:PaveBlock from BOPTools; - aPB2:PaveBlock from BOPTools) - returns Boolean from Standard - is protected; - - RefinePavePool(me:out) - is protected; - - CheckFacePaves(me:out; - aV : Vertex from TopoDS; - nF: Integer from Standard) - returns Integer from Standard - is protected; - - ReplaceCommonBlocks (me:out; - aLCB: ListOfCommonBlock from NMTTools) - is protected; - - RemoveCommonBlocks (me:out; - aLCB: ListOfCommonBlock from NMTTools) - is protected; - - SplitCommonBlocks (me:out; - aLCB: ListOfCommonBlock from NMTTools) - is protected; - - SplitCommonBlock (me:out; - aCB : CommonBlock from NMTTools; - aLCB: out ListOfCommonBlock from NMTTools) - is protected; - - EECommonBlocks(me:out; - aM:IDMapOfPaveBlockIMapOfPaveBlock from BOPTools) - is protected; - - EFCommonBlocks(me:out; - aMapCB:IDMapOfPaveBlockIMapOfInteger from BOPTools) - is protected; - - EENewVertices (me:out; - aM:IndexedDataMapOfShapeInteger from BooleanOperations) - is protected; - - EENewVertices (me:out; - aV:Vertex from TopoDS; - aM:IndexedDataMapOfShapeInteger from BooleanOperations) - is protected; - - EFNewVertices (me:out; - aM:IndexedDataMapOfShapeInteger from BooleanOperations) - is protected; - - EFNewVertices (me:out; - aV:Vertex from TopoDS; - aM:IndexedDataMapOfShapeInteger from BooleanOperations) - is protected; - - UpdateCommonBlocks(me:out) - is protected; - - --modified by NIZNHY-PKV Mon Dec 12 09:12:15 2011f - UpdateCommonBlocks(me:out; - aI:Integer from Standard) - is protected; - --modified by NIZNHY-PKV Mon Dec 12 09:12:21 2011t - - UpdatePaveBlocks(me:out) - is protected; - - SplitIndex(me; - aPB:PaveBlock from BOPTools) - returns Integer from Standard - is protected; - - MakeBlocks(me:out) - is protected; - - -------------------------------------------------------------- - --- - --- Some API FUNCTIONS - --- - SplitsInFace(me:out; - aBid:Integer from Standard; - nF1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfInteger from TColStd) - returns Integer from Standard; - - SplitsInFace(me:out; - nE1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfInteger from TColStd) - returns Integer from Standard; - - SplitsOnEdge(me:out; - nE1 :Integer from Standard; - nE2 :Integer from Standard; - aLs :out ListOfInteger from TColStd) - returns Integer from Standard; - - SplitsOnFace(me:out; - nE1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfInteger from TColStd) - returns Integer from Standard; - - SplitsOnFace(me:out; - aBid:Integer from Standard; - nF1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfInteger from TColStd) - returns Integer from Standard; - - SplitsInFace(me:out; - aBid:Integer from Standard; - nF1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools) - returns Integer from Standard; - - SplitsInFace(me:out; - nE1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools) - returns Integer from Standard; - - SplitsOnEdge(me:out; - nE1 :Integer from Standard; - nE2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools) - returns Integer from Standard; - - SplitsOnFace(me:out; - nE1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools) - returns Integer from Standard; - - SplitsOnFace(me:out; - aBid:Integer from Standard; - nF1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools) - returns Integer from Standard; - -- - SplitsFace (me:out; - nF2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools) - returns Integer from Standard; - - SplitsFace (me:out; - nF2 :Integer from Standard; - aLs :out ListOfInteger from TColStd) - returns Integer from Standard; - - CommonBlocksFace (me:out; - nF :Integer from Standard; - aLCB:out ListOfCommonBlock from NMTTools) - returns Integer from Standard; - - PrepareFace(me:out; - nF : Integer from Standard; - aF : out Face from TopoDS); - - -- - RealPaveBlock(me:out; - aPB:PaveBlock from BOPTools) - returns PaveBlock from BOPTools; - ---C++: return const & - - RealPaveBlock(me:out; - aPB:PaveBlock from BOPTools; - aLB:out ListOfInteger from TColStd; - aIsCommonBlock:out Integer from Standard) - returns PaveBlock from BOPTools; - ---C++: return const & - - RealSplitsFace (me:out; - nF2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools); - - HasRealSplitsInOnFace (me:out; - nF1 :Integer from Standard; - nF2 :Integer from Standard) - returns Boolean from Standard; - - RealSplitsInFace(me:out; - aBid:Integer from Standard; - nF1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools); - - RealSplitsInFace(me:out; - nE1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools); - - RealSplitsInFace(me:out; - nF1 :Integer from Standard; - aLPB :out ListOfPaveBlock from BOPTools); - - RealSplitsOnEdge(me:out; - nE1 :Integer from Standard; - nE2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools); - - RealSplitsOnFace(me:out; - nE1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools); - - RealSplitsOnFace(me:out; - aBid:Integer from Standard; - nF1 :Integer from Standard; - nF2 :Integer from Standard; - aLs :out ListOfPaveBlock from BOPTools); - - PrepareSetForFace(me:out; - nF1 :Integer from Standard; - nF2 :Integer from Standard; - aLPB: ListOfPaveBlock from BOPTools; - aPSF:out PaveSet from BOPTools); - - PutPaveOnCurve(me:out; - aPSF: PaveSet from BOPTools; - aTol: Real from Standard; - aBC : out Curve from BOPTools); - - - PutBoundPaveOnCurve (me:out; - aBC :out Curve from BOPTools; - aFF :out SSInterference from BOPTools); - - PutBoundPaveOnCurve (me:out; - aP : Pnt from gp; - aT : Real from Standard; - aBC :out Curve from BOPTools; - aFF :out SSInterference from BOPTools); - - FindPave (me:out; - aP : Pnt from gp; - aTpV: Real from Standard; - aPS : PaveSet from BOPTools; - aPV :out Pave from BOPTools) - returns Boolean from Standard; - - CheckIntermediatePoint(me:out; - aPB : PaveBlock from BOPTools; - aPBR: PaveBlock from BOPTools; - aTol: Real from Standard) - returns Integer from Standard; - - - IsExistingPaveBlock (me:out; - aPB : PaveBlock from BOPTools; - aLPB: ListOfPaveBlock from BOPTools; - aTol: Real from Standard) - returns Boolean from Standard; - - MakePCurves (me:out); - - PerformVF1(me:out) - is protected; - - MakeAloneVertices(me:out) - is protected; - - AloneVertices(me) - returns IndexedDataMapOfIndexedMapOfInteger from NMTTools; - ---C++: return const & - - 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; - - SharedEdges(me:out; - nF1 :Integer from Standard; - nF2 :Integer from Standard; - aLNE :out ListOfInteger from TColStd; - aLSE :out ListOfShape from TopTools); - - FuseVertices(me; - aC:Shape from TopoDS; - aDMVV: out DataMapOfShapeShape from TopTools); - -- - TreatPaveBlocks(me:out; - theLCB:out ListOfCommonBlock from NMTTools); - - ChangePavePoolNew(me:out) - returns PavePool from BOPTools; - ---C++:return & - - CheckCoincidence (me:out; - aPB1 : PaveBlock from BOPTools; - aPB2 : PaveBlock from BOPTools) - returns Boolean from Standard; - - FillFaceInfo (me:out) - is protected; - - CorrectTolR3D(me:out; - aFF : SSInterference from BOPTools; - aMVStick: MapOfInteger from TColStd; - aTolR3D: out Real from Standard) - is protected; - - PutClosingPaveOnCurve (me:out; - aBC :out Curve from BOPTools; - aFF :out SSInterference from BOPTools); - -fields - myDS : PShapesDataStructure from NMTDS is protected; - myIsDone : Boolean from Standard is protected; - myNbSources : Integer from Standard is protected; - myNbEdges : Integer from Standard is protected; - - 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; - myAloneVertices : IndexedDataMapOfIndexedMapOfInteger from NMTTools is protected; - -- - myVSD : DataMapOfIntegerInteger from TColStd is protected; - myDSIt : PIterator from NMTDS is protected; - myCompositeShape : Shape from TopoDS is protected; - myIP : PInterfPool from NMTDS is protected; - myFaceInfo : DataMapOfIntegerFaceInfo from NMTTools is protected; -end PaveFiller; diff --git a/src/NMTTools/NMTTools_PaveFiller.cxx b/src/NMTTools/NMTTools_PaveFiller.cxx index ad89441e4..b98bc4fa6 100644 --- a/src/NMTTools/NMTTools_PaveFiller.cxx +++ b/src/NMTTools/NMTTools_PaveFiller.cxx @@ -23,22 +23,20 @@ // File: NMTTools_PaveFiller.cxx // Created: Fri Dec 5 14:58:54 2003 // Author: Peter KURNEV - -#include - -#include - -#include - +// +// +#include +// +#include +#include #include +#include #include #include -#include - //======================================================================= // function: NMTTools_PaveFiller::NMTTools_PaveFiller -// purpose: +// purpose: //======================================================================= NMTTools_PaveFiller::NMTTools_PaveFiller() { @@ -51,7 +49,7 @@ } //======================================================================= // function: ~ -// purpose: +// purpose: //======================================================================= NMTTools_PaveFiller::~NMTTools_PaveFiller() { @@ -59,19 +57,19 @@ } //======================================================================= // function: Clear -// purpose: +// purpose: //======================================================================= void NMTTools_PaveFiller::Clear() { if (myDSIt) { delete myDSIt; - } + } if (myDS) { delete myDS; } myDSIt=NULL; myDS=NULL; - + if (myIP) { delete myIP; } @@ -79,7 +77,7 @@ } //======================================================================= // function: SetCompositeShape -// purpose: +// purpose: //======================================================================= void NMTTools_PaveFiller::SetCompositeShape(const TopoDS_Shape& aS) { @@ -87,7 +85,7 @@ } //======================================================================= // function: CompositeShape -// purpose: +// purpose: //======================================================================= const TopoDS_Shape& NMTTools_PaveFiller::CompositeShape()const { @@ -95,7 +93,7 @@ } //======================================================================= // function: DS -// purpose: +// purpose: //======================================================================= NMTDS_PShapesDataStructure NMTTools_PaveFiller::DS() { @@ -103,7 +101,7 @@ } //======================================================================= // function: DSIt -// purpose: +// purpose: //======================================================================= NMTDS_PIterator NMTTools_PaveFiller::DSIt() { @@ -111,7 +109,7 @@ } //======================================================================= // function: IP -// purpose: +// purpose: //======================================================================= NMTDS_PInterfPool NMTTools_PaveFiller::IP() { @@ -119,7 +117,7 @@ } //======================================================================= // function:IsDone -// purpose: +// purpose: //======================================================================= Standard_Boolean NMTTools_PaveFiller::IsDone() const { @@ -127,31 +125,15 @@ } //======================================================================= // function: Context -// purpose: +// purpose: //======================================================================= -#if OCC_VERSION_LARGE > 0x06050200 -const Handle(IntTools_Context)& NMTTools_PaveFiller::Context() const -#else -const IntTools_Context& NMTTools_PaveFiller::Context() const -#endif + const Handle(IntTools_Context)& NMTTools_PaveFiller::Context() const { return myContext; } - -#if OCC_VERSION_LARGE <= 0x06050200 -//======================================================================= -// function: ChangeContext -// purpose: -//======================================================================= -IntTools_Context& NMTTools_PaveFiller::ChangeContext() -{ - return myContext; -} -#endif - //======================================================================= // function: PavePool -// purpose: +// purpose: //======================================================================= const BOPTools_PavePool& NMTTools_PaveFiller::PavePool() const { @@ -159,7 +141,7 @@ IntTools_Context& NMTTools_PaveFiller::ChangeContext() } //======================================================================= // function: ChangePavePool -// purpose: +// purpose: //======================================================================= BOPTools_PavePool& NMTTools_PaveFiller::ChangePavePool() { @@ -167,7 +149,7 @@ IntTools_Context& NMTTools_PaveFiller::ChangeContext() } //======================================================================= // function: ChangePavePoolNew -// purpose: +// purpose: //======================================================================= BOPTools_PavePool& NMTTools_PaveFiller::ChangePavePoolNew() { @@ -175,7 +157,7 @@ IntTools_Context& NMTTools_PaveFiller::ChangeContext() } //======================================================================= // function: CommonBlockPool -// purpose: +// purpose: //======================================================================= const NMTTools_CommonBlockPool& NMTTools_PaveFiller::CommonBlockPool() const { @@ -183,7 +165,7 @@ IntTools_Context& NMTTools_PaveFiller::ChangeContext() } //======================================================================= // function: ChangeCommonBlockPool -// purpose: +// purpose: //======================================================================= NMTTools_CommonBlockPool& NMTTools_PaveFiller::ChangeCommonBlockPool() { @@ -191,7 +173,7 @@ IntTools_Context& NMTTools_PaveFiller::ChangeContext() } //======================================================================= // function: SplitShapesPool -// purpose: +// purpose: //======================================================================= const BOPTools_SplitShapesPool& NMTTools_PaveFiller::SplitShapesPool() const { @@ -199,7 +181,7 @@ IntTools_Context& NMTTools_PaveFiller::ChangeContext() } //======================================================================= // function: ChangeSplitShapesPool -// purpose: +// purpose: //======================================================================= BOPTools_SplitShapesPool& NMTTools_PaveFiller::ChangeSplitShapesPool() { @@ -207,7 +189,7 @@ IntTools_Context& NMTTools_PaveFiller::ChangeContext() } //======================================================================= // function: Init -// purpose: +// purpose: //======================================================================= void NMTTools_PaveFiller::Init() { @@ -232,18 +214,16 @@ IntTools_Context& NMTTools_PaveFiller::ChangeContext() myDS->NumberOfShapesOfTheTool(); myNbEdges=myDS->NbEdges(); // - // 4. + // 4 myIP=new NMTDS_InterfPool; -#if OCC_VERSION_LARGE > 0x06050200 // - // 5. + // 5 myContext=new IntTools_Context; -#endif } //======================================================================= // function: Perform -// purpose: +// purpose: //======================================================================= void NMTTools_PaveFiller::Perform() { @@ -259,7 +239,7 @@ IntTools_Context& NMTTools_PaveFiller::ChangeContext() // // 2.VE myPavePool.Resize (myNbEdges); - + PrepareEdges(); PerformVE(); @@ -293,7 +273,7 @@ IntTools_Context& NMTTools_PaveFiller::ChangeContext() RefinePavePool(); // myPavePoolNew.Destroy(); - + MakeSplitEdges(); UpdateCommonBlocks(); @@ -305,7 +285,7 @@ IntTools_Context& NMTTools_PaveFiller::ChangeContext() // MakePCurves(); // - // 7.Postprocessing + // 7.Postprocessing UpdatePaveBlocks(); // NMTTools_DEProcessor aDEP(*this); diff --git a/src/NMTTools/NMTTools_PaveFiller.hxx b/src/NMTTools/NMTTools_PaveFiller.hxx index 360191d0e..765e5aba3 100644 --- a/src/NMTTools/NMTTools_PaveFiller.hxx +++ b/src/NMTTools/NMTTools_PaveFiller.hxx @@ -20,71 +20,60 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_PaveFiller.hxx +// Created: Fri Dec 5 14:58:54 2003 +// Author: Peter KURNEV +// +// #ifndef _NMTTools_PaveFiller_HeaderFile #define _NMTTools_PaveFiller_HeaderFile -#include - -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - -#ifndef _NMTDS_PShapesDataStructure_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _Standard_Integer_HeaderFile #include -#endif -#ifndef _BOPTools_PavePool_HeaderFile #include -#endif -#ifndef _NMTTools_CommonBlockPool_HeaderFile #include -#endif -#ifndef _BOPTools_SplitShapesPool_HeaderFile #include -#endif - -#if OCC_VERSION_LARGE > 0x06050200 #include -#else -#include -#endif - -#ifndef _BOPTools_SSIntersectionAttribute_HeaderFile #include -#endif -#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile #include -#endif -#ifndef _TColStd_DataMapOfIntegerInteger_HeaderFile #include -#endif -#ifndef _NMTDS_PIterator_HeaderFile #include -#endif -#ifndef _TopoDS_Shape_HeaderFile #include -#endif -#ifndef _NMTDS_PInterfPool_HeaderFile #include -#endif -#ifndef _NMTTools_DataMapOfIntegerFaceInfo_HeaderFile #include -#endif -#ifndef _TopAbs_ShapeEnum_HeaderFile #include -#endif -#ifndef _Standard_Real_HeaderFile +#include #include -#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* class TopoDS_Shape; class BOPTools_Pave; class IntTools_ShrunkRange; @@ -94,7 +83,6 @@ class BOPTools_SplitShapesPool; class BOPTools_PaveBlock; class TopoDS_Vertex; class NMTTools_ListOfCommonBlock; -class NMTTools_CommonBlock; class BOPTools_IDMapOfPaveBlockIMapOfPaveBlock; class BOPTools_IDMapOfPaveBlockIMapOfInteger; class BooleanOperations_IndexedDataMapOfShapeInteger; @@ -109,248 +97,404 @@ class NMTTools_IndexedDataMapOfIndexedMapOfInteger; class TopTools_ListOfShape; class TopoDS_Edge; class TopTools_DataMapOfShapeShape; -class TColStd_MapOfInteger; +class TCoLSTD_MapOfInteger; +*/ +//======================================================================= +//function : NMTTools_PaveFiller +//purpose : +//======================================================================= class NMTTools_PaveFiller { -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); - } - - - Standard_EXPORT NMTTools_PaveFiller(); -Standard_EXPORT virtual ~NMTTools_PaveFiller(); - - Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ; - - Standard_EXPORT const TopoDS_Shape& CompositeShape() const; + public: + Standard_EXPORT + NMTTools_PaveFiller(); - Standard_EXPORT NMTDS_PShapesDataStructure DS() ; + Standard_EXPORT + virtual ~NMTTools_PaveFiller(); - Standard_EXPORT NMTDS_PIterator DSIt() ; + Standard_EXPORT + void SetCompositeShape(const TopoDS_Shape& aS) ; - Standard_EXPORT NMTDS_PInterfPool IP() ; + Standard_EXPORT + const TopoDS_Shape& CompositeShape() const; - Standard_EXPORT virtual void Perform() ; + Standard_EXPORT + NMTDS_PShapesDataStructure DS() ; - Standard_EXPORT Standard_Boolean IsDone() const; + Standard_EXPORT + NMTDS_PIterator DSIt() ; -#if OCC_VERSION_LARGE > 0x06050200 - Standard_EXPORT const Handle_IntTools_Context& Context() const; -#else - Standard_EXPORT const IntTools_Context& Context() const; - Standard_EXPORT IntTools_Context& ChangeContext() ; -#endif - - 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 + NMTDS_PInterfPool IP() ; - Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + Standard_EXPORT + virtual void Perform() ; - Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ; + Standard_EXPORT + Standard_Boolean IsDone() const; - Standard_EXPORT Standard_Integer CommonBlocksFace(const Standard_Integer nF,NMTTools_ListOfCommonBlock& aLCB) ; + Standard_EXPORT + const Handle_IntTools_Context& Context() const; - Standard_EXPORT void PrepareFace(const Standard_Integer nF,TopoDS_Face& aF) ; + Standard_EXPORT + const BOPTools_PavePool& PavePool() const; - Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB) ; + Standard_EXPORT + BOPTools_PavePool& ChangePavePool() ; - Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB,TColStd_ListOfInteger& aLB,Standard_Integer& aIsCommonBlock) ; + Standard_EXPORT + const NMTTools_CommonBlockPool& CommonBlockPool() const; - Standard_EXPORT void RealSplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + Standard_EXPORT + NMTTools_CommonBlockPool& ChangeCommonBlockPool() ; - Standard_EXPORT Standard_Boolean HasRealSplitsInOnFace(const Standard_Integer nF1,const Standard_Integer nF2) ; + Standard_EXPORT + const BOPTools_SplitShapesPool& SplitShapesPool() const; - Standard_EXPORT void RealSplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + Standard_EXPORT + BOPTools_SplitShapesPool& ChangeSplitShapesPool() ; - Standard_EXPORT void RealSplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + 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 void RealSplitsInFace(const Standard_Integer nF1,BOPTools_ListOfPaveBlock& aLPB) ; + Standard_EXPORT + Standard_Integer SplitsInFace(const Standard_Integer nE1, + const Standard_Integer nF2, + TColStd_ListOfInteger& aLs) ; - Standard_EXPORT void RealSplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& 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_Integer& aIsCommonBlock) ; + + 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 RealSplitsInFace(const Standard_Integer nF1, + BOPTools_ListOfPaveBlock& aLPB) ; + + 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 void RealSplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + Standard_EXPORT + Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB, + const BOPTools_ListOfPaveBlock& aLPB) ; - Standard_EXPORT void RealSplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; + Standard_EXPORT + Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB, + const TopoDS_Edge& aE, + const Standard_Real aTol) ; - Standard_EXPORT void PrepareSetForFace(const Standard_Integer nF1,const Standard_Integer nF2,const BOPTools_ListOfPaveBlock& aLPB,BOPTools_PaveSet& aPSF) ; + Standard_EXPORT + void SharedEdges(const Standard_Integer nF1, + const Standard_Integer nF2, + TColStd_ListOfInteger& aLNE, + TopTools_ListOfShape& aLSE) ; - Standard_EXPORT void PutPaveOnCurve(const BOPTools_PaveSet& aPSF,const Standard_Real aTol,BOPTools_Curve& aBC) ; + Standard_EXPORT + void FuseVertices(const TopoDS_Shape& aC, + TopTools_DataMapOfShapeShape& aDMVV) const; - Standard_EXPORT void PutBoundPaveOnCurve(BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ; + Standard_EXPORT + void TreatPaveBlocks(NMTTools_ListOfCommonBlock& theLCB) ; - Standard_EXPORT void PutBoundPaveOnCurve(const gp_Pnt& aP,const Standard_Real aT,BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ; + Standard_EXPORT + BOPTools_PavePool& ChangePavePoolNew() ; - Standard_EXPORT Standard_Boolean FindPave(const gp_Pnt& aP,const Standard_Real aTpV,const BOPTools_PaveSet& aPS,BOPTools_Pave& aPV) ; + Standard_EXPORT + Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB1, + const BOPTools_PaveBlock& aPB2) ; - Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const BOPTools_PaveBlock& aPBR,const Standard_Real aTol) ; + Standard_EXPORT + void PutClosingPaveOnCurve(BOPTools_Curve& aBC, + BOPTools_SSInterference& aFF) ; - Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB,const Standard_Real aTol) ; + protected: + Standard_EXPORT + virtual void Init() ; - Standard_EXPORT void MakePCurves() ; + Standard_EXPORT + virtual void Clear() ; - Standard_EXPORT const NMTTools_IndexedDataMapOfIndexedMapOfInteger& AloneVertices() const; + Standard_EXPORT + virtual void PerformVV() ; - Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const TopTools_ListOfShape& aLPB,const Standard_Real aTol) ; + Standard_EXPORT + virtual void PerformVE() ; - Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB,const BOPTools_ListOfPaveBlock& aLPB) ; + Standard_EXPORT + virtual void PerformVF() ; - Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const TopoDS_Edge& aE,const Standard_Real aTol) ; + Standard_EXPORT + virtual void PerformEE() ; - Standard_EXPORT void SharedEdges(const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLNE,TopTools_ListOfShape& aLSE) ; + Standard_EXPORT + virtual void PerformEF() ; - Standard_EXPORT void FuseVertices(const TopoDS_Shape& aC,TopTools_DataMapOfShapeShape& aDMVV) const; + Standard_EXPORT + virtual void PerformFF() ; - Standard_EXPORT void TreatPaveBlocks(NMTTools_ListOfCommonBlock& theLCB) ; + Standard_EXPORT + void MakeSplitEdges() ; - Standard_EXPORT BOPTools_PavePool& ChangePavePoolNew() ; + Standard_EXPORT + virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1, + const TopAbs_ShapeEnum aType2) ; - Standard_EXPORT Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) ; + Standard_EXPORT + void CorrectShrunkRanges(const Standard_Integer aSide, + const BOPTools_Pave& aPave, + IntTools_ShrunkRange& aSR) ; - Standard_EXPORT void PutClosingPaveOnCurve(BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ; + Standard_EXPORT + virtual void PreparePaveBlocks(const Standard_Integer anE) ; -protected: + Standard_EXPORT + virtual void PrepareEdges() ; - Standard_EXPORT virtual void Init() ; + Standard_EXPORT + Standard_Boolean IsSuccessorsComputed(const Standard_Integer iF1, + const Standard_Integer iF2) const; - Standard_EXPORT virtual void Clear() ; + Standard_EXPORT + Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1, + const BOPTools_PaveBlock& aPB2) const; - Standard_EXPORT virtual void PerformVV() ; + Standard_EXPORT + void RefinePavePool() ; - Standard_EXPORT virtual void PerformVE() ; + Standard_EXPORT + Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV, + const Standard_Integer nF) ; - Standard_EXPORT virtual void PerformVF() ; + Standard_EXPORT + void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; - Standard_EXPORT virtual void PerformEE() ; + Standard_EXPORT + void RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; - Standard_EXPORT virtual void PerformEF() ; + Standard_EXPORT + void SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; - Standard_EXPORT virtual void PerformFF() ; + Standard_EXPORT + void SplitCommonBlock(const NMTTools_CommonBlock& aCB,NMTTools_ListOfCommonBlock& aLCB) ; - Standard_EXPORT void MakeSplitEdges() ; + Standard_EXPORT + void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aM) ; - Standard_EXPORT virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ; + Standard_EXPORT + void EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) ; - Standard_EXPORT void CorrectShrunkRanges(const Standard_Integer aSide,const BOPTools_Pave& aPave,IntTools_ShrunkRange& aSR) ; + Standard_EXPORT + void EENewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; - Standard_EXPORT virtual void PreparePaveBlocks(const Standard_Integer anE) ; + Standard_EXPORT + void EENewVertices(const TopoDS_Vertex& aV, + const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; - Standard_EXPORT virtual void PrepareEdges() ; + Standard_EXPORT + void EFNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; - Standard_EXPORT Standard_Boolean IsSuccessorsComputed(const Standard_Integer iF1,const Standard_Integer iF2) const; + Standard_EXPORT + void EFNewVertices(const TopoDS_Vertex& aV, + const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; - Standard_EXPORT Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) const; + Standard_EXPORT + void UpdateCommonBlocks() ; - Standard_EXPORT void RefinePavePool() ; + Standard_EXPORT + void UpdateCommonBlocks(const Standard_Integer aI) ; - Standard_EXPORT Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV,const Standard_Integer nF) ; + Standard_EXPORT + void UpdatePaveBlocks() ; - Standard_EXPORT void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; + Standard_EXPORT + Standard_Integer SplitIndex(const BOPTools_PaveBlock& aPB) const; - Standard_EXPORT void RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; + Standard_EXPORT + void MakeBlocks() ; - Standard_EXPORT void SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; + Standard_EXPORT + void PerformVF1() ; - Standard_EXPORT void SplitCommonBlock(const NMTTools_CommonBlock& aCB,NMTTools_ListOfCommonBlock& aLCB) ; + Standard_EXPORT + void MakeAloneVertices() ; - Standard_EXPORT void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aM) ; + Standard_EXPORT + void FillFaceInfo() ; - Standard_EXPORT void EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) ; + Standard_EXPORT + void CorrectTolR3D(const BOPTools_SSInterference& aFF, + const TColStd_MapOfInteger& aMVStick, + Standard_Real& aTolR3D) ; - 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 UpdateCommonBlocks (const Standard_Integer aI); - - 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() ; - - Standard_EXPORT void FillFaceInfo() ; - - Standard_EXPORT void CorrectTolR3D(const BOPTools_SSInterference& aFF,const TColStd_MapOfInteger& aMVStick,Standard_Real& aTolR3D) ; - - -NMTDS_PShapesDataStructure myDS; -Standard_Boolean myIsDone; -Standard_Integer myNbSources; -Standard_Integer myNbEdges; -BOPTools_PavePool myPavePool; -BOPTools_PavePool myPavePoolNew; -NMTTools_CommonBlockPool myCommonBlockPool; -BOPTools_SplitShapesPool mySplitShapesPool; -#if OCC_VERSION_LARGE > 0x06050200 + NMTDS_PShapesDataStructure myDS; + Standard_Boolean myIsDone; + Standard_Integer myNbSources; + Standard_Integer myNbEdges; + BOPTools_PavePool myPavePool; + BOPTools_PavePool myPavePoolNew; + NMTTools_CommonBlockPool myCommonBlockPool; + BOPTools_SplitShapesPool mySplitShapesPool; Handle_IntTools_Context myContext; -#else - IntTools_Context myContext; -#endif -BOPTools_SSIntersectionAttribute mySectionAttribute; -NMTTools_IndexedDataMapOfIndexedMapOfInteger myAloneVertices; -TColStd_DataMapOfIntegerInteger myVSD; -NMTDS_PIterator myDSIt; -TopoDS_Shape myCompositeShape; -NMTDS_PInterfPool myIP; -NMTTools_DataMapOfIntegerFaceInfo myFaceInfo; - -private: + BOPTools_SSIntersectionAttribute mySectionAttribute; + NMTTools_IndexedDataMapOfIndexedMapOfInteger myAloneVertices; + TColStd_DataMapOfIntegerInteger myVSD; + NMTDS_PIterator myDSIt; + TopoDS_Shape myCompositeShape; + NMTDS_PInterfPool myIP; + NMTTools_DataMapOfIntegerFaceInfo myFaceInfo; -}; -// other Inline functions and methods (like "C++: function call" methods) + // private: +}; #endif diff --git a/src/NMTTools/NMTTools_PaveFiller.ixx b/src/NMTTools/NMTTools_PaveFiller.ixx deleted file mode 100644 index 0d15ab0ba..000000000 --- a/src/NMTTools/NMTTools_PaveFiller.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTTools/NMTTools_PaveFiller.jxx b/src/NMTTools/NMTTools_PaveFiller.jxx deleted file mode 100644 index 4aab014a5..000000000 --- a/src/NMTTools/NMTTools_PaveFiller.jxx +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _BOPTools_Pave_HeaderFile -#include -#endif -#ifndef _IntTools_ShrunkRange_HeaderFile -#include -#endif -#ifndef _IntTools_Context_HeaderFile -#include -#endif -#ifndef _BOPTools_PavePool_HeaderFile -#include -#endif -#ifndef _NMTTools_CommonBlockPool_HeaderFile -#include -#endif -#ifndef _BOPTools_SplitShapesPool_HeaderFile -#include -#endif -#ifndef _BOPTools_PaveBlock_HeaderFile -#include -#endif -#ifndef _TopoDS_Vertex_HeaderFile -#include -#endif -#ifndef _NMTTools_ListOfCommonBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_CommonBlock_HeaderFile -#include -#endif -#ifndef _BOPTools_IDMapOfPaveBlockIMapOfPaveBlock_HeaderFile -#include -#endif -#ifndef _BOPTools_IDMapOfPaveBlockIMapOfInteger_HeaderFile -#include -#endif -#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile -#include -#endif -#ifndef _TColStd_ListOfInteger_HeaderFile -#include -#endif -#ifndef _BOPTools_ListOfPaveBlock_HeaderFile -#include -#endif -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _BOPTools_PaveSet_HeaderFile -#include -#endif -#ifndef _BOPTools_Curve_HeaderFile -#include -#endif -#ifndef _BOPTools_SSInterference_HeaderFile -#include -#endif -#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 _TopTools_DataMapOfShapeShape_HeaderFile -#include -#endif -#ifndef _TColStd_MapOfInteger_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 b211a5fc1..832b0b0f0 100644 --- a/src/NMTTools/NMTTools_PaveFiller_0.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_0.cxx @@ -25,7 +25,7 @@ // Author: Peter KURNEV // // -#include +#include #include #include @@ -36,7 +36,7 @@ //======================================================================= // function:IsSuccesstorsComputed -// purpose: +// purpose: //======================================================================= Standard_Boolean NMTTools_PaveFiller::IsSuccessorsComputed(const Standard_Integer aN1, const Standard_Integer aN2)const @@ -59,7 +59,7 @@ aNbS=aMSuc.Extent(); for (i=1; i<=aNbS; ++i) { nSuc=aMSuc(i); - bComputed=myIP->Contains(n1, nSuc); + bComputed=myIP->Contains(n1, nSuc); if (bComputed) { break; } @@ -69,13 +69,13 @@ /* //======================================================================= // function: ExpectedPoolLength -// purpose: +// purpose: //======================================================================= Standard_Integer NMTTools_PaveFiller::ExpectedPoolLength()const { Standard_Integer aNbIIs; Standard_Real aCfPredict=.5; - // Modified Thu Sep 14 14:35:18 2006 + // Modified Thu Sep 14 14:35:18 2006 // Contribution of Samtech www.samcef.com BEGIN //const BOPTools_ListOfCoupleOfInteger& aLC=myDSIt.ListOfCouple(); //aNbIIs=aLC.Extent(); @@ -87,18 +87,18 @@ } // aNbIIs=(Standard_Integer) (aCfPredict*(Standard_Real)aNbIIs); - + return aNbIIs; } */ /* //======================================================================= //function : SortTypes -//purpose : +//purpose : //======================================================================= void NMTTools_PaveFiller::SortTypes(Standard_Integer& theWhat, - Standard_Integer& theWith)const -{ + Standard_Integer& theWith)const +{ Standard_Integer aWhat, aWith; Standard_Boolean aReverseFlag; TopAbs_ShapeEnum aType1, aType2; @@ -114,7 +114,7 @@ if (aType1==TopAbs_EDGE && aType2==TopAbs_FACE) { aReverseFlag=Standard_False; } - if (aType1==TopAbs_VERTEX && + if (aType1==TopAbs_VERTEX && (aType2==TopAbs_FACE || aType2==TopAbs_EDGE)) { aReverseFlag=Standard_False; } diff --git a/src/NMTTools/NMTTools_PaveFiller_1.cxx b/src/NMTTools/NMTTools_PaveFiller_1.cxx index ace624b09..0f566f218 100644 --- a/src/NMTTools/NMTTools_PaveFiller_1.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_1.cxx @@ -25,7 +25,7 @@ // Author: Peter KURNEV // // -#include +#include #include #include @@ -51,9 +51,9 @@ //======================================================================= // function: PerformVV -// purpose: +// purpose: //======================================================================= - void NMTTools_PaveFiller::PerformVV() + void NMTTools_PaveFiller::PerformVV() { myIsDone=Standard_False; // @@ -131,7 +131,7 @@ // BOPTools_VVInterference aVV(n1, n2); aVV.SetNewShape(nVnew); - aVVs.Append(aVV); + aVVs.Append(aVV); } } } @@ -140,7 +140,7 @@ } //======================================================================= // function: FindSDVertex -// purpose: +// purpose: //======================================================================= Standard_Integer NMTTools_PaveFiller::FindSDVertex(const Standard_Integer nV)const { @@ -155,9 +155,9 @@ /* //======================================================================= // function: PerformNewVertices -// purpose: +// purpose: //======================================================================= - void NMTTools_PaveFiller::PerformNewVertices() + void NMTTools_PaveFiller::PerformNewVertices() { } */ diff --git a/src/NMTTools/NMTTools_PaveFiller_2.cxx b/src/NMTTools/NMTTools_PaveFiller_2.cxx index 4451b9877..be0cbe728 100644 --- a/src/NMTTools/NMTTools_PaveFiller_2.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_2.cxx @@ -26,7 +26,7 @@ #include -#include +#include #include @@ -57,16 +57,16 @@ #include #include -// Modified Thu Sep 14 14:35:18 2006 -// Contribution of Samtech www.samcef.com BEGIN + #include #include #include +#include + static Standard_Boolean Contains(const TopoDS_Edge& aE, const TopoDS_Vertex& aV); -// Contribution of Samtech www.samcef.com END //======================================================================= // function: PerformVE @@ -155,14 +155,11 @@ void NMTTools_PaveFiller::PerformVE() } // //modified by NIZNHY-PKV Mon Dec 28 08:58:05 2009f -#if OCC_VERSION_LARGE > 0x06050200 - // In OCCT6.5.3 class IntTools_Context become a handle - aFlag = myContext->ComputeVE (aV1, aE2, aT, bToUpdateVertex, aDist); -#elif OCC_VERSION_LARGE > 0x06030008 +#if OCC_VERSION_LARGE > 0x06030008 // In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method - aFlag = myContext.ComputeVE (aV1, aE2, aT, bToUpdateVertex, aDist); + aFlag = myContext->ComputeVE (aV1, aE2, aT, bToUpdateVertex, aDist); #else - aFlag = myContext.ComputeVE (aV1, aE2, aT); + aFlag = myContext->ComputeVE (aV1, aE2, aT); #endif //modified by NIZNHY-PKV Mon Dec 28 08:58:13 2009t // diff --git a/src/NMTTools/NMTTools_PaveFiller_3.cxx b/src/NMTTools/NMTTools_PaveFiller_3.cxx index e9ea74fd9..e1061d1e3 100644 --- a/src/NMTTools/NMTTools_PaveFiller_3.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_3.cxx @@ -23,10 +23,9 @@ // File: NMTTools_PaveFiller_3.cxx // Created: Mon Dec 8 16:06:56 2003 // Author: Peter KURNEV - -#include - -#include +// +// +#include #include #include @@ -41,20 +40,18 @@ #include #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: +// purpose: //======================================================================= - void NMTTools_PaveFiller::PerformVF() + void NMTTools_PaveFiller::PerformVF() { myIsDone=Standard_False; // @@ -66,7 +63,7 @@ static // BOPTools_CArray1OfVSInterference& aVSs=myIP->VSInterferences(); // - // V/E Interferences + // V/E Interferences myDSIt->Initialize(TopAbs_VERTEX, TopAbs_FACE); // // BlockLength correction @@ -101,18 +98,14 @@ static // aF2=TopoDS::Face(myDS->Shape(aWith)); // - // Modified Thu Sep 14 14:35:18 2006 + // 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 // -#if OCC_VERSION_LARGE > 0x06050200 aFlag=myContext->ComputeVS (aV1, aF2, aU, aV); -#else - aFlag=myContext.ComputeVS (aV1, aF2, aU, aV); -#endif // if (!aFlag) { // @@ -136,11 +129,11 @@ static } myIsDone=Standard_True; } -// Modified Thu Sep 14 14:35:18 2006 +// Modified Thu Sep 14 14:35:18 2006 // Contribution of Samtech www.samcef.com BEGIN //======================================================================= //function : Contains -//purpose : +//purpose : //======================================================================= Standard_Boolean Contains(const TopoDS_Face& aF, const TopoDS_Vertex& aV) diff --git a/src/NMTTools/NMTTools_PaveFiller_4.cxx b/src/NMTTools/NMTTools_PaveFiller_4.cxx index d3eb9aab6..188676c70 100644 --- a/src/NMTTools/NMTTools_PaveFiller_4.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_4.cxx @@ -23,9 +23,7 @@ // Created: Mon Dec 8 17:08:58 2003 // Author: Peter KURNEV -#include - -#include +#include #include #include @@ -67,6 +65,7 @@ #include #include #include +#include #include #include @@ -481,11 +480,7 @@ void NMTTools_PaveFiller::TreatPaveBlocks (NMTTools_ListOfCommonBlock& theLCB) // Append Pave of nV to rhe edge nE const TopoDS_Edge& aE=*(TopoDS_Edge*)(&myDS->Shape(nE)); const TopoDS_Vertex& aV= *(TopoDS_Vertex*)(&myDS->Shape(nV)); -#if OCC_VERSION_LARGE > 0x06050200 iFlag=myContext->ComputeVE (aV, aE, aT); -#else - iFlag=myContext.ComputeVE (aV, aE, aT); -#endif if (!iFlag) { BOPTools_Pave aPave; // @@ -575,11 +570,7 @@ void NMTTools_PaveFiller::EENewVertices (const BooleanOperations_IndexedDataMapO for (j=0; j<2; ++j) { if (aMFence.Add(nE[j])) { aE=TopoDS::Edge(myDS->Shape(nE[j])); -#if OCC_VERSION_LARGE > 0x06050200 iFlag=myContext->ComputeVE (aVnew, aE, aT); -#else - iFlag=myContext.ComputeVE (aVnew, aE, aT); -#endif if (!iFlag) { aPave.SetInterference(-1); aPave.SetType (BooleanOperations_EdgeEdge); @@ -1201,7 +1192,7 @@ void NMTTools_PaveFiller::SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aL // anIt.Initialize(aLCBE); for (; anIt.More(); anIt.Next()) { - NMTTools_CommonBlock& aCBE=anIt.Value(); + NMTTools_CommonBlock& aCBE=anIt.ChangeValue(); const BOPTools_ListOfPaveBlock& aLPBE=aCBE.PaveBlocks(); // aTolMax=-1.; @@ -1563,11 +1554,7 @@ void ProcessBlock(const BOPTools_PaveBlock& aPB, } // anIndexIn=0; -#if OCC_VERSION_LARGE > 0x06050200 aFlag=myContext->ComputeVS (aVnew, aF, aU, aV); -#else - aFlag=myContext.ComputeVS (aVnew, aF, aU, aV); -#endif if (!aFlag) { BOPTools_VSInterference anInterf (nNewShape, nF, aU, aV); // @@ -1606,11 +1593,7 @@ Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& nE2=aPB2.OriginalEdge(); const TopoDS_Edge& aE2=(*(TopoDS_Edge*)(&myDS->Shape(nE2))); // -#if OCC_VERSION_LARGE > 0x06050200 GeomAPI_ProjectPointOnCurve& aPPC=myContext->ProjPC(aE2); -#else - GeomAPI_ProjectPointOnCurve& aPPC=myContext.ProjPC(aE2); -#endif aPPC.Perform(aP1m); aNbPoints=aPPC.NbPoints(); if (aNbPoints) { diff --git a/src/NMTTools/NMTTools_PaveFiller_5.cxx b/src/NMTTools/NMTTools_PaveFiller_5.cxx index d7c385de8..a00a435d6 100644 --- a/src/NMTTools/NMTTools_PaveFiller_5.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_5.cxx @@ -25,9 +25,7 @@ // Author: Peter KURNEV // // -#include - -#include +#include #include @@ -51,12 +49,10 @@ #include #include #include -#if OCC_VERSION_LARGE <= 0x06050200 -#include -#endif #include #include #include +#include #include #include @@ -100,9 +96,9 @@ static // //======================================================================= // function: PerformEF -// purpose: +// purpose: //======================================================================= - void NMTTools_PaveFiller::PerformEF() + void NMTTools_PaveFiller::PerformEF() { Standard_Boolean bJustAdd; Standard_Integer n1, n2, anIndexIn, nE, nF, aNbEFs, aBlockLength; @@ -136,10 +132,10 @@ static // anIndexIn = 0; // - nE=n1; + nE=n1; nF=n2; if (myDS->GetShapeType(n2)==TopAbs_EDGE) { - nE=n2; + nE=n2; nF=n1; } // @@ -165,8 +161,8 @@ static // aTolF=BRep_Tool::Tolerance(aF); aTolE=BRep_Tool::Tolerance(aE); - - const Bnd_Box& aBBF=myDS->GetBoundingBox(nF); + + const Bnd_Box& aBBF=myDS->GetBoundingBox(nF); // // Process each PaveBlock on edge nE BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); @@ -185,7 +181,7 @@ static if (aBBF.IsOut (aBBE)) { continue; } - // + // // EF IntTools_EdgeFace aEF; aEF.SetEdge (aE); @@ -194,16 +190,12 @@ static aEF.SetTolF (aTolF); aEF.SetDiscretize (aDiscretize); aEF.SetDeflection (aDeflection); - // -#if OCC_VERSION_LARGE > 0x06050200 + // aEF.SetContext(myContext); -#else - aEF.SetContext((IntTools_PContext)&myContext); -#endif - // + // IntTools_Range anewSR = aSR; - // - // Correction of the Shrunk Range + // + // Correction of the Shrunk Range BOPTools_Tools::CorrectRange(aE, aF, aSR, anewSR); aEF.SetRange (anewSR); // @@ -228,7 +220,7 @@ static case TopAbs_VERTEX: { Standard_Boolean bIsOnPave1, bIsOnPave2; Standard_Integer nVF; - Standard_Real aT, aTolToDecide; + Standard_Real aT, aTolToDecide; TopoDS_Vertex aNewVertex; // const IntTools_Range& aR=aCPart.Range1(); @@ -239,8 +231,8 @@ static // //decide to add pave or not aTolToDecide=5.e-8; - bIsOnPave1=IsOnPave(anewSR.First(), aR, aTolToDecide); - bIsOnPave2=IsOnPave(anewSR.Last() , aR, aTolToDecide); + bIsOnPave1=IsOnPave(anewSR.First(), aR, aTolToDecide); + bIsOnPave2=IsOnPave(anewSR.Last() , aR, aTolToDecide); // if (!bIsOnPave1 && !bIsOnPave2) { nVF=CheckFacePaves(aNewVertex, nF); @@ -257,7 +249,7 @@ static myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF); // }// if (!nVF) - }// if (!bIsOnPave1 && !bIsOnPave2) + }// if (!bIsOnPave1 && !bIsOnPave2) // //modified by NIZNHY-PKV Fri Apr 18 10:55:38 2008f else { @@ -295,16 +287,16 @@ static default: break; - } // switch (aType) - } // for (i=1; i<=aNbCPrts; i++) + } // switch (aType) + } // for (i=1; i<=aNbCPrts; i++) } //if (aEF.IsDone()) - } // for (; anIt.More(); anIt.Next()) - }// for (; myDSIt.More(); myDSIt.Next()) + } // for (; anIt.More(); anIt.Next()) + }// for (; myDSIt.More(); myDSIt.Next()) // // Treat New vertices EFNewVertices(aMapVI); // - // Add draft Common Blocks of EF type + // Add draft Common Blocks of EF type EFCommonBlocks(aMapCB); // // Collect all CB we suspected to split by new vertices @@ -341,7 +333,7 @@ static } //======================================================================= // function:EFCommonBlocks -// purpose: +// purpose: //======================================================================= void NMTTools_PaveFiller::EFCommonBlocks (const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) @@ -380,10 +372,10 @@ static } //======================================================================= // function:EFNewVertices -// purpose: +// purpose: //======================================================================= - void NMTTools_PaveFiller::EFNewVertices - (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) + void NMTTools_PaveFiller::EFNewVertices + (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) { Standard_Integer i, j, aNb, aNewShape, aFlag, iX, aNbVV, aNbSimple; Standard_Integer aWhat, aWith, nE, nF, nV, aNbIEF, aNbEdges, iTmp; @@ -397,7 +389,7 @@ static TopTools_IndexedMapOfShape aMNVComplex, aMNVSimple; // aNb=aMapVI.Extent(); - if (!aNb) { // no new vertices, no new problems + if (!aNb) { // no new vertices, no new problems return; } // @@ -417,7 +409,7 @@ static aBB.Add(aCompound, aV); } // - // 2. VV intersection between these vertices + // 2. VV intersection between these vertices // using the auxiliary Filler NMTTools_PaveFiller tPF; // @@ -455,7 +447,7 @@ static EFNewVertices(aV, aMapVI); } // - // 3. Fill Maps : NewVertex-edges (aMNVE) + // 3. Fill Maps : NewVertex-edges (aMNVE) // NewVertex-interferences (aMNVIEE) aNb=aVVInterfs.Extent(); for (i=1; i<=aNb; ++i) { @@ -527,19 +519,15 @@ static BOPTools_ESInterference& aEF=aEFs(iX); aEF.SetNewShape(aNewShape); } - // - // Update Paves on all edges + // + // Update Paves on all 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));//mpv // -#if OCC_VERSION_LARGE > 0x06050200 aFlag=myContext->ComputeVE (aNewVertex, aE, aT); -#else - aFlag=myContext.ComputeVE (aNewVertex, aE, aT); -#endif // if (!aFlag) { aPave.SetInterference(-1); @@ -555,11 +543,11 @@ static } //======================================================================= // function:EFNewVertices -// purpose: +// purpose: //======================================================================= - void NMTTools_PaveFiller::EFNewVertices + void NMTTools_PaveFiller::EFNewVertices (const TopoDS_Vertex& aNewVertex, - const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) + const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) { Standard_Integer i, aNewShape, nE, nF; Standard_Real aT; @@ -597,9 +585,9 @@ static } //======================================================================= // function: CheckFacePaves -// purpose: +// purpose: //======================================================================= - Standard_Integer NMTTools_PaveFiller::CheckFacePaves + Standard_Integer NMTTools_PaveFiller::CheckFacePaves (const TopoDS_Vertex& aNewVertex, const Standard_Integer nF) { @@ -607,7 +595,7 @@ static BOPTools_ListIteratorOfListOfPave anIt; TColStd_IndexedMapOfInteger aMVF; // - iRet=0; + iRet=0; // BooleanOperations_OnceExplorer aExp(*myDS); aExp.Init(nF, TopAbs_EDGE); @@ -637,7 +625,7 @@ static // //======================================================================= // function: VertexParameter -// purpose: +// purpose: //======================================================================= void VertexParameter(const IntTools_CommonPrt& aCPart, Standard_Real& aT) @@ -651,7 +639,7 @@ void VertexParameter(const IntTools_CommonPrt& aCPart, } //======================================================================= // function: IsOnPave -// purpose: +// purpose: //======================================================================= Standard_Boolean IsOnPave(const Standard_Real& aTR, const IntTools_Range& aCPRange, @@ -667,7 +655,7 @@ Standard_Boolean IsOnPave(const Standard_Real& aTR, return bIsOnPave; } // - dT1=Abs(aTR-aT1); + dT1=Abs(aTR-aT1); dT2=Abs(aTR-aT2); bIsOnPave=(dT1<=aTolerance || dT2<=aTolerance); return bIsOnPave; diff --git a/src/NMTTools/NMTTools_PaveFiller_6.cxx b/src/NMTTools/NMTTools_PaveFiller_6.cxx index 009f902bf..3f897dedd 100644 --- a/src/NMTTools/NMTTools_PaveFiller_6.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_6.cxx @@ -23,7 +23,7 @@ // Created: Fri Dec 19 10:27:31 2003 // Author: Peter KURNEV -#include +#include #include @@ -37,6 +37,7 @@ #include #include + #include #include #include @@ -91,6 +92,7 @@ #include #include #include +#include #include #include @@ -112,11 +114,7 @@ static Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx); -#else - IntTools_Context& aCtx); -#endif //======================================================================= // function: PerformFF @@ -245,7 +243,7 @@ void NMTTools_PaveFiller::MakeBlocks() // BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences(); // - + // // 1. Make Section Edges from intersection curves // between each pair of faces @@ -417,11 +415,7 @@ void NMTTools_PaveFiller::MakeBlocks() // // Checking of validity in 2D // -#if OCC_VERSION_LARGE > 0x06050200 bIsValidIn2D=myContext->IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D); -#else - bIsValidIn2D=myContext.IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D); -#endif if (!bIsValidIn2D) { continue; } @@ -436,18 +430,10 @@ void NMTTools_PaveFiller::MakeBlocks() { Standard_Real aT; // -#if OCC_VERSION_LARGE > 0x06050200 myContext->IsVertexOnLine(aV1, aIC, aTolR3D, aT); -#else - myContext.IsVertexOnLine(aV1, aIC, aTolR3D, aT); -#endif BOPTools_Tools::UpdateVertex (aIC, aT, aV1); // -#if OCC_VERSION_LARGE > 0x06050200 myContext->IsVertexOnLine(aV2, aIC, aTolR3D, aT); -#else - myContext.IsVertexOnLine(aV2, aIC, aTolR3D, aT); -#endif BOPTools_Tools::UpdateVertex (aIC, aT, aV2); } // @@ -945,11 +931,7 @@ Standard_Integer NMTTools_PaveFiller::CheckIntermediatePoint(const BOPTools_Pave // aBB.MakeVertex (aVM, aPM, aTolC); // -#if OCC_VERSION_LARGE > 0x06050200 iVM=myContext->ComputeVE(aVM, aE2, aTmp); -#else - iVM=myContext.ComputeVE(aVM, aE2, aTmp); -#endif // return iVM; } @@ -982,20 +964,12 @@ void NMTTools_PaveFiller::PutBoundPaveOnCurve(BOPTools_Curve& aBC, const TopoDS_Face aF1=TopoDS::Face(myDS->GetShape(nF1));//mpv const TopoDS_Face aF2=TopoDS::Face(myDS->GetShape(nF2));//mpv // -#if OCC_VERSION_LARGE > 0x06050200 bVF=myContext->IsValidPointForFaces (aP1, aF1, aF2, aTolR3D); -#else - bVF=myContext.IsValidPointForFaces (aP1, aF1, aF2, aTolR3D); -#endif if (bVF) { PutBoundPaveOnCurve (aP1, aT1, aBC, aFFi); } // -#if OCC_VERSION_LARGE > 0x06050200 bVF=myContext->IsValidPointForFaces (aP2, aF1, aF2, aTolR3D); -#else - bVF=myContext.IsValidPointForFaces (aP2, aF1, aF2, aTolR3D); -#endif if (bVF) { PutBoundPaveOnCurve (aP2, aT2, aBC, aFFi); } @@ -1187,11 +1161,7 @@ Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& } // VE if (!iV) { -#if OCC_VERSION_LARGE > 0x06050200 iVE=myContext->ComputeVE (aV11, aE2, aTE); -#else - iVE=myContext.ComputeVE (aV11, aE2, aTE); -#endif if (!iVE) { iCount++; if (iCount>iCountExt) { @@ -1220,11 +1190,7 @@ Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& } // VE if (!iV) { -#if OCC_VERSION_LARGE > 0x06050200 iVE=myContext->ComputeVE (aV12, aE2, aTE); -#else - iVE=myContext.ComputeVE (aV12, aE2, aTE); -#endif if (!iVE) { iCount++; if (iCount>iCountExt) { @@ -1242,11 +1208,7 @@ Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& //purpose : //======================================================================= Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx) -#else - IntTools_Context& aCtx) -#endif { Standard_Boolean bRet; Standard_Integer iErr; @@ -1313,11 +1275,7 @@ void NMTTools_PaveFiller::PutPaveOnCurve(const BOPTools_PaveSet& aPaveSet, continue; } // -#if OCC_VERSION_LARGE > 0x06050200 bIsVertexOnLine=myContext->IsVertexOnLine(aV, aC, aTolR3D, aT); -#else - bIsVertexOnLine=myContext.IsVertexOnLine(aV, aC, aTolR3D, aT); -#endif // // if (bIsVertexOnLine) { @@ -1331,14 +1289,14 @@ void NMTTools_PaveFiller::PutPaveOnCurve(const BOPTools_PaveSet& aPaveSet, // //======================================================================= //function : FillFaceInfo -//purpose : +//purpose : //======================================================================= void NMTTools_PaveFiller::FillFaceInfo() { Standard_Integer i, aNbS, aNbFFs, nF, aNbVFs, aNbEFs, j, n1, n2, nX, aNbF; TopAbs_ShapeEnum aType; TopoDS_Shape aS; - TColStd_ListIteratorOfListOfInteger aItF; + TColStd_ListIteratorOfListOfInteger aItF; BOPTools_ListIteratorOfListOfPaveBlock anItPB; NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo aItMFI; NMTTools_ListIteratorOfListOfCommonBlock aItCB; @@ -1479,19 +1437,19 @@ void NMTTools_PaveFiller::FillFaceInfo() //======================================================================= //function : CorrectTolR3D //purpose : Attempt to correct the value of tolerance aTolR3D for -// the intersection curve in order to +// the intersection curve in order to // compel it to pass through the sticks. -// Prerequisites: +// Prerequisites: // 2. The are based on B-Spline surfaces; // 1. There is at least the one intersection curve; // 2. The faces have stick vertices to catch the curve; // 3. The intersection angle is rather small (0.7-7 deg) -// +// //======================================================================= void NMTTools_PaveFiller::CorrectTolR3D(const BOPTools_SSInterference& aFF, const TColStd_MapOfInteger& aMVStick, Standard_Real& aTolR3D) - + { Standard_Boolean bHasBounds; Standard_Integer i, nF[2], nV, aNbCurves; @@ -1546,11 +1504,7 @@ void NMTTools_PaveFiller::CorrectTolR3D(const BOPTools_SSInterference& aFF, aC3D->D0(aT, aP); // for (i=0; i<2; ++i) { -#if OCC_VERSION_LARGE > 0x06050200 GeomAPI_ProjectPointOnSurf& aPPS=myContext->ProjPS(aF[i]); -#else - GeomAPI_ProjectPointOnSurf& aPPS=myContext.ProjPS(aF[i]); -#endif aPPS.Perform(aP); aPPS.LowerDistanceParameters(aU, aV); BOPTools_Tools3D::GetNormalToSurface(aS[i], aU, aV, aDN[i]); @@ -1577,7 +1531,7 @@ void NMTTools_PaveFiller::CorrectTolR3D(const BOPTools_SSInterference& aFF, } } // - + aTolR=aTolVmax/aA; if (aTolR - -#include +#include #include #include @@ -60,10 +58,11 @@ #include #include - +// #include #include #include +#include #include @@ -82,6 +81,7 @@ #include #include +#include #include #include @@ -215,7 +215,7 @@ void NMTTools_PaveFiller::UpdateCommonBlocks(const Standard_Integer) for (; aItLCB.More(); aItLCB.Next()) { NMTTools_CommonBlock aCBx; // - NMTTools_CommonBlock& aCB=aItLCB.Value(); + NMTTools_CommonBlock& aCB=aItLCB.ChangeValue(); const BOPTools_ListOfPaveBlock &aLPB=aCB.PaveBlocks(); aItLPB.Initialize(aLPB); for (; aItLPB.More(); aItLPB.Next()) { @@ -246,14 +246,14 @@ void NMTTools_PaveFiller::UpdateCommonBlocks(const Standard_Integer) // aItLCB.Initialize(aLCBx); for (; aItLCB.More(); aItLCB.Next()) { - NMTTools_CommonBlock& aCBx=aItLCB.Value(); + NMTTools_CommonBlock& aCBx=aItLCB.ChangeValue(); aLCB.Append(aCBx); } //modified by NIZNHY-PKV Thu Jan 19 09:03:30 2012t // 1 aItLCB.Initialize(aLCB); for (; aItLCB.More(); aItLCB.Next()) { - NMTTools_CommonBlock& aCB=aItLCB.Value(); + NMTTools_CommonBlock& aCB=aItLCB.ChangeValue(); // BOPTools_PaveBlock aPBMax; aTolExMax=-1.; @@ -296,11 +296,7 @@ void NMTTools_PaveFiller::UpdateCommonBlocks(const Standard_Integer) } // const TopoDS_Edge& aEx=*((TopoDS_Edge*)&myDS->Shape(nEx)); -#if OCC_VERSION_LARGE > 0x06050200 GeomAPI_ProjectPointOnCurve& aPPCx=myContext->ProjPC(aEx); -#else - GeomAPI_ProjectPointOnCurve& aPPCx=myContext.ProjPC(aEx); -#endif // for (j=0; j<2; ++j) { aPPCx.Perform(aPMax[j]); @@ -384,7 +380,7 @@ void NMTTools_PaveFiller::UpdateCommonBlocks() // aCBIt.Initialize(aLCB); for (; aCBIt.More(); aCBIt.Next()) { - NMTTools_CommonBlock& aCB=aCBIt.Value(); + NMTTools_CommonBlock& aCB=aCBIt.ChangeValue(); // // Among all PBs of aCB the first PB will be one // that have max tolerance value diff --git a/src/NMTTools/NMTTools_PaveFiller_8.cxx b/src/NMTTools/NMTTools_PaveFiller_8.cxx index a413fde1c..305f04ca1 100644 --- a/src/NMTTools/NMTTools_PaveFiller_8.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_8.cxx @@ -25,12 +25,14 @@ // Author: Peter KURNEV // // -#include +#include #include #include #include +#include + #include #include @@ -46,7 +48,7 @@ #include -// Modified to add new method Thu Sep 14 14:35:18 2006 +// Modified to add new method Thu Sep 14 14:35:18 2006 // Contribution of Samtech www.samcef.com BEGIN //======================================================================= // function: SharedEdges @@ -68,7 +70,7 @@ nE1=aExp.Current(); aM1.Add(nE1); } - + aExp.Init(nF2, TopAbs_EDGE); for (; aExp.More(); aExp.Next()) { nE2=aExp.Current(); @@ -101,7 +103,7 @@ if (aCBAPI.IsCommonBlock(aPB)) { NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB); // - aIsCommonBlock=1; + aIsCommonBlock=1; // const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); aItPBx.Initialize(aLPBx); @@ -254,7 +256,7 @@ // anItCB.Initialize(aLCB); for (; anItCB.More(); anItCB.Next()) { - NMTTools_CommonBlock& aCB=anItCB.Value(); + NMTTools_CommonBlock& aCB=anItCB.ChangeValue(); const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1); const BOPTools_PaveBlock& aPB1R=RealPaveBlock(aPB1); @@ -285,7 +287,7 @@ anItCB.Initialize(aLCB); for (; anItCB.More(); anItCB.Next()) { - NMTTools_CommonBlock& aCB=anItCB.Value(); + NMTTools_CommonBlock& aCB=anItCB.ChangeValue(); const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1); const BOPTools_PaveBlock& aPB1R=RealPaveBlock(aPB1); // @@ -424,7 +426,7 @@ // anItCB.Initialize(aLCB); for (; anItCB.More(); anItCB.Next()) { - NMTTools_CommonBlock& aCB=anItCB.Value(); + NMTTools_CommonBlock& aCB=anItCB.ChangeValue(); const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1); const TColStd_ListOfInteger& aLFCB=aCB.Faces(); @@ -463,7 +465,7 @@ anItCB.Initialize(aLCB); for (; anItCB.More(); anItCB.Next()) { - NMTTools_CommonBlock& aCB=anItCB.Value(); + NMTTools_CommonBlock& aCB=anItCB.ChangeValue(); const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1);//XXX // const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); @@ -688,13 +690,13 @@ return 0; //Ok } //modified by NIZNHY-PKV Mon Oct 17 12:07:48 2011f -static +static void SortPaveBlocks(BOPTools_ListOfPaveBlock &); static - void SortShell(const Standard_Integer, + void SortShell(const Standard_Integer, BOPTools_PaveBlock *); static - Standard_Boolean Less(const BOPTools_PaveBlock &, + Standard_Boolean Less(const BOPTools_PaveBlock &, const BOPTools_PaveBlock &); //======================================================================= @@ -705,7 +707,7 @@ static BOPTools_ListOfPaveBlock& aLPBIn) { Standard_Integer j, aNbCBP, nSpIn; - TColStd_MapOfInteger aMFence; + TColStd_MapOfInteger aMFence; BOPTools_ListOfPaveBlock aLPB; BOPTools_ListIteratorOfListOfPaveBlock aItPB; NMTTools_ListIteratorOfListOfCommonBlock aItCB; @@ -717,7 +719,7 @@ static NMTTools_ListOfCommonBlock& aLCB=aCBP(j); aItCB.Initialize(aLCB); for (; aItCB.More(); aItCB.Next()) { - NMTTools_CommonBlock& aCB=aItCB.Value(); + NMTTools_CommonBlock& aCB=aItCB.ChangeValue(); if (aCB.IsPaveBlockOnFace(nF)) { const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(); nSpIn=aPB1.Edge(); @@ -770,10 +772,10 @@ void SortPaveBlocks(BOPTools_ListOfPaveBlock &aLPBIn) } //======================================================================= //function : SortShell -//purpose : +//purpose : //======================================================================= -void SortShell(const Standard_Integer n, - BOPTools_PaveBlock *a) +void SortShell(const Standard_Integer n, + BOPTools_PaveBlock *a) { Standard_Integer nd, i, j, l, d=1; BOPTools_PaveBlock x; @@ -798,15 +800,15 @@ void SortShell(const Standard_Integer n, j-=d; if (j > -1) goto m30; }//if (a[l] < a[j]){ - }//for (i=0; i // -#include +#include #include @@ -56,9 +56,9 @@ //======================================================================= // function: PrepareFace -// purpose: +// purpose: //======================================================================= - void NMTTools_PaveFiller::PrepareFace(const Standard_Integer nF, + void NMTTools_PaveFiller::PrepareFace(const Standard_Integer nF, TopoDS_Face& newFace) { Standard_Boolean bToReverse, bIsDegenerated; diff --git a/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock.hxx b/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock.hxx deleted file mode 100644 index 024c17f19..000000000 --- a/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock.hxx +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile -#define _NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_NMTTools_StdMapNodeOfMapOfPaveBlock_HeaderFile -#include -#endif - -#ifndef _BOPTools_PaveBlock_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class BOPTools_PaveBlock; -class BOPTools_PaveBlockMapHasher; -class NMTTools_MapOfPaveBlock; -class NMTTools_MapIteratorOfMapOfPaveBlock; - - - -class NMTTools_StdMapNodeOfMapOfPaveBlock : public TCollection_MapNode { - -public: - // Methods PUBLIC - // - -NMTTools_StdMapNodeOfMapOfPaveBlock(const BOPTools_PaveBlock& K,const TCollection_MapNodePtr& n); - - BOPTools_PaveBlock& Key() const; -//Standard_EXPORT ~NMTTools_StdMapNodeOfMapOfPaveBlock(); - - - - - // Type management - // - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -BOPTools_PaveBlock myKey; - - -}; - -#define TheKey BOPTools_PaveBlock -#define TheKey_hxx -#define Hasher BOPTools_PaveBlockMapHasher -#define Hasher_hxx -#define TCollection_StdMapNode NMTTools_StdMapNodeOfMapOfPaveBlock -#define TCollection_StdMapNode_hxx -#define TCollection_MapIterator NMTTools_MapIteratorOfMapOfPaveBlock -#define TCollection_MapIterator_hxx -#define Handle_TCollection_StdMapNode Handle_NMTTools_StdMapNodeOfMapOfPaveBlock -#define TCollection_StdMapNode_Type_() NMTTools_StdMapNodeOfMapOfPaveBlock_Type_() -#define TCollection_Map NMTTools_MapOfPaveBlock -#define TCollection_Map_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_StdMapNode -#undef TCollection_StdMapNode_hxx -#undef TCollection_MapIterator -#undef TCollection_MapIterator_hxx -#undef Handle_TCollection_StdMapNode -#undef TCollection_StdMapNode_Type_ -#undef TCollection_Map -#undef TCollection_Map_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx b/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx deleted file mode 100644 index aefd735f3..000000000 --- a/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _BOPTools_PaveBlock_HeaderFile -#include -#endif -#ifndef _BOPTools_PaveBlockMapHasher_HeaderFile -#include -#endif -#ifndef _NMTTools_MapOfPaveBlock_HeaderFile -#include -#endif -#ifndef _NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile -#include -#endif -//NMTTools_StdMapNodeOfMapOfPaveBlock::~NMTTools_StdMapNodeOfMapOfPaveBlock() {} - - - -Standard_EXPORT Handle_Standard_Type& NMTTools_StdMapNodeOfMapOfPaveBlock_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("NMTTools_StdMapNodeOfMapOfPaveBlock", - sizeof(NMTTools_StdMapNodeOfMapOfPaveBlock), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(NMTTools_StdMapNodeOfMapOfPaveBlock) Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(NMTTools_StdMapNodeOfMapOfPaveBlock) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(NMTTools_StdMapNodeOfMapOfPaveBlock))) { - _anOtherObject = Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)((Handle(NMTTools_StdMapNodeOfMapOfPaveBlock)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& NMTTools_StdMapNodeOfMapOfPaveBlock::DynamicType() const -{ - return STANDARD_TYPE(NMTTools_StdMapNodeOfMapOfPaveBlock) ; -} -//Standard_Boolean NMTTools_StdMapNodeOfMapOfPaveBlock::IsKind(const Handle(Standard_Type)& AType) const -//{ -// return (STANDARD_TYPE(NMTTools_StdMapNodeOfMapOfPaveBlock) == AType || TCollection_MapNode::IsKind(AType)); -//} -//Handle_NMTTools_StdMapNodeOfMapOfPaveBlock::~Handle_NMTTools_StdMapNodeOfMapOfPaveBlock() {} -#define TheKey BOPTools_PaveBlock -#define TheKey_hxx -#define Hasher BOPTools_PaveBlockMapHasher -#define Hasher_hxx -#define TCollection_StdMapNode NMTTools_StdMapNodeOfMapOfPaveBlock -#define TCollection_StdMapNode_hxx -#define TCollection_MapIterator NMTTools_MapIteratorOfMapOfPaveBlock -#define TCollection_MapIterator_hxx -#define Handle_TCollection_StdMapNode Handle_NMTTools_StdMapNodeOfMapOfPaveBlock -#define TCollection_StdMapNode_Type_() NMTTools_StdMapNodeOfMapOfPaveBlock_Type_() -#define TCollection_Map NMTTools_MapOfPaveBlock -#define TCollection_Map_hxx -#include - diff --git a/src/NMTTools/NMTTools_Tools.cdl b/src/NMTTools/NMTTools_Tools.cdl deleted file mode 100644 index 988a299c8..000000000 --- a/src/NMTTools/NMTTools_Tools.cdl +++ /dev/null @@ -1,95 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTTools_Tools.cdl --- Created: Mon Dec 8 10:32:34 2003 --- Author: Peter KURNEV --- --- -class Tools from NMTTools - - ---Purpose: - -uses - Vertex from TopoDS, - Edge from TopoDS, - Face from TopoDS, - Context from IntTools, - Curve from Geom2d, - - ListOfShape from TopTools, - IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd, - CArray1OfVVInterference from BOPTools, - CArray1OfSSInterference from BOPTools, - ListOfCoupleOfShape from NMTTools, - IndexedDataMapOfShapeIndexedMapOfShape from NMTTools - ---raises - -is - MakeNewVertex (myclass; - aLV : ListOfShape from TopTools; - aNewVertex: out Vertex from TopoDS); - FindChains(myclass; - aVVs:CArray1OfVVInterference from BOPTools; - aMCX: out IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd); - - FindChains(myclass; - aVVs:CArray1OfSSInterference from BOPTools; - aMCX: out IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd); - - FindChains(myclass; - aMCV: IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd; - aMCX: out IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd); - - - IsSplitInOnFace(myclass; - aE : Edge from TopoDS; - aF : Face from TopoDS; - aCtx: Context from IntTools) - returns Boolean from Standard; - - AreFacesSameDomain(myclass; - aF1 : Face from TopoDS; - aF2 : Face from TopoDS; - aCtx : Context from IntTools) - returns Boolean from Standard; - - FindChains(myclass; - aLCS:ListOfCoupleOfShape from NMTTools; - aM :out IndexedDataMapOfShapeIndexedMapOfShape from NMTTools); - - FindChains(myclass; - aM1: IndexedDataMapOfShapeIndexedMapOfShape from NMTTools; - aM2:out IndexedDataMapOfShapeIndexedMapOfShape from NMTTools); - - MakePCurve(myclass; - aE : Edge from TopoDS; - aF : Face from TopoDS; - aC2D : Curve from Geom2d); - - UpdateEdge(myclass; - aE : Edge from TopoDS; - aTol : Real from Standard); ---fields - -end Tools; diff --git a/src/NMTTools/NMTTools_Tools.cxx b/src/NMTTools/NMTTools_Tools.cxx index 03c3179eb..7d06d68c1 100644 --- a/src/NMTTools/NMTTools_Tools.cxx +++ b/src/NMTTools/NMTTools_Tools.cxx @@ -23,54 +23,56 @@ // File: NMTTools_Tools.cxx // Created: Mon Dec 8 10:35:15 2003 // Author: Peter KURNEV +// +// +#include -#include +#include -#include +#include +#include +#include -#include -#include -#include +#include +#include #include #include #include #include -#include #include -#include -#include -#include -#include #include +#include #include #include #include -#include #include #include #include #include + #include -#include #include - +#include +#include +#include +#include +#include #include #include -#include -#include -#include - -#include - -#include -#include -#include +#include +#include +#include +#include +// +#include +#include +#include static void ProcessBlock(const Standard_Integer iV, @@ -115,6 +117,7 @@ static void NMTTools_Tools::MakePCurve(const TopoDS_Edge& aE, const TopoDS_Face& aF, const Handle(Geom2d_Curve)& aC2Dx1) + { Standard_Real aTolE, aT1, aT2, aOutFirst, aOutLast, aOutTol; Handle(Geom2d_Curve) aC2D, aC2DA; @@ -212,11 +215,7 @@ static //======================================================================= Standard_Boolean NMTTools_Tools::IsSplitInOnFace(const TopoDS_Edge& aE, const TopoDS_Face& aF, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aContext) -#else - IntTools_Context& aContext) -#endif { Standard_Boolean bFlag; Standard_Real aT, aTolE, aTolF, aTol, aDist, aU, aV; @@ -227,11 +226,7 @@ static aTolF=BRep_Tool::Tolerance(aF); aTol=aTolE+aTolF; // -#if OCC_VERSION_LARGE > 0x06050200 GeomAPI_ProjectPointOnSurf& aProjector=aContext->ProjPS(aF); -#else - GeomAPI_ProjectPointOnSurf& aProjector=aContext.ProjPS(aF); -#endif // aT=BOPTools_Tools2D::IntermediatePoint(aE); BOPTools_Tools::PointOnEdge(aE, aT, aP); @@ -250,11 +245,7 @@ static // aProjector.LowerDistanceParameters(aU, aV); aP2D.SetCoord(aU, aV); -#if OCC_VERSION_LARGE > 0x06050200 bFlag=aContext->IsPointInOnFace (aF, aP2D); -#else - bFlag=aContext.IsPointInOnFace (aF, aP2D); -#endif return bFlag; } //======================================================================= @@ -450,11 +441,7 @@ void ProcessBlock(const Standard_Integer iV, //======================================================================= Standard_Boolean NMTTools_Tools::AreFacesSameDomain(const TopoDS_Face& aF1x, const TopoDS_Face& aF2y, -#if OCC_VERSION_LARGE > 0x06050200 const Handle(IntTools_Context)& aCtx) -#else - IntTools_Context& aCtx) -#endif { Standard_Boolean bFlag; // Modified Thu Sep 14 14:35:18 2006 @@ -521,11 +508,7 @@ void ProcessBlock(const Standard_Integer iV, for (; aIt.More(); aIt.Next()) { const TopoDS_Edge& aE=TopoDS::Edge(aIt.Key()); BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP); -#if OCC_VERSION_LARGE > 0x06050200 bFlag=aCtx->IsValidPointForFace(aP, aF2, aTol); -#else - bFlag=aCtx.IsValidPointForFace(aP, aF2, aTol); -#endif break; } // diff --git a/src/NMTTools/NMTTools_Tools.hxx b/src/NMTTools/NMTTools_Tools.hxx index ac5488668..6be0cc1a8 100644 --- a/src/NMTTools/NMTTools_Tools.hxx +++ b/src/NMTTools/NMTTools_Tools.hxx @@ -20,100 +20,80 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// File: NMTTools_Tools.hxx +// Created: Mon Dec 8 10:35:15 2003 +// Author: Peter KURNEV +// + #ifndef _NMTTools_Tools_HeaderFile #define _NMTTools_Tools_HeaderFile -#ifndef _Standard_HeaderFile #include -#endif -#ifndef _Standard_Macro_HeaderFile #include -#endif - -#include - -#ifndef _Standard_Boolean_HeaderFile #include -#endif -#ifndef _Handle_Geom2d_Curve_HeaderFile +#include #include -#endif -#ifndef _Standard_Real_HeaderFile #include -#endif - -#if OCC_VERSION_LARGE > 0x06050200 -#include -#else -class IntTools_Context; -#endif - -class TopTools_ListOfShape; -class TopoDS_Vertex; -class BOPTools_CArray1OfVVInterference; -class BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger; -class BOPTools_CArray1OfSSInterference; -class TopoDS_Edge; -class TopoDS_Face; -class NMTTools_ListOfCoupleOfShape; -class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape; -class Geom2d_Curve; - +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : NMTTools_Tools +//purpose : +//======================================================================= class NMTTools_Tools { -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); - } - - - 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, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx); -#else - IntTools_Context& aCtx); -#endif - - Standard_EXPORT static Standard_Boolean AreFacesSameDomain (const TopoDS_Face& aF1, - const TopoDS_Face& aF2, -#if OCC_VERSION_LARGE > 0x06050200 - const Handle(IntTools_Context)& aCtx); -#else - IntTools_Context& aCtx); -#endif - - 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) ; - - Standard_EXPORT static void UpdateEdge(const TopoDS_Edge& aE,const Standard_Real aTol) ; - -protected: - -private: + 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, + const Handle(IntTools_Context)& aCtx) ; + + Standard_EXPORT + static Standard_Boolean AreFacesSameDomain(const TopoDS_Face& aF1, + const TopoDS_Face& aF2, + const Handle(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) ; + + Standard_EXPORT + static void UpdateEdge(const TopoDS_Edge& aE, + const Standard_Real aTol) ; }; - -// other Inline functions and methods (like "C++: function call" methods) - #endif diff --git a/src/NMTTools/NMTTools_Tools.ixx b/src/NMTTools/NMTTools_Tools.ixx deleted file mode 100644 index c7e8694fa..000000000 --- a/src/NMTTools/NMTTools_Tools.ixx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include - - - - diff --git a/src/NMTTools/NMTTools_Tools.jxx b/src/NMTTools/NMTTools_Tools.jxx deleted file mode 100644 index 2c70bf463..000000000 --- a/src/NMTTools/NMTTools_Tools.jxx +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _TopTools_ListOfShape_HeaderFile -#include -#endif -#ifndef _TopoDS_Vertex_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfVVInterference_HeaderFile -#include -#endif -#ifndef _BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger_HeaderFile -#include -#endif -#ifndef _BOPTools_CArray1OfSSInterference_HeaderFile -#include -#endif -#ifndef _TopoDS_Edge_HeaderFile -#include -#endif -#ifndef _TopoDS_Face_HeaderFile -#include -#endif -#ifndef _IntTools_Context_HeaderFile -#include -#endif -#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile -#include -#endif -#ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile -#include -#endif -#ifndef _Geom2d_Curve_HeaderFile -#include -#endif -#ifndef _NMTTools_Tools_HeaderFile -#include -#endif diff --git a/src/NMTTools_NEW/Makefile.am b/src/NMTTools_NEW/Makefile.am deleted file mode 100644 index 0bc91529d..000000000 --- a/src/NMTTools_NEW/Makefile.am +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it 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 -# - -# GEOM NMTTools : partition algorithm -# File : Makefile.in -# Author : Julia DOROVSKIKH -# Modified by : Alexander BORODIN (OCN) - autotools usage -# Module : GEOM - -include $(top_srcdir)/adm_local/unix/make_common_starter.am - -# header files -salomeinclude_HEADERS = \ - NMTTools_CheckerSI.hxx \ - NMTTools_CommonBlockAPI.hxx \ - NMTTools_CommonBlock.hxx \ - NMTTools_CommonBlockPool.hxx \ - NMTTools_CoupleOfShape.hxx \ - NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx \ - NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx \ - NMTTools_DataMapOfIntegerFaceInfo.hxx \ - NMTTools_DataMapOfIntegerListOfPaveBlock.hxx \ - NMTTools_DEProcessor.hxx \ - NMTTools_FaceInfo.hxx \ - NMTTools_FaceInfo.lxx \ - NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx \ - NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx \ - NMTTools_IndexedDataMapOfShapePaveBlock.hxx \ - NMTTools_ListIteratorOfListOfCommonBlock.hxx \ - NMTTools_ListIteratorOfListOfCoupleOfShape.hxx \ - NMTTools_ListOfCommonBlock.hxx \ - NMTTools_ListOfCoupleOfShape.hxx \ - NMTTools_MapIteratorOfMapOfPaveBlock.hxx \ - NMTTools_MapOfPaveBlock.hxx \ - NMTTools_PaveFiller.hxx \ - NMTTools_PPaveFiller.hxx \ - NMTTools_Tools.hxx - -# Libraries targets -lib_LTLIBRARIES = libNMTTools.la - -dist_libNMTTools_la_SOURCES = \ - NMTTools_CheckerSI.cxx \ - NMTTools_CheckerSI_1.cxx \ - NMTTools_CommonBlockAPI.cxx \ - NMTTools_CommonBlock.cxx \ - NMTTools_CommonBlockPool.cxx \ - NMTTools_CoupleOfShape.cxx \ - NMTTools_DEProcessor.cxx \ - NMTTools_FaceInfo.cxx \ - NMTTools_PaveFiller_0.cxx \ - NMTTools_PaveFiller_1.cxx \ - NMTTools_PaveFiller_2.cxx \ - NMTTools_PaveFiller_3.cxx \ - NMTTools_PaveFiller_4.cxx \ - NMTTools_PaveFiller_5.cxx \ - NMTTools_PaveFiller_6.cxx \ - NMTTools_PaveFiller_7.cxx \ - NMTTools_PaveFiller_8.cxx \ - NMTTools_PaveFiller_9.cxx \ - NMTTools_PaveFiller.cxx \ - NMTTools_Tools.cxx - -# additional information to compile and link file - -libNMTTools_la_CPPFLAGS = \ - $(CAS_CPPFLAGS) \ - $(KERNEL_CXXFLAGS) \ - -I$(srcdir)/../$(NMTDS_VAR) - -libNMTTools_la_LDFLAGS = \ - ../$(NMTDS_VAR)/libNMTDS.la \ - $(STDLIB) \ - $(CAS_LDPATH) -lTKBool -lTKBO \ - $(KERNEL_LDFLAGS) - -CDL_FILES = \ - NMTTools.cdl - -EXTRA_DIST += \ - $(CDL_FILES) \ - FILES diff --git a/src/NMTTools_NEW/NMTTools.cdl b/src/NMTTools_NEW/NMTTools.cdl deleted file mode 100644 index e3ce88466..000000000 --- a/src/NMTTools_NEW/NMTTools.cdl +++ /dev/null @@ -1,129 +0,0 @@ --- Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE --- --- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com --- - --- File: NMTTools.cdl --- Created: Thu Dec 4 16:55:49 2003 --- Author: Peter KURNEV --- --- -package NMTTools - - ---Purpose: - -uses - - TCollection, - TColStd, - gp, - TopAbs, - TopoDS, - TopTools, - Geom2d, - BooleanOperations, - BOPTColStd, - IntTools, - BOPTools, - NMTDS - -is - imported CoupleOfShape from NMTTools; - imported CommonBlock from NMTTools; - imported CommonBlockAPI from NMTTools; - imported FaceInfo from NMTTools; - imported Tools from NMTTools; - imported PaveFiller from NMTTools; - imported PPaveFiller from NMTTools; - imported DEProcessor from NMTTools; - imported CheckerSI from NMTTools; - -- - imported ListOfCommonBlock from NMTTools; - imported ListIteratorOfListOfCommonBlock from NMTTools; - - imported ListOfCoupleOfShape from NMTTools; - imported ListIteratorOfListOfCoupleOfShape from NMTTools; - - imported MapOfPaveBlock from NMTTools; - imported MapIteratorOfMapOfPaveBlock from NMTTools; - - imported IndexedDataMapOfIndexedMapOfInteger from NMTTools; - imported IndexedDataMapOfShapePaveBlock from NMTTools; - imported IndexedDataMapOfShapeIndexedMapOfShape from NMTTools; - - imported DataMapOfIntegerListOfPaveBlock from NMTTools; - imported DataMapIteratorOfDataMapOfIntegerListOfPaveBlock from NMTTools; - - imported DataMapOfIntegerFaceInfo from NMTTools; - imported DataMapIteratorOfDataMapOfIntegerFaceInfo from NMTTools; - - imported CommonBlockPool from NMTTools; - - -- - --class PaveFiller; - --class Tools; - --class CommonBlock; - --class CommonBlockAPI; - --class FaceInfo; - --class CoupleOfShape; - --class CheckerSI; - --class DEProcessor; - --pointer PPaveFiller to PaveFiller from NMTTools; - -- - --class ListOfCommonBlock instantiates - -- List from TCollection(CommonBlock from NMTTools); - - --class ListOfCoupleOfShape instantiates - -- List from TCollection(CoupleOfShape from NMTTools); --- - --class MapOfPaveBlock instantiates - -- Map from TCollection (PaveBlock from BOPTools, - -- PaveBlockMapHasher from BOPTools); --- - --class IndexedDataMapOfIndexedMapOfInteger instantiates - -- IndexedDataMap from TCollection (Integer from Standard, - -- IndexedMapOfInteger from TColStd, - -- MapIntegerHasher from TColStd); - - --class IndexedDataMapOfShapePaveBlock instantiates - -- IndexedDataMap from TCollection (Shape from TopoDS, - -- PaveBlock from BOPTools, - -- ShapeMapHasher from TopTools); - - --class IndexedDataMapOfShapeIndexedMapOfShape instantiates - -- IndexedDataMap from TCollection (Shape from TopoDS, - -- IndexedMapOfShape from TopTools, - -- ShapeMapHasher from TopTools); - --- - --class DataMapOfIntegerListOfPaveBlock instantiates - -- DataMap from TCollection(Integer from Standard, - -- ListOfPaveBlock from BOPTools, - -- MapIntegerHasher from TColStd); - - --class DataMapOfIntegerFaceInfo instantiates - -- DataMap from TCollection(Integer from Standard, - -- FaceInfo from NMTTools, - -- MapIntegerHasher from TColStd); --- - --class CommonBlockPool instantiates - -- CArray1 from BOPTColStd (ListOfCommonBlock from NMTTools); --- -end NMTTools; diff --git a/src/NMTTools_NEW/NMTTools_CheckerSI.cxx b/src/NMTTools_NEW/NMTTools_CheckerSI.cxx deleted file mode 100644 index dd724ba6a..000000000 --- a/src/NMTTools_NEW/NMTTools_CheckerSI.cxx +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_CheckerSI.cxx -// Created: Mon Feb 19 11:32:08 2007 -// Author: Peter KURNEV -// -#include - -#include -#include -#include -#include -#include - -//======================================================================= -//function : -//purpose : -//======================================================================= - NMTTools_CheckerSI::NMTTools_CheckerSI() -: - NMTTools_PaveFiller() -{ - myStopStatus=0; -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= - NMTTools_CheckerSI::~NMTTools_CheckerSI() -{ -} -//======================================================================= -//function : Clear -//purpose : -//======================================================================= - void NMTTools_CheckerSI::Clear() -{ - NMTTools_PaveFiller::Clear(); -} -//======================================================================= -//function : StopStatus -//purpose : -//======================================================================= - Standard_Integer NMTTools_CheckerSI::StopStatus()const -{ - return myStopStatus; -} -//======================================================================= -//function : Init -//purpose : -//======================================================================= - void NMTTools_CheckerSI::Init() -{ - myIsDone=Standard_False; - if (myCompositeShape.IsNull()) { - return; - } - // - Clear(); - // 1. - myDS=new NMTDS_ShapesDataStructure; - myDS->SetCompositeShape(myCompositeShape); - myDS->Init(); - // - // 2. - myDSIt=new NMTDS_IteratorCheckerSI; - myDSIt->SetDS(myDS); - myDSIt->Prepare(); - // - // 3. - myNbSources=myDS->NumberOfShapesOfTheObject()+ - myDS->NumberOfShapesOfTheTool(); - myNbEdges=myDS->NbEdges(); - // 4 - myIP=new NMTDS_InterfPool; - // - // 5 - myContext=new IntTools_Context; -} -//======================================================================= -//function : Perform -//purpose : -//======================================================================= - void NMTTools_CheckerSI::Perform() -{ - myIsDone=Standard_False; - myStopStatus=0; - // - Init(); - //1.VV - // - PerformVV(); - // - // 2.VE - myPavePool.Resize (myNbEdges); - - PrepareEdges(); - // - PerformVE(); - // - // 3.VF - PerformVF(); - // - // 4.EE - myCommonBlockPool.Resize (myNbEdges); - mySplitShapesPool.Resize (myNbEdges); - myPavePoolNew .Resize (myNbEdges); - // - PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE); - if (myStopStatus) { - return; - } - PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE); - if (myStopStatus) { - return; - } - // - PerformEE(); - // - RefinePavePool (); - if (myStopStatus) { - return; - } - // - myPavePoolNew.Destroy(); - myPavePoolNew.Resize (myNbEdges); - // - // 5.EF - PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE); - if (myStopStatus) { - return; - } - // - PerformEF(); - // - RefinePavePool(); - if (myStopStatus) { - return; - } - // - myPavePoolNew.Destroy(); - // - MakeSplitEdges(); - // - UpdateCommonBlocks(); - // - // 6. FF - PerformFF (); - // - MakeBlocks(); - // - MakePCurves(); - // - // 7. Postprocessing - UpdatePaveBlocks(); - // - NMTTools_DEProcessor aDEP(*this); - aDEP.Do(); - // - MakeAloneVertices(); - // - myIsDone=Standard_True; -} diff --git a/src/NMTTools_NEW/NMTTools_CheckerSI.hxx b/src/NMTTools_NEW/NMTTools_CheckerSI.hxx deleted file mode 100644 index ff9000ad5..000000000 --- a/src/NMTTools_NEW/NMTTools_CheckerSI.hxx +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_CheckerSI.hxx -// Created: Mon Feb 19 11:32:08 2007 -// Author: Peter KURNEV -// -#ifndef _NMTTools_CheckerSI_HeaderFile -#define _NMTTools_CheckerSI_HeaderFile - -#include -#include -#include -#include -#include - -//======================================================================= -//class : NMTTools_CheckerSI -//purpose : -//======================================================================= -class NMTTools_CheckerSI : public NMTTools_PaveFiller -{ - public: - Standard_EXPORT - NMTTools_CheckerSI(); - - Standard_EXPORT - virtual ~NMTTools_CheckerSI(); - - Standard_EXPORT - virtual void Perform() ; - - Standard_EXPORT - Standard_Integer StopStatus() const; - - protected: - Standard_EXPORT - virtual void Init() ; - - Standard_EXPORT - virtual void Clear() ; - - Standard_EXPORT - virtual void PreparePaveBlocks(const Standard_Integer nE) ; - - Standard_EXPORT - virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) ; - - - Standard_Integer myStopStatus; -}; -#endif diff --git a/src/NMTTools_NEW/NMTTools_CheckerSI_1.cxx b/src/NMTTools_NEW/NMTTools_CheckerSI_1.cxx deleted file mode 100644 index eb00dec0f..000000000 --- a/src/NMTTools_NEW/NMTTools_CheckerSI_1.cxx +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_CheckerSI.cxx -// Created: Mon Feb 19 11:32:08 2007 -// Author: Peter KURNEV -// -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - -static - Standard_Boolean IsValid(const TopoDS_Edge& aE, - const TopoDS_Vertex& aV, - const Standard_Real aTV1, - const Standard_Real aTV2); - -//======================================================================= -// function: PreparePaveBlocks -// purpose: -//======================================================================= - void NMTTools_CheckerSI::PreparePaveBlocks(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) -{ - NMTTools_PaveFiller::PreparePaveBlocks(aType1, aType2); -} -//======================================================================= -// function: PreparePaveBlocks -// purpose: -//======================================================================= - void NMTTools_CheckerSI::PreparePaveBlocks(const Standard_Integer nE) -{ - myIsDone=Standard_False; - // - // char buf[32]={"SR"}; - Standard_Boolean bIsValid; - Standard_Integer nV1, nV2, iErr; - Standard_Real aT1, aT2; - TopoDS_Edge aE; - TopoDS_Vertex aV1, aV2; - // - BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); - // Edge - aE=TopoDS::Edge(myDS->Shape(nE)); - if (BRep_Tool::Degenerated(aE)) { - myIsDone=Standard_True; - return; - } - // - BOPTools_PaveSet& aPS=myPavePool(myDS->RefEdge(nE)); - - BOPTools_PaveBlockIterator aPBIt(nE, aPS); - for (; aPBIt.More(); aPBIt.Next()) { - BOPTools_PaveBlock& aPB=aPBIt.Value(); - const IntTools_Range& aRange=aPB.Range(); - // - const BOPTools_Pave& aPave1=aPB.Pave1(); - nV1=aPave1.Index(); - aV1=TopoDS::Vertex(myDS->Shape(nV1)); - aT1=aPave1.Param(); - // - const BOPTools_Pave& aPave2=aPB.Pave2(); - nV2=aPave2.Index(); - aV2=TopoDS::Vertex(myDS->Shape(nV2)); - aT2=aPave2.Param(); - // - bIsValid=Standard_True; - if (nV1==nV2) { - bIsValid=IsValid(aE, aV1, aT1, aT2); - if (!bIsValid) { - //printf(" pb SR: nV nE: %d nV1:( %d %15.10lf ) nV2:( %d %15.10lf )\n", nE, nV1, aT1, nV2, aT2); - myStopStatus=1; - } - } - // - IntTools_ShrunkRange aSR (aE, aV1, aV2, aRange, myContext); - iErr=aSR.ErrorStatus(); - if (!aSR.IsDone()) { - //printf(" pb SR: Done nE: %d nV1:( %d %15.10lf ) nV2:( %d %15.10lf )\n", nE, nV1, aT1, nV2, aT2); - aSR.SetShrunkRange(aRange); - //throw BOPTColStd_Failure(buf) ; - } - else if (iErr!=6) { - CorrectShrunkRanges (0, aPave1, aSR); - CorrectShrunkRanges (1, aPave2, aSR); - } - aPB.SetShrunkRange(aSR); - aLPB.Append(aPB); - } //for (; aPBIt.More(); aPBIt.Next()) - myIsDone=Standard_True; -} - -//======================================================================= -//function : IsValid -//purpose : -//======================================================================= -Standard_Boolean IsValid(const TopoDS_Edge& aE, - const TopoDS_Vertex& aV, - const Standard_Real aTV1, - const Standard_Real aTV2) -{ - Standard_Boolean bRet; - Standard_Integer i, aNbP, aNbP1; - Standard_Real aTolV2, aTC1, aTC2, dT, aTC, aD2; - Handle(Geom_Curve) aC; - gp_Pnt aPV, aPC; - // - bRet=Standard_False; - aTolV2=BRep_Tool::Tolerance(aV); - aTolV2=aTolV2*aTolV2; - aPV=BRep_Tool::Pnt(aV); - aC=BRep_Tool::Curve(aE, aTC1, aTC2); - aNbP=7; - aNbP1=aNbP-1; - dT=(aTV2-aTV1)/aNbP1; - // - for (i=1; iD0(aTC, aPC); - aD2=aPV.SquareDistance(aPC); - bRet=aD2>aTolV2; - } - return bRet; -} diff --git a/src/NMTTools_NEW/NMTTools_CommonBlock.cxx b/src/NMTTools_NEW/NMTTools_CommonBlock.cxx deleted file mode 100644 index 701bf3790..000000000 --- a/src/NMTTools_NEW/NMTTools_CommonBlock.cxx +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_CommonBlock.cxx -// Created: Tue Dec 9 12:23:29 2003 -// Author: Peter KURNEV -// -// -#include - -#include -#include - -//======================================================================= -// function: NMTTools_CommonBlock::NMTTools_CommonBlock() -// purpose: -//======================================================================= - NMTTools_CommonBlock::NMTTools_CommonBlock() -{ -} -//======================================================================= -// function: AddPaveBlock -// purpose: -//======================================================================= - void NMTTools_CommonBlock::AddPaveBlock(const BOPTools_PaveBlock& aPB) -{ - myPaveBlocks.Append(aPB); -} -//======================================================================= -// function: AddFace -// purpose: -//======================================================================= - void NMTTools_CommonBlock::AddFace(const Standard_Integer aF) -{ - myFaces.Append(aF); -} -//======================================================================= -// function: AddFaces -// purpose: -//======================================================================= - void NMTTools_CommonBlock::AddFaces(const TColStd_ListOfInteger& aLF) -{ - TColStd_ListIteratorOfListOfInteger aIt(aLF); - // - for (; aIt.More(); aIt.Next()) { - myFaces.Append(aIt.Value()); - } -} -//======================================================================= -// function: PaveBlocks -// purpose: -//======================================================================= - const BOPTools_ListOfPaveBlock& NMTTools_CommonBlock::PaveBlocks()const -{ - return myPaveBlocks; -} -//======================================================================= -// function: Faces -// purpose: -//======================================================================= - const TColStd_ListOfInteger& NMTTools_CommonBlock::Faces()const -{ - return myFaces; -} -//======================================================================= -// function: PaveBlock1 -// purpose: -//======================================================================= - const BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlock1()const -{ - return myPaveBlocks.First(); -} -//======================================================================= -// function: PaveBlock1 -// purpose: -//======================================================================= - BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlock1(const Standard_Integer aIx) -{ - return PaveBlockOnEdge(aIx); -} -//======================================================================= -// function: PaveBlockOnEdge -// purpose: -//======================================================================= - BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlockOnEdge(const Standard_Integer aIx) -{ - static BOPTools_PaveBlock aPBs; - Standard_Integer aIOr; - BOPTools_ListIteratorOfListOfPaveBlock anIt(myPaveBlocks); - // - for (; anIt.More(); anIt.Next()) { - BOPTools_PaveBlock& aPB=anIt.Value(); - aIOr=aPB.OriginalEdge(); - if (aIOr==aIx){ - return aPB; - } - } - return aPBs; -} -//======================================================================= -// function: IsPaveBlockOnFace -// purpose: -//======================================================================= - Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnFace(const Standard_Integer aIx)const -{ - Standard_Boolean bFound=Standard_False; - Standard_Integer nF; - TColStd_ListIteratorOfListOfInteger anIt(myFaces); - // - for (; anIt.More(); anIt.Next()) { - nF=anIt.Value(); - if (nF==aIx){ - return !bFound; - } - } - return bFound; -} -//======================================================================= -// function: IsPaveBlockOnEdge -// purpose: -//======================================================================= - Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnEdge(const Standard_Integer aIx)const -{ - Standard_Boolean bFound=Standard_False; - Standard_Integer aIOr; - BOPTools_ListIteratorOfListOfPaveBlock anIt(myPaveBlocks); - // - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB=anIt.Value(); - aIOr=aPB.OriginalEdge(); - if (aIOr==aIx){ - return !bFound; - } - } - return bFound; -} -//======================================================================= -// function: IsEqual -// purpose: -//======================================================================= - Standard_Boolean NMTTools_CommonBlock::IsEqual(const NMTTools_CommonBlock& aOther)const -{ - Standard_Boolean bFound=Standard_True; - Standard_Integer aNb1, aNb2; - BOPTools_ListIteratorOfListOfPaveBlock anIt; - // - aNb1=myPaveBlocks.Extent(); - aNb2=aOther.myPaveBlocks.Extent(); - // - if (!aNb1 && !aNb2) { - return bFound; - } - if (!aNb1) { - return !bFound; - } - if (!aNb2) { - return !bFound; - } - // - const BOPTools_PaveBlock& aPB=PaveBlock1(); - // - anIt.Initialize(aOther.myPaveBlocks); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPBOther=anIt.Value(); - if (aPB.IsEqual(aPBOther)){ - return bFound; - } - } - return !bFound; -} -//======================================================================= -// function: Contains -// purpose: -//======================================================================= - Standard_Boolean NMTTools_CommonBlock::Contains(const BOPTools_PaveBlock& aPBx)const -{ - Standard_Boolean bFound=Standard_False; - Standard_Integer aNb1; - BOPTools_ListIteratorOfListOfPaveBlock anIt; - // - aNb1=myPaveBlocks.Extent(); - // - if (!aNb1) { - return bFound; - } - // - anIt.Initialize(myPaveBlocks); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB=anIt.Value(); - if (aPB.IsEqual(aPBx)) { - return !bFound; - } - } - return bFound; -} -/* -//======================================================================= -// function: SetEdge -// purpose: -//======================================================================= - void NMTTools_CommonBlock::SetEdge(const Standard_Integer anEdge) -{ - BOPTools_ListIteratorOfListOfPaveBlock anIt; - // - anIt.Initialize(myPaveBlocks); - for (; anIt.More(); anIt.Next()) { - BOPTools_PaveBlock& aPB=anIt.Value(); - aPB.SetEdge(anEdge); - } -} -//======================================================================= -// function: Edge -// purpose: -//======================================================================= - Standard_Integer NMTTools_CommonBlock::Edge()const -{ - Standard_Integer aNb; - // - aNb=myPaveBlocks.Extent(); - // - if (!aNb) { - return aNb; - } - // - const BOPTools_PaveBlock& aPB=PaveBlock1(); - aNb=aPB.Edge(); - return aNb; -} -*/ diff --git a/src/NMTTools_NEW/NMTTools_CommonBlock.hxx b/src/NMTTools_NEW/NMTTools_CommonBlock.hxx deleted file mode 100644 index 94dc4d9b2..000000000 --- a/src/NMTTools_NEW/NMTTools_CommonBlock.hxx +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_CommonBlock.hxx -// Created: Tue Dec 9 12:23:29 2003 -// Author: Peter KURNEV -// -// - -#ifndef _NMTTools_CommonBlock_HeaderFile -#define _NMTTools_CommonBlock_HeaderFile - -#include -#include -#include -#include -#include -#include -#include - - -//======================================================================= -//function : NMTTools_CommonBlock -//purpose : -//======================================================================= -class NMTTools_CommonBlock { - 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; - - protected: - BOPTools_ListOfPaveBlock myPaveBlocks; - TColStd_ListOfInteger myFaces; -}; - -#endif diff --git a/src/NMTTools_NEW/NMTTools_CommonBlockAPI.cxx b/src/NMTTools_NEW/NMTTools_CommonBlockAPI.cxx deleted file mode 100644 index 4593ef860..000000000 --- a/src/NMTTools_NEW/NMTTools_CommonBlockAPI.cxx +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_CommonBlockAPI.cxx -// Created: Mon Dec 15 11:38:04 2003 -// Author: Peter KURNEV -// -// -#include - -#include -#include -#include - -#include -#include -#include - -//======================================================================= -// function: NMTTools_CommonBlockAPI::NMTTools_CommonBlockAPI -// purpose: -//======================================================================= - NMTTools_CommonBlockAPI::NMTTools_CommonBlockAPI (const NMTTools_ListOfCommonBlock& aLCB) -{ - myListOfCommonBlock=(void *)&aLCB; -} -//======================================================================= -// function: List -// purpose: -//======================================================================= - const NMTTools_ListOfCommonBlock& NMTTools_CommonBlockAPI::List () const -{ - NMTTools_ListOfCommonBlock* pListOfCommonBlock=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock; - return *pListOfCommonBlock; -} -//======================================================================= -// function: CommonPaveBlocks -// purpose: get all CommonPaveBlocks -//======================================================================= - const BOPTools_ListOfPaveBlock& NMTTools_CommonBlockAPI::CommonPaveBlocks(const Standard_Integer anE) const -{ - Standard_Integer anECurrent; - BOPTools_ListIteratorOfListOfPaveBlock anItPB; - // - BOPTools_ListOfPaveBlock* pmyListOfPaveBlock=(BOPTools_ListOfPaveBlock*) &myListOfPaveBlock; - pmyListOfPaveBlock->Clear(); - - NMTTools_ListOfCommonBlock* pListOfCommonBlock=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock; - - NMTTools_ListIteratorOfListOfCommonBlock anIt(*pListOfCommonBlock); - for (; anIt.More(); anIt.Next()) { - const NMTTools_CommonBlock& aCB=anIt.Value(); - // - const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks(); - anItPB.Initialize(aLPB); - for (; anItPB.More(); anItPB.Next()) { - const BOPTools_PaveBlock& aPB=anItPB.Value(); - anECurrent=aPB.OriginalEdge(); - if (anECurrent==anE) { - pmyListOfPaveBlock->Append(aPB); - break; - } - } - } - return myListOfPaveBlock; -} -//======================================================================= -// function: IsCommonBlock -// purpose: -//======================================================================= - Standard_Boolean NMTTools_CommonBlockAPI::IsCommonBlock(const BOPTools_PaveBlock& aPB) const -{ - Standard_Integer anE; - // - anE=aPB.OriginalEdge(); - // - CommonPaveBlocks(anE); - // - BOPTools_ListIteratorOfListOfPaveBlock anIt(myListOfPaveBlock); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB1=anIt.Value(); - if (aPB1.IsEqual(aPB)) { - return Standard_True; - } - } - return Standard_False; -} - -//======================================================================= -// function: CommonBlock -// purpose: -//======================================================================= - NMTTools_CommonBlock& NMTTools_CommonBlockAPI::CommonBlock(const BOPTools_PaveBlock& aPB)const -{ - static NMTTools_CommonBlock aCBTMP; - // - NMTTools_ListIteratorOfListOfCommonBlock anItCB; - BOPTools_ListIteratorOfListOfPaveBlock anItPB; - // - NMTTools_ListOfCommonBlock* pLCB=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock; - // - anItCB.Initialize(*pLCB); - for (; anItCB.More(); anItCB.Next()) { - NMTTools_CommonBlock& aCB=anItCB.ChangeValue(); - // - const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks(); - anItPB.Initialize(aLPB); - for (; anItPB.More(); anItPB.Next()) { - const BOPTools_PaveBlock& aPBx=anItPB.Value(); - if (aPBx.IsEqual(aPB)) { - return aCB; - } - } - } - return aCBTMP; -} diff --git a/src/NMTTools_NEW/NMTTools_CommonBlockAPI.hxx b/src/NMTTools_NEW/NMTTools_CommonBlockAPI.hxx deleted file mode 100644 index d9c4aa4e7..000000000 --- a/src/NMTTools_NEW/NMTTools_CommonBlockAPI.hxx +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_CommonBlockAPI.hxx -// Created: Mon Dec 15 11:38:04 2003 -// Author: Peter KURNEV -// -// -#ifndef _NMTTools_CommonBlockAPI_HeaderFile -#define _NMTTools_CommonBlockAPI_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//class : NMTTools_CommonBlockAPI -//purpose : -//======================================================================= -class NMTTools_CommonBlockAPI -{ - 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; -protected: -//private: - -Standard_Address myListOfCommonBlock; -BOPTools_ListOfPaveBlock myListOfPaveBlock; -}; -#endif diff --git a/src/NMTTools_NEW/NMTTools_CommonBlockPool.hxx b/src/NMTTools_NEW/NMTTools_CommonBlockPool.hxx deleted file mode 100644 index 57a95d332..000000000 --- a/src/NMTTools_NEW/NMTTools_CommonBlockPool.hxx +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_CommonBlockPool.hxx -// Created: -// Author: Peter KURNEV -// -// - -#ifndef _NMTTools_CommonBlockPool_HeaderFile -#define _NMTTools_CommonBlockPool_HeaderFile - -#include -#include -#include -#include -#include -#include - -class Standard_OutOfRange; -class Standard_OutOfMemory; - - - -//======================================================================= -//class : NMTTools_CommonBlockPool -//purpose : -//======================================================================= -class NMTTools_CommonBlockPool -{ - 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; - - Standard_EXPORT - void Purge() ; - -protected: - -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; - - - Standard_Address myStart; - Standard_Integer myLength; - Standard_Integer myFactLength; - Standard_Integer myBlockLength; - Standard_Boolean myIsAllocated; -}; -#endif diff --git a/src/NMTTools_NEW/NMTTools_CoupleOfShape.cxx b/src/NMTTools_NEW/NMTTools_CoupleOfShape.cxx deleted file mode 100644 index 80726d9bd..000000000 --- a/src/NMTTools_NEW/NMTTools_CoupleOfShape.cxx +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_CoupleOfShape.cxx -// Created: Wed Jan 28 15:06:11 2004 -// Author: Peter KURNEV -// -// -#include - -//======================================================================= -// function: NMTTools_CoupleOfShape::NMTTools_CoupleOfShape -// purpose: -//======================================================================= - NMTTools_CoupleOfShape::NMTTools_CoupleOfShape() -{} -//======================================================================= -// function: SetShape1 -// purpose: -//======================================================================= - void NMTTools_CoupleOfShape::SetShape1(const TopoDS_Shape& aS) -{ - myShape1=aS; -} -//======================================================================= -// function: SetShape2 -// purpose: -//======================================================================= - void NMTTools_CoupleOfShape::SetShape2(const TopoDS_Shape& aS) -{ - myShape2=aS; -} -//======================================================================= -// function: Shape1 -// purpose: -//======================================================================= - const TopoDS_Shape& NMTTools_CoupleOfShape::Shape1()const -{ - return myShape1; -} -//======================================================================= -// function: Shape2 -// purpose: -//======================================================================= - const TopoDS_Shape& NMTTools_CoupleOfShape::Shape2()const -{ - return myShape2; -} diff --git a/src/NMTTools_NEW/NMTTools_CoupleOfShape.hxx b/src/NMTTools_NEW/NMTTools_CoupleOfShape.hxx deleted file mode 100644 index fef9a00fe..000000000 --- a/src/NMTTools_NEW/NMTTools_CoupleOfShape.hxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_CoupleOfShape.hxx -// Created: Wed Jan 28 15:06:11 2004 -// Author: Peter KURNEV -// -// -#ifndef _NMTTools_CoupleOfShape_HeaderFile -#define _NMTTools_CoupleOfShape_HeaderFile - -#include -#include -#include - -//======================================================================= -//class : NMTTools_CoupleOfShape -//purpose : -//======================================================================= -class NMTTools_CoupleOfShape -{ - 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; - - protected: - TopoDS_Shape myShape1; - TopoDS_Shape myShape2; -}; -#endif diff --git a/src/NMTTools_NEW/NMTTools_DEProcessor.cxx b/src/NMTTools_NEW/NMTTools_DEProcessor.cxx deleted file mode 100644 index 7a1501a38..000000000 --- a/src/NMTTools_NEW/NMTTools_DEProcessor.cxx +++ /dev/null @@ -1,568 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_DEProcessor.cxx -// Created: Wed Sep 12 12:10:52 2001 -// Author: Peter KURNEV -// -// -#include - -#include - -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -//======================================================================= -// function: -// purpose: -//======================================================================= - NMTTools_DEProcessor::NMTTools_DEProcessor(NMTTools_PaveFiller& aPaveFiller) -: - myIsDone(Standard_False) -{ - myFiller=(NMTTools_PaveFiller*) &aPaveFiller; - myDS=myFiller->DS(); -} -//======================================================================= -// function: IsDone -// purpose: -//======================================================================= - Standard_Boolean NMTTools_DEProcessor::IsDone() const -{ - return myIsDone; -} -//======================================================================= -// function: Do -// purpose: -//======================================================================= - void NMTTools_DEProcessor::Do() -{ - Standard_Integer aNbE; - // - myIsDone=Standard_False; - // - FindDegeneratedEdges(); - // - aNbE=myDEMap.Extent(); - if (!aNbE) { - myIsDone=!myIsDone; - return; - } - // - DoPaves(); -} -//======================================================================= -// function: FindDegeneratedEdges -// purpose: -//======================================================================= - void NMTTools_DEProcessor::FindDegeneratedEdges() -{ - Standard_Integer i, aNb, nV, nF, nVx, ip, iRankE; - TopoDS_Vertex aV; - TopTools_IndexedDataMapOfShapeListOfShape aMEF; - // - aNb=myDS->NumberOfShapesOfTheObject(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape aF=myDS->Shape(i); - 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); - if (aS.ShapeType()==TopAbs_EDGE) { - const TopoDS_Edge& aE=TopoDS::Edge(aS); - - if (BRep_Tool::Degenerated(aE)) { - iRankE=myDS->Rank(i); - aV=TopExp::FirstVertex(aE); - nVx=myDS->ShapeIndex(aV, iRankE); - // - nV=nVx; - ip=myFiller->FindSDVertex(nV); - if (ip) { - nV=ip; - } - // - TColStd_ListOfInteger aLFn; - const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE); - TopTools_ListIteratorOfListOfShape anIt(aLF); - for (; anIt.More(); anIt.Next()) { - const TopoDS_Shape& aF=anIt.Value(); - nF=myDS->ShapeIndex(aF, iRankE); - aLFn.Append(nF); - } - BOPTools_DEInfo aDEInfo; - aDEInfo.SetVertex(nV); - aDEInfo.SetFaces(aLFn); - - myDEMap.Add (i, aDEInfo); - } - } - } -} -//======================================================================= -// function: DoPaves -// purpose: -//======================================================================= - void NMTTools_DEProcessor::DoPaves() -{ - - Standard_Integer i, aNbE, nED, nVD, aNbLPB, nFD; - // - nFD=0; - aNbE=myDEMap.Extent(); - for (i=1; i<=aNbE; ++i) { - nED=myDEMap.FindKey(i); - // - const BOPTools_DEInfo& aDEInfo=myDEMap(i); - nVD=aDEInfo.Vertex(); - // - // Fill PaveSet for the edge nED - const TColStd_ListOfInteger& nLF=aDEInfo.Faces(); - TColStd_ListIteratorOfListOfInteger anIt(nLF); - for (; anIt.More(); anIt.Next()) { - nFD=anIt.Value(); - - BOPTools_ListOfPaveBlock aLPB; - FindPaveBlocks(nED, nVD, nFD, aLPB); - // - aNbLPB=aLPB.Extent(); - if (!aNbLPB) { - continue; - } - // - FillPaveSet (nED, nVD, nFD, aLPB); - } - // - // Fill aSplitEdges for the edge nED - FillSplitEdgesPool(nED); - // - // MakeSplitEdges - MakeSplitEdges(nED, nFD); - // - }// next nED -} -//======================================================================= -// function: FindPaveBlocks -// purpose: -//======================================================================= - void NMTTools_DEProcessor::FindPaveBlocks(const Standard_Integer , - const Standard_Integer nVD, - const Standard_Integer nFD, - BOPTools_ListOfPaveBlock& aLPBOut) -{ - BOPTools_ListIteratorOfListOfPaveBlock anIt; - Standard_Integer i, aNb, nF2, nV; - // - BOPTools_CArray1OfSSInterference& aFFs=(myFiller->IP())->SSInterferences(); - // - aNb=aFFs.Extent(); - for (i=1; i<=aNb; ++i) { - BOPTools_SSInterference& aFF=aFFs(i); - // - nF2=aFF.OppositeIndex(nFD); - if (!nF2) { - continue; - } - // - // Split Parts - const BOPTools_ListOfPaveBlock& aLPBSplits=aFF.PaveBlocks(); - anIt.Initialize(aLPBSplits); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPBSp=anIt.Value(); - // - const BOPTools_Pave& aPave1=aPBSp.Pave1(); - nV=aPave1.Index(); - if (nV==nVD) { - aLPBOut.Append(aPBSp); - continue; - } - // - const BOPTools_Pave& aPave2=aPBSp.Pave2(); - nV=aPave2.Index(); - if (nV==nVD) { - aLPBOut.Append(aPBSp); - continue; - } - } - // - // Section Parts - Standard_Integer j, aNbCurves; - // - BOPTools_SequenceOfCurves& aSC=aFF.Curves(); - aNbCurves=aSC.Length(); - for (j=1; j<=aNbCurves; ++j) { - const BOPTools_Curve& aBC=aSC(j); - const BOPTools_ListOfPaveBlock& aLPBSe=aBC.NewPaveBlocks(); - // - anIt.Initialize(aLPBSe); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPBSe=anIt.Value(); - // - const BOPTools_Pave& aPv1=aPBSe.Pave1(); - nV=aPv1.Index(); - if (nV==nVD) { - aLPBOut.Append(aPBSe); - continue; - } - // - const BOPTools_Pave& aPv2=aPBSe.Pave2(); - nV=aPv2.Index(); - if (nV==nVD) { - aLPBOut.Append(aPBSe); - continue; - } - } - } - } -} -//======================================================================= -// function: FillPaveSet -// purpose: -//======================================================================= - void NMTTools_DEProcessor::FillPaveSet (const Standard_Integer nED, - const Standard_Integer nVD, - const Standard_Integer nFD, - const BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Boolean bIsDone, bXDir, bRejectFlag; - Standard_Integer nE, aNbPoints, j; - Standard_Real aTD1, aTD2, aT1, aT2, aTolInter, aX, aDT, aXx; - gp_Pnt2d aP2d1, aP2d2, aP2D; - gp_Lin2d aLDE; - // - aDT=Precision::PConfusion(); - // - BOPTools_PaveSet& aPaveSet= - (myFiller->ChangePavePool()).ChangeValue(myDS->RefEdge(nED)); - // - // Clear aPaveSet, aSplitEdges - aPaveSet.ChangeSet().Clear(); - // - const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED)); - const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD)); - // - // 2D Curve of degenerated edge on the face aDF - Handle(Geom2d_Curve) aC2DDE1=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2); - Handle(Geom2d_TrimmedCurve)aC2DDE=new Geom2d_TrimmedCurve(aC2DDE1, aTD1, aTD2); - // - // Choose direction for degenerated edge - aC2DDE->D0(aTD1, aP2d1); - aC2DDE->D0(aTD2, aP2d2); - - bXDir=Standard_False; - if (fabs(aP2d1.Y()-aP2d2.Y()) < aDT){ - bXDir=!bXDir; - } - // - // Prepare bounding Paves - BOPTools_Pave aPave1 (nVD, aTD1, BooleanOperations_UnknownInterference); - aPaveSet.Append(aPave1); - BOPTools_Pave aPave2 (nVD, aTD2, BooleanOperations_UnknownInterference); - aPaveSet.Append(aPave2); - // - // Fill other paves - BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB=anIt.Value(); - nE=aPB.Edge(); - const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE)); - - Handle(Geom2d_Curve) aC2D=BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2); - // - // Intersection - Geom2dAdaptor_Curve aGAC1, aGAC2; - // - aGAC1.Load(aC2DDE, aTD1, aTD2); - Handle(Geom2d_Line) aL2D= Handle(Geom2d_Line)::DownCast(aC2D); - if (!aL2D.IsNull()) { - aGAC2.Load(aC2D); - } - else { - aGAC2.Load(aC2D, aT1, aT2); - } - // - aTolInter=0.001; - Geom2dInt_GInter aGInter(aGAC1, aGAC2, aTolInter, aTolInter); - bIsDone=aGInter.IsDone(); - if(bIsDone) { - aNbPoints=aGInter.NbPoints(); - if (aNbPoints) { - for (j=1; j<=aNbPoints; ++j) { - aP2D=aGInter.Point(j).Value(); - Handle(Geom2d_Line) aCLDE; - // - //modified by NIZNHY-PKV Thu Mar 20 17:37:32 2008f - Handle(Geom2d_TrimmedCurve) aCLDET1= - Handle(Geom2d_TrimmedCurve)::DownCast(aC2DDE1); - if (aCLDET1.IsNull()) { - aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1); - } - else { - Handle(Geom2d_Curve) aBasisCurve=aCLDET1->BasisCurve(); - aCLDE=Handle(Geom2d_Line)::DownCast(aBasisCurve); - } - //aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1); - //modified by NIZNHY-PKV Thu Mar 20 17:37:37 2008t - - if (aCLDE.IsNull()) { - continue; - } - - aLDE=aCLDE->Lin2d(); - aX=ElCLib::Parameter(aLDE, aP2D); - // - if (fabs (aX-aTD1) < aDT || fabs (aX-aTD2) < aDT) { - continue; - } - if (aX < aTD1 || aX > aTD2) { - continue; - } - // - bRejectFlag=Standard_False; - const BOPTools_ListOfPave& aListOfPave=aPaveSet.Set(); - BOPTools_ListIteratorOfListOfPave aPaveIt(aListOfPave); - for (; aPaveIt.More(); aPaveIt.Next()) { - const BOPTools_Pave& aPavex=aPaveIt.Value(); - aXx=aPavex.Param(); - if (fabs (aX-aXx) < aDT) { - bRejectFlag=Standard_True; - break; - } - } - if (bRejectFlag) { - continue; - } - // - BOPTools_Pave aPave(nVD, aX, BooleanOperations_UnknownInterference); - aPaveSet.Append(aPave); - } - } - } - } -} -//======================================================================= -// function: FillSplitEdgesPool -// purpose: -//======================================================================= - void NMTTools_DEProcessor::FillSplitEdgesPool (const Standard_Integer nED) -{ - BOPTools_SplitShapesPool& aSplitShapesPool= - myFiller->ChangeSplitShapesPool(); - BOPTools_ListOfPaveBlock& aSplitEdges= - aSplitShapesPool.ChangeValue(myDS->RefEdge(nED)); - // - aSplitEdges.Clear(); - // - const BOPTools_PavePool& aPavePool=myFiller->PavePool(); - BOPTools_PavePool* pPavePool=(BOPTools_PavePool*) &aPavePool; - BOPTools_PaveSet& aPaveSet= pPavePool->ChangeValue(myDS->RefEdge(nED)); - - BOPTools_PaveBlockIterator aPBIt(nED, aPaveSet); - for (; aPBIt.More(); aPBIt.Next()) { - BOPTools_PaveBlock& aPB=aPBIt.Value(); - aSplitEdges.Append(aPB); - } -} -//======================================================================= -// function: MakeSplitEdges -// purpose: -//======================================================================= - void NMTTools_DEProcessor::MakeSplitEdges (const Standard_Integer nED, - const Standard_Integer nFD) -{ - const BOPTools_SplitShapesPool& aSplitShapesPool=myFiller->SplitShapesPool(); - const BOPTools_ListOfPaveBlock& aSplitEdges=aSplitShapesPool(myDS->RefEdge(nED)); - - Standard_Integer nV1, nV2, aNbPB, aNewShapeIndex; - Standard_Real t1, t2; - TopoDS_Edge aE, aESplit; - TopoDS_Vertex aV1, aV2; - BOPTools_ListIteratorOfListOfPaveBlock aPBIt; - // - const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED)); - const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD)); - // - //modified by NIZNHY-PKV Wed Oct 20 13:20:37 2010f - aNbPB=aSplitEdges.Extent(); - if (aNbPB==1) { - Standard_Real aT1, aT2, dT1, dT2, aDT; - Handle(Geom2d_Curve) aC2D; - // - BOPTools_PaveBlock& aPB=aSplitEdges.First(); - // - const BOPTools_Pave& aPave1=aPB.Pave1(); - t1=aPave1.Param(); - const BOPTools_Pave& aPave2=aPB.Pave2(); - t2=aPave2.Param(); - //// - nV1=aPave1.Index(); - aV1=*((TopoDS_Vertex*)&myDS->GetShape(nV1)); - // - aV2=TopExp::FirstVertex(aDE); - if (aV2.IsSame(aV1)) { - aC2D=BRep_Tool::CurveOnSurface(aDE, aDF, aT1, aT2); - dT1=aT1-t1; - if (dT1<0.) { - dT1=-dT1; - } - // - dT2=aT2-t2; - if (dT2<0.) { - dT2=-dT2; - } - aDT=Precision::PConfusion(); - if(dT1Clear(); - return; - } - } - } - //modified by NIZNHY-PKV Wed Oct 20 13:20:39 2010t - // - aPBIt.Initialize(aSplitEdges); - for (; aPBIt.More(); aPBIt.Next()) { - BOPTools_PaveBlock& aPB=aPBIt.Value(); - - const BOPTools_Pave& aPave1=aPB.Pave1(); - nV1=aPave1.Index(); - t1=aPave1.Param(); - aV1=TopoDS::Vertex(myDS->GetShape(nV1)); - aV1.Orientation(TopAbs_FORWARD); - - const BOPTools_Pave& aPave2=aPB.Pave2(); - nV2=aPave2.Index(); - t2=aPave2.Param(); - aV2=TopoDS::Vertex(myDS->GetShape(nV2)); - aV2.Orientation(TopAbs_REVERSED); - - MakeSplitEdge(aDE, aDF, aV1, t1, aV2, t2, aESplit); - // - // Add Split Part of the Original Edge to the DS - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - - anASSeq.SetNewSuccessor(nV1); - anASSeq.SetNewOrientation(aV1.Orientation()); - - anASSeq.SetNewSuccessor(nV2); - anASSeq.SetNewOrientation(aV2.Orientation()); - - myDS->InsertShapeAndAncestorsSuccessors(aESplit, anASSeq); - aNewShapeIndex=myDS->NumberOfInsertedShapes(); - myDS->SetState(aNewShapeIndex, BooleanOperations_UNKNOWN); - // - // Fill Split Set for the Original Edge - aPB.SetEdge(aNewShapeIndex); - // - } -} -//======================================================================= -// function: MakeSplitEdge -// purpose: -//======================================================================= - void NMTTools_DEProcessor::MakeSplitEdge (const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const TopoDS_Vertex& aV1, - const Standard_Real aP1, - const TopoDS_Vertex& aV2, - const Standard_Real aP2, - TopoDS_Edge& aNewEdge) -{ - Standard_Real aTol=1.e-7; - - TopoDS_Edge E=aE; - - E.EmptyCopy(); - BRep_Builder BB; - BB.Add (E, aV1); - BB.Add (E, aV2); - - BB.Range(E, aF, aP1, aP2); - - BB.Degenerated(E, Standard_True); - - BB.UpdateEdge(E, aTol); - aNewEdge=E; -} - diff --git a/src/NMTTools_NEW/NMTTools_DEProcessor.hxx b/src/NMTTools_NEW/NMTTools_DEProcessor.hxx deleted file mode 100644 index e2ee6e089..000000000 --- a/src/NMTTools_NEW/NMTTools_DEProcessor.hxx +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_DEProcessor.hxx -// Created: Wed Sep 12 12:10:52 2001 -// Author: Peter KURNEV -// - -#ifndef _NMTTools_DEProcessor_HeaderFile -#define _NMTTools_DEProcessor_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -//!
-//! 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 -//purpose : -//======================================================================= -class NMTTools_DEProcessor { -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; - - - -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) ; - - - NMTTools_PPaveFiller myFiller; - NMTDS_PShapesDataStructure myDS; - Standard_Boolean myIsDone; - BOPTools_IndexedDataMapOfIntegerDEInfo myDEMap; -}; -#endif diff --git a/src/NMTTools_NEW/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx b/src/NMTTools_NEW/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx deleted file mode 100644 index 1117b0d7d..000000000 --- a/src/NMTTools_NEW/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx -// Created: Mon Feb 20 12:24:47 2012 -// Author: -// - - -#ifndef NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile -#define NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo_HeaderFile - -#ifndef NMTTools_DataMapOfIntegerFaceInfo_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTTools_NEW/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx b/src/NMTTools_NEW/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx deleted file mode 100644 index 415d7db84..000000000 --- a/src/NMTTools_NEW/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx -// Created: Mon Feb 20 12:04:52 2012 -// Author: -// - - -#ifndef NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile -#define NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock_HeaderFile - -#ifndef NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTTools_NEW/NMTTools_DataMapOfIntegerFaceInfo.hxx b/src/NMTTools_NEW/NMTTools_DataMapOfIntegerFaceInfo.hxx deleted file mode 100644 index 7d97931fb..000000000 --- a/src/NMTTools_NEW/NMTTools_DataMapOfIntegerFaceInfo.hxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapOfIntegerFaceInfo.hxx -// Created: Mon Feb 20 12:21:55 2012 -// Author: -// - - -#ifndef NMTTools_DataMapOfIntegerFaceInfo_HeaderFile -#define NMTTools_DataMapOfIntegerFaceInfo_HeaderFile - -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_DataMap NMTTools_DataMapOfIntegerFaceInfo; -typedef NMTTools_DataMapOfIntegerFaceInfo::Iterator NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo; - -#undef _NCollection_MapHasher - - -#endif diff --git a/src/NMTTools_NEW/NMTTools_DataMapOfIntegerListOfPaveBlock.hxx b/src/NMTTools_NEW/NMTTools_DataMapOfIntegerListOfPaveBlock.hxx deleted file mode 100644 index 805c92eca..000000000 --- a/src/NMTTools_NEW/NMTTools_DataMapOfIntegerListOfPaveBlock.hxx +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_DataMapOfIntegerListOfPaveBlock.hxx -// Created: Mon Feb 20 09:27:40 2012 -// Author: -// - - -#ifndef NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile -#define NMTTools_DataMapOfIntegerListOfPaveBlock_HeaderFile - - -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_DataMap NMTTools_DataMapOfIntegerListOfPaveBlock; -typedef NMTTools_DataMapOfIntegerListOfPaveBlock::Iterator NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock; - -#undef _NCollection_MapHasher - - -#endif diff --git a/src/NMTTools_NEW/NMTTools_FaceInfo.cxx b/src/NMTTools_NEW/NMTTools_FaceInfo.cxx deleted file mode 100644 index 26bbcdcd9..000000000 --- a/src/NMTTools_NEW/NMTTools_FaceInfo.cxx +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_FaceInfo.cxx -// Created: Tue Dec 9 12:23:29 2003 -// Author: Peter KURNEV -// -// -#include diff --git a/src/NMTTools_NEW/NMTTools_FaceInfo.hxx b/src/NMTTools_NEW/NMTTools_FaceInfo.hxx deleted file mode 100644 index 6a37fb79c..000000000 --- a/src/NMTTools_NEW/NMTTools_FaceInfo.hxx +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_FaceInfo.hxx -// Created: Tue Dec 9 12:23:29 2003 -// Author: Peter KURNEV -// -// -#ifndef _NMTTools_FaceInfo_HeaderFile -#define _NMTTools_FaceInfo_HeaderFile - -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//class : NMTTools_FaceInfo -//purpose : -//======================================================================= -class NMTTools_FaceInfo { - public: - - //! Empty contructor
- //!
- NMTTools_FaceInfo(); - - virtual ~NMTTools_FaceInfo(); - - //! Clears the contents
- Standard_EXPORT void Clear() ; - - //! Modifier
- //! Sets the index of the face
- void SetIndex(const Standard_Integer theI) ; - - //! Selector
- //! Returns the index of the face
- //!
- //! In
- //!
- Standard_Integer Index() const; - - //! Selector
- //! Returns the pave blocks of the face
- //! that have state In
- const NMTTools_MapOfPaveBlock& PaveBlocksIn() const; - -//! Selector/Modifier
- //! Returns the pave blocks
- //! of the face
- //! that have state In
- NMTTools_MapOfPaveBlock& ChangePaveBlocksIn() ; - - //! Selector
- //! Returns the list of indices for vertices
- //! of the face
- //! that have state In
- const TColStd_MapOfInteger& VerticesIn() const; - - //! Selector/Modifier
- //! Returns the list of indices for vertices
- //! of the face
- //! that have state In
- //!
- //! On
- //!
- TColStd_MapOfInteger& ChangeVerticesIn() ; - - //! Selector
- //! Returns the pave blocks of the face
- //! that have state On
- const NMTTools_MapOfPaveBlock& PaveBlocksOn() const; - - //! Selector/Modifier
- //! Returns the pave blocks
- //! of the face
- //! that have state On
- NMTTools_MapOfPaveBlock& ChangePaveBlocksOn() ; - - //! Selector
- //! Returns the list of indices for vertices
- //! of the face
- //! that have state On
- const TColStd_MapOfInteger& VerticesOn() const; - - //! Selector/Modifier
- //! Returns the list of indices for vertices
- //! of the face
- //! that have state On
- TColStd_MapOfInteger& ChangeVerticesOn() ; - - protected: - Standard_Integer myIndex; - NMTTools_MapOfPaveBlock myPaveBlocksIn; - TColStd_MapOfInteger myVerticesIn; - NMTTools_MapOfPaveBlock myPaveBlocksOn; - TColStd_MapOfInteger myVerticesOn; -}; - -#include -#endif diff --git a/src/NMTTools_NEW/NMTTools_FaceInfo.lxx b/src/NMTTools_NEW/NMTTools_FaceInfo.lxx deleted file mode 100644 index 7a14228cc..000000000 --- a/src/NMTTools_NEW/NMTTools_FaceInfo.lxx +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: NMTTools_FaceInfo.lxx -// Created: Tue Dec 9 12:23:29 2003 -// Author: Peter KURNEV -// -// - -//======================================================================= -//function : -//purpose : -//======================================================================= -inline NMTTools_FaceInfo::NMTTools_FaceInfo() -: - myIndex(-1) -{ -} -//======================================================================= -//function : ~ -//purpose : -//======================================================================= -inline NMTTools_FaceInfo::~NMTTools_FaceInfo() -{ - Clear(); -} -//======================================================================= -//function : Clear -//purpose : -//======================================================================= -inline void NMTTools_FaceInfo::Clear() -{ - myIndex=-1; - myPaveBlocksIn.Clear(); - myVerticesIn.Clear(); - myPaveBlocksOn.Clear(); - myVerticesOn.Clear(); -} -//======================================================================= -//function : SetIndex -//purpose : -//======================================================================= - inline void NMTTools_FaceInfo::SetIndex(const Standard_Integer theI) -{ - myIndex=theI; -} -//======================================================================= -//function : Index -//purpose : -//======================================================================= - inline Standard_Integer NMTTools_FaceInfo::Index()const -{ - return myIndex; -} -//======================================================================= -//function : PaveBlockIn -//purpose : -//======================================================================= - inline const NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::PaveBlocksIn()const -{ - return myPaveBlocksIn; -} -//======================================================================= -//function : ChangePaveBlocksIn -//purpose : -//======================================================================= - inline NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::ChangePaveBlocksIn() -{ - return myPaveBlocksIn; -} -//======================================================================= -//function : VerticesIn -//purpose : -//======================================================================= - inline const TColStd_MapOfInteger& NMTTools_FaceInfo::VerticesIn()const -{ - return myVerticesIn; -} -//======================================================================= -//function : ChangeVerticesIn -//purpose : -//======================================================================= - inline TColStd_MapOfInteger& NMTTools_FaceInfo::ChangeVerticesIn() -{ - return myVerticesIn; -} -//======================================================================= -//function : PaveBlockOn -//purpose : -//======================================================================= - inline const NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::PaveBlocksOn()const -{ - return myPaveBlocksOn; -} -//======================================================================= -//function : ChangePaveBlocksOn -//purpose : -//======================================================================= - inline NMTTools_MapOfPaveBlock& NMTTools_FaceInfo::ChangePaveBlocksOn() -{ - return myPaveBlocksOn; -} -//======================================================================= -//function : VerticesOn -//purpose : -//======================================================================= - inline const TColStd_MapOfInteger& NMTTools_FaceInfo::VerticesOn()const -{ - return myVerticesOn; -} -//======================================================================= -//function : ChangeVerticesOn -//purpose : -//======================================================================= - inline TColStd_MapOfInteger& NMTTools_FaceInfo::ChangeVerticesOn() -{ - return myVerticesOn; -} diff --git a/src/NMTTools_NEW/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx b/src/NMTTools_NEW/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx deleted file mode 100644 index 479a13158..000000000 --- a/src/NMTTools_NEW/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IndexedDataMapOfIndexedMapOfInteger.hxx -// Created: Mon Feb 20 09:20:07 2012 -// Author: -// - - -#ifndef NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile -#define NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile - - -#include -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_IndexedDataMap NMTTools_IndexedDataMapOfIndexedMapOfInteger; - -#undef _NCollection_MapHasher - - - -#endif diff --git a/src/NMTTools_NEW/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/NMTTools_NEW/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx deleted file mode 100644 index 6dbe387cb..000000000 --- a/src/NMTTools_NEW/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IndexedDataMapOfIndexedMapOfInteger.hxx -// Created: Mon Feb 20 09:20:07 2012 -// Author: -// -// File: NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx -// Created: Mon Feb 20 11:59:23 2012 -// Author: -// - - -#ifndef NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile -#define NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile - - -#include -#include -#include - -#define _NCollection_MapHasher -#include - - -typedef NCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapeIndexedMapOfShape; - -#undef _NCollection_MapHasher - - -#endif - diff --git a/src/NMTTools_NEW/NMTTools_IndexedDataMapOfShapePaveBlock.hxx b/src/NMTTools_NEW/NMTTools_IndexedDataMapOfShapePaveBlock.hxx deleted file mode 100644 index db2546036..000000000 --- a/src/NMTTools_NEW/NMTTools_IndexedDataMapOfShapePaveBlock.hxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_IndexedDataMapOfShapePaveBlock.hxx -// Created: Mon Feb 20 11:55:34 2012 -// Author: -// - - -#ifndef NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile -#define NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile - -#include -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapePaveBlock; - -#undef _NCollection_MapHasher - - -#endif diff --git a/src/NMTTools_NEW/NMTTools_ListIteratorOfListOfCommonBlock.hxx b/src/NMTTools_NEW/NMTTools_ListIteratorOfListOfCommonBlock.hxx deleted file mode 100644 index 160530caf..000000000 --- a/src/NMTTools_NEW/NMTTools_ListIteratorOfListOfCommonBlock.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListIteratorOfListOfCommonBlock.hxx -// Created: Mon Feb 20 11:25:23 2012 -// Author: -// - -#ifndef NMTDS_ListIteratorOfListOfCommonBlock_HeaderFile -#define NMTDS_ListIteratorOfListOfCommonBlock_HeaderFile - -#ifndef NMTTools_ListOfCommonBlock_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTTools_NEW/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx b/src/NMTTools_NEW/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx deleted file mode 100644 index 0a1b3ca3d..000000000 --- a/src/NMTTools_NEW/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListIteratorOfListOfCoupleOfShape.hxx -// Created: Mon Feb 20 11:25:23 2012 -// Author: -// - -#ifndef NMTDS_ListIteratorOfListOfCoupleOfShape_HeaderFile -#define NMTDS_ListIteratorOfListOfCoupleOfShape_HeaderFile - -#ifndef NMTTools_ListOfCoupleOfShape_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTTools_NEW/NMTTools_ListOfCommonBlock.hxx b/src/NMTTools_NEW/NMTTools_ListOfCommonBlock.hxx deleted file mode 100644 index ebca6d403..000000000 --- a/src/NMTTools_NEW/NMTTools_ListOfCommonBlock.hxx +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListOfCommonBlock.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - -#ifndef NMTTools_ListOfCommonBlock_HeaderFile -#define NMTTools_ListOfCommonBlock_HeaderFile - -#include -#include - -typedef NCollection_List NMTTools_ListOfCommonBlock; -typedef NMTTools_ListOfCommonBlock::Iterator NMTTools_ListIteratorOfListOfCommonBlock; - -#endif diff --git a/src/NMTTools_NEW/NMTTools_ListOfCoupleOfShape.hxx b/src/NMTTools_NEW/NMTTools_ListOfCoupleOfShape.hxx deleted file mode 100644 index 6660a46f2..000000000 --- a/src/NMTTools_NEW/NMTTools_ListOfCoupleOfShape.hxx +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_ListOfCoupleOfShape.hxx -// Created: Mon Feb 20 07:27:34 2012 -// Author: -// - -#ifndef NMTTools_ListOfCoupleOfShape_HeaderFile -#define NMTTools_ListOfCoupleOfShape_HeaderFile - -#include -#include - -typedef NCollection_List NMTTools_ListOfCoupleOfShape; -typedef NMTTools_ListOfCoupleOfShape::Iterator NMTTools_ListIteratorOfListOfCoupleOfShape; - -#endif diff --git a/src/NMTTools_NEW/NMTTools_MapIteratorOfMapOfPaveBlock.hxx b/src/NMTTools_NEW/NMTTools_MapIteratorOfMapOfPaveBlock.hxx deleted file mode 100644 index bf94f3757..000000000 --- a/src/NMTTools_NEW/NMTTools_MapIteratorOfMapOfPaveBlock.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_MapIteratorOfMapOfPaveBlock.hxx -// Created: Mon Feb 20 11:47:30 2012 -// Author: -// - - -#ifndef NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile -#define NMTTools_MapIteratorOfMapOfPaveBlock_HeaderFile - -#ifndef NMTTools_MapOfPaveBlock_HeaderFile -#include -#endif - -#endif diff --git a/src/NMTTools_NEW/NMTTools_MapOfPaveBlock.hxx b/src/NMTTools_NEW/NMTTools_MapOfPaveBlock.hxx deleted file mode 100644 index 9def69219..000000000 --- a/src/NMTTools_NEW/NMTTools_MapOfPaveBlock.hxx +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it 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_MapOfPaveBlock.hxx -// Created: Mon Feb 20 08:19:07 2012 -// Author: -// - - -#ifndef NMTTools_MapOfPaveBlock_HeaderFile -#define NMTTools_MapOfPaveBlock_HeaderFile - -#include -#include - -#define _NCollection_MapHasher -#include - -typedef NCollection_Map NMTTools_MapOfPaveBlock; -typedef NMTTools_MapOfPaveBlock::Iterator NMTTools_MapIteratorOfMapOfPaveBlock; - -#undef _NCollection_MapHasher - -#endif diff --git a/src/NMTTools_NEW/NMTTools_PPaveFiller.hxx b/src/NMTTools_NEW/NMTTools_PPaveFiller.hxx deleted file mode 100644 index 516d71f52..000000000 --- a/src/NMTTools_NEW/NMTTools_PPaveFiller.hxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_PPaveFiller.hxx -// Created: Tue Dec 9 12:23:29 2003 -// Author: Peter KURNEV -// -// -#ifndef _NMTTools_PPaveFiller_HeaderFile -#define _NMTTools_PPaveFiller_HeaderFile - -class NMTTools_PaveFiller; - -typedef NMTTools_PaveFiller* NMTTools_PPaveFiller; - -#endif diff --git a/src/NMTTools_NEW/NMTTools_PaveFiller.cxx b/src/NMTTools_NEW/NMTTools_PaveFiller.cxx deleted file mode 100644 index b98bc4fa6..000000000 --- a/src/NMTTools_NEW/NMTTools_PaveFiller.cxx +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_PaveFiller.cxx -// Created: Fri Dec 5 14:58:54 2003 -// Author: Peter KURNEV -// -// -#include -// -#include -#include -#include -#include -#include -#include - -//======================================================================= -// function: NMTTools_PaveFiller::NMTTools_PaveFiller -// purpose: -//======================================================================= - NMTTools_PaveFiller::NMTTools_PaveFiller() -{ - myDS=NULL; - myDSIt=NULL; - myIsDone=Standard_False; - myNbSources=0; - myNbEdges=0; - myIP=NULL; -} -//======================================================================= -// function: ~ -// purpose: -//======================================================================= - NMTTools_PaveFiller::~NMTTools_PaveFiller() -{ - Clear(); -} -//======================================================================= -// function: Clear -// purpose: -//======================================================================= - void NMTTools_PaveFiller::Clear() -{ - if (myDSIt) { - delete myDSIt; - } - if (myDS) { - delete myDS; - } - myDSIt=NULL; - myDS=NULL; - - if (myIP) { - delete myIP; - } - myIP=NULL; -} -//======================================================================= -// function: SetCompositeShape -// purpose: -//======================================================================= - void NMTTools_PaveFiller::SetCompositeShape(const TopoDS_Shape& aS) -{ - myCompositeShape=aS; -} -//======================================================================= -// function: CompositeShape -// purpose: -//======================================================================= - const TopoDS_Shape& NMTTools_PaveFiller::CompositeShape()const -{ - return myCompositeShape; -} -//======================================================================= -// function: DS -// purpose: -//======================================================================= - NMTDS_PShapesDataStructure NMTTools_PaveFiller::DS() -{ - return myDS; -} -//======================================================================= -// function: DSIt -// purpose: -//======================================================================= - NMTDS_PIterator NMTTools_PaveFiller::DSIt() -{ - return myDSIt; -} -//======================================================================= -// function: IP -// purpose: -//======================================================================= - NMTDS_PInterfPool NMTTools_PaveFiller::IP() -{ - return myIP; -} -//======================================================================= -// function:IsDone -// purpose: -//======================================================================= - Standard_Boolean NMTTools_PaveFiller::IsDone() const -{ - return myIsDone; -} -//======================================================================= -// function: Context -// purpose: -//======================================================================= - const Handle(IntTools_Context)& NMTTools_PaveFiller::Context() const -{ - return myContext; -} -//======================================================================= -// function: PavePool -// purpose: -//======================================================================= - const BOPTools_PavePool& NMTTools_PaveFiller::PavePool() const -{ - return myPavePool; -} -//======================================================================= -// function: ChangePavePool -// purpose: -//======================================================================= - BOPTools_PavePool& NMTTools_PaveFiller::ChangePavePool() -{ - return myPavePool; -} -//======================================================================= -// function: ChangePavePoolNew -// purpose: -//======================================================================= - BOPTools_PavePool& NMTTools_PaveFiller::ChangePavePoolNew() -{ - return myPavePoolNew; -} -//======================================================================= -// function: CommonBlockPool -// purpose: -//======================================================================= - const NMTTools_CommonBlockPool& NMTTools_PaveFiller::CommonBlockPool() const -{ - return myCommonBlockPool; -} -//======================================================================= -// function: ChangeCommonBlockPool -// purpose: -//======================================================================= - NMTTools_CommonBlockPool& NMTTools_PaveFiller::ChangeCommonBlockPool() -{ - return myCommonBlockPool; -} -//======================================================================= -// function: SplitShapesPool -// purpose: -//======================================================================= - const BOPTools_SplitShapesPool& NMTTools_PaveFiller::SplitShapesPool() const -{ - return mySplitShapesPool; -} -//======================================================================= -// function: ChangeSplitShapesPool -// purpose: -//======================================================================= - BOPTools_SplitShapesPool& NMTTools_PaveFiller::ChangeSplitShapesPool() -{ - return mySplitShapesPool; -} -//======================================================================= -// function: Init -// purpose: -//======================================================================= - void NMTTools_PaveFiller::Init() -{ - myIsDone=Standard_False; - if (myCompositeShape.IsNull()) { - return; - } - // - Clear(); - // 1. - myDS=new NMTDS_ShapesDataStructure; - myDS->SetCompositeShape(myCompositeShape); - myDS->Init(); - // - // 2. - myDSIt=new NMTDS_Iterator; - myDSIt->SetDS(myDS); - myDSIt->Prepare(); - // - // 3. - myNbSources=myDS->NumberOfShapesOfTheObject()+ - myDS->NumberOfShapesOfTheTool(); - myNbEdges=myDS->NbEdges(); - // - // 4 - myIP=new NMTDS_InterfPool; - // - // 5 - myContext=new IntTools_Context; -} - -//======================================================================= -// function: Perform -// purpose: -//======================================================================= - void NMTTools_PaveFiller::Perform() -{ - myIsDone=Standard_False; - // - //---------------- - try { - // 0. - Init(); - //1.VV - // - PerformVV(); - // - // 2.VE - myPavePool.Resize (myNbEdges); - - PrepareEdges(); - - PerformVE(); - // - // 3.VF - PerformVF(); - // - // 4.EE - myCommonBlockPool.Resize (myNbEdges); - mySplitShapesPool.Resize (myNbEdges); - myPavePoolNew .Resize (myNbEdges); - - PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE); - PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE); - // - PerformEE(); - // - RefinePavePool (); - // - myPavePoolNew.Destroy(); - myPavePoolNew.Resize (myNbEdges); - // - //modified by NIZNHY-PKV Mon Dec 12 09:13:53 2011f - UpdateCommonBlocks(0); - //modified by NIZNHY-PKV Mon Dec 12 09:13:56 2011t - // - // 5.EF - PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE); - PerformEF(); - // - RefinePavePool(); - // - myPavePoolNew.Destroy(); - - MakeSplitEdges(); - - UpdateCommonBlocks(); - // - // 6. FF - PerformFF (); - // - MakeBlocks(); - // - MakePCurves(); - // - // 7.Postprocessing - UpdatePaveBlocks(); - // - NMTTools_DEProcessor aDEP(*this); - aDEP.Do(); - // - MakeAloneVertices(); - // - //modified by NIZNHY-PKV Mon Dec 12 09:14:23 2011f - myIP->Purge(); - //modified by NIZNHY-PKV Mon Dec 12 09:14:27 2011t - myIsDone=Standard_True; - } - catch (BOPTColStd_Failure& ) { - } -} diff --git a/src/NMTTools_NEW/NMTTools_PaveFiller.hxx b/src/NMTTools_NEW/NMTTools_PaveFiller.hxx deleted file mode 100644 index 765e5aba3..000000000 --- a/src/NMTTools_NEW/NMTTools_PaveFiller.hxx +++ /dev/null @@ -1,500 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_PaveFiller.hxx -// Created: Fri Dec 5 14:58:54 2003 -// Author: Peter KURNEV -// -// -#ifndef _NMTTools_PaveFiller_HeaderFile -#define _NMTTools_PaveFiller_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -/* -class TopoDS_Shape; -class BOPTools_Pave; -class IntTools_ShrunkRange; -class BOPTools_PavePool; -class NMTTools_CommonBlockPool; -class BOPTools_SplitShapesPool; -class BOPTools_PaveBlock; -class TopoDS_Vertex; -class NMTTools_ListOfCommonBlock; -class BOPTools_IDMapOfPaveBlockIMapOfPaveBlock; -class BOPTools_IDMapOfPaveBlockIMapOfInteger; -class BooleanOperations_IndexedDataMapOfShapeInteger; -class TColStd_ListOfInteger; -class BOPTools_ListOfPaveBlock; -class TopoDS_Face; -class BOPTools_PaveSet; -class BOPTools_Curve; -class BOPTools_SSInterference; -class gp_Pnt; -class NMTTools_IndexedDataMapOfIndexedMapOfInteger; -class TopTools_ListOfShape; -class TopoDS_Edge; -class TopTools_DataMapOfShapeShape; -class TCoLSTD_MapOfInteger; -*/ - - -//======================================================================= -//function : NMTTools_PaveFiller -//purpose : -//======================================================================= -class NMTTools_PaveFiller { - public: - Standard_EXPORT - NMTTools_PaveFiller(); - - Standard_EXPORT - virtual ~NMTTools_PaveFiller(); - - Standard_EXPORT - void SetCompositeShape(const TopoDS_Shape& aS) ; - - Standard_EXPORT - const TopoDS_Shape& CompositeShape() const; - - Standard_EXPORT - NMTDS_PShapesDataStructure DS() ; - - Standard_EXPORT - NMTDS_PIterator DSIt() ; - - Standard_EXPORT - NMTDS_PInterfPool IP() ; - - Standard_EXPORT - virtual void Perform() ; - - Standard_EXPORT - Standard_Boolean IsDone() const; - - Standard_EXPORT - const Handle_IntTools_Context& Context() const; - - 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_Integer& aIsCommonBlock) ; - - 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 RealSplitsInFace(const Standard_Integer nF1, - BOPTools_ListOfPaveBlock& aLPB) ; - - 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) ; - - Standard_EXPORT - void FuseVertices(const TopoDS_Shape& aC, - TopTools_DataMapOfShapeShape& aDMVV) const; - - Standard_EXPORT - void TreatPaveBlocks(NMTTools_ListOfCommonBlock& theLCB) ; - - Standard_EXPORT - BOPTools_PavePool& ChangePavePoolNew() ; - - Standard_EXPORT - Standard_Boolean CheckCoincidence(const BOPTools_PaveBlock& aPB1, - const BOPTools_PaveBlock& aPB2) ; - - Standard_EXPORT - void PutClosingPaveOnCurve(BOPTools_Curve& aBC, - BOPTools_SSInterference& aFF) ; - - protected: - Standard_EXPORT - virtual void Init() ; - - Standard_EXPORT - virtual void Clear() ; - - 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 PrepareEdges() ; - - Standard_EXPORT - Standard_Boolean IsSuccessorsComputed(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 UpdateCommonBlocks(const Standard_Integer aI) ; - - 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() ; - - Standard_EXPORT - void FillFaceInfo() ; - - Standard_EXPORT - void CorrectTolR3D(const BOPTools_SSInterference& aFF, - const TColStd_MapOfInteger& aMVStick, - Standard_Real& aTolR3D) ; - - - NMTDS_PShapesDataStructure myDS; - Standard_Boolean myIsDone; - Standard_Integer myNbSources; - Standard_Integer myNbEdges; - BOPTools_PavePool myPavePool; - BOPTools_PavePool myPavePoolNew; - NMTTools_CommonBlockPool myCommonBlockPool; - BOPTools_SplitShapesPool mySplitShapesPool; - Handle_IntTools_Context myContext; - BOPTools_SSIntersectionAttribute mySectionAttribute; - NMTTools_IndexedDataMapOfIndexedMapOfInteger myAloneVertices; - TColStd_DataMapOfIntegerInteger myVSD; - NMTDS_PIterator myDSIt; - TopoDS_Shape myCompositeShape; - NMTDS_PInterfPool myIP; - NMTTools_DataMapOfIntegerFaceInfo myFaceInfo; - - - // private: - -}; -#endif diff --git a/src/NMTTools_NEW/NMTTools_PaveFiller_0.cxx b/src/NMTTools_NEW/NMTTools_PaveFiller_0.cxx deleted file mode 100644 index 832b0b0f0..000000000 --- a/src/NMTTools_NEW/NMTTools_PaveFiller_0.cxx +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_PaveFiller_0.cxx -// Created: Mon Dec 8 11:45:51 2003 -// Author: Peter KURNEV -// -// -#include - -#include -#include - -#include -#include -#include - -//======================================================================= -// function:IsSuccesstorsComputed -// purpose: -//======================================================================= - Standard_Boolean NMTTools_PaveFiller::IsSuccessorsComputed(const Standard_Integer aN1, - const Standard_Integer aN2)const -{ - Standard_Boolean bComputed; - Standard_Integer i, nSuc, n1, n2, ntmp, aNbS; - TopAbs_ShapeEnum aType; - TColStd_IndexedMapOfInteger aMSuc; - // - n1=aN1; - n2=aN2; - aType=myDS->GetShapeType(aN1); - if (aType!=TopAbs_VERTEX) { - ntmp=n1; - n1=n2; - n2=ntmp; - } - // - myDS->GetAllSuccessors(n2, aMSuc); - aNbS=aMSuc.Extent(); - for (i=1; i<=aNbS; ++i) { - nSuc=aMSuc(i); - bComputed=myIP->Contains(n1, nSuc); - if (bComputed) { - break; - } - } - return bComputed; -} -/* -//======================================================================= -// function: ExpectedPoolLength -// purpose: -//======================================================================= - Standard_Integer NMTTools_PaveFiller::ExpectedPoolLength()const -{ - Standard_Integer aNbIIs; - Standard_Real aCfPredict=.5; - // 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; - } - // - aNbIIs=(Standard_Integer) (aCfPredict*(Standard_Real)aNbIIs); - - return aNbIIs; -} -*/ -/* -//======================================================================= -//function : SortTypes -//purpose : -//======================================================================= - void NMTTools_PaveFiller::SortTypes(Standard_Integer& theWhat, - Standard_Integer& theWith)const -{ - Standard_Integer aWhat, aWith; - Standard_Boolean aReverseFlag; - TopAbs_ShapeEnum aType1, aType2; - // - aType1= myDS->GetShapeType(theWhat), - aType2= myDS->GetShapeType(theWith); - // - if (aType1==aType2) { - return; - } - // - aReverseFlag=Standard_True; - if (aType1==TopAbs_EDGE && aType2==TopAbs_FACE) { - aReverseFlag=Standard_False; - } - if (aType1==TopAbs_VERTEX && - (aType2==TopAbs_FACE || aType2==TopAbs_EDGE)) { - aReverseFlag=Standard_False; - } - // - aWhat=(aReverseFlag) ? theWith : theWhat; - aWith=(aReverseFlag) ? theWhat : theWith; - // - theWhat=aWhat; - theWith=aWith; -} -*/ diff --git a/src/NMTTools_NEW/NMTTools_PaveFiller_1.cxx b/src/NMTTools_NEW/NMTTools_PaveFiller_1.cxx deleted file mode 100644 index 0f566f218..000000000 --- a/src/NMTTools_NEW/NMTTools_PaveFiller_1.cxx +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_PaveFiller_1.cxx -// Created: Mon Dec 8 11:47:55 2003 -// Author: Peter KURNEV -// -// -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include - -//======================================================================= -// function: PerformVV -// purpose: -//======================================================================= - void NMTTools_PaveFiller::PerformVV() -{ - myIsDone=Standard_False; - // - Standard_Integer aNbVVs, aBL, aNbVSD, nVnew, i, j, n1, n2; - TColStd_DataMapIteratorOfDataMapOfIntegerListOfInteger aIt1; - TColStd_ListIteratorOfListOfInteger aItX, aItY; - TColStd_ListOfInteger aLIX; - TopTools_ListOfShape aLV; - TopoDS_Vertex aVnew; - // - myVSD.Clear(); - // - const TColStd_DataMapOfIntegerListOfInteger& aMVSD=myDSIt->SDVertices(); - aNbVSD=aMVSD.Extent(); - if (!aNbVSD) { - return; - } - // - BOPTools_CArray1OfVVInterference& aVVs=myIP->VVInterferences(); - // - // BlockLength correction - myDSIt->Initialize(TopAbs_VERTEX, TopAbs_VERTEX); - aNbVVs=myDSIt->BlockLength(); - aBL=aVVs.BlockLength(); - if (aNbVVs > aBL) { - aVVs.SetBlockLength(aNbVVs); - } - // - aIt1.Initialize(aMVSD); - for (; aIt1.More(); aIt1.Next()) { - aLV.Clear(); - // - n1=aIt1.Key(); - const TColStd_ListOfInteger& aLIV=aIt1.Value(); - // - // new vertex - const TopoDS_Shape& aS1=myDS->Shape(n1); - aLV.Append(aS1); - aItX.Initialize(aLIV); - for (; aItX.More(); aItX.Next()) { - n2=aItX.Value(); - const TopoDS_Shape& aS2=myDS->Shape(n2); - aLV.Append(aS2); - } - // - NMTTools_Tools::MakeNewVertex(aLV, aVnew); - // - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - // - myDS->InsertShapeAndAncestorsSuccessors(aVnew, anASSeq); - nVnew=myDS->NumberOfInsertedShapes(); - myDS->SetState (nVnew, BooleanOperations_ON); - // - // myVSD, aLIX - aLIX.Clear(); - aLIX.Append(n1); - myVSD.Bind(n1, nVnew); - // - aItX.Initialize(aLIV); - for (; aItX.More(); aItX.Next()) { - n2=aItX.Value(); - aLIX.Append(n2); - myVSD.Bind(n2, nVnew); - } - // - // interferences - aItX.Initialize(aLIX); - for (i=0; aItX.More(); aItX.Next(), ++i) { - aItY.Initialize(aLIX); - for (j=0; aItY.More(); aItY.Next(), ++j) { - if (j>i) { - n1=aItX.Value(); - n2=aItY.Value(); - myIP->Add(n1, n2, Standard_True, NMTDS_TI_VV); - // - BOPTools_VVInterference aVV(n1, n2); - aVV.SetNewShape(nVnew); - aVVs.Append(aVV); - } - } - } - }//for (; aIt1.More(); aIt1.Next()) { - myIsDone=Standard_True; -} -//======================================================================= -// function: FindSDVertex -// purpose: -//======================================================================= - Standard_Integer NMTTools_PaveFiller::FindSDVertex(const Standard_Integer nV)const -{ - Standard_Integer nVSD; - // - nVSD=0; - if (myVSD.IsBound(nV)) { - nVSD=myVSD.Find(nV); - } - return nVSD; -} -/* -//======================================================================= -// function: PerformNewVertices -// purpose: -//======================================================================= - void NMTTools_PaveFiller::PerformNewVertices() -{ -} -*/ diff --git a/src/NMTTools_NEW/NMTTools_PaveFiller_2.cxx b/src/NMTTools_NEW/NMTTools_PaveFiller_2.cxx deleted file mode 100644 index be0cbe728..000000000 --- a/src/NMTTools_NEW/NMTTools_PaveFiller_2.cxx +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_PaveFiller_2.cxx -// Created: Mon Dec 8 12:02:56 2003 -// Author: Peter KURNEV - -#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 Contains(const TopoDS_Edge& aE, - const TopoDS_Vertex& aV); - -//======================================================================= -// function: PerformVE -// purpose: -//======================================================================= -void NMTTools_PaveFiller::PerformVE() -{ - myIsDone=Standard_False; - // - Standard_Boolean bJustAdd; - Standard_Integer n1, n2, anIndexIn, aFlag, aWhat; - Standard_Integer aWith, aNbVEs, aBlockLength, iSDV, nV1; - Standard_Real aT; -#if OCC_VERSION_LARGE > 0x06030008 - // In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method - Standard_Boolean bToUpdateVertex; - Standard_Real aDist; -#endif - TopoDS_Vertex aV1; - TopoDS_Edge aE2; - BOPTools_IndexedMapOfCoupleOfInteger aSnareMap; - BOPTools_CoupleOfInteger aCouple; - // - BOPTools_CArray1OfVEInterference& aVEs=myIP->VEInterferences(); - // - myDSIt->Initialize (TopAbs_VERTEX, TopAbs_EDGE); - // - // BlockLength correction - aNbVEs=myDSIt->BlockLength(); - aBlockLength=aVEs.BlockLength(); - if (aNbVEs > aBlockLength) { - aVEs.SetBlockLength(aNbVEs); - } - // - for (; myDSIt->More(); myDSIt->Next()) { - myDSIt->Current(n1, n2, bJustAdd); - if (!IsSuccessorsComputed(n1, n2)) { - anIndexIn=0; - aWhat=n1; // Vertex - aWith=n2; // Edge - if (myDS->GetShapeType(n1)==TopAbs_EDGE) { - aWhat=n2; - aWith=n1; - } - // - if(bJustAdd) { - continue; - } - // Edge - aE2=TopoDS::Edge(myDS->Shape(aWith)); - if (BRep_Tool::Degenerated(aE2)){ - continue; - } - // Vertex - nV1=aWhat; - aV1=TopoDS::Vertex(myDS->Shape(aWhat)); - // - iSDV=FindSDVertex(aWhat); - 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 - } - // - //modified by NIZNHY-PKV Mon Dec 28 08:58:05 2009f -#if OCC_VERSION_LARGE > 0x06030008 - // In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method - aFlag = myContext->ComputeVE (aV1, aE2, aT, bToUpdateVertex, aDist); -#else - aFlag = myContext->ComputeVE (aV1, aE2, aT); -#endif - //modified by NIZNHY-PKV Mon Dec 28 08:58:13 2009t - // - if (!aFlag) { - // Add Interference to the Pool - BOPTools_VEInterference anInterf (aWhat, aWith, aT); - anIndexIn=aVEs.Append(anInterf); - // - // Add Pave to the Edge's myPavePool - aCouple.SetCouple(nV1, aWith); - if (!aSnareMap.Contains(aCouple)){ - aSnareMap.Add(aCouple); - // - BOPTools_Pave aPave(nV1, aT, BooleanOperations_VertexEdge); - aPave.SetInterference(anIndexIn); - BOPTools_PaveSet& aPaveSet= myPavePool(myDS->RefEdge(aWith)); - aPaveSet.Append(aPave); - } - // - // State for the Vertex in DS; - myDS->SetState (aWhat, BooleanOperations_ON); - // Insert Vertex in Interference Object - BOPTools_VEInterference& aVE=aVEs(anIndexIn); - aVE.SetNewShape(aWhat); - // - myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_VE); - // - //modified by NIZNHY-PKV Mon Dec 28 09:00:54 2009f -#if OCC_VERSION_LARGE > 0x06030008 - // In OCCT6.3.0sp9 is changed a signature of IntTools_Context::ComputeVE() method - if (bToUpdateVertex) { - BRep_Builder aBB; - // - aBB.UpdateVertex(aV1, aDist); - } -#endif - //modified by NIZNHY-PKV Mon Dec 28 09:00:57 2009t - // - } //if (!aFlag) { - } - } - myIsDone=Standard_True; -} - -//======================================================================= -// function: PrepareEdges -// purpose: -//======================================================================= -void NMTTools_PaveFiller::PrepareEdges() -{ - Standard_Integer i, nV, ii, aNBSuc, ip, aNbShapesObject; - Standard_Real aT; - TopAbs_Orientation anOr; - TopoDS_Edge aE; - TopoDS_Vertex aV; - // - aNbShapesObject=myDS->NumberOfShapesOfTheObject(); - for (i=1; i<=myNbSources; ++i) { - if (myDS->GetShapeType(i)==TopAbs_EDGE) { - aE=TopoDS::Edge(myDS->Shape(i)); - // - if (BRep_Tool::Degenerated(aE)){ - continue; - } - // - BOPTools_PaveSet& aPaveSet=myPavePool(myDS->RefEdge(i)); - // - // A <- - aNBSuc=myDS->NumberOfSuccessors(i); - for (ii=1; ii <=aNBSuc; ii++) { - nV=myDS->GetSuccessor(i, ii); - anOr=myDS->GetOrientation(i, ii); - aV=TopoDS::Vertex(myDS->Shape(nV)); - aV.Orientation(anOr); - aT=BRep_Tool::Parameter(aV, aE); - // - ip=FindSDVertex(nV); - if (ip) { - aV=TopoDS::Vertex(myDS->Shape(ip)); - aV.Orientation(anOr);// XX ? if the edge is closed it'll be amazing result - nV=ip; - } - // - BOPTools_Pave aPave(nV, aT); - 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_NEW/NMTTools_PaveFiller_3.cxx b/src/NMTTools_NEW/NMTTools_PaveFiller_3.cxx deleted file mode 100644 index e1061d1e3..000000000 --- a/src/NMTTools_NEW/NMTTools_PaveFiller_3.cxx +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_PaveFiller_3.cxx -// Created: Mon Dec 8 16:06:56 2003 -// Author: Peter KURNEV -// -// -#include - -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include - - -static - Standard_Boolean Contains(const TopoDS_Face& aF, - const TopoDS_Vertex& aV); - -//======================================================================= -// function: PerformVF -// purpose: -//======================================================================= - void NMTTools_PaveFiller::PerformVF() -{ - myIsDone=Standard_False; - // - Standard_Boolean aJustAdd; - Standard_Integer n1, n2, anIndexIn, aFlag, aWhat, aWith, aNbVSs, aBlockLength, iSDV; - Standard_Real aU, aV; - TopoDS_Vertex aV1; - TopoDS_Face aF2; - // - BOPTools_CArray1OfVSInterference& aVSs=myIP->VSInterferences(); - // - // V/E Interferences - myDSIt->Initialize(TopAbs_VERTEX, TopAbs_FACE); - // - // BlockLength correction - aNbVSs=myDSIt->BlockLength(); - aBlockLength=aVSs.BlockLength(); - if (aNbVSs > aBlockLength) { - aVSs.SetBlockLength(aNbVSs); - } - // - for (; myDSIt->More(); myDSIt->Next()) { - myDSIt->Current(n1, n2, aJustAdd); - if (! IsSuccessorsComputed(n1, n2)) { - anIndexIn=0; - aWhat=n1; // Vertex - aWith=n2; // Face - if (myDS->GetShapeType(n1)==TopAbs_FACE) { - aWhat=n2; - aWith=n1; - } - // - iSDV=FindSDVertex(aWhat); - // - if(aJustAdd) { - //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn); - continue; - } - // - aV1=TopoDS::Vertex(myDS->Shape(aWhat)); - if (iSDV) { - aV1=TopoDS::Vertex(myDS->Shape(iSDV)); - } - // - 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) { - // - // Add Interference to the Pool - BOPTools_VSInterference anInterf (aWhat, aWith, aU, aV); - anIndexIn=aVSs.Append(anInterf); - // - // SetState for Vertex in DS; - myDS->SetState (aWhat, BooleanOperations_ON); - // Insert Vertex in Interference Object - BOPTools_VSInterference& aVS=aVSs(anIndexIn); - aVS.SetNewShape(aWhat); - // qqf - { - myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_VF); - } - // qqt - } - //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn); - } - } - 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_NEW/NMTTools_PaveFiller_4.cxx b/src/NMTTools_NEW/NMTTools_PaveFiller_4.cxx deleted file mode 100644 index 188676c70..000000000 --- a/src/NMTTools_NEW/NMTTools_PaveFiller_4.cxx +++ /dev/null @@ -1,1613 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: NMTTools_PaveFiller_4.cxx -// Created: Mon Dec 8 17:08:58 2003 -// Author: Peter KURNEV - -#include - -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -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, - Standard_Real& aT2); - -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, - BOPTools_IMapOfPaveBlock& aProcessedBlocks, - BOPTools_IMapOfPaveBlock& aChain); - -static - void FindChains(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, - NMTTools_ListOfCommonBlock& aLCB); - -//======================================================================= -// function: PerformEE -// purpose: -//======================================================================= -void NMTTools_PaveFiller::PerformEE() -{ - myIsDone=Standard_False; - // - 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; - TopoDS_Vertex aNewVertex; - BooleanOperations_IndexedDataMapOfShapeInteger aMapVI; - BOPTools_IDMapOfPaveBlockIMapOfPaveBlock aMapCB; - // - BOPTools_CArray1OfEEInterference& aEEs=myIP->EEInterferences(); - // - myDSIt->Initialize(TopAbs_EDGE, TopAbs_EDGE); - // - // BlockLength correction - aNbVEs=myDSIt->BlockLength(); - aBlockLength=aEEs.BlockLength(); - if (aNbVEs > aBlockLength) { - aEEs.SetBlockLength(aNbVEs); - } - // - for (; myDSIt->More(); myDSIt->Next()) { - myDSIt->Current(n1, n2, bJustAdd); - anIndexIn = 0; - nE1=n1; - nE2=n2; - // - if(bJustAdd) { - continue; - } - // - 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; - } - // - aTolE1=BRep_Tool::Tolerance(aE1); - 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(); - const IntTools_ShrunkRange& aShrunkRange1=aPB1.ShrunkRange(); - // - const IntTools_Range& aSR1=aShrunkRange1.ShrunkRange(); - const Bnd_Box& aBB1=aShrunkRange1.BndBox(); - // - for (anIt2.Initialize(aLPB2); anIt2.More(); anIt2.Next()) { - BOPTools_PaveBlock& aPB2=anIt2.Value(); - const IntTools_ShrunkRange& aShrunkRange2=aPB2.ShrunkRange(); - // - const IntTools_Range& aSR2=aShrunkRange2.ShrunkRange(); - const Bnd_Box& aBB2=aShrunkRange2.BndBox(); - // - if (aBB1.IsOut (aBB2)) { - continue; - } - // - // EE - IntTools_EdgeEdge aEE; - aEE.SetEdge1 (aE1); - aEE.SetEdge2 (aE2); - aEE.SetTolerance1 (aTolE1); - aEE.SetTolerance2 (aTolE2); - aEE.SetDiscretize (aDiscretize); - aEE.SetDeflection (aDeflection); - // - IntTools_Range anewSR1 = aSR1; - IntTools_Range anewSR2 = aSR2; - // - BOPTools_Tools::CorrectRange (aE1, aE2, aSR1, anewSR1); - BOPTools_Tools::CorrectRange (aE2, aE1, aSR2, anewSR2); - // - aEE.SetRange1(anewSR1); - aEE.SetRange2(anewSR2); - // - aEE.Perform(); - // - anIndexIn=0; - // - if (aEE.IsDone()) { - // reverse order if it is necessary - aEWhat=aE1; - aEWith=aE2; - aWhat=nE1; - aWith=nE2; - if (aEE.Order()) { - aTmp=aWhat; - aWhat=aWith; - aWith=aTmp; - aEWhat=aE2; - aEWith=aE1; - } - // - const IntTools_SequenceOfCommonPrts& aCPrts=aEE.CommonParts(); - aNbCPrts=aCPrts.Length(); - for (i=1; i<=aNbCPrts; i++) { - const IntTools_CommonPrt& aCPart=aCPrts(i); - const IntTools_SequenceOfRanges& aRanges2=aCPart.Ranges2(); - // - anIndexIn=0; - // - TopAbs_ShapeEnum aType=aCPart.Type(); - switch (aType) { - case TopAbs_VERTEX: { - Standard_Real aT1, aT2, aTol=Precision::PConfusion(); - Standard_Boolean bIsOnPave1, bIsOnPave2; - IntTools_Range aR1, aR2; - // - VertexParameters(aCPart, aT1, aT2); - // - //decide to keep the pave or not - aR1 = (aEE.Order()) ? anewSR2 : anewSR1; - aR2 = (aEE.Order()) ? anewSR1 : anewSR2; - // - aTol=0.8*aTol; - bIsOnPave1=IsOnPave(aT1, aR1, aTol); - bIsOnPave2=IsOnPave(aT2, aR2, aTol); - // - if(bIsOnPave1 || bIsOnPave2) { - continue; - } - // - BOPTools_Tools::MakeNewVertex(aEWhat, aT1, aEWith, aT2, aNewVertex); - // - { - Standard_Integer nV11, nV12, nV21, nV22, nVS[2], k, j, iFound; - Standard_Real aTolVx, aTolVnew, aD2, aDT2; - TColStd_MapOfInteger aMV; - gp_Pnt aPnew, aPx; - // - iFound=0; - j=-1; - nV11=aPB1.Pave1().Index(); - nV12=aPB1.Pave2().Index(); - nV21=aPB2.Pave1().Index(); - nV22=aPB2.Pave2().Index(); - aMV.Add(nV11); - aMV.Add(nV12); - // - if (aMV.Contains(nV21)) { - ++j; - nVS[j]=nV21; - } - if (aMV.Contains(nV22)) { - ++j; - nVS[j]=nV22; - } - // - aTolVnew=BRep_Tool::Tolerance(aNewVertex); - aPnew=BRep_Tool::Pnt(aNewVertex); - // - for (k=0; k<=j; ++k) { - const TopoDS_Vertex& aVx=TopoDS::Vertex(myDS->Shape(nVS[k])); - aTolVx=BRep_Tool::Tolerance(aVx); - aPx=BRep_Tool::Pnt(aVx); - aD2=aPnew.SquareDistance(aPx); - // - aDT2=100.*(aTolVnew+aTolVx)*(aTolVnew+aTolVx); - // - if (aD2Add(aWhat, aWith, Standard_True, NMTDS_TI_EE); - } - // qqt - // - // Collect - aMapVI.Add(aNewVertex, anIndexIn); - } - break; - - case TopAbs_EDGE: { - Standard_Integer aNbComPrt2; - Standard_Boolean aCoinsideFlag; - // - aNbComPrt2=aRanges2.Length(); - aCoinsideFlag=IsBlocksCoinside(aPB1, aPB2); - // - if (aNbComPrt2>1 || !aCoinsideFlag) { - break; - } - // - // Fill aMapCB - if (aMapCB.Contains(aPB1)) { - BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.ChangeFromKey(aPB1); - aMapPB.Add(aPB1); - aMapPB.Add(aPB2); - } - else { - BOPTools_IMapOfPaveBlock aMapPB; - aMapPB.Add(aPB1); - aMapPB.Add(aPB2); - aMapCB.Add(aPB1, aMapPB); - } - // - if (aMapCB.Contains(aPB2)) { - BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.ChangeFromKey(aPB2); - aMapPB.Add(aPB1); - aMapPB.Add(aPB2); - } - else { - BOPTools_IMapOfPaveBlock aMapPB; - aMapPB.Add(aPB1); - aMapPB.Add(aPB2); - aMapCB.Add(aPB2, aMapPB); - } - // qqf - { - myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_EE); - } - // qqt - } - break; - default: - break; - } // switch (aType) - } // for (i=1; i<=aNbCPrts; i++) - }// if (aEE.IsDone()) - } // for (; anIt2.More(); anIt2.Next()) - } // for (; anIt1.More(); anIt1.Next()) - }// for (; myDSIt.More(); myDSIt.Next()) - // - { - NMTTools_ListOfCommonBlock aLCB; - // - FindChains(aMapCB, aLCB); - EENewVertices (aMapVI); - //TreatPaveBlocks(*this, aLCB); - TreatPaveBlocks(aLCB); - ReplaceCommonBlocks(aLCB); - } - // - PerformVF1(); - // - myIsDone=Standard_True; -} - -//======================================================================= -// function:TreatPaveBlocks -// purpose: -//======================================================================= -void NMTTools_PaveFiller::TreatPaveBlocks (NMTTools_ListOfCommonBlock& theLCB) -{ - Standard_Boolean bFound; - Standard_Integer nE, nV, nVp, iFlag; - Standard_Real aT; - TColStd_MapOfInteger aMI; - TColStd_MapIteratorOfMapOfInteger aItMI; - NMTTools_ListIteratorOfListOfCommonBlock aItLCB; - BOPTools_ListIteratorOfListOfPaveBlock aItLPB; - BOPTools_ListIteratorOfListOfPave aItLP; - // - aItLCB.Initialize(theLCB); - for (; aItLCB.More(); aItLCB.Next()) { - const NMTTools_CommonBlock& aCB=aItLCB.Value(); - // - aMI.Clear(); - const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks(); - // - // 1 -> aMI - aItLPB.Initialize(aLPB); - for (; aItLPB.More(); aItLPB.Next()) { - const BOPTools_PaveBlock& aPB=aItLPB.Value(); - nE=aPB.OriginalEdge(); - BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE)); - BOPTools_ListOfPave& aLP=aPaveSet.ChangeSet(); - // - aItLP.Initialize(aLP); - for (; aItLP.More(); aItLP.Next()) { - const BOPTools_Pave& aPave=aItLP.Value(); - nV=aPave.Index(); - aMI.Add(nV); - } - }//for (; anItLPB.More(); anItLPB.Next()) { - // - // 2 - aItLPB.Initialize(aLPB); - for (; aItLPB.More(); aItLPB.Next()) { - const BOPTools_PaveBlock& aPB=aItLPB.Value(); - nE=aPB.OriginalEdge(); - BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE)); - BOPTools_ListOfPave& aLP=aPaveSet.ChangeSet(); - // - aItMI.Initialize(aMI); - for (; aItMI.More(); aItMI.Next()) { - nV=aItMI.Key(); - bFound=Standard_False; - aItLP.Initialize(aLP); - for (; aItLP.More(); aItLP.Next()) { - const BOPTools_Pave& aPave=aItLP.Value(); - nVp=aPave.Index(); - if (nVp==nV) { - bFound=!bFound; - break; - } - } - // - if (!bFound) { - // Append Pave of nV to rhe edge nE - const TopoDS_Edge& aE=*(TopoDS_Edge*)(&myDS->Shape(nE)); - const TopoDS_Vertex& aV= *(TopoDS_Vertex*)(&myDS->Shape(nV)); - iFlag=myContext->ComputeVE (aV, aE, aT); - if (!iFlag) { - BOPTools_Pave aPave; - // - aPave.SetInterference(-1); - aPave.SetType (BooleanOperations_EdgeEdge); - aPave.SetIndex(nV); - aPave.SetParam(aT); - aPaveSet.Append(aPave); - } - } - }//for (; aItMI.More(); aItMI.Next()) { - }//for (; anItLPB.More(); anItLPB.Next()) { - } -} - -//======================================================================= -// function:EECommonBlocks -// purpose: -//======================================================================= -void NMTTools_PaveFiller::EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB) -{ - NMTTools_ListOfCommonBlock aLCB; - // - FindChains(aMapCB, aLCB); - ReplaceCommonBlocks(aLCB); -} - -//======================================================================= -// function:EENewVertices -// purpose: -//======================================================================= -void NMTTools_PaveFiller::EENewVertices (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) -{ - Standard_Integer aNb, aNbVSD, nVnew, nIEE, nE[2], j, iFlag; - Standard_Real aT; - TopoDS_Edge aE; - TopTools_DataMapOfShapeListOfShape myImages; - TopTools_DataMapOfShapeShape myOrigins; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; - TopTools_ListIteratorOfListOfShape aIt; - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - TColStd_MapOfInteger aMFence; - BOPTools_Pave aPave; - // - BOPTools_CArray1OfEEInterference& aEEs=myIP->EEInterferences(); - // - aNb=aMapVI.Extent(); - if (!aNb) { // no new vertices, no new problems - return; - } - // - // 0. - if (aNb==1) { - TopoDS_Vertex aV1=TopoDS::Vertex(aMapVI.FindKey(1)); - EENewVertices(aV1, aMapVI); - return; - } - // - // 1. - TreatNewVertices(aMapVI, myImages, myOrigins); - // - 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; - } - // - // aNbVSD>1 - myDS->InsertShapeAndAncestorsSuccessors(aVnew, anASSeq); - nVnew=myDS->NumberOfInsertedShapes(); - myDS->SetState(nVnew, BooleanOperations_ON); - // - 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()) -} -// -// case: use_02 -// completely rewritten -//======================================================================= -//function : TreatNewVertices -//purpose : -//======================================================================= -void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI, - TopTools_DataMapOfShapeListOfShape& myImages, - TopTools_DataMapOfShapeShape& myOrigins) -{ - Standard_Integer j, i, aNbV, 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); - } - // - for (i=1; i<=aNbV; ++i) { - const TopoDS_Shape& aV=aMV(i); - Bnd_Box aBox; - // - aTol=BRep_Tool::Tolerance(TopoDS::Vertex(aV)); - aBox.SetGap(aTol); - BRepBndLib::Add(aV, aBox); - // - aTreeFiller.Add(i, aBox); - // - aMIS.Add(i, aV); - aMSB.Add(aV, aBox); - } - // - aTreeFiller.Fill(); - // - // Chains - for (i=1; i<=aNbV; ++i) { - const TopoDS_Shape& aV=aMV(i); - // - if (aMVProcessed.Contains(aV)) { - continue; - } - // - Standard_Integer aNbIP, aIP, aNbIP1, aIP1; - TopTools_ListOfShape aLVSD; - TColStd_MapOfInteger aMIP, aMIP1, aMIPC; - TColStd_MapIteratorOfMapOfInteger aIt1; - // - aMIP.Add(i); - while(1) { - aNbIP=aMIP.Extent(); - aIt1.Initialize(aMIP); - for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - if (aMIPC.Contains(aIP)) { - continue; - } - // - const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); - const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP); - // - aSelector.Clear(); - aSelector.SetBox(aBoxVP); - // - aNbVSD=aBBTree.Select(aSelector); - if (!aNbVSD) { - continue; // it must not be - } - // - const TColStd_ListOfInteger& aLI=aSelector.Indices(); - aIt.Initialize(aLI); - for (; aIt.More(); aIt.Next()) { - aIP1=aIt.Value(); - if (aMIP.Contains(aIP1)) { - continue; - } - aMIP1.Add(aIP1); - } //for (; aIt.More(); aIt.Next()) { - }//for(; aIt1.More(); aIt1.Next()) { - // - aNbIP1=aMIP1.Extent(); - if (!aNbIP1) { - break; // from while(1) - } - // - aIt1.Initialize(aMIP); - for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - aMIPC.Add(aIP); - } - // - aMIP.Clear(); - aIt1.Initialize(aMIP1); - for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - aMIP.Add(aIP); - } - aMIP1.Clear(); - }// while(1) - //... - aNbIP=aMIPC.Extent(); - if (!aNbIP) { - aMIPC.Add(i); - } - // - aIt1.Initialize(aMIPC); - for(j=0; aIt1.More(); aIt1.Next(), ++j) { - aIP=aIt1.Key(); - const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); - if (!j) { - aVF=aVP; - } - aLVSD.Append(aVP); - aMVProcessed.Add(aVP); - } - myImages.Bind(aVF, aLVSD); - }// for (i=1; i<=aNbV; ++i) { - //------------------------------ - // - // 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); - } - } - } -} - -//======================================================================= -//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 -// purpose: -//======================================================================= -void NMTTools_PaveFiller::EENewVertices (const TopoDS_Vertex& aNewVertex, - const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) -{ - Standard_Integer i, aNewShape, nE1, nE2; - Standard_Real aT1, aT2; - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - BOPTools_Pave aPave; - // - BOPTools_CArray1OfEEInterference& aEEs=myIP->EEInterferences(); - // - // one new vertex case is treated in usual way - // - // Insert New Vertex in DS; - myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); - aNewShape=myDS->NumberOfInsertedShapes(); - myDS->SetState (aNewShape, BooleanOperations_ON); - // Insert New Vertex in EE Interference - i=aMapVI.FindFromKey(aNewVertex); - BOPTools_EEInterference& aEEInterf= aEEs(i); - aEEInterf.SetNewShape(aNewShape); - // Extact interference info - aEEInterf.Indices(nE1, nE2); - const IntTools_CommonPrt& aCPart=aEEInterf.CommonPrt(); - VertexParameters(aCPart, aT1, aT2); - // - // Add Paves to the myPavePoolNew - aPave.SetInterference(i); - aPave.SetType (BooleanOperations_EdgeEdge); - aPave.SetIndex(aNewShape); - // Pave for edge nE1 - aPave.SetParam(aT1); - BOPTools_PaveSet& aPaveSet1=myPavePoolNew(myDS->RefEdge(nE1)); - aPaveSet1.Append(aPave); - // Pave for edge nE2 - aPave.SetParam(aT2); - BOPTools_PaveSet& aPaveSet2=myPavePoolNew(myDS->RefEdge(nE2)); - aPaveSet2.Append(aPave); -} - -//======================================================================= -// function: RefinePavePool -// purpose: -//======================================================================= -void NMTTools_PaveFiller::RefinePavePool() -{ - Standard_Integer i, aNbNew; - - for (i=1; i<=myNbSources; i++) { - - if ((myDS->GetShape(i)).ShapeType()==TopAbs_EDGE) { - BOPTools_PaveSet& aPS= myPavePool(myDS->RefEdge(i)); - // - BOPTools_PaveSet& aNewPS= myPavePoolNew(myDS->RefEdge(i)); - BOPTools_ListOfPave& aNewLP=aNewPS.ChangeSet(); - // - aNbNew=aNewLP.Extent(); - if (aNbNew) { - BOPTools_ListIteratorOfListOfPave anIt(aNewLP); - for (; anIt.More(); anIt.Next()) { - const BOPTools_Pave& aPave=anIt.Value(); - aPS.Append(aPave); - } - // Clear the ListOfPaveBlock - BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(i)); - aLPB.Clear(); - // Prepare the paveBlocks for that egde again - PreparePaveBlocks(i); - } - aNewLP.Clear(); - } - } -} - -//======================================================================= -// function: PreparePaveBlocks -// purpose: -//======================================================================= -void NMTTools_PaveFiller::PreparePaveBlocks(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) -{ - myIsDone=Standard_False; - // - Standard_Boolean bOk1, bOk2, bOk3, bFlag; - Standard_Integer i, aNb, nE[2], n1, n2, aNbSplits; - TColStd_MapOfInteger aMap; - // - bOk1= (aType1==TopAbs_VERTEX) && (aType2==TopAbs_EDGE) ; - bOk2= (aType1==TopAbs_EDGE) && (aType2==TopAbs_EDGE) ; - bOk3= (aType1==TopAbs_EDGE) && (aType2==TopAbs_FACE) ; - if (!bOk1 && !bOk2 && !bOk3) {// error: Type mismatch - return; - } - // - aNb=bOk2 ? 2 : 1; - // - myDSIt->Initialize(aType1, aType2); - for (; myDSIt->More(); myDSIt->Next()) { - myDSIt->Current(n1, n2, bFlag); - // - nE[0]=n1; - nE[1]=n2; - if (myDS->GetShapeType(n1)!=TopAbs_EDGE) { - nE[0]=n2; - nE[1]=n1; - } - // - for (i=0; iRefEdge(nE[i])); - aNbSplits=aLPB.Extent(); - if (!aNbSplits) { - if (aMap.Add(nE[i])) { - PreparePaveBlocks(nE[i]); - if (!myIsDone) { - return; - } - } - } - } - }// for (; myDSIt.More(); myDSIt.Next()) - myIsDone=Standard_True; -} - -//======================================================================= -// function: PreparePaveBlocks -// purpose: -//======================================================================= -void NMTTools_PaveFiller::PreparePaveBlocks(const Standard_Integer nE) -{ - myIsDone=Standard_False; - // - char buf[512]; - Standard_Integer nV1, nV2, iErr; - TopoDS_Edge aE; - TopoDS_Vertex aV1, aV2; - // - BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); - // Edge - aE=TopoDS::Edge(myDS->Shape(nE)); - if (BRep_Tool::Degenerated(aE)) { - myIsDone=Standard_True; - return; - } - // - BOPTools_PaveSet& aPS=myPavePool(myDS->RefEdge(nE)); - // - BOPTools_PaveBlockIterator aPBIt(nE, aPS); - for (; aPBIt.More(); aPBIt.Next()) { - BOPTools_PaveBlock& aPB=aPBIt.Value(); - const IntTools_Range& aRange=aPB.Range(); - // - const BOPTools_Pave& aPave1=aPB.Pave1(); - nV1=aPave1.Index(); - aV1=TopoDS::Vertex(myDS->GetShape(nV1)); - // - const BOPTools_Pave& aPave2=aPB.Pave2(); - nV2=aPave2.Index(); - aV2=TopoDS::Vertex(myDS->GetShape(nV2)); - // - // ShrunkRange - IntTools_ShrunkRange aSR (aE, aV1, aV2, aRange, myContext); - iErr=aSR.ErrorStatus(); - if (!aSR.IsDone()) { - sprintf (buf, "Can not obtain ShrunkRange for Edge %d\n", nE); - BOPTColStd_Dump::PrintMessage(buf); - sprintf (buf, "Can not obtain ShrunkRange for Edge %d", nE); - throw - BOPTColStd_Failure(buf) ; - } - // - if (iErr==6) { - sprintf(buf, - "Warning: [PreparePaveBlocks()] Max.Dummy Shrunk Range for Edge %d\n", nE); - BOPTColStd_Dump::PrintMessage(buf); - } - else { - // Check left paves and correct ShrunkRange if it is necessary - CorrectShrunkRanges (0, aPave1, aSR); - CorrectShrunkRanges (1, aPave2, aSR); - } - // - aPB.SetShrunkRange(aSR); - aLPB.Append(aPB); - } //for (; aPBIt.More(); aPBIt.Next()) - myIsDone=Standard_True; -} - -//======================================================================= -// function: CorrectShrunkRanges -// purpose: -//======================================================================= -void NMTTools_PaveFiller::CorrectShrunkRanges(const Standard_Integer aSide, - const BOPTools_Pave& aPave, - IntTools_ShrunkRange& aShrunkRange) -{ - BooleanOperations_KindOfInterference aType; - Standard_Integer anIndexInterf ; - // - aType=aPave.Type(); - if (aType!=BooleanOperations_EdgeEdge) { - return; - } - // - anIndexInterf=aPave.Interference(); - if (anIndexInterf<0) { - // it can be EE interf between E and (e1,e2,..en) -> vertex - // so we can't decide which aEE.CommonPrt() we should take. - return; - } - - BOPTools_CArray1OfEEInterference& aEEs=myIP->EEInterferences(); - const BOPTools_EEInterference& aEE=aEEs(anIndexInterf); - const IntTools_CommonPrt& aCP=aEE.CommonPrt(); - const TopoDS_Edge& aE1=aCP.Edge1(); - const TopoDS_Edge& aE2=aCP.Edge2(); - - const IntTools_Range& aSR=aShrunkRange.ShrunkRange(); - const TopoDS_Edge& aE=aShrunkRange.Edge(); - - IntTools_Range aNewRange; - IntTools_Range aCPRange; - - if (aE1.IsSame(aE)) { - const IntTools_Range& aR1=aCP.Range1(); - aCPRange=aR1; - } - if (aE2.IsSame(aE)) { - const IntTools_SequenceOfRanges& aSeqR=aCP.Ranges2(); - const IntTools_Range& aR2=aSeqR(1); - aCPRange=aR2; - } - // - Standard_Real aCoeff=1.05, tV, tNV; - tV=aPave.Param(); - if (aSide==0) { // Left - if (aCPRange.Last() > aSR.First()) { - tNV=aCPRange.Last(); - tNV=tV+aCoeff*(tNV-tV); - aNewRange.SetFirst(tNV); - aNewRange.SetLast (aSR.Last()); - if(aNewRange.First() < aNewRange.Last()) { - aShrunkRange.SetShrunkRange(aNewRange); - } - } - } - else { // Right - if (aCPRange.First() < aSR.Last()) { - tNV=aCPRange.First(); - tNV=tV-aCoeff*(tV-tNV); - aNewRange.SetFirst(aSR.First()); - aNewRange.SetLast (tNV); - - if(aNewRange.First() < aNewRange.Last()) { - aShrunkRange.SetShrunkRange(aNewRange); - } - } - } -} - -//======================================================================= -// function: IsBlocksCoinside -// purpose: -//======================================================================= -Standard_Boolean NMTTools_PaveFiller::IsBlocksCoinside(const BOPTools_PaveBlock& aPB1, - const BOPTools_PaveBlock& aPB2) const -{ - Standard_Boolean bRetFlag=Standard_True; - Standard_Real aTolV11, aTolV12, aTolV21, aTolV22; - 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()));//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); - aTolV21=BRep_Tool::Tolerance(aV21); - aTolV22=BRep_Tool::Tolerance(aV22); - - aP11=BRep_Tool::Pnt(aV11); - aP12=BRep_Tool::Pnt(aV12); - aP21=BRep_Tool::Pnt(aV21); - aP22=BRep_Tool::Pnt(aV22); - - d1121=aP11.Distance(aP21); - aTolSum=aCoeff*(aTolV11+aTolV21); - if (d1121RefEdge(nE)); - aLCBE.Append(aCBx); - } - } - } - // 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.ChangeValue(); - 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 -// purpose: -//======================================================================= -void NMTTools_PaveFiller::RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) -{ - Standard_Integer nE; - NMTTools_ListOfCommonBlock aLCBx; - NMTTools_ListIteratorOfListOfCommonBlock anItCB, anItCBE; - BOPTools_ListIteratorOfListOfPaveBlock anItLPB; - // - anItCB.Initialize(aLCB); - for (; anItCB.More(); anItCB.Next()) { - const NMTTools_CommonBlock& aCB=anItCB.Value(); - const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks(); - // - // Remove aCB from each edge - anItLPB.Initialize(aLPB); - for (; anItLPB.More(); anItLPB.Next()) { - const BOPTools_PaveBlock& aPB=anItLPB.Value(); - nE=aPB.OriginalEdge(); - // - NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE)); - anItCBE.Initialize(aLCBE); - for (; anItCBE.More(); anItCBE.Next()) { - const NMTTools_CommonBlock& aCBE=anItCBE.Value(); - if (aCBE.IsEqual(aCB)) { - aLCBE.Remove(anItCBE); - break; - } - } - } - } -} - -//======================================================================= -// function: SplitCommonBlock -// purpose: -//======================================================================= -void NMTTools_PaveFiller::SplitCommonBlock(const NMTTools_CommonBlock& aCB, - NMTTools_ListOfCommonBlock& aLCBx) -{ - Standard_Boolean bIsCoincided; - Standard_Integer i, j,nE, aNbE, aNbSPBx, aNbPB, k; - BOPTools_SequenceOfPaveBlock aSPBx; - BOPTools_ListIteratorOfListOfPaveBlock anItLPB; - BOPTools_ListIteratorOfListOfPave anIt; - BOPTools_PaveBlockIterator anPBIt; - // - const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks(); - aNbE=aLPB.Extent(); - // - // 1. Checking: Whether we realy need to split the common block ? - anItLPB.Initialize(aLPB); - for (; anItLPB.More(); anItLPB.Next()) { - const BOPTools_PaveBlock& aPB=anItLPB.Value(); - nE=aPB.OriginalEdge(); - BOPTools_PaveSet& aPSE=myPavePoolNew(myDS->RefEdge(nE)); - aPSE.SortSet(); - // - BOPTools_PaveSet aPSx; - // - const BOPTools_ListOfPave& aLPE=aPSE.Set(); - anIt.Initialize(aLPE); - for (; anIt.More(); anIt.Next()) { - const BOPTools_Pave& aPx=anIt.Value(); - if (aPB.IsInBlock(aPx)) { - aPSx.Append(aPx); - } - } - aNbPB=aPSx.Set().Extent(); - break; - } - // - if (!aNbPB) { - // we need not split it - aLCBx.Append(aCB); - return; - } - // - // 2. Get sequence of pave Blocks containing all new pave blocks - // for each edges's source pave Block - anItLPB.Initialize(aLPB); - for (; anItLPB.More(); anItLPB.Next()) { - const BOPTools_PaveBlock& aPB=anItLPB.Value(); - const BOPTools_Pave& aPave1=aPB.Pave1(); - const BOPTools_Pave& aPave2=aPB.Pave2(); - nE=aPB.OriginalEdge(); - // - BOPTools_PaveSet aPSx; - // - // the set aPsx will contain bounadry paves aPave1, aPave2 and - // all paves of the edge nE that are inside block aPB - aPSx.Append(aPave1); - aPSx.Append(aPave2); - // - BOPTools_PaveSet& aPSE=myPavePoolNew(myDS->RefEdge(nE)); - aPSE.SortSet(); - // - const BOPTools_ListOfPave& aLPE=aPSE.Set(); - anIt.Initialize(aLPE); - for (; anIt.More(); anIt.Next()) { - const BOPTools_Pave& aPx=anIt.Value(); - if (aPB.IsInBlock(aPx)) { - aPSx.Append(aPx); - } - } - // - // Form pave blocks from aPSx and collect them in aSPBx - anPBIt.Initialize(nE, aPSx); - for (; anPBIt.More(); anPBIt.Next()) { - const BOPTools_PaveBlock& aPBx=anPBIt.Value(); - aSPBx.Append(aPBx); - } - } - // - // 3. Do new common blocks - // - const TColStd_ListOfInteger& aLF=aCB.Faces(); - aNbSPBx=aSPBx.Length(); - aNbPB=aNbSPBx/aNbE; - // - Standard_Integer k1, k2, n11, n12, n21, n22; - // - for (i=1; i<=aNbPB; ++i) { - NMTTools_CommonBlock aCBx; - // - aCBx.AddFaces(aLF); - // - const BOPTools_PaveBlock& aPB1=aSPBx(i); - n11=aPB1.Pave1().Index(); - n12=aPB1.Pave2().Index(); - // - aCBx.AddPaveBlock(aPB1); - // - for (j=2; j<=aNbE; ++j) { - k1=(j-1)*aNbPB+1; - k2=k1+aNbPB-1; - for(k=k1; k<=k2; ++k) { - const BOPTools_PaveBlock& aPB2=aSPBx(k); - n21=aPB2.Pave1().Index(); - n22=aPB2.Pave2().Index(); - if ((n21==n11 && n22==n12) || (n21==n12 && n22==n11)) { - //modified by NIZNHY-PKV Thu Nov 11 08:13:24 2010f - bIsCoincided=CheckCoincidence(aPB2, aPB1); - if (bIsCoincided) { - aCBx.AddPaveBlock(aPB2); - break; - } - //aCBx.AddPaveBlock(aPB2); - //break; - //modified by NIZNHY-PKV Thu Nov 11 08:13:31 2010t - } - } - } - aLCBx.Append(aCBx); - } -} - -//======================================================================= -// function: VertexParameters -// purpose: -//======================================================================= -void VertexParameters(const IntTools_CommonPrt& aCPart, - Standard_Real& aT1, - Standard_Real& aT2) -{ - const IntTools_Range& aR1=aCPart.Range1(); - aT1=0.5*(aR1.First()+aR1.Last()); - // - if((aCPart.VertexParameter1() >= aR1.First()) && - (aCPart.VertexParameter1() <= aR1.Last())) { - aT1 = aCPart.VertexParameter1(); - } - // - const IntTools_SequenceOfRanges& aRanges2=aCPart.Ranges2(); - const IntTools_Range& aR2=aRanges2(1); - aT2=0.5*(aR2.First()+aR2.Last()); - // - if((aCPart.VertexParameter2() >= aR2.First()) && - (aCPart.VertexParameter2() <= aR2.Last())) { - aT2 = aCPart.VertexParameter2(); - } -} - -//======================================================================= -// function: KeepPave -// purpose: -//======================================================================= -Standard_Boolean IsOnPave(const Standard_Real& aT1, - const IntTools_Range& aRange, - const Standard_Real& aTolerance) -{ - Standard_Boolean firstisonpave1, firstisonpave2, bIsOnPave; - // - firstisonpave1 = (Abs(aRange.First() - aT1) < aTolerance); - firstisonpave2 = (Abs(aRange.Last() - aT1) < aTolerance); - bIsOnPave=(firstisonpave1 || firstisonpave2); - return bIsOnPave; -} - -//======================================================================= -// function:FindChains -// purpose: -//======================================================================= -void FindChains(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, - NMTTools_ListOfCommonBlock& aLCB) -{ - Standard_Integer i, j, aNbCB, aNbPB; - BOPTools_IMapOfPaveBlock aProcessedBlocks, aChain; - // - aNbCB=aMapCB.Extent(); - for (i=1; i<=aNbCB; ++i) { - const BOPTools_PaveBlock& aPB=aMapCB.FindKey(i); - if (aProcessedBlocks.Contains(aPB)) { - continue; - } - // - aProcessedBlocks.Add(aPB); - aChain.Add(aPB); - // - const BOPTools_IMapOfPaveBlock& aMapPB=aMapCB(i); - aNbPB=aMapPB.Extent(); - for (j=1; j<=aNbPB; ++j) { - const BOPTools_PaveBlock& aPBx=aMapPB(j); - ProcessBlock(aPBx, aMapCB, aProcessedBlocks, aChain); - } - // - NMTTools_CommonBlock aCB; - // - aNbPB=aChain.Extent(); - for (j=1; j<=aNbPB; ++j) { - const BOPTools_PaveBlock& aPBx=aChain(j); - aCB.AddPaveBlock(aPBx); - } - aLCB.Append(aCB); - aChain.Clear(); - } -} - -//======================================================================= -// function:ProcessBlock -// purpose: -//======================================================================= -void ProcessBlock(const BOPTools_PaveBlock& aPB, - const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, - BOPTools_IMapOfPaveBlock& aProcessedBlocks, - BOPTools_IMapOfPaveBlock& aChain) -{ - Standard_Integer j, aNbPB; - // - if (aProcessedBlocks.Contains(aPB)) { - return; - } - aProcessedBlocks.Add(aPB); - aChain.Add(aPB); - // - const BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.FindFromKey(aPB); - aNbPB=aMapPB.Extent(); - for (j=1; j<=aNbPB; ++j) { - const BOPTools_PaveBlock& aPBx=aMapPB(j); - 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=myIP->VSInterferences(); - BOPTools_CArray1OfEEInterference& aEEs=myIP->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 -//modified by NIZNHY-PKV Thu Nov 11 08:13:48 2010f -//======================================================================= -// function: CheckCoincidence -// purpose: -//======================================================================= -Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& aPB1, - const BOPTools_PaveBlock& aPB2) -{ - Standard_Boolean bRet; - Standard_Integer nE1, nE2, aNbPoints; - Standard_Real aT11, aT12, aT21, aT22, aT1m, aD, aTol, aT2x; - gp_Pnt aP1m; - // - bRet=Standard_False; - // - aT11=aPB1.Pave1().Param(); - aT12=aPB1.Pave2().Param(); - aT1m=IntTools_Tools::IntermediatePoint (aT11, aT12); - nE1=aPB1.OriginalEdge(); - const TopoDS_Edge& aE1=(*(TopoDS_Edge*)(&myDS->Shape(nE1))); - BOPTools_Tools::PointOnEdge(aE1, aT1m, aP1m); - // - aT21=aPB2.Pave1().Param(); - aT22=aPB2.Pave2().Param(); - nE2=aPB2.OriginalEdge(); - const TopoDS_Edge& aE2=(*(TopoDS_Edge*)(&myDS->Shape(nE2))); - // - GeomAPI_ProjectPointOnCurve& aPPC=myContext->ProjPC(aE2); - aPPC.Perform(aP1m); - aNbPoints=aPPC.NbPoints(); - if (aNbPoints) { - aD=aPPC.LowerDistance(); - // - aTol=BRep_Tool::Tolerance(aE1); - aTol=aTol+BRep_Tool::Tolerance(aE2); - if (aDaT21 && aT2x -// -#include - -#include - -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - - -static - void VertexParameter(const IntTools_CommonPrt& aCPart, - Standard_Real& aT); -static - Standard_Boolean IsOnPave(const Standard_Real& aTR, - const IntTools_Range& aCPRange, - const Standard_Real& aTolerance); -// -//======================================================================= -// function: PerformEF -// purpose: -//======================================================================= - void NMTTools_PaveFiller::PerformEF() -{ - Standard_Boolean bJustAdd; - Standard_Integer n1, n2, anIndexIn, nE, nF, aNbEFs, aBlockLength; - Standard_Integer aDiscretize; - Standard_Real aTolE, aTolF, aDeflection; - BooleanOperations_IndexedDataMapOfShapeInteger aMapVI; - BOPTools_IDMapOfPaveBlockIMapOfInteger aMapCB; - BOPTools_IMapOfPaveBlock aIMPBx; - // - myIsDone=Standard_False; - aDeflection=0.01; - aDiscretize=35; - // - BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences(); - // - myDSIt->Initialize(TopAbs_EDGE, TopAbs_FACE); - // - // BlockLength correction - aNbEFs=myDSIt->BlockLength(); - aBlockLength=aEFs.BlockLength(); - if (aNbEFs > aBlockLength) { - aEFs.SetBlockLength(aNbEFs); - } - // - for (; myDSIt->More(); myDSIt->Next()) { - myDSIt->Current(n1, n2, bJustAdd); - // - if(bJustAdd) { - continue; - } - // - anIndexIn = 0; - // - nE=n1; - nF=n2; - if (myDS->GetShapeType(n2)==TopAbs_EDGE) { - nE=n2; - nF=n1; - } - // - // all Common Blocks for face nF - NMTTools_ListOfCommonBlock aLCBF; - CommonBlocksFace(nF, aLCBF); - NMTTools_CommonBlockAPI aCBAPIF(aLCBF); - // - // Edge - const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE)); - if (BRep_Tool::Degenerated(aE)){ - continue; - } - // - // Face - const TopoDS_Face aF=TopoDS::Face(myDS->Shape(nF)); - // - TopTools_IndexedMapOfShape aME; - TopExp::MapShapes(aF, TopAbs_EDGE, aME); - if (aME.Contains(aE)) { - continue; - } - // - aTolF=BRep_Tool::Tolerance(aF); - aTolE=BRep_Tool::Tolerance(aE); - - const Bnd_Box& aBBF=myDS->GetBoundingBox(nF); - // - // Process each PaveBlock on edge nE - BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); - // - BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB); - for (; anIt.More(); anIt.Next()) { - BOPTools_PaveBlock& aPB=anIt.Value(); - if (aCBAPIF.IsCommonBlock(aPB)) { - continue; - } - // - const IntTools_ShrunkRange& aShrunkRange=aPB.ShrunkRange(); - const IntTools_Range& aSR =aShrunkRange.ShrunkRange(); - const Bnd_Box& aBBE=aShrunkRange.BndBox(); - // - if (aBBF.IsOut (aBBE)) { - continue; - } - // - // EF - IntTools_EdgeFace aEF; - aEF.SetEdge (aE); - aEF.SetFace (aF); - aEF.SetTolE (aTolE); - aEF.SetTolF (aTolF); - aEF.SetDiscretize (aDiscretize); - aEF.SetDeflection (aDeflection); - // - aEF.SetContext(myContext); - // - IntTools_Range anewSR = aSR; - // - // Correction of the Shrunk Range - BOPTools_Tools::CorrectRange(aE, aF, aSR, anewSR); - aEF.SetRange (anewSR); - // - aEF.Perform(); - // - if (aEF.IsDone()) { - Standard_Boolean bCoinsideFlag; - Standard_Integer i, aNbCPrts; - TopAbs_ShapeEnum aType; - // - const IntTools_SequenceOfCommonPrts& aCPrts=aEF.CommonParts(); - // - aNbCPrts=aCPrts.Length(); - for (i=1; i<=aNbCPrts; ++i) { - anIndexIn=0; - // - const IntTools_CommonPrt& aCPart=aCPrts(i); - aType=aCPart.Type(); - // - switch (aType) { - // - case TopAbs_VERTEX: { - Standard_Boolean bIsOnPave1, bIsOnPave2; - Standard_Integer nVF; - Standard_Real aT, aTolToDecide; - TopoDS_Vertex aNewVertex; - // - const IntTools_Range& aR=aCPart.Range1(); - // - // New Vertex - VertexParameter(aCPart, aT); - BOPTools_Tools::MakeNewVertex(aE, aT, aF, aNewVertex); - // - //decide to add pave or not - aTolToDecide=5.e-8; - bIsOnPave1=IsOnPave(anewSR.First(), aR, aTolToDecide); - bIsOnPave2=IsOnPave(anewSR.Last() , aR, aTolToDecide); - // - if (!bIsOnPave1 && !bIsOnPave2) { - nVF=CheckFacePaves(aNewVertex, nF); - if (!nVF) { - // really new vertex - // Add Interference to the Pool - BOPTools_ESInterference anInterf (nE, nF, aCPart); - anIndexIn=aEFs.Append(anInterf); - anInterf.SetNewShape(0); - // - aMapVI.Add(aNewVertex, anIndexIn); - aIMPBx.Add(aPB); - // - myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF); - // - }// if (!nVF) - }// if (!bIsOnPave1 && !bIsOnPave2) - // - //modified by NIZNHY-PKV Fri Apr 18 10:55:38 2008f - else { - const BOPTools_Pave& aPave=(bIsOnPave1)? aPB.Pave1() : aPB.Pave2(); - nVF=aPave.Index(); - const TopoDS_Vertex& aVF=TopoDS::Vertex(myDS->Shape(nVF)); - BOPTools_Tools::UpdateVertex (aVF, aNewVertex); - } - //modified by NIZNHY-PKV Fri Apr 18 10:55:40 2008t - // - }// case TopAbs_VERTEX: - break; - // - case TopAbs_EDGE: { - bCoinsideFlag=BOPTools_Tools::IsBlockInOnFace(aPB, aF, myContext); - if (!bCoinsideFlag) { - break; - } - // - // Fill aMapCB - if (aMapCB.Contains(aPB)) { - TColStd_IndexedMapOfInteger& aMapF=aMapCB.ChangeFromKey(aPB); - aMapF.Add(nF); - } - else { - TColStd_IndexedMapOfInteger aMapF; - aMapF.Add(nF); - aMapCB.Add(aPB, aMapF); - } - // - aIMPBx.Add(aPB); - myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF); - }// case TopAbs_EDGE: - break; - - default: - break; - } // switch (aType) - } // for (i=1; i<=aNbCPrts; i++) - } //if (aEF.IsDone()) - } // for (; anIt.More(); anIt.Next()) - }// for (; myDSIt.More(); myDSIt.Next()) - // - // Treat New vertices - EFNewVertices(aMapVI); - // - // Add draft Common Blocks of EF type - EFCommonBlocks(aMapCB); - // - // Collect all CB we suspected to split by new vertices - NMTTools_ListOfCommonBlock aLCBx; - { - Standard_Integer i, aNbPBx, nEx; - BOPTools_IMapOfPaveBlock aMx; - // - aNbPBx=aIMPBx.Extent(); - for (i=1; i<=aNbPBx; ++i) { - const BOPTools_PaveBlock& aPBx=aIMPBx(i); - nEx=aPBx.OriginalEdge(); - NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nEx)); - if (aLCB.Extent()) { - NMTTools_CommonBlockAPI aCBAPIx(aLCB); - if (aCBAPIx.IsCommonBlock(aPBx)) { - NMTTools_CommonBlock& aCBx=aCBAPIx.CommonBlock(aPBx); - const BOPTools_PaveBlock& aPB1=aCBx.PaveBlock1(); - if (!aMx.Contains(aPB1)){ - aMx.Add(aPB1); - aLCBx.Append(aCBx); - } - } - } - } - } - // - // Split the common blocks above - if (aLCBx.Extent()) { - ReplaceCommonBlocks(aLCBx); - } - // - myIsDone=Standard_True; -} -//======================================================================= -// function:EFCommonBlocks -// purpose: -//======================================================================= - void NMTTools_PaveFiller::EFCommonBlocks - (const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) -{ - Standard_Integer i, aNbPB, nE, j, aNbF, nF; - // - aNbPB=aMapCB.Extent(); - for (i=1; i<=aNbPB; ++i) { - const BOPTools_PaveBlock& aPB=aMapCB.FindKey(i); - const TColStd_IndexedMapOfInteger& aMapF=aMapCB.FindFromIndex(i); - aNbF=aMapF.Extent(); - // - nE=aPB.OriginalEdge(); - // - NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE)); - // - NMTTools_CommonBlockAPI aCBAPI(aLCB); - if (aCBAPI.IsCommonBlock(aPB)) { - NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB); - for (j=1; j<=aNbF; ++j) { - nF=aMapF(j); - aCB.AddFace(nF); - } - } - else { - NMTTools_CommonBlock aCB; - // - aCB.AddPaveBlock(aPB); - for (j=1; j<=aNbF; ++j) { - nF=aMapF(j); - aCB.AddFace(nF); - } - aLCB.Append(aCB); - } - } -} -//======================================================================= -// function:EFNewVertices -// purpose: -//======================================================================= - void NMTTools_PaveFiller::EFNewVertices - (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) -{ - Standard_Integer i, j, aNb, aNewShape, aFlag, iX, aNbVV, aNbSimple; - Standard_Integer aWhat, aWith, nE, nF, nV, aNbIEF, aNbEdges, iTmp; - Standard_Real aT; - TopoDS_Compound aCompound; - TopoDS_Vertex aNewVertex; - BRep_Builder aBB; - BOPTools_Pave aPave; - NMTTools_IndexedDataMapOfIndexedMapOfInteger aMNVE, aMNVIEF; - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - TopTools_IndexedMapOfShape aMNVComplex, aMNVSimple; - // - aNb=aMapVI.Extent(); - if (!aNb) { // no new vertices, no new problems - return; - } - // - BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences(); - // - // 0. - if (aNb==1) { - aNewVertex=TopoDS::Vertex(aMapVI.FindKey(1)); - EFNewVertices(aNewVertex, 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); - } - // - // 2. VV intersection between these vertices - // using the auxiliary Filler - NMTTools_PaveFiller tPF; - // - tPF.SetCompositeShape(aCompound); - // - tPF.Init(); - tPF.PerformVV(); - // - NMTDS_ShapesDataStructure& tDS=*(tPF.DS()); - NMTDS_InterfPool& tInterfPool=*(tPF.IP()); - BOPTools_CArray1OfVVInterference& aVVInterfs=tInterfPool.VVInterferences(); - // - // 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)); - EFNewVertices(aV, aMapVI); - } - // - // 3. Fill Maps : NewVertex-edges (aMNVE) - // NewVertex-interferences (aMNVIEE) - aNb=aVVInterfs.Extent(); - for (i=1; i<=aNb; ++i) { - const BOPTools_VVInterference& aVV=aVVInterfs(i); - aNewShape=aVV.NewShape(); - if (!aNewShape) { - continue; - } - // - if (!aMNVE.Contains(aNewShape)) { - TColStd_IndexedMapOfInteger aMx; - aMNVE.Add(aNewShape, aMx); - } - if (!aMNVIEF.Contains(aNewShape)) { - TColStd_IndexedMapOfInteger aMx; - aMNVIEF.Add(aNewShape, aMx); - } - // - TColStd_IndexedMapOfInteger& aME=aMNVE.ChangeFromKey(aNewShape); - TColStd_IndexedMapOfInteger& aMIEF=aMNVIEF.ChangeFromKey(aNewShape); - // - aVV.Indices(aWhat, aWith); - //aWhat - const TopoDS_Shape& aV1=tDS.Shape(aWhat); - iX=aMapVI.FindFromKey(aV1); - const BOPTools_ESInterference& aEF1=aEFs(iX); - aEF1.Indices(nE, nF); - // - if (myDS->GetShapeType(nF)==TopAbs_EDGE) { - iTmp=nE; - nE=nF; - nF=iTmp; - } - aME.Add(nE); - aMIEF.Add(iX); - //aWith - const TopoDS_Shape& aV2=tDS.Shape(aWith); - iX=aMapVI.FindFromKey(aV2); - const BOPTools_ESInterference& aEF2=aEFs(iX); - aEF2.Indices(nE, nF); - // - if (myDS->GetShapeType(nF)==TopAbs_EDGE) { - iTmp=nE; - nE=nF; - nF=iTmp; - } - aME.Add(nE); - aMIEF.Add(iX); - }// for (i=1; i<=aNb; ++i) { - // - // 4. Process new vertices - aNb=aMNVE.Extent(); - for (i=1; i<=aNb; ++i) { // xx - // - // new Vertex - nV=aMNVE.FindKey(i); - aNewVertex=TopoDS::Vertex(tDS.Shape(nV)); - // - // Insert New Vertex in DS; - myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); - aNewShape=myDS->NumberOfInsertedShapes(); - myDS->SetState (aNewShape, BooleanOperations_ON); - // - // Update index of NewShape in EF interferences - const TColStd_IndexedMapOfInteger& aMIEF=aMNVIEF.FindFromKey(nV); - aNbIEF=aMIEF.Extent(); - for (j=1; j<=aNbIEF; ++j) { - iX=aMIEF(j); - BOPTools_ESInterference& aEF=aEFs(iX); - aEF.SetNewShape(aNewShape); - } - // - // Update Paves on all 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));//mpv - // - aFlag=myContext->ComputeVE (aNewVertex, aE, aT); - // - if (!aFlag) { - aPave.SetInterference(-1); - aPave.SetType (BooleanOperations_EdgeSurface); - aPave.SetIndex(aNewShape); - aPave.SetParam(aT); - // - BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE)); - aPaveSet.Append(aPave); - } - } - } -} -//======================================================================= -// function:EFNewVertices -// purpose: -//======================================================================= - void NMTTools_PaveFiller::EFNewVertices - (const TopoDS_Vertex& aNewVertex, - const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) -{ - Standard_Integer i, aNewShape, nE, nF; - Standard_Real aT; - BOPTools_Pave aPave; - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - // - BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences(); - // - // Insert New Vertex in DS; - myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); - aNewShape=myDS->NumberOfInsertedShapes(); - myDS->SetState (aNewShape, BooleanOperations_ON); - // - // Insert New Vertex in EFInterference - i=aMapVI.FindFromKey(aNewVertex); - BOPTools_ESInterference& aEFInterf= aEFs(i); - aEFInterf.SetNewShape(aNewShape); - // Extract interference info - aEFInterf.Indices(nE, nF); - if (myDS->GetShapeType(nF)==TopAbs_EDGE) { - nE=nF; - } - const IntTools_CommonPrt& aCPart=aEFInterf.CommonPrt(); - VertexParameter(aCPart, aT); - // - // Pave for edge nE - aPave.SetInterference(i); - aPave.SetType (BooleanOperations_EdgeSurface); - aPave.SetIndex(aNewShape); - aPave.SetParam(aT); - // Append the Pave to the myPavePoolNew - BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE)); - aPaveSet.Append(aPave); - // -} -//======================================================================= -// function: CheckFacePaves -// purpose: -//======================================================================= - Standard_Integer NMTTools_PaveFiller::CheckFacePaves - (const TopoDS_Vertex& aNewVertex, - const Standard_Integer nF) -{ - Standard_Integer nEF, nVF, iFlag, i, aNbV, iRet; - BOPTools_ListIteratorOfListOfPave anIt; - TColStd_IndexedMapOfInteger aMVF; - // - iRet=0; - // - BooleanOperations_OnceExplorer aExp(*myDS); - aExp.Init(nF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - nEF=aExp.Current(); - BOPTools_PaveSet& aPaveSet=myPavePool(myDS->RefEdge(nEF)); - const BOPTools_ListOfPave& aLP=aPaveSet.Set(); - anIt.Initialize(aLP); - for (; anIt.More(); anIt.Next()) { - const BOPTools_Pave& aPave=anIt.Value(); - nVF=aPave.Index(); - aMVF.Add(nVF); - } - } - // - aNbV=aMVF.Extent(); - for (i=1; i<=aNbV; ++i) { - nVF=aMVF(i); - const TopoDS_Vertex aVF=TopoDS::Vertex(myDS->Shape(nVF)); - iFlag=IntTools_Tools::ComputeVV(aNewVertex, aVF); - if (!iFlag) { - return nVF; - } - } - return iRet; -} -// -//======================================================================= -// function: VertexParameter -// purpose: -//======================================================================= -void VertexParameter(const IntTools_CommonPrt& aCPart, - Standard_Real& aT) -{ - const IntTools_Range& aR=aCPart.Range1(); - aT=0.5*(aR.First()+aR.Last()); - if((aCPart.VertexParameter1() >= aR.First()) && - (aCPart.VertexParameter1() <= aR.Last())) { - aT = aCPart.VertexParameter1(); - } -} -//======================================================================= -// function: IsOnPave -// purpose: -//======================================================================= -Standard_Boolean IsOnPave(const Standard_Real& aTR, - const IntTools_Range& aCPRange, - const Standard_Real& aTolerance) -{ - Standard_Boolean bIsOnPave; - Standard_Real aT1, aT2, dT1, dT2; - // - aT1=aCPRange.First(); - aT2=aCPRange.Last(); - bIsOnPave=(aTR>=aT1 && aTR<=aT1); - if (bIsOnPave) { - return bIsOnPave; - } - // - dT1=Abs(aTR-aT1); - dT2=Abs(aTR-aT2); - bIsOnPave=(dT1<=aTolerance || dT2<=aTolerance); - return bIsOnPave; -} diff --git a/src/NMTTools_NEW/NMTTools_PaveFiller_6.cxx b/src/NMTTools_NEW/NMTTools_PaveFiller_6.cxx deleted file mode 100644 index 3f897dedd..000000000 --- a/src/NMTTools_NEW/NMTTools_PaveFiller_6.cxx +++ /dev/null @@ -1,1605 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File: NMTTools_PaveFiller_6.cxx -// Created: Fri Dec 19 10:27:31 2003 -// Author: Peter KURNEV - -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static - Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE, - const Handle(IntTools_Context)& aCtx); - -//======================================================================= -// function: PerformFF -// purpose: -//======================================================================= - void NMTTools_PaveFiller::PerformFF() -{ - myIsDone=Standard_False; - // - Standard_Boolean bToApproxC3d, bToApproxC2dOnS1, bToApproxC2dOnS2, bIsDone; - Standard_Boolean bJustAdd, bToSplit; - Standard_Integer n1, n2, anIndexIn, nF1, nF2, aBlockLength, aNbFFs; - Standard_Integer aNbCurves, aNbPoints; - Standard_Real anApproxTol, aTolR3D, aTolR2D; - BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMapWhat, aMapWith; - IntTools_SequenceOfPntOn2Faces aPnts; - IntTools_SequenceOfCurves aCvs; - // - BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences(); - // - // F/F Interferences [BooleanOperations_SurfaceSurface] - myDSIt->Initialize(TopAbs_FACE, TopAbs_FACE); - // - // BlockLength correction - aNbFFs=myDSIt->BlockLength(); - aBlockLength=aFFs.BlockLength(); - if (aNbFFs > aBlockLength) { - aFFs.SetBlockLength(aNbFFs); - } - // - //modified by NIZNHY-PKV Thu Sep 15 08:02:52 2011f - bToSplit=Standard_False; - //modified by NIZNHY-PKV Thu Sep 15 08:02:55 2011t - // - for (; myDSIt->More(); myDSIt->Next()) { - myDSIt->Current(n1, n2, bJustAdd); - // - nF1 = n2; - nF2 = n1; - if(n1 < n2) { - nF1 = n1; - nF2 = n2; - } - anIndexIn=0; - aPnts.Clear(); - aCvs.Clear(); - // - const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));//mpv - const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));//mpv - // - // FF - bToApproxC3d = mySectionAttribute.Approximation(); - bToApproxC2dOnS1 = mySectionAttribute.PCurveOnS1(); - bToApproxC2dOnS2 = mySectionAttribute.PCurveOnS2(); - // - anApproxTol=1.e-7; - // - IntTools_FaceFace aFF; - // - aFF.SetParameters (bToApproxC3d, bToApproxC2dOnS1, - bToApproxC2dOnS2, anApproxTol); - // - aFF.Perform(aF1, aF2); - // - bIsDone=aFF.IsDone(); - // - if (!bIsDone) { - BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts); - anIndexIn=aFFs.Append(anInterf); - continue; - } - // - aTolR3D=aFF.TolReached3d(); - aTolR2D=aFF.TolReached2d(); - if (aTolR3D < 1.e-7){ - aTolR3D=1.e-7; - } - // - //modified by NIZNHY-PKV Thu Sep 15 08:03:02 2011f -#if OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher - aFF.PrepareLines3D(bToSplit); -#else - aFF.PrepareLines3D(); -#endif // OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher - //modified by NIZNHY-PKV Thu Sep 15 08:03:04 2011t - // - const IntTools_SequenceOfCurves& aCvsX=aFF.Lines(); - const IntTools_SequenceOfPntOn2Faces& aPntsX=aFF.Points(); - // - aNbCurves=aCvsX.Length(); - aNbPoints=aPntsX.Length(); - // - if (!aNbCurves && !aNbPoints) { - BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts); - anIndexIn=aFFs.Append(anInterf); - continue; - } - // - { - BOPTools_SSInterference anInterf (nF1, nF2, aTolR3D, aTolR2D, aCvsX, aPntsX); - anIndexIn=aFFs.Append(anInterf); - } - // - }// for (; myDSIt.More(); myDSIt.Next()) - // - myIsDone=Standard_True; -} - -//======================================================================= -// function: MakeBlocks -// purpose: -//======================================================================= -void NMTTools_PaveFiller::MakeBlocks() -{ - myIsDone=Standard_False; - // - Standard_Boolean bIsExistingPaveBlock, bIsValidIn2D, bIsCoincided; - Standard_Boolean bIsMicroEdge, bHasES; - Standard_Integer i, aNbFFs, nF1, nF2; - Standard_Integer nV1, nV2, j, aNbCurves; - Standard_Real aTolR3D, aTol2D, aT1, aT2, aTolPPC=Precision::PConfusion(); - TopoDS_Face aF1, aF2; - NMTTools_IndexedDataMapOfShapePaveBlock aMEPB; - BooleanOperations_IndexedDataMapOfShapeInteger aMapEI; - BOPTools_ListIteratorOfListOfPaveBlock anIt; - // - BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences(); - // - - // - // 1. Make Section Edges from intersection curves - // between each pair of faces - aNbFFs=aFFs.Extent(); - if (!aNbFFs) { - return; - } - // - FillFaceInfo(); - // - for (i=1; i<=aNbFFs; ++i) { - BOPTools_ListOfPaveBlock aLPB; - TColStd_MapOfInteger aMVStick; - TopTools_ListOfShape aLSE; - TColStd_ListOfInteger aLNE; - BOPTools_PaveSet aPSF; - NMTTools_MapOfPaveBlock aMPBX; - TColStd_MapIteratorOfMapOfInteger aItMI; - NMTTools_MapIteratorOfMapOfPaveBlock aItMPB; - // - BOPTools_SSInterference& aFFi=aFFs(i); - // - // Faces - aFFi.Indices(nF1, nF2); - aF1=*((TopoDS_Face*)(&myDS->Shape(nF1))); - aF2=*((TopoDS_Face*)(&myDS->Shape(nF2))); - // - SharedEdges(nF1, nF2, aLNE, aLSE); - aFFi.SetSharedEdges(aLNE); - // - // aMVStick - const NMTTools_FaceInfo& aFI1=myFaceInfo.Find(nF1); - const NMTTools_FaceInfo& aFI2=myFaceInfo.Find(nF2); - // - const TColStd_MapOfInteger& aMVOn1=aFI1.VerticesOn(); - const TColStd_MapOfInteger& aMVIn1=aFI1.VerticesIn(); - const TColStd_MapOfInteger& aMVOn2=aFI2.VerticesOn(); - const TColStd_MapOfInteger& aMVIn2=aFI2.VerticesIn(); - // - for (j=0; j<2; ++j) { - const TColStd_MapOfInteger& aMV1=(!j) ? aMVOn1 :aMVIn1; - aItMI.Initialize(aMV1); - for (; aItMI.More(); aItMI.Next()) { - nV1=aItMI.Key(); - if (aMVOn2.Contains(nV1) || aMVIn2.Contains(nV1)) { - aMVStick.Add(nV1); - } - } - } - // - // aLPB - const NMTTools_MapOfPaveBlock& aMPBIn1=aFI1.PaveBlocksIn(); - const NMTTools_MapOfPaveBlock& aMPBOn1=aFI1.PaveBlocksOn(); - const NMTTools_MapOfPaveBlock& aMPBIn2=aFI2.PaveBlocksIn(); - const NMTTools_MapOfPaveBlock& aMPBOn2=aFI2.PaveBlocksOn(); - // - aMPBX.Clear(); - for (j=0; j<4; ++j) { - NMTTools_MapOfPaveBlock *pMPB; - // - if (!j) { - pMPB=((NMTTools_MapOfPaveBlock*)&aMPBIn1); - } - else if (j==1) { - pMPB=((NMTTools_MapOfPaveBlock*)&aMPBOn1); - } - else if (j==2) { - pMPB=((NMTTools_MapOfPaveBlock*)&aMPBIn2); - } - else if (j==3) { - pMPB=((NMTTools_MapOfPaveBlock*)&aMPBOn2); - } - // - const NMTTools_MapOfPaveBlock& aMPB=*pMPB; - aItMPB.Initialize(aMPB); - for (; aItMPB.More(); aItMPB.Next()) { - const BOPTools_PaveBlock& aPB=aItMPB.Key(); - if (aMPBX.Add(aPB)) { - aLPB.Append(aPB); - } - // - else { - if (j>1) { - aFFi.AppendBlock(aPB); - } - } - // - } - } - // - BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves(); - aNbCurves=aSCvs.Length(); - if (!aNbCurves) { - continue; - } - // - aTolR3D=aFFi.TolR3D(); - aTol2D=(aTolR3D < 1.e-3) ? 1.e-3 : aTolR3D; - // - CorrectTolR3D(aFFi, aMVStick, aTolR3D); - // - PrepareSetForFace (nF1, nF2, aLPB, aPSF); - // - // Put Paves On Curves - for (j=1; j<=aNbCurves; ++j) { - BOPTools_Curve& aBC=aSCvs(j); - const IntTools_Curve& aC=aBC.Curve(); - // DEBUG f - Handle(Geom_Curve) aC3D = aC.Curve(); - // DEBUG t - PutPaveOnCurve (aPSF, aTolR3D, aBC); - } - // - // Put bounding paves on curves - for (j=1; j<=aNbCurves; ++j) { - BOPTools_Curve& aBC=aSCvs(j); - PutBoundPaveOnCurve (aBC, aFFi); - } - //modified by NIZNHY-PKV Wed Sep 14 13:12:14 2011f -#if OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher - // - // Put closing pave if needded - for (j=1; j<=aNbCurves; ++j) { - BOPTools_Curve& aBC=aSCvs(j); - PutClosingPaveOnCurve (aBC, aFFi); - } -#endif // OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher - //modified by NIZNHY-PKV Wed Sep 14 13:12:17 2011t - // - // Pave Blocks on Curves - bHasES=Standard_False; - for (j=1; j<=aNbCurves; ++j) { - BOPTools_Curve& aBC=aSCvs(j); - const IntTools_Curve& aIC= aBC.Curve(); - BOPTools_PaveSet& aPaveSet=aBC.Set(); - // - BOPTools_PaveBlockIterator aPBIter(0, aPaveSet); - for (; aPBIter.More(); aPBIter.Next()) { - BOPTools_PaveBlock& aPBNew=aPBIter.Value(); - aPBNew.SetCurve(aIC); - aPBNew.SetFace1(nF1); - aPBNew.SetFace2(nF2); - // - nV1=aPBNew.Pave1().Index(); - nV2=aPBNew.Pave2().Index(); - aT1=aPBNew.Pave1().Param(); - aT2=aPBNew.Pave2().Param(); - // - if((nV1==nV2) && (Abs(aT2 - aT1) < aTolPPC)) { - continue;// mkk ft ??? - } - // - // 1 - bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLPB, aTolR3D); - if (bIsExistingPaveBlock) { - continue; - } - // - bIsCoincided=CheckCoincidence(aPBNew, aLPB); - if(bIsCoincided) { - continue; - } - // - // 2 - bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLSE, aTolR3D); - if (bIsExistingPaveBlock) { - continue; - } - // - // Checking of validity in 2D - // - bIsValidIn2D=myContext->IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D); - if (!bIsValidIn2D) { - continue; - } - // - // - // Make Section Edge - TopoDS_Edge aES; - // - const TopoDS_Vertex aV1=TopoDS::Vertex(myDS->Shape(nV1)); - const TopoDS_Vertex aV2=TopoDS::Vertex(myDS->Shape(nV2)); - // - { - Standard_Real aT; - // - myContext->IsVertexOnLine(aV1, aIC, aTolR3D, aT); - BOPTools_Tools::UpdateVertex (aIC, aT, aV1); - // - myContext->IsVertexOnLine(aV2, aIC, aTolR3D, aT); - BOPTools_Tools::UpdateVertex (aIC, aT, aV2); - } - // - BOPTools_Tools::MakeSectEdge (aIC, aV1, aT1, aV2, aT2, aES); - // - NMTTools_Tools::UpdateEdge (aES, aTolR3D); - bIsMicroEdge=IsMicroEdge(aES, myContext); - if (bIsMicroEdge) { - continue; - } - // - { - Handle(Geom2d_Curve) aC2D1, aC2D2; - // - aC2D1=aIC.FirstCurve2d(); - aC2D2=aIC.SecondCurve2d(); - // - NMTTools_Tools::MakePCurve(aES, aF1, aC2D1); - NMTTools_Tools::MakePCurve(aES, aF2, aC2D2); - } - // - aMEPB.Add(aES, aPBNew); - aMapEI.Add(aES, i); - // - bHasES=Standard_True; - }// for (; aPBIter.More(); aPBIter.Next()) - } // end of for (j=1; j<=aNbCurves; ++j) - // qqf - if (bHasES) { - myIP->Add(nF1, nF2, Standard_True, NMTDS_TI_FF); - } - // qqt - }// for (i=1; i<=aNbFFs; ++i) - //============================================================= - // - // II. Post treatment - // - // Input data: aMEPB, aMapEI - // Result : section edges in myDS - // - Standard_Integer aNbSE; - // - aNbSE=aMEPB.Extent(); - if (!aNbSE) { - // there is nothing to do here - return; - } - // - BRep_Builder aBB; - TopoDS_Compound aCompound; - // - // 1. Make compound from SE - aBB.MakeCompound(aCompound); - for (i=1; i<=aNbSE; ++i) { - const TopoDS_Shape& aSE=aMEPB.FindKey(i); - aBB.Add(aCompound, aSE); - } - // - // - // 2. Intersect SE using auxiliary Filler - NMTTools_PaveFiller tPF; - // - tPF.SetCompositeShape(aCompound); - // - // 2.1.VV - tPF.Init(); - tPF.PerformVV(); - // - // 2.2.VE - tPF.myPavePool.Resize (tPF.myNbEdges); - tPF.PrepareEdges(); - tPF.PerformVE(); - // - // 2.3.VF - tPF.PerformVF(); - // - // 2.4.EE - tPF.myCommonBlockPool.Resize (tPF.myNbEdges); - tPF.mySplitShapesPool.Resize (tPF.myNbEdges); - tPF.myPavePoolNew .Resize (tPF.myNbEdges); - - tPF.PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE); - tPF.PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE); - // - tPF.PerformEE(); - // - tPF.RefinePavePool (); - // - tPF.myPavePoolNew.Destroy(); - // - tPF.MakeSplitEdges(); - tPF.UpdateCommonBlocks(); - // - // 3. Treatment of the result of intersection - // - Standard_Integer aNbOld, aNbLines, aNbPB, mV1, mV2, nE, mE, iFF; - TopAbs_ShapeEnum aType; - BOPTools_ListIteratorOfListOfPaveBlock aIt; - BOPTColStd_IndexedDataMapOfIntegerInteger aMNewOld; - // - const NMTDS_ShapesDataStructure& tDS=*(tPF.DS()); - const BOPTools_SplitShapesPool& aSSP=tPF.mySplitShapesPool; - const NMTTools_CommonBlockPool& aCBP=tPF.myCommonBlockPool; - // - aNbLines=tDS.NumberOfInsertedShapes(); - aNbOld=tDS.NumberOfShapesOfTheObject(); - // - // 3.1 Links between indices in tDS and DS (kept in aMNewOld) - // - // 3.1.1.Old vertices [ links ] - for (i=1; i<=aNbOld; ++i) { - const TopoDS_Shape& aV=tDS.Shape(i); - aType=aV.ShapeType(); - if (aType!=TopAbs_VERTEX) { - continue; - } - // - for (j=1; j<=aNbSE; ++j) { - const BOPTools_PaveBlock& aPBSE=aMEPB(j); - nV1=aPBSE.Pave1().Index(); - 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);//mpv - if (aV2.IsSame(aV)) { - aMNewOld.Add(i, nV2); - break; - } - } - } - // - // 3.1.2. New vertices [ links ] - i=tDS.NumberOfSourceShapes()+1; - for (; i<=aNbLines; ++i) { - const TopoDS_Shape& aV=tDS.Shape(i); - aType=aV.ShapeType(); - if (aType!=TopAbs_VERTEX) { - continue; - } - // - // Insert new vertex in myDS - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - myDS->InsertShapeAndAncestorsSuccessors(aV, anASSeq); - nV1=myDS->NumberOfInsertedShapes(); - // link - aMNewOld.Add(i, nV1); - } - // - // 3.2. Treatment of section edges (SE) - for (i=1; i<=aNbOld; ++i) { - const TopoDS_Shape& aE=tDS.Shape(i); - aType=aE.ShapeType(); - if (aType!=TopAbs_EDGE) { - continue; - } - // - // block of section edge that we already have for this SE - BOPTools_PaveBlock& aPBSE=aMEPB.ChangeFromKey(aE); - // - // Corresponding FF-interference - iFF=aMapEI.FindFromKey(aE); - BOPTools_SSInterference& aFFi=aFFs(iFF); - BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves(); - // - BOPTools_Curve& aBC=aSCvs(1); - // - const BOPTools_ListOfPaveBlock& aLPB=aSSP(tDS.RefEdge(i)); - aNbPB=aLPB.Extent(); - // - if (!aNbPB) { - // no pave blocks -> use aPBSE and whole edge aE - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - // - nV1=aPBSE.Pave1().Index(); - const TopoDS_Shape aV1=myDS->Shape(nV1);//mpv - nV2=aPBSE.Pave2().Index(); - const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv - // - anASSeq.SetNewSuccessor(nV1); - anASSeq.SetNewOrientation(aV1.Orientation()); - anASSeq.SetNewSuccessor(nV2); - anASSeq.SetNewOrientation(aV2.Orientation()); - // - myDS->InsertShapeAndAncestorsSuccessors(aE, anASSeq); - nE=myDS->NumberOfInsertedShapes(); - // - aPBSE.SetEdge(nE); - aBC.AppendNewBlock(aPBSE); - // - continue; - } - // - nF1=aPBSE.Face1(); - nF2=aPBSE.Face2(); - // - const NMTTools_ListOfCommonBlock& aLCB=aCBP(tDS.RefEdge(i)); - NMTTools_CommonBlockAPI aCBAPI(aLCB); - // - aIt.Initialize(aLPB); - for (; aIt.More(); aIt.Next()) { - BOPTools_PaveBlock aPB=aIt.Value(); - // - 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 - Standard_Real aTolEx; - Handle(Geom2d_Curve) aC2D1, aC2D2; - TopoDS_Face aF1FWD, aF2FWD; - // - NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB); - //const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); - // - aPB=aCB.PaveBlock1(); - mE=aPB.Edge(); // index of edge in tDS - const TopoDS_Edge& aEx=TopoDS::Edge(tDS.Shape(mE)); - aTolEx=BRep_Tool::Tolerance(aEx); - // - aF1FWD=aF1; - aF1FWD.Orientation(TopAbs_FORWARD); - aF2FWD=aF2; - aF2FWD.Orientation(TopAbs_FORWARD); - // - NMTTools_Tools::MakePCurve(aEx, aF1FWD, aC2D1); - NMTTools_Tools::MakePCurve(aEx, aF2FWD, aC2D2); - NMTTools_Tools::UpdateEdge (aEx, aTolEx); - } //if (aCBAPI.IsCommonBlock(aPB)) - // - // new SE - mE=aPB.Edge(); // index of edge in tDS - const TopoDS_Shape& aSp=tDS.Shape(mE); - // - const BOPTools_Pave& aPave1=aPB.Pave1(); - aT1=aPave1.Param(); - mV1=aPave1.Index(); // index in tDS - nV1=aMNewOld.FindFromKey(mV1); // index in myDS - 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);//mpv - // - if (!aMNewOld.Contains(mE)) { - // add new SE to the myDS - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - // - anASSeq.SetNewSuccessor(nV1); - anASSeq.SetNewOrientation(aV1.Orientation()); - - anASSeq.SetNewSuccessor(nV2); - anASSeq.SetNewOrientation(aV2.Orientation()); - - myDS->InsertShapeAndAncestorsSuccessors(aSp, anASSeq); - nE=myDS->NumberOfInsertedShapes(); - // - aMNewOld.Add(mE, nE); - } - else { - nE=aMNewOld.FindFromKey(mE); - } - // Form PaveBlock; - BOPTools_PaveBlock aPBx; - BOPTools_Pave aP1, aP2; - // - aPBx.SetFace1(nF1); - aPBx.SetFace1(nF2); - // - aP1.SetIndex(nV1); - aP1.SetParam(aT1); - // - aP2.SetIndex(nV2); - aP2.SetParam(aT2); - // - aPBx.SetPave1(aP1); - aPBx.SetPave2(aP2); - // - aPBx.SetEdge(nE); - // - aBC.AppendNewBlock(aPBx); - }// for (; aIt.More(); aIt.Next()) - }// for (i=1; i<=aNbOld; ++i) - // - myIsDone=Standard_True; -} - -//======================================================================= -// function: MakePCurves -// purpose: -//======================================================================= -void NMTTools_PaveFiller::MakePCurves() -{ - Standard_Integer i, aNb, nF1, nF2, nE; - Standard_Integer aNbCB, aNbF, nSp, nF; - TopAbs_ShapeEnum aType; - TopoDS_Face aF1FWD, aF2FWD; - TColStd_ListIteratorOfListOfInteger aItF; - BOPTools_ListIteratorOfListOfPaveBlock anIt; - NMTTools_ListIteratorOfListOfCommonBlock aItCB; - // - BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences(); - // - aNb=aFFs.Extent(); - for (i=1; i<=aNb; i++) { - BOPTools_SSInterference& aFF=aFFs(i); - aFF.Indices(nF1, 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); - aF2FWD=aF2; - aF2FWD.Orientation(TopAbs_FORWARD); - // - // In, On parts processing - const BOPTools_ListOfPaveBlock& aLPBInOn=aFF.PaveBlocks(); - // - anIt.Initialize(aLPBInOn); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB=anIt.Value(); - nE=aPB.Edge(); - const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));//mpv - - BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD); - BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD); - } - } - // Check common blocks between edges and faces - // Build P-Curves if they were not built in previos block. - // The main case is :arguments for e.g aEdge, aFace -> no FFs, - // but p-curves are needed. - // - aNb=myDS->NumberOfShapesOfTheObject(); - for (i=1; i<=aNb; ++i) { - const TopoDS_Shape& aS=myDS->Shape(i); - aType=aS.ShapeType(); - // - if (aType!=TopAbs_EDGE) { - continue; - } - const TopoDS_Edge& aE=TopoDS::Edge(aS); - // - if (BRep_Tool::Degenerated(aE)) { - continue; - } - // - const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(i)); - aNbCB=aLCB.Extent(); - if (!aNbCB) { - continue; - } - // - 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) { - continue; - } - // - nSp=aPB1.Edge(); - const TopoDS_Edge aSp=TopoDS::Edge(myDS->Shape(nSp));//mpv - // - aItF.Initialize(aLF); - for (; aItF.More(); aItF.Next()) { - nF=aItF.Value(); - aF1FWD=TopoDS::Face(myDS->Shape(nF)); - aF1FWD.Orientation(TopAbs_FORWARD); - // - BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aSp, aF1FWD); - } // for (; aItCB.More(); aItCB.Next()) { - }//if (aS.ShapeType()==TopAbs_EDGE) { - } -} - -//======================================================================= -// function: IsExistingPaveBlock -// purpose: -//======================================================================= -Standard_Boolean NMTTools_PaveFiller::IsExistingPaveBlock(const BOPTools_PaveBlock& aPBNew, - const BOPTools_ListOfPaveBlock& aLPBR, - const Standard_Real aTolR3D) -{ - Standard_Boolean bFlag; - Standard_Integer nVNew1, nVNew2, nV1, nV2, iC; - BOPTools_ListIteratorOfListOfPaveBlock anIt; - // - bFlag=Standard_False; - nVNew1=aPBNew.Pave1().Index(); - nVNew2=aPBNew.Pave2().Index(); - // - anIt.Initialize(aLPBR); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPBR=anIt.Value(); - nV1=aPBR.Pave1().Index(); - nV2=aPBR.Pave2().Index(); - if (nVNew1==nV1 || nVNew1==nV2 || nVNew2==nV1 || nVNew2==nV2) { - // - iC=CheckIntermediatePoint(aPBNew, aPBR, aTolR3D); - if (!iC) { - return !bFlag; - } - } - } - 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; - Standard_Real aTolE, aTol; - 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()); - aTolE=BRep_Tool::Tolerance(aE); - aTol=aTolR3D; - if (aTolE>aTol) { - aTol=aTolE; - } - iC=CheckIntermediatePoint(aPBNew, aE, aTol); - if (!iC) { - return !bFlag; - } - } - return bFlag; -} - -//======================================================================= -// function: CheckIntermediatePoint -// purpose: -//======================================================================= -Standard_Integer NMTTools_PaveFiller::CheckIntermediatePoint(const BOPTools_PaveBlock& aPB, - const BOPTools_PaveBlock& aPBR, - const Standard_Real aTolC) -{ - 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; - // - // Vertex - const BOPTools_Pave& aPave11=aPB.Pave1(); - aT11=aPave11.Param(); - // - const BOPTools_Pave& aPave12=aPB.Pave2(); - aT12=aPave12.Param(); - // - aTM=IntTools_Tools::IntermediatePoint (aT11, aT12); - // - const IntTools_Curve& aIC=aPB.Curve(); - aIC.D0(aTM, aPM); - // - aBB.MakeVertex (aVM, aPM, aTolC); - // - iVM=myContext->ComputeVE(aVM, aE2, aTmp); - // - return iVM; -} - -//======================================================================= -// function: PutBoundPaveOnCurve -// purpose: -//======================================================================= -void NMTTools_PaveFiller::PutBoundPaveOnCurve(BOPTools_Curve& aBC, - BOPTools_SSInterference& aFFi) -{ - Standard_Boolean bHasBounds, bVF; - Standard_Integer nF1, nF2; - Standard_Real aT1, aT2, aTolR3D; - gp_Pnt aP1, aP2; - // - const IntTools_Curve& aIC=aBC.Curve(); - bHasBounds=aIC.HasBounds (); - if (!bHasBounds){ - return; - } - // - // Bounds - aIC.Bounds (aT1, aT2, aP1, aP2); - // - // Faces - aFFi.Indices(nF1, nF2); - aTolR3D=aFFi.TolR3D(); - // - 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) { - PutBoundPaveOnCurve (aP1, aT1, aBC, aFFi); - } - // - bVF=myContext->IsValidPointForFaces (aP2, aF1, aF2, aTolR3D); - if (bVF) { - PutBoundPaveOnCurve (aP2, aT2, aBC, aFFi); - } -} - -//======================================================================= -// function: PutBoundPaveOnCurve -// purpose: -//======================================================================= -void NMTTools_PaveFiller::PutBoundPaveOnCurve(const gp_Pnt& aP, - const Standard_Real aT, - BOPTools_Curve& aBC, - BOPTools_SSInterference& aFFi) -{ - Standard_Boolean bFound1, bFound2; - Standard_Integer nV; - Standard_Real aTolV=aFFi.TolR3D(); - - BOPTools_Pave aPave1, aPave2, aPave; - BOPTools_PaveSet& aCPS=aBC.Set(); - BOPTools_PaveSet& aFFiPS=aFFi.NewPaveSet(); - const IntTools_Curve& aIC=aBC.Curve(); - // - bFound1=FindPave(aP, aTolV, aCPS , aPave1); - bFound2=FindPave(aP, aTolV, aFFiPS, aPave2); - // - if (!bFound1 && !bFound2) { - TopoDS_Vertex aNewVertex; - BOPTools_Tools::MakeNewVertex(aP, aTolV, aNewVertex); - // - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); - nV=myDS->NumberOfInsertedShapes(); - aPave.SetIndex(nV); - aPave.SetParam(aT); - - aCPS.Append(aPave); - aFFiPS.Append(aPave); - // - // Append Techno Vertex to the Curve - 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));//mpv - BOPTools_Tools::UpdateVertex (aIC, aT, aV); - } - - if (!bFound1 && bFound2) { - nV=aPave2.Index(); - aPave.SetIndex(nV); - aPave.SetParam(aT); - aCPS.Append(aPave); - // - const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv - BOPTools_Tools::UpdateVertex (aIC, aT, aV); - } -} - -//======================================================================= -// function: FindPave -// purpose: -//======================================================================= -Standard_Boolean NMTTools_PaveFiller::FindPave(const gp_Pnt& aP, - const Standard_Real aTolPV, - const BOPTools_PaveSet& aPS, - BOPTools_Pave& aPave) -{ - Standard_Integer nV; - Standard_Boolean bIsVertex=Standard_False; - - const BOPTools_ListOfPave& aLP=aPS.Set(); - BOPTools_ListIteratorOfListOfPave anIt(aLP); - for (; anIt.More(); anIt.Next()) { - const BOPTools_Pave& aPC=anIt.Value(); - nV=aPC.Index(); - const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv - bIsVertex=IntTools_Tools::IsVertex (aP, aTolPV, aV); - if (bIsVertex) { - aPave=aPC; - return bIsVertex; - } - } - return bIsVertex; -} - -//======================================================================= -// function: PrepareSetForFace -// purpose: -//======================================================================= -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_ListIteratorOfListOfPaveBlock anIt; - // - anIt.Initialize(aLPBC); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB=anIt.Value(); - const BOPTools_Pave& aPave1=aPB.Pave1(); - nV1=aPave1.Index(); - if (!aMap.Contains(nV1)) { - aMap.Add(nV1); - aPSF.Append(aPave1); - } - const BOPTools_Pave& aPave2=aPB.Pave2(); - nV2=aPave2.Index(); - if (!aMap.Contains(nV2)) { - aMap.Add(nV2); - aPSF.Append(aPave2); - } - } -} - -//======================================================================= -// 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(); - // - if (nV11==nV21 || nV11==nV22 || nV12==nV21 || nV12==nV22) { - continue; - } - // - // 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; -} - -//======================================================================= -//function : IsMicroEdge -//purpose : -//======================================================================= -Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE, - const Handle(IntTools_Context)& aCtx) -{ - Standard_Boolean bRet; - Standard_Integer iErr; - Standard_Real aT1, aT2, aTmp; - Handle(Geom_Curve) aC3D; - TopoDS_Vertex aV1, aV2; - IntTools_Range aR; - // - bRet=(BRep_Tool::Degenerated(aE) || - !BRep_Tool::IsGeometric(aE)); - if (bRet) { - return bRet; - } - // - aC3D=BRep_Tool::Curve(aE, aT1, aT2); - TopExp::Vertices(aE, aV1, aV2); - aT1=BRep_Tool::Parameter(aV1, aE); - aT2=BRep_Tool::Parameter(aV2, aE); - if (aT2Shape(nV)); - // - Bnd_Box aBBV; - BRepBndLib::Add(aV, aBBV); - if (aBBC.IsOut(aBBV)){ - continue; - } - // - bIsVertexOnLine=myContext->IsVertexOnLine(aV, aC, aTolR3D, aT); - // - // - if (bIsVertexOnLine) { - BOPTools_Pave aPaveNew(nV, aT, BooleanOperations_SurfaceSurface); - BOPTools_PaveSet& aPS=aBC.Set(); - aPS.Append(aPaveNew); - //<-B - } - } -} -// -//======================================================================= -//function : FillFaceInfo -//purpose : -//======================================================================= -void NMTTools_PaveFiller::FillFaceInfo() -{ - Standard_Integer i, aNbS, aNbFFs, nF, aNbVFs, aNbEFs, j, n1, n2, nX, aNbF; - TopAbs_ShapeEnum aType; - TopoDS_Shape aS; - TColStd_ListIteratorOfListOfInteger aItF; - BOPTools_ListIteratorOfListOfPaveBlock anItPB; - NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo aItMFI; - NMTTools_ListIteratorOfListOfCommonBlock aItCB; - // - myFaceInfo.Clear(); - // - BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences(); - BOPTools_CArray1OfVSInterference& aVFs=myIP->VSInterferences(); - BOPTools_CArray1OfESInterference& aEFs=myIP->ESInterferences(); - // - aNbFFs=aFFs.Extent(); - if (!aNbFFs) { - return; - } - // - // 0. - for (i=1; i<=aNbFFs; ++i) { - NMTTools_FaceInfo aFI; - // - BOPTools_SSInterference& aFFi=aFFs(i); - aFFi.Indices(n1, n2); - myFaceInfo.Bind(n1, aFI); - myFaceInfo.Bind(n2, aFI); - } - // - // 1. - aNbS=myDS->NumberOfShapesOfTheObject(); - for (i=1; i<=aNbS; ++i) { - 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) { - continue; - } - // - aItF.Initialize(aLF); - for (; aItF.More(); aItF.Next()) { - nF=aItF.Value(); - if (!myFaceInfo.IsBound(nF)) { - continue; - } - // - NMTTools_FaceInfo& aFI=myFaceInfo.ChangeFind(nF); - aFI.ChangePaveBlocksIn().Add(aPB1); - // - n1=aPB1.Pave1().Index(); - n2=aPB1.Pave2().Index(); - aFI.ChangeVerticesIn().Add(n1); - aFI.ChangeVerticesIn().Add(n2); - } - } - }// if (aType==TopAbs_EDGE) { - else if (aType==TopAbs_FACE) { - if (!myFaceInfo.IsBound(i)) { - continue; - } - // - BOPTools_ListOfPaveBlock aLPBOn; - // - nF=i; - NMTTools_FaceInfo& aFI=myFaceInfo.ChangeFind(nF); - // - RealSplitsFace(nF, aLPBOn); - // - anItPB.Initialize(aLPBOn); - for (; anItPB.More(); anItPB.Next()) { - const BOPTools_PaveBlock &aPB=anItPB.Value(); - aFI.ChangePaveBlocksOn().Add(aPB); - // - n1=aPB.Pave1().Index(); - n2=aPB.Pave2().Index(); - aFI.ChangeVerticesOn().Add(n1); - aFI.ChangeVerticesOn().Add(n2); - } - // - }// else if (aType==TopAbs_FACE) { - }// for (i=1; i<=aNbS; ++i) { - // - // 2. - aItMFI.Initialize(myFaceInfo); - for (; aItMFI.More(); aItMFI.Next()) { - nF=aItMFI.Key(); - NMTTools_FaceInfo& aFI=*((NMTTools_FaceInfo*)&aItMFI.Value()); - // - aFI.SetIndex(nF); - // - // - // 2.1 aVFs - aNbVFs=aVFs.Extent(); - for (j=1; j<=aNbVFs; ++j) { - BOPTools_VSInterference& aVFj=aVFs(j); - aVFj.Indices(n1, n2); - if (nF==n1) { - aFI.ChangeVerticesIn().Add(n2); - } - else if (nF==n2){ - aFI.ChangeVerticesIn().Add(n1); - } - }// for (j=1; j<=aNbVFs; ++j) { - // - // 2.2 aEFs - aNbEFs=aEFs.Extent(); - for (j=1; j<=aNbEFs; ++j) { - BOPTools_ESInterference& aEFj=aEFs(j); - aEFj.Indices(n1, n2); - if (!(nF==n1 || nF==n2)) { - continue; - } - // - nX=aEFj.NewShape(); - if (nX<1) { - continue; - } - // - aS=myDS->Shape(nX); - aType=aS.ShapeType(); - if (aType!=TopAbs_VERTEX) { - continue; - } - // - aFI.ChangeVerticesIn().Add(nX); - }// for (j=1; j<=aNbEFs; ++j) { - }// for (; aItMFI.More(); aItMFI.Next()) { -} - - -#include -#include -#include -#include -//======================================================================= -//function : CorrectTolR3D -//purpose : Attempt to correct the value of tolerance aTolR3D for -// the intersection curve in order to -// compel it to pass through the sticks. -// Prerequisites: -// 2. The are based on B-Spline surfaces; -// 1. There is at least the one intersection curve; -// 2. The faces have stick vertices to catch the curve; -// 3. The intersection angle is rather small (0.7-7 deg) -// -//======================================================================= -void NMTTools_PaveFiller::CorrectTolR3D(const BOPTools_SSInterference& aFF, - const TColStd_MapOfInteger& aMVStick, - Standard_Real& aTolR3D) - -{ - Standard_Boolean bHasBounds; - Standard_Integer i, nF[2], nV, aNbCurves; - Standard_Real aT1, aT2, aU, aV, aT, aA, aTolV, aTolVmax; - Standard_Real aTolR, aTolTresh, aAmin, aAmax; - TColStd_MapIteratorOfMapOfInteger aIt; - gp_Pnt aP, aP1, aP2; - gp_Dir aDN[2]; - gp_Vec aVT; - Handle(Geom_Surface) aS[2]; - Handle(Geom_Curve) aC3D; - GeomAdaptor_Surface aGAS; - GeomAbs_SurfaceType aType; - TopoDS_Face aF[2]; - // - aTolTresh=0.0005; - aAmin=0.012;// 0.7-7 deg - aAmax=0.12; - // - if (!aMVStick.Extent()) { - return; - } - // - BOPTools_SSInterference& aFFi=*((BOPTools_SSInterference*)&aFF); - BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves(); - aNbCurves=aSCvs.Length(); - if (aNbCurves!=1){ - return; - } - // - aFFi.Indices(nF[0], nF[1]); - for (i=0; i<2; ++i) { - aF[i]=*((TopoDS_Face*)(&myDS->Shape(nF[i]))); - aS[i]=BRep_Tool::Surface(aF[i]); - aGAS.Load(aS[i]); - aType=aGAS.GetType(); - if (aType!=GeomAbs_BSplineSurface) { - return; - } - } - // - BOPTools_Curve& aBC=aSCvs(1); - const IntTools_Curve& aIC=aBC.Curve(); - bHasBounds=aIC.HasBounds(); - if (!bHasBounds){ - return; - } - // - aIC.Bounds (aT1, aT2, aP1, aP2); - aT=IntTools_Tools::IntermediatePoint(aT1, aT2); - aC3D=aIC.Curve(); - aC3D->D0(aT, aP); - // - for (i=0; i<2; ++i) { - GeomAPI_ProjectPointOnSurf& aPPS=myContext->ProjPS(aF[i]); - aPPS.Perform(aP); - aPPS.LowerDistanceParameters(aU, aV); - BOPTools_Tools3D::GetNormalToSurface(aS[i], aU, aV, aDN[i]); - } - // - aA=aDN[0].Angle(aDN[1]); - aA=fabs(aA); - if (aA > 0.5*M_PI) { - aA = M_PI - aA; - } - // - if (aAaAmax) { - return; - } - // - aTolVmax=-1.; - aIt.Initialize(aMVStick); - for (; aIt.More(); aIt.Next()) { - nV=aIt.Key(); - const TopoDS_Vertex& aV=*((TopoDS_Vertex*)(&myDS->Shape(nV))); - aTolV=BRep_Tool::Tolerance(aV); - if (aTolV>aTolVmax) { - aTolVmax=aTolV; - } - } - // - - aTolR=aTolVmax/aA; - if (aTolR 0x06050100 // For OCCT6.5.2 and higher -//======================================================================= -// function: PutClosingPaveOnCurve -// purpose: -//======================================================================= -void NMTTools_PaveFiller::PutClosingPaveOnCurve(BOPTools_Curve& aBC, - BOPTools_SSInterference& aFFi) -{ - Standard_Boolean bIsClosed, bHasBounds, bAdded; - Standard_Integer nVC, j; - Standard_Real aT[2], aTolR3D, aTC, dT, aTx; - gp_Pnt aP[2] ; - BOPTools_Pave aPVx; - BOPTools_ListIteratorOfListOfPave aItLP; - // - const IntTools_Curve& aIC=aBC.Curve(); - const Handle (Geom_Curve)& aC3D=aIC.Curve(); - if(aC3D.IsNull()) { - return; - } - // - bIsClosed=IntTools_Tools::IsClosed(aC3D); - if (!bIsClosed) { - return; - } - // - bHasBounds=aIC.HasBounds (); - if (!bHasBounds){ - return; - } - // - bAdded=Standard_False; - dT=Precision::PConfusion(); - aTolR3D=aFFi.TolR3D(); - aIC.Bounds (aT[0], aT[1], aP[0], aP[1]); - // - BOPTools_PaveSet& aFFiPS=aFFi.NewPaveSet(); - BOPTools_PaveSet& aCPS=aBC.Set(); - // - const BOPTools_ListOfPave& aLP=aCPS.Set(); - aItLP.Initialize(aLP); - for (; aItLP.More() && !bAdded; aItLP.Next()) { - const BOPTools_Pave& aPC=aItLP.Value(); - nVC=aPC.Index(); - const TopoDS_Vertex aVC=TopoDS::Vertex(myDS->Shape(nVC)); - aTC=aPC.Param(); - // - for (j=0; j<2; ++j) { - if (fabs(aTC-aT[j]) < dT) { - aTx=(!j) ? aT[1] : aT[0]; - aPVx.SetIndex(nVC); - aPVx.SetParam(aTx); - // - aCPS.Append(aPVx); - aFFiPS.Append(aPVx); - // - bAdded=Standard_True; - break; - } - } - } -} -#endif // OCC_VERSION_LARGE > 0x06050100 // For OCCT6.5.2 and higher -//modified by NIZNHY-PKV Wed Sep 14 13:21:17 2011t diff --git a/src/NMTTools_NEW/NMTTools_PaveFiller_7.cxx b/src/NMTTools_NEW/NMTTools_PaveFiller_7.cxx deleted file mode 100644 index a365d7a73..000000000 --- a/src/NMTTools_NEW/NMTTools_PaveFiller_7.cxx +++ /dev/null @@ -1,818 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_PaveFiller_7.cxx -// Author: Peter KURNEV - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -// -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - - -//======================================================================= -// function: MakeSplitEdges -// purpose: -//======================================================================= -void NMTTools_PaveFiller::MakeSplitEdges() -{ - myIsDone=Standard_False; - // - Standard_Boolean bIsNewVertex1, bIsNewVertex2; - Standard_Integer i, aNbS, nV1, nV2, aNbPaveBlocks, aNewShapeIndex; - Standard_Real t1, t2; - TopAbs_Orientation anOri; - TopoDS_Edge aE, aESplit; - TopoDS_Vertex aV1, aV2; - // - aNbS=myDS->NumberOfShapesOfTheObject(); - for (i=1; i<=aNbS; ++i) { - if (myDS->GetShapeType(i) != TopAbs_EDGE) - continue; - // - // Original Edge - aE=TopoDS::Edge(myDS->Shape(i)); - if (BRep_Tool::Degenerated(aE)){ - continue; - } - // - anOri=aE.Orientation(); - aE.Orientation(TopAbs_FORWARD); - // - // Making Split Edges - // - // Split Set for the Original Edge i - BOPTools_ListOfPaveBlock& aSplitEdges=mySplitShapesPool(myDS->RefEdge(i)); - BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges); - // - aNbPaveBlocks=aSplitEdges.Extent(); - - for (; aPBIt.More(); aPBIt.Next()) { - BOPTools_PaveBlock& aPB=aPBIt.Value(); - // aPave1 - const BOPTools_Pave& aPave1=aPB.Pave1(); - nV1=aPave1.Index(); - t1=aPave1.Param(); - aV1=TopoDS::Vertex(myDS->GetShape(nV1)); - aV1.Orientation(TopAbs_FORWARD); - // aPave2 - const BOPTools_Pave& aPave2=aPB.Pave2(); - nV2=aPave2.Index(); - t2=aPave2.Param(); - aV2=TopoDS::Vertex(myDS->GetShape(nV2)); - aV2.Orientation(TopAbs_REVERSED); - //xx - if (aNbPaveBlocks==1) { - bIsNewVertex1=myDS->IsNewShape (nV1); - bIsNewVertex2=myDS->IsNewShape (nV2); - if (!bIsNewVertex1 && !bIsNewVertex2) { - aPB.SetEdge(i); - continue; - } - } - //xx - BOPTools_Tools::MakeSplitEdge(aE, aV1, t1, aV2, t2, aESplit); - // - // Add Split Part of the Original Edge to the DS - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - - anASSeq.SetNewSuccessor(nV1); - anASSeq.SetNewOrientation(aV1.Orientation()); - - anASSeq.SetNewSuccessor(nV2); - anASSeq.SetNewOrientation(aV2.Orientation()); - // - if (anOri==TopAbs_INTERNAL) { - anASSeq.SetNewAncestor(i); - aESplit.Orientation(anOri); - } - // - myDS->InsertShapeAndAncestorsSuccessors(aESplit, anASSeq); - aNewShapeIndex=myDS->NumberOfInsertedShapes(); - myDS->SetState(aNewShapeIndex, BooleanOperations_UNKNOWN); - // - // Fill Split Set for the Original Edge - aPB.SetEdge(aNewShapeIndex); - // - } - } - myIsDone=Standard_True; -} -//======================================================================= -// function: UpdateCommonBlocks -// purpose: -//======================================================================= -void NMTTools_PaveFiller::UpdateCommonBlocks(const Standard_Integer) -{ - Standard_Integer nE, aNbS, nEx, nEMax, j, aNbPoints, aNbLCB, nF; - Standard_Real aTolEx, aTolExMax, aTSRMax[2], aTx[2], aTmp; - TColStd_ListIteratorOfListOfInteger aItLI; - gp_Pnt aPMax[2]; - TopoDS_Edge aEMax; - BOPTools_ListIteratorOfListOfPaveBlock aItLPB, aItLPBS; - NMTTools_ListIteratorOfListOfCommonBlock aItLCB; - NMTTools_MapOfPaveBlock aMPB; - // - myIsDone=Standard_False; - // - aNbS=myDS->NumberOfShapesOfTheObject(); - for (nE=1; nE<=aNbS; ++nE) { - if (myDS->GetShapeType(nE)!=TopAbs_EDGE){ - continue; - } - // - const TopoDS_Edge& aE=*((TopoDS_Edge*)&myDS->Shape(nE)); - if (BRep_Tool::Degenerated(aE)){ - continue; - } - // - NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE)); - //modified by NIZNHY-PKV Thu Jan 19 09:03:19 2012f - aNbLCB=aLCB.Extent(); - if (!aNbLCB) { - continue; - } - // 0 - NMTTools_ListOfCommonBlock aLCBx; - // - aItLCB.Initialize(aLCB); - for (; aItLCB.More(); aItLCB.Next()) { - NMTTools_CommonBlock aCBx; - // - NMTTools_CommonBlock& aCB=aItLCB.ChangeValue(); - const BOPTools_ListOfPaveBlock &aLPB=aCB.PaveBlocks(); - aItLPB.Initialize(aLPB); - for (; aItLPB.More(); aItLPB.Next()) { - const BOPTools_PaveBlock& aPBx=aItLPB.Value(); - nEx=aPBx.OriginalEdge(); - BOPTools_ListOfPaveBlock& aLPBS=mySplitShapesPool(myDS->RefEdge(nEx)); - aItLPBS.Initialize(aLPBS); - for (; aItLPBS.More(); aItLPBS.Next()) { - const BOPTools_PaveBlock& aPBSx=aItLPBS.Value(); - if (aPBSx.IsEqual(aPBx)) { - aCBx.AddPaveBlock(aPBSx); - break; - } - }// for (; aItLPBS.More(); aItLPBS.Next()) { - }// for (; aItLPB.More(); aItLPB.Next()) { - // - const TColStd_ListOfInteger& aLI=aCB.Faces(); - aItLI.Initialize(aLI); - for (; aItLI.More(); aItLI.Next()) { - nF=aItLI.Value(); - aCBx.AddFace(nF); - } - // - aLCBx.Append(aCBx); - }//for (; aItLCB.More(); aItLCB.Next()) { - // - aLCB.Clear(); - // - aItLCB.Initialize(aLCBx); - for (; aItLCB.More(); aItLCB.Next()) { - NMTTools_CommonBlock& aCBx=aItLCB.ChangeValue(); - aLCB.Append(aCBx); - } - //modified by NIZNHY-PKV Thu Jan 19 09:03:30 2012t - // 1 - aItLCB.Initialize(aLCB); - for (; aItLCB.More(); aItLCB.Next()) { - NMTTools_CommonBlock& aCB=aItLCB.ChangeValue(); - // - BOPTools_PaveBlock aPBMax; - aTolExMax=-1.; - const BOPTools_ListOfPaveBlock &aLPB=aCB.PaveBlocks(); - aItLPB.Initialize(aLPB); - for (; aItLPB.More(); aItLPB.Next()) { - const BOPTools_PaveBlock& aPBx=aItLPB.Value(); - nEx=aPBx.OriginalEdge(); - const TopoDS_Edge& aEx=*((TopoDS_Edge*)&myDS->Shape(nEx)); - aTolEx=BRep_Tool::Tolerance(aEx); - if (aTolEx>aTolExMax) { - aTolExMax=aTolEx; - aEMax=aEx; - aPBMax=aPBx; - } - } - // - // 2 - if (aMPB.Contains(aPBMax)) { - continue; - } - aMPB.Add(aPBMax); - // - nEMax=aPBMax.OriginalEdge(); - const IntTools_ShrunkRange& aISRMax=aPBMax.ShrunkRange(); - const IntTools_Range& aSRMax=aISRMax.ShrunkRange(); - const Bnd_Box& aBoxMax=aISRMax.BndBox(); - aSRMax.Range(aTSRMax[0], aTSRMax[1]); - for (j=0; j<2; ++j) { - BOPTools_Tools::PointOnEdge(aEMax, aTSRMax[j], aPMax[j]); - } - // - // 3 - aItLPB.Initialize(aLPB); - for (; aItLPB.More(); aItLPB.Next()) { - const BOPTools_PaveBlock& aPBx=aItLPB.Value(); - nEx=aPBx.OriginalEdge(); - if (nEx==nEMax) { - continue; - } - // - const TopoDS_Edge& aEx=*((TopoDS_Edge*)&myDS->Shape(nEx)); - GeomAPI_ProjectPointOnCurve& aPPCx=myContext->ProjPC(aEx); - // - for (j=0; j<2; ++j) { - aPPCx.Perform(aPMax[j]); - aNbPoints=aPPCx.NbPoints(); - if (!aNbPoints) { - break; - } - aTx[j]=aPPCx.LowerDistanceParameter(); - } - if (!aNbPoints) { - // correction the range is impossible due to - // a projection problem - continue; - } - // - if (aTx[0]>aTx[1]){ - aTmp=aTx[0]; - aTx[0]=aTx[1]; - aTx[1]=aTmp; - } - // - // 4 Correction - // 4.1 aPBx - { - const IntTools_ShrunkRange& aISRx=aPBx.ShrunkRange(); - IntTools_Range *pSRx=(IntTools_Range *)(&aISRx.ShrunkRange()); - Bnd_Box *pBoxx=(Bnd_Box *)(&aISRx.BndBox()); - // - pSRx->SetFirst(aTx[0]); - pSRx->SetLast(aTx[1]); - *pBoxx=aBoxMax; - } - // - // 4.2 aPBSx - BOPTools_ListOfPaveBlock& aLPBSx=mySplitShapesPool(myDS->RefEdge(nEx)); - aItLPBS.Initialize(aLPBSx); - for (; aItLPBS.More(); aItLPBS.Next()) { - const BOPTools_PaveBlock& aPBSx=aItLPBS.Value(); - if (!aPBSx.IsEqual(aPBx)) { - continue; - } - // - const IntTools_ShrunkRange& aISRx=aPBSx.ShrunkRange(); - IntTools_Range *pSRx=(IntTools_Range *)(&aISRx.ShrunkRange()); - Bnd_Box *pBoxx=(Bnd_Box *)(&aISRx.BndBox()); - // - pSRx->SetFirst(aTx[0]); - pSRx->SetLast(aTx[1]); - *pBoxx=aBoxMax; - } - // - // - }//for (; aItLPB.More(); aItLPB.Next()) { - }//for (; aItLCB.More(); aItLCB.Next()) { - }//for (nE=1; nE<=aNbS; ++nE) { -} -//======================================================================= -// function: UpdateCommonBlocks -// purpose: -//======================================================================= -void NMTTools_PaveFiller::UpdateCommonBlocks() -{ - myIsDone=Standard_False; - // - Standard_Integer nE, aNbS, nSp, nEx, nSpx; - NMTTools_ListIteratorOfListOfCommonBlock aCBIt; - BOPTools_ListIteratorOfListOfPaveBlock aPBIt; - // - aNbS=myDS->NumberOfShapesOfTheObject(); - // - for (nE=1; nE<=aNbS; ++nE) { - if (myDS->GetShapeType(nE)!=TopAbs_EDGE){ - continue; - } - if (BRep_Tool::Degenerated(TopoDS::Edge(myDS->Shape(nE)))){ - continue; - } - // - NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE)); - /*BOPTools_ListOfPaveBlock& aLPB=*/mySplitShapesPool (myDS->RefEdge(nE)); - // - aCBIt.Initialize(aLCB); - for (; aCBIt.More(); aCBIt.Next()) { - NMTTools_CommonBlock& aCB=aCBIt.ChangeValue(); - // - // Among all PBs of aCB the first PB will be one - // that have max tolerance value - { - Standard_Real aTolEx, aTolExMax; - BOPTools_ListOfPaveBlock *pLPB, aLPBx; - // - aTolExMax=-1.; - pLPB=(BOPTools_ListOfPaveBlock *)&aCB.PaveBlocks(); - aPBIt.Initialize(*pLPB); - for (; aPBIt.More(); aPBIt.Next()) { - const BOPTools_PaveBlock& aPBx=aPBIt.Value(); - nEx=aPBx.OriginalEdge(); - const TopoDS_Edge& aEx=TopoDS::Edge(myDS->Shape(nEx)); - aTolEx=BRep_Tool::Tolerance(aEx); - if (aTolEx>aTolExMax) { - aTolExMax=aTolEx; - aLPBx.Prepend(aPBx); - } - else{ - aLPBx.Append(aPBx); - } - } - // - pLPB->Clear(); - *pLPB=aLPBx; - } - // - BOPTools_PaveBlock& aPB=aCB.PaveBlock1(nE); - nSp=SplitIndex(aPB); - aPB.SetEdge(nSp); - // - const BOPTools_ListOfPaveBlock& aCBLPB=aCB.PaveBlocks(); - aPBIt.Initialize(aCBLPB); - for (; aPBIt.More(); aPBIt.Next()) { - BOPTools_PaveBlock& aPBx=aPBIt.Value(); - nEx=aPBx.OriginalEdge(); - if (nEx==nE) { - continue; - } - // - nSpx=SplitIndex(aPBx); - aPBx.SetEdge(nSpx); - } - // - } - } -} -//======================================================================= -// function: SplitIndex -// purpose: -//======================================================================= -Standard_Integer NMTTools_PaveFiller::SplitIndex - (const BOPTools_PaveBlock& aPBx) const -{ - Standard_Integer anOriginalEdge, anEdgeIndex=0; - - anOriginalEdge=aPBx.OriginalEdge(); - - const BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(anOriginalEdge)); - // - BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB); - for (; anIt.More(); anIt.Next()) { - BOPTools_PaveBlock& aPB=anIt.Value(); - if (aPB.IsEqual(aPBx)) { - anEdgeIndex=aPB.Edge(); - return anEdgeIndex; - } - } - return anEdgeIndex; -} - -//======================================================================= -// function: UpdatePaveBlocks -// purpose: -//======================================================================= -void NMTTools_PaveFiller::UpdatePaveBlocks() -{ - myIsDone=Standard_False; - // - Standard_Integer i, aNbFFs, nF1, nF2, aNbF, nF, iRankF, nE, nV1, nV2, aNbPB; - Standard_Real aT1, aT2; - TColStd_IndexedMapOfInteger aMF, aME; - TopExp_Explorer aExp; - TopoDS_Vertex aV1, aV2; - TopoDS_Edge aE; - BOPTools_Pave aPave1, aPave2; - BOPTools_PaveBlock aPB; - // - BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences(); - // - aNbFFs=aFFs.Extent(); - for (i=1; i<=aNbFFs; ++i) { - BOPTools_SSInterference& aFFi=aFFs(i); - aFFi.Indices(nF1, nF2); - aMF.Add(nF1); - aMF.Add(nF2); - } - // - aNbF=aMF.Extent(); - for(i=1; i<=aNbF; ++i) { - nF=aMF(i); - iRankF=myDS->Rank(nF); - const TopoDS_Shape aF=myDS->Shape(nF);//mpv - aExp.Init(aF, TopAbs_EDGE); - for(; aExp.More(); aExp.Next()) { - aE=TopoDS::Edge(aExp.Current()); - // - if (BRep_Tool::Degenerated(aE)) { - continue; - } - // - nE=myDS->ShapeIndex(aE, iRankF); - // - if (aME.Contains(nE)) { - continue; - } - aME.Add(nE); - // - BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); - aNbPB=aLPB.Extent(); - if (aNbPB) { - continue; - } - TopExp::Vertices(aE, aV1, aV2); - // - nV1=myDS->ShapeIndex(aV1, iRankF); - aT1=BRep_Tool::Parameter(aV1, aE); - aPave1.SetIndex(nV1); - aPave1.SetParam(aT1); - // - nV2=myDS->ShapeIndex(aV2, iRankF); - aT2=BRep_Tool::Parameter(aV2, aE); - aPave2.SetIndex(nV2); - aPave2.SetParam(aT2); - // - aPB.SetEdge(nE); - aPB.SetOriginalEdge(nE); - aPB.SetPave1(aPave1); - aPB.SetPave2(aPave2); - // - aLPB.Append(aPB); - } - } -} - -//======================================================================= -// 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=myIP->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); - } - } - } - } - // qqf - { - Standard_Integer aNbF, aNbAV, nF, k; - NMTTools_IndexedDataMapOfIndexedMapOfInteger aMAVF; - // - aNbF=myAloneVertices.Extent(); - if (aNbF<2) { - return; - } - // - // 1. fill map Alone Vertex/Face -> aMAVF - for (i=1; i<=aNbF; ++i) { - nF=myAloneVertices.FindKey(i); - const TColStd_IndexedMapOfInteger& aMAV=myAloneVertices(i); - aNbAV=aMAV.Extent(); - for(j=1; j<=aNbAV; ++j) { - nV=aMAV(j); - if (aMAVF.Contains(nV)) { - TColStd_IndexedMapOfInteger& aMF=aMAVF.ChangeFromKey(nV); - aMF.Add(nF); - } - else{ - TColStd_IndexedMapOfInteger aMF; - aMF.Add(nF); - aMAVF.Add(nV, aMF); - } - } - } - // - // 2 Obtain pairs of faces - aNbAV=aMAVF.Extent(); - for (i=1; i<=aNbAV; ++i) { - const TColStd_IndexedMapOfInteger& aMF=aMAVF(i); - aNbF=aMF.Extent(); - for(j=1; jAdd(nF1, nF2, Standard_True, NMTDS_TI_FF); - } - } - } - } - // qqt -} -//======================================================================= -// function: AloneVertices -// purpose: -//======================================================================= -const NMTTools_IndexedDataMapOfIndexedMapOfInteger& - NMTTools_PaveFiller::AloneVertices()const -{ - return myAloneVertices; -} -//======================================================================= -// function: FuseVertices -// purpose: -//======================================================================= -void NMTTools_PaveFiller::FuseVertices - (const TopoDS_Shape& aCompound, - TopTools_DataMapOfShapeShape& aDMVV)const -{ - Standard_Integer i, aNbVV, n1, n2, nX; - NMTTools_PaveFiller tPF; - // - tPF.SetCompositeShape(aCompound); - // - tPF.Init(); - // - tPF.PerformVV(); - //tPF.PerformNewVertices(); //qq - // - NMTDS_ShapesDataStructure& tDS=*(tPF.DS()); - NMTDS_InterfPool& tInterfPool=*(tPF.IP()); - BOPTools_CArray1OfVVInterference& aVVt=tInterfPool.VVInterferences(); - // - 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); - } - } -} diff --git a/src/NMTTools_NEW/NMTTools_PaveFiller_8.cxx b/src/NMTTools_NEW/NMTTools_PaveFiller_8.cxx deleted file mode 100644 index 305f04ca1..000000000 --- a/src/NMTTools_NEW/NMTTools_PaveFiller_8.cxx +++ /dev/null @@ -1,830 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_PaveFiller_8.cxx -// Created: Fri Dec 19 11:15:53 2003 -// Author: Peter KURNEV -// -// -#include - -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include - -#include - -#include -#include -#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& aIsCommonBlock) -{ - Standard_Integer nE, nSpx; - BOPTools_ListIteratorOfListOfPaveBlock aItPBx; - // - aIsCommonBlock=0; - 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); - // - aIsCommonBlock=1; - // - 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: -//======================================================================= - const BOPTools_PaveBlock& NMTTools_PaveFiller::RealPaveBlock(const BOPTools_PaveBlock& aPB) -{ - Standard_Integer nE; - // - 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_PaveBlock& aPBx=aCB.PaveBlock1(); - return aPBx; - } - return aPB; -} -//======================================================================= -// function: CommonBlocksFace -// purpose: -//======================================================================= - Standard_Integer NMTTools_PaveFiller::CommonBlocksFace(const Standard_Integer nF, - NMTTools_ListOfCommonBlock& aLCB) -{ - Standard_Integer nE; - TopAbs_ShapeEnum aT; - NMTTools_ListIteratorOfListOfCommonBlock anIt; - // - aT=myDS->GetShapeType(nF); - // - if (aT!=TopAbs_FACE) { - return 1; // Type mismatch - } - // - BooleanOperations_ShapesDataStructure *pDS=myDS; - BooleanOperations_OnceExplorer aExp(*pDS); - // - aExp.Init(nF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - nE=aExp.Current(); - const NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE)); - anIt.Initialize(aLCBE); - for (; anIt.More(); anIt.Next()) { - const NMTTools_CommonBlock& aCBE=anIt.Value(); - aLCB.Append(aCBE); - } - } - return 0; //Ok -} -// -// 1 RealSplits -// -// -//======================================================================= -// function: RealSplitsFace -// purpose: -//======================================================================= - void NMTTools_PaveFiller::RealSplitsFace(const Standard_Integer nF, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nE; - BOPTools_ListIteratorOfListOfPaveBlock anIt; - // - BooleanOperations_ShapesDataStructure *pDS=myDS; - BooleanOperations_OnceExplorer aExp(*pDS); - // - aExp.Init(nF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - nE=aExp.Current(); - const BOPTools_ListOfPaveBlock& aLPBE=mySplitShapesPool(myDS->RefEdge(nE)); - anIt.Initialize(aLPBE); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB=anIt.Value(); - const BOPTools_PaveBlock& aPBR=RealPaveBlock(aPB); - aLPB.Append(aPBR); - } - } -} -//======================================================================= -// function: HasRealSplitsInOnFace -// purpose: -//======================================================================= - Standard_Boolean NMTTools_PaveFiller::HasRealSplitsInOnFace(const Standard_Integer nF1, - const Standard_Integer nF2) -{ - Standard_Boolean bFlag; - BOPTools_ListOfPaveBlock aLPB; - // - RealSplitsInFace(0, nF1, nF2, aLPB); - // - bFlag=!aLPB.IsEmpty(); - if (bFlag) { - return bFlag; - } - // - RealSplitsInFace(0, nF1, nF2, aLPB); - // - bFlag=!aLPB.IsEmpty(); - return bFlag; -} -//======================================================================= -// function: RealSplitsInFace -// purpose: -//======================================================================= - void NMTTools_PaveFiller::RealSplitsInFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nE1; - // - BooleanOperations_ShapesDataStructure *pDS=myDS; - BooleanOperations_OnceExplorer aExp(*pDS); - aExp.Init(nF1, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - nE1=aExp.Current(); - RealSplitsInFace (nE1, nF2, aLPB); - } -} -//======================================================================= -// function: RealSplitsInFace -// purpose: -//======================================================================= - void NMTTools_PaveFiller::RealSplitsInFace(const Standard_Integer nE1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nF1; - // - TColStd_ListIteratorOfListOfInteger anItLFCB; - NMTTools_ListIteratorOfListOfCommonBlock anItCB; - // - const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1)); - // - anItCB.Initialize(aLCB); - for (; anItCB.More(); anItCB.Next()) { - NMTTools_CommonBlock& aCB=anItCB.ChangeValue(); - const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1); - const BOPTools_PaveBlock& aPB1R=RealPaveBlock(aPB1); - - const TColStd_ListOfInteger& aLFCB=aCB.Faces(); - anItLFCB.Initialize(aLFCB); - for (; anItLFCB.More(); anItLFCB.Next()) { - nF1=anItLFCB.Value(); - if (nF1==nF2) { - aLPB.Append(aPB1R); - } - } - } -} -//======================================================================= -// function: RealSplitsOnEdge -// purpose: -//======================================================================= - void NMTTools_PaveFiller::RealSplitsOnEdge(const Standard_Integer nE1, - const Standard_Integer nE2, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nE; - // - BOPTools_ListIteratorOfListOfPaveBlock anIt; - NMTTools_ListIteratorOfListOfCommonBlock anItCB; - // - const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1)); - - anItCB.Initialize(aLCB); - for (; anItCB.More(); anItCB.Next()) { - NMTTools_CommonBlock& aCB=anItCB.ChangeValue(); - const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1); - const BOPTools_PaveBlock& aPB1R=RealPaveBlock(aPB1); - // - const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); - anIt.Initialize(aLPBx); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB2=anIt.Value(); - nE=aPB2.OriginalEdge(); - if (nE==nE2) { - aLPB.Append(aPB1R); - } - } - } -} -//======================================================================= -// function: RealSplitsOnFace -// purpose: -//======================================================================= - void NMTTools_PaveFiller::RealSplitsOnFace(const Standard_Integer nE1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nE2; - // - BooleanOperations_ShapesDataStructure *pDS=myDS; - BooleanOperations_OnceExplorer aExp(*pDS); - aExp.Init(nF2, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - nE2=aExp.Current(); - RealSplitsOnEdge(nE1, nE2, aLPB); - } -} -//======================================================================= -// function: RealSplitsOnFace -// purpose: -//======================================================================= - void NMTTools_PaveFiller::RealSplitsOnFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nE1; - // -// BooleanOperations_ShapesDataStructure *pDS=myDS; - BooleanOperations_OnceExplorer aExp(*myDS); - aExp.Init(nF1, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - nE1=aExp.Current(); - RealSplitsOnFace(nE1, nF2, aLPB); - } -} - -// 2 SimpleSplits -//======================================================================= -// function: SplitsFace -// purpose: -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsFace(const Standard_Integer nF, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nE; - TopAbs_ShapeEnum aT; - BOPTools_ListIteratorOfListOfPaveBlock anIt; - // - aT=myDS->GetShapeType(nF); - // - if (aT!=TopAbs_FACE) { - return 1; // Type mismatch - } - // - BooleanOperations_ShapesDataStructure *pDS=myDS; - BooleanOperations_OnceExplorer aExp(*pDS); - // - aExp.Init(nF, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - nE=aExp.Current(); - const BOPTools_ListOfPaveBlock& aLPBE=mySplitShapesPool(myDS->RefEdge(nE)); - anIt.Initialize(aLPBE); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPBE=anIt.Value(); - aLPB.Append(aPBE); - } - } - return 0; //Ok -} - -//======================================================================= -// function: SplitsInFace -// purpose: splits of edges from nF1 in nF2 -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nE1; - TopAbs_ShapeEnum aT1, aT2; - - aT1=myDS->GetShapeType(nF1); - aT2=myDS->GetShapeType(nF2); - - if (aT1!=TopAbs_FACE || aT2!=TopAbs_FACE) { - return 1; // Type mismatch - } - BooleanOperations_ShapesDataStructure *pDS=myDS; - BooleanOperations_OnceExplorer aExp(*pDS); - aExp.Init(nF1, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - nE1=aExp.Current(); - SplitsInFace (nE1, nF2, aLPB); - } - return 0; //Ok -} -//======================================================================= -// function: SplitsInFace -// purpose: splits of edge nE1 in aFace2 -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer nE1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nF1; - TopAbs_ShapeEnum aT1, aT2; - - aT1=myDS->GetShapeType(nE1); - aT2=myDS->GetShapeType(nF2); - - if (aT1!=TopAbs_EDGE || aT2!=TopAbs_FACE) { - return 1; // Type mismatch - } - // - TColStd_ListIteratorOfListOfInteger anItLFCB; - NMTTools_ListIteratorOfListOfCommonBlock anItCB; - // - const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1)); - // - anItCB.Initialize(aLCB); - for (; anItCB.More(); anItCB.Next()) { - NMTTools_CommonBlock& aCB=anItCB.ChangeValue(); - const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1); - - const TColStd_ListOfInteger& aLFCB=aCB.Faces(); - anItLFCB.Initialize(aLFCB); - for (; anItLFCB.More(); anItLFCB.Next()) { - nF1=anItLFCB.Value(); - if (nF1==nF2) { - aLPB.Append(aPB1); - } - } - } - return 0; //Ok -} -//======================================================================= -// function: SplitsOnEdge -// purpose: splits of edge nE1 on nE2 -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsOnEdge(const Standard_Integer nE1, - const Standard_Integer nE2, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nE; - TopAbs_ShapeEnum aT1, aT2; - - aT1=myDS->GetShapeType(nE1); - aT2=myDS->GetShapeType(nE2); - - if (aT1!=TopAbs_EDGE || aT2!=TopAbs_EDGE) { - return 1; // Type mismatch - } - // - BOPTools_ListIteratorOfListOfPaveBlock anIt; - NMTTools_ListIteratorOfListOfCommonBlock anItCB; - // - const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1)); - - anItCB.Initialize(aLCB); - for (; anItCB.More(); anItCB.Next()) { - NMTTools_CommonBlock& aCB=anItCB.ChangeValue(); - const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1);//XXX - // - const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); - anIt.Initialize(aLPBx); - for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPB2=anIt.Value(); - nE=aPB2.OriginalEdge(); - if (nE==nE2) { - aLPB.Append(aPB1); - } - } - } - return 0; //Ok -} -//======================================================================= -// function: SplitsOnFace -// purpose: splits of edge nE1 on face nF2 -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer nE1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nE2, ip; - TopAbs_ShapeEnum aT1, aT2; - - aT1=myDS->GetShapeType(nE1); - aT2=myDS->GetShapeType(nF2); - - if (aT1!=TopAbs_EDGE || aT2!=TopAbs_FACE) { - return 1; // Type mismatch - } - BooleanOperations_ShapesDataStructure *pDS=myDS; - BooleanOperations_OnceExplorer aExp(*pDS); - aExp.Init(nF2, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - nE2=aExp.Current(); - ip=SplitsOnEdge(nE1, nE2, aLPB); - if (ip) { - return ip; - } - } - return 0; //Ok -} -//======================================================================= -// function: SplitsOnFace -// purpose: splits of edges from face nF1 on face nF2 -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) -{ - Standard_Integer nE1, ip; - TopAbs_ShapeEnum aT1, aT2; - - aT1=myDS->GetShapeType(nF1); - aT2=myDS->GetShapeType(nF2); - - if (aT1!=TopAbs_FACE || aT2!=TopAbs_FACE) { - return 1; // Type mismatch - } -// BooleanOperations_ShapesDataStructure *pDS=myDS; - BooleanOperations_OnceExplorer aExp(*myDS); - aExp.Init(nF1, TopAbs_EDGE); - for (; aExp.More(); aExp.Next()) { - nE1=aExp.Current(); - ip=SplitsOnFace(nE1, nF2, aLPB); - if (ip) { - return ip; - } - } - return 0; //Ok -} - -// 3 Simple Splits indices -//======================================================================= -// function: SplitsFace -// purpose: -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsFace(const Standard_Integer nF, - TColStd_ListOfInteger& aSplits) -{ - Standard_Integer nE, iErr; - BOPTools_ListIteratorOfListOfPaveBlock aIt; - BOPTools_ListOfPaveBlock aLPB; - // - iErr=SplitsFace(nF, aLPB); - if (iErr) { - return iErr; - } - - aIt.Initialize(aLPB); - for (; aIt.More(); aIt.Next()) { - const BOPTools_PaveBlock& aPB=aIt.Value(); - nE=aPB.Edge(); - aSplits.Append(nE); - } - return 0; //Ok -} - -//======================================================================= -// function: SplitsInFace -// purpose: splits of edges from nF1 in nF2 -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - TColStd_ListOfInteger& aSplits) -{ - Standard_Integer nE, iErr; - BOPTools_ListIteratorOfListOfPaveBlock aIt; - BOPTools_ListOfPaveBlock aLPB; - // - iErr=SplitsInFace(0, nF1, nF2, aLPB); - if (iErr) { - return iErr; - } - aIt.Initialize(aLPB); - for (; aIt.More(); aIt.Next()) { - const BOPTools_PaveBlock& aPB=aIt.Value(); - nE=aPB.Edge(); - aSplits.Append(nE); - } - return iErr; -} -//======================================================================= -// function: SplitsInFace -// purpose: splits of edge nE1 in aFace2 -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer nE1, - const Standard_Integer nF2, - TColStd_ListOfInteger& aSplits) -{ - Standard_Integer nE, iErr; - BOPTools_ListIteratorOfListOfPaveBlock aIt; - BOPTools_ListOfPaveBlock aLPB; - // - iErr=SplitsInFace(nE1, nF2, aLPB); - if (iErr) { - return iErr; - } - aIt.Initialize(aLPB); - for (; aIt.More(); aIt.Next()) { - const BOPTools_PaveBlock& aPB=aIt.Value(); - nE=aPB.Edge(); - aSplits.Append(nE); - } - return iErr; -} -//======================================================================= -// function: SplitsOnEdge -// purpose: splits of edge nE1 on nE2 -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsOnEdge(const Standard_Integer nE1, - const Standard_Integer nE2, - TColStd_ListOfInteger& aSplits) -{ - Standard_Integer nE, iErr; - BOPTools_ListIteratorOfListOfPaveBlock aIt; - BOPTools_ListOfPaveBlock aLPB; - // - iErr=SplitsOnEdge(nE1, nE2, aLPB); - if (iErr) { - return iErr; - } - aIt.Initialize(aLPB); - for (; aIt.More(); aIt.Next()) { - const BOPTools_PaveBlock& aPB=aIt.Value(); - nE=aPB.Edge(); - aSplits.Append(nE); - } - return iErr; -} -//======================================================================= -// function: SplitsOnFace -// purpose: splits of edge nE1 on face nF2 -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer nE1, - const Standard_Integer nF2, - TColStd_ListOfInteger& aSplits) -{ - Standard_Integer nE, iErr; - BOPTools_ListIteratorOfListOfPaveBlock aIt; - BOPTools_ListOfPaveBlock aLPB; - // - iErr=SplitsOnEdge(nE1, nF2, aLPB); - if (iErr) { - return iErr; - } - aIt.Initialize(aLPB); - for (; aIt.More(); aIt.Next()) { - const BOPTools_PaveBlock& aPB=aIt.Value(); - nE=aPB.Edge(); - aSplits.Append(nE); - } - return iErr; -} -//======================================================================= -// function: SplitsOnFace -// purpose: splits of edges from face nF1 on face nF2 -//======================================================================= - Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - TColStd_ListOfInteger& aSplits) -{ - Standard_Integer nE, iErr; - BOPTools_ListIteratorOfListOfPaveBlock aIt; - BOPTools_ListOfPaveBlock aLPB; - // - iErr=SplitsOnFace(0, nF1, nF2, aLPB); - if (iErr) { - return iErr; - } - - aIt.Initialize(aLPB); - for (; aIt.More(); aIt.Next()) { - const BOPTools_PaveBlock& aPB=aIt.Value(); - nE=aPB.Edge(); - aSplits.Append(nE); - } - return 0; //Ok -} -//modified by NIZNHY-PKV Mon Oct 17 12:07:48 2011f -static - void SortPaveBlocks(BOPTools_ListOfPaveBlock &); -static - void SortShell(const Standard_Integer, - BOPTools_PaveBlock *); -static - Standard_Boolean Less(const BOPTools_PaveBlock &, - const BOPTools_PaveBlock &); - -//======================================================================= -// function: RealSplitsInFace -// purpose: -//======================================================================= - void NMTTools_PaveFiller::RealSplitsInFace(const Standard_Integer nF, - BOPTools_ListOfPaveBlock& aLPBIn) -{ - Standard_Integer j, aNbCBP, nSpIn; - TColStd_MapOfInteger aMFence; - BOPTools_ListOfPaveBlock aLPB; - BOPTools_ListIteratorOfListOfPaveBlock aItPB; - NMTTools_ListIteratorOfListOfCommonBlock aItCB; - // - NMTTools_CommonBlockPool& aCBP=ChangeCommonBlockPool(); - // - aNbCBP=aCBP.Extent(); - for (j=1; j<=aNbCBP; ++j) { - NMTTools_ListOfCommonBlock& aLCB=aCBP(j); - aItCB.Initialize(aLCB); - for (; aItCB.More(); aItCB.Next()) { - NMTTools_CommonBlock& aCB=aItCB.ChangeValue(); - if (aCB.IsPaveBlockOnFace(nF)) { - const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(); - nSpIn=aPB1.Edge(); - if (aMFence.Add(nSpIn)){ - aLPB.Append(aPB1); - } - } - } - } - // - SortPaveBlocks(aLPB); - // - aItPB.Initialize(aLPB); - for (; aItPB.More(); aItPB.Next()) { - const BOPTools_PaveBlock& aPB=aItPB.Value(); - aLPBIn.Append(aPB); - } -} -//======================================================================= -// function: SortPaveBlocks -// purpose: -//======================================================================= -void SortPaveBlocks(BOPTools_ListOfPaveBlock &aLPBIn) -{ - Standard_Integer i, aNbPBIn; - BOPTools_ListIteratorOfListOfPaveBlock aItPB; - BOPTools_PaveBlock *pPB; - // - aNbPBIn=aLPBIn.Extent(); - if (aNbPBIn<2) { - return; - } - // - pPB=new BOPTools_PaveBlock[aNbPBIn]; - // - aItPB.Initialize(aLPBIn); - for (i=0; aItPB.More(); aItPB.Next(), ++i) { - const BOPTools_PaveBlock& aPB=aItPB.Value(); - pPB[i]=aPB; - } - // - SortShell(aNbPBIn, pPB); - // - aLPBIn.Clear(); - for (i=0; i -1) goto m30; - }//if (a[l] < a[j]){ - }//for (i=0; i -// -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include - -#include - -#include -#include - - -//======================================================================= -// function: PrepareFace -// purpose: -//======================================================================= - void NMTTools_PaveFiller::PrepareFace(const Standard_Integer nF, - TopoDS_Face& newFace) -{ - Standard_Boolean bToReverse, bIsDegenerated; - Standard_Integer iRankF, nE, nSp, aNbPB; - Standard_Real aTol; - TopLoc_Location aLoc; - TopoDS_Face aF; - TopoDS_Wire newWire; - TopoDS_Edge aSp; - TopAbs_Orientation anOrF, anOrE; - BRep_Builder aBB; - TopExp_Explorer aExpW, aExpE; - BOPTools_ListIteratorOfListOfPaveBlock aItPB; - // - iRankF=myDS->Rank(nF); - aF=TopoDS::Face(myDS->Shape(nF)); - anOrF=aF.Orientation(); - aF.Orientation(TopAbs_FORWARD); - // - Handle(Geom_Surface) aS=BRep_Tool::Surface(aF, aLoc); - aTol=BRep_Tool::Tolerance(aF); - // - aBB.MakeFace (newFace, aS, aLoc, aTol); - // - aExpW.Init(aF, TopAbs_WIRE); - for (; aExpW.More(); aExpW.Next()) { - const TopoDS_Shape& aW=aExpW.Current(); - aBB.MakeWire(newWire); - // - aExpE.Init(aW, TopAbs_EDGE); - for (; aExpE.More(); aExpE.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current()); - bIsDegenerated=BRep_Tool::Degenerated(aE); - anOrE=aE.Orientation(); - // - nE=myDS->ShapeIndex(aE, iRankF); - const BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); - aNbPB=aLPB.Extent(); - if (!aNbPB) { - aBB.Add(newWire, aE); - continue; - } - // - aItPB.Initialize(aLPB); - for (; aItPB.More(); aItPB.Next()) { - const BOPTools_PaveBlock& aPB=aItPB.Value(); - const BOPTools_PaveBlock& aPBR=RealPaveBlock(aPB); - nSp=aPBR.Edge(); - // - aSp=TopoDS::Edge(myDS->Shape(nSp)); - if (!bIsDegenerated) { - bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, myContext); - if (bToReverse) { - aSp.Reverse(); - } - } - else { - aSp.Orientation(anOrE); - } - aBB.Add(newWire, aSp); - } - } - aBB.Add(newFace, newWire); - } - newFace.Orientation(anOrF); -} diff --git a/src/NMTTools_NEW/NMTTools_Tools.cxx b/src/NMTTools_NEW/NMTTools_Tools.cxx deleted file mode 100644 index 7d06d68c1..000000000 --- a/src/NMTTools_NEW/NMTTools_Tools.cxx +++ /dev/null @@ -1,614 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_Tools.cxx -// Created: Mon Dec 8 10:35:15 2003 -// Author: Peter KURNEV -// -// -#include - -#include - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// -#include -#include -#include - -static - void ProcessBlock(const Standard_Integer iV, - const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV, - TColStd_IndexedMapOfInteger& aProcessed, - TColStd_IndexedMapOfInteger& aChain); -static - void ProcessBlock(const TopoDS_Shape& aF, - const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV, - 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: -//======================================================================= - void NMTTools_Tools::MakePCurve(const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Handle(Geom2d_Curve)& aC2Dx, - const Standard_Real aTolR2D) -{ - Standard_Integer k, aNbV; - Standard_Real aTolEdge, aTolFact, aTolV, aTolVmax; - Standard_Real aTFirst, aTLast, aOutFirst, aOutLast, aOutTol; - TopoDS_Face aFFWD; - TopTools_IndexedMapOfShape aVMap; - BRep_Builder aBB; - // - aFFWD=aF; - aFFWD.Orientation(TopAbs_FORWARD); - // - aTolEdge=BRep_Tool::Tolerance(aE); - aTolFact=Max(aTolEdge, aTolR2D); - // - TopExp::MapShapes(aE, TopAbs_VERTEX, aVMap); - // - aTolVmax=-1.; - aNbV=aVMap.Extent(); - for (k=1; k<=aNbV; ++k) { - const TopoDS_Vertex& aV=TopoDS::Vertex(aVMap(k)); - aTolV=BRep_Tool::Tolerance(aV); - if (aTolV>aTolVmax) { - aTolVmax=aTolV; - } - } - // - if (aTolFact>aTolVmax) { - aTolFact=aTolVmax; - } - // - const Handle(Geom_Curve)& aC3DE=BRep_Tool::Curve(aE, aTFirst, aTLast); - Handle(Geom_TrimmedCurve)aC3DETrim=new Geom_TrimmedCurve(aC3DE, aTFirst, aTLast); - // - Handle(Geom2d_Curve) aC2D, aC2DA; - // - aC2D=aC2Dx; - if (aC2D.IsNull()) { - BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aFFWD); - BOPTools_Tools2D::CurveOnSurface(aE, aFFWD, aC2D, aOutFirst, aOutLast, aOutTol, Standard_True); - } - if (aC3DE->IsPeriodic()) { - BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aTFirst, aTLast, aC2D, aC2DA); - } - else { - BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aC3DETrim, aC2D, aC2DA); - } - // - aBB.UpdateEdge(aE, aC2DA, aFFWD, aTolFact); - BRepLib::SameParameter(aE); -} -*/ -//modified by NIZNHY-PKV Thu Nov 16 10:46:55 2006t -//======================================================================= -// function: IsSplitInOnFace -// purpose: -//======================================================================= - Standard_Boolean NMTTools_Tools::IsSplitInOnFace(const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Handle(IntTools_Context)& aContext) -{ - Standard_Boolean bFlag; - Standard_Real aT, aTolE, aTolF, aTol, aDist, aU, aV; - gp_Pnt aP; - gp_Pnt2d aP2D; - // - aTolE=BRep_Tool::Tolerance(aE); - aTolF=BRep_Tool::Tolerance(aF); - aTol=aTolE+aTolF; - // - GeomAPI_ProjectPointOnSurf& aProjector=aContext->ProjPS(aF); - // - aT=BOPTools_Tools2D::IntermediatePoint(aE); - BOPTools_Tools::PointOnEdge(aE, aT, aP); - // - aProjector.Perform(aP); - bFlag=aProjector.IsDone(); - if (!bFlag) { - return bFlag; - } - // - aDist=aProjector.LowerDistance(); - bFlag=(aDist <= aTol); - if (!bFlag) { - return bFlag; - } - // - aProjector.LowerDistanceParameters(aU, aV); - aP2D.SetCoord(aU, aV); - bFlag=aContext->IsPointInOnFace (aF, aP2D); - return bFlag; -} -//======================================================================= -// function: NMTTools_Tools::MakeNewVertex -// purpose : -//======================================================================= - void NMTTools_Tools::MakeNewVertex(const TopTools_ListOfShape& aLVs, - TopoDS_Vertex& aNewVertex) -{ - Standard_Integer aNb; - Standard_Real aTi, aDi, aDmax=-1.e5; - gp_Pnt aPi, aP; - gp_XYZ aXYZ(0.,0.,0.), aXYZi; - TopTools_ListIteratorOfListOfShape anIt; - // - aNb=aLVs.Extent(); - if (!aNb) { - return; - } - // - anIt.Initialize(aLVs); - for (; anIt.More(); anIt.Next()) { - TopoDS_Vertex aVi=TopoDS::Vertex(anIt.Value()); - aPi=BRep_Tool::Pnt(aVi); - aXYZi=aPi.XYZ(); - aXYZ=aXYZ+aXYZi; - } - // - aXYZ.Divide((Standard_Real)aNb); - aP.SetXYZ(aXYZ); - // - anIt.Initialize(aLVs); - for (; anIt.More(); anIt.Next()) { - TopoDS_Vertex aVi=TopoDS::Vertex(anIt.Value()); - aPi=BRep_Tool::Pnt(aVi); - aTi=BRep_Tool::Tolerance(aVi); - aDi=aP.Distance(aPi); - aDi=aDi+aTi; - if (aDi > aDmax) { - aDmax=aDi; - } - } - BRep_Builder aBB; - aBB.MakeVertex (aNewVertex, aP, aDmax); -} -//======================================================================= -// function: FindChains -// purpose : -//======================================================================= - void NMTTools_Tools::FindChains(const BOPTools_CArray1OfSSInterference& FFs, - BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) -{ - Standard_Boolean bIsTangentFaces; - Standard_Integer j, aNb, anIndex1, anIndex2; - BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMCV; - // - aNb=FFs.Extent(); - for (j=1; j<=aNb; ++j) { - const BOPTools_SSInterference& aFF=FFs(j); - // - bIsTangentFaces=aFF.IsTangentFaces(); - if (!bIsTangentFaces) { - continue; - } - // - aFF.Indices(anIndex1, anIndex2); - // - if (aMCV.Contains(anIndex1)) { - TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex1); - aMV.Add(anIndex1); - aMV.Add(anIndex2); - } - else { - TColStd_IndexedMapOfInteger aMV; - aMV.Add(anIndex1); - aMV.Add(anIndex2); - aMCV.Add(anIndex1, aMV); - } - // - if (aMCV.Contains(anIndex2)) { - TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex2); - aMV.Add(anIndex1); - aMV.Add(anIndex2); - } - else { - TColStd_IndexedMapOfInteger aMV; - aMV.Add(anIndex1); - aMV.Add(anIndex2); - aMCV.Add(anIndex2, aMV); - } - } - NMTTools_Tools::FindChains(aMCV, aMapChains); -} -//======================================================================= -// function: FindChains -// purpose : -//======================================================================= - void NMTTools_Tools::FindChains(const BOPTools_CArray1OfVVInterference& VVs, - BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) -{ - Standard_Integer j, aNb, anIndex1, anIndex2; - BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMCV; - // - aNb=VVs.Extent(); - for (j=1; j<=aNb; ++j) { - const BOPTools_VVInterference& VV=VVs(j); - VV.Indices(anIndex1, anIndex2); - // - if (aMCV.Contains(anIndex1)) { - TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex1); - aMV.Add(anIndex1); - aMV.Add(anIndex2); - } - else { - TColStd_IndexedMapOfInteger aMV; - aMV.Add(anIndex1); - aMV.Add(anIndex2); - aMCV.Add(anIndex1, aMV); - } - // - if (aMCV.Contains(anIndex2)) { - TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex2); - aMV.Add(anIndex1); - aMV.Add(anIndex2); - } - else { - TColStd_IndexedMapOfInteger aMV; - aMV.Add(anIndex1); - aMV.Add(anIndex2); - aMCV.Add(anIndex2, aMV); - } - } - NMTTools_Tools::FindChains(aMCV, aMapChains); -} - -//======================================================================= -// function: FindChains -// purpose : -//======================================================================= - void NMTTools_Tools::FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV, - BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) -{ - Standard_Integer i, j, aNbCV, aNbV, iV, iVx; - TColStd_IndexedMapOfInteger aProcessed, aChain; - // - aNbCV=aMCV.Extent(); - for (i=1; i<=aNbCV; ++i) { - iV=aMCV.FindKey(i); - if (aProcessed.Contains(iV)) { - continue; - } - // - aProcessed.Add(iV); - aChain.Add(iV); - // - const TColStd_IndexedMapOfInteger& aMV=aMCV(i); - aNbV=aMV.Extent(); - for (j=1; j<=aNbV; ++j) { - iVx=aMV(j); - ProcessBlock(iVx, aMCV, aProcessed, aChain); - } - aMapChains.Add(i, aChain); - aChain.Clear(); - } -} -//======================================================================= -// function: ProcessBlock -// purpose: -//======================================================================= -void ProcessBlock(const Standard_Integer iV, - const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV, - TColStd_IndexedMapOfInteger& aProcessed, - TColStd_IndexedMapOfInteger& aChain) -{ - Standard_Integer j, aNbV, iVx; - // - if (aProcessed.Contains(iV)) { - return; - } - aProcessed.Add(iV); - aChain.Add(iV); - // - const TColStd_IndexedMapOfInteger& aMV=aMCV.FindFromKey(iV); - aNbV=aMV.Extent(); - for (j=1; j<=aNbV; ++j) { - iVx=aMV(j); - ProcessBlock(iVx, aMCV, aProcessed, aChain); - } -} -//======================================================================= -// function: AreFacesSameDomain -// purpose : -//======================================================================= - Standard_Boolean NMTTools_Tools::AreFacesSameDomain(const TopoDS_Face& aF1x, - const TopoDS_Face& aF2y, - const Handle(IntTools_Context)& aCtx) -{ - Standard_Boolean bFlag; - // 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); - // - // Modified Thu Sep 14 14:35:18 2006 - // Contribution of Samtech www.samcef.com BEGIN - // - // 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(); - // - if(!aNbE1 || !aNbE2){ - return bFlag; - } - // - if(aNbE1!=aNbE2) { - return bFlag; - } - // - // 2 - aTolF1=BRep_Tool::Tolerance(aF1); - aTolF2=BRep_Tool::Tolerance(aF2); - aTol=aTolF1+aTolF2; - // - 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; -} -//======================================================================= -// function: FindChains -// purpose : -//======================================================================= - void NMTTools_Tools::FindChains(const NMTTools_ListOfCoupleOfShape& aLCS, - NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMapChains) -{ - NMTTools_ListIteratorOfListOfCoupleOfShape aItCS; - NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMCV; - // - aItCS.Initialize(aLCS); - for (; aItCS.More(); aItCS.Next()) { - const NMTTools_CoupleOfShape& aCS=aItCS.Value(); - // - const TopoDS_Shape& aF1=aCS.Shape1(); - const TopoDS_Shape& aF2=aCS.Shape2(); - // - // - if (aMCV.Contains(aF1)) { - TopTools_IndexedMapOfShape& aMV=aMCV.ChangeFromKey(aF1); - aMV.Add(aF1); - aMV.Add(aF2); - } - else { - TopTools_IndexedMapOfShape aMV; - aMV.Add(aF1); - aMV.Add(aF2); - aMCV.Add(aF1, aMV); - } - // - if (aMCV.Contains(aF2)) { - TopTools_IndexedMapOfShape& aMV=aMCV.ChangeFromKey(aF2); - aMV.Add(aF1); - aMV.Add(aF2); - } - else { - TopTools_IndexedMapOfShape aMV; - aMV.Add(aF1); - aMV.Add(aF2); - aMCV.Add(aF2, aMV); - } - } - NMTTools_Tools::FindChains(aMCV, aMapChains); -} -//======================================================================= -// function: FindChains -// purpose : -//======================================================================= - void NMTTools_Tools::FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV, - NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMapChains) -{ - Standard_Integer i, j, aNbCV, aNbV; - TopTools_IndexedMapOfShape aProcessed, aChain; - // - aNbCV=aMCV.Extent(); - for (i=1; i<=aNbCV; ++i) { - const TopoDS_Shape& aF=aMCV.FindKey(i); - if (aProcessed.Contains(aF)) { - continue; - } - // - aProcessed.Add(aF); - aChain.Add(aF); - // - const TopTools_IndexedMapOfShape& aMV=aMCV(i); - aNbV=aMV.Extent(); - for (j=1; j<=aNbV; ++j) { - const TopoDS_Shape& aFx=aMV(j); - ProcessBlock(aFx, aMCV, aProcessed, aChain); - } - aMapChains.Add(aF, aChain); - aChain.Clear(); - } -} -//======================================================================= -// function: ProcessBlock -// purpose: -//======================================================================= -void ProcessBlock(const TopoDS_Shape& aF, - const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV, - TopTools_IndexedMapOfShape& aProcessed, - TopTools_IndexedMapOfShape& aChain) -{ - Standard_Integer j, aNbV; - // - if (aProcessed.Contains(aF)) { - return; - } - aProcessed.Add(aF); - aChain.Add(aF); - // - const TopTools_IndexedMapOfShape& aMV=aMCV.FindFromKey(aF); - aNbV=aMV.Extent(); - for (j=1; j<=aNbV; ++j) { - const TopoDS_Shape& aFx=aMV(j); - ProcessBlock(aFx, aMCV, aProcessed, aChain); - } -} diff --git a/src/NMTTools_NEW/NMTTools_Tools.hxx b/src/NMTTools_NEW/NMTTools_Tools.hxx deleted file mode 100644 index 6be0cc1a8..000000000 --- a/src/NMTTools_NEW/NMTTools_Tools.hxx +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// File: NMTTools_Tools.hxx -// Created: Mon Dec 8 10:35:15 2003 -// Author: Peter KURNEV -// - -#ifndef _NMTTools_Tools_HeaderFile -#define _NMTTools_Tools_HeaderFile - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//======================================================================= -//function : NMTTools_Tools -//purpose : -//======================================================================= -class NMTTools_Tools { - 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, - const Handle(IntTools_Context)& aCtx) ; - - Standard_EXPORT - static Standard_Boolean AreFacesSameDomain(const TopoDS_Face& aF1, - const TopoDS_Face& aF2, - const Handle(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) ; - - Standard_EXPORT - static void UpdateEdge(const TopoDS_Edge& aE, - const Standard_Real aTol) ; - -}; -#endif -- 2.39.2