From 15abe68f0bb3ffd581d98a873852cef6484215c2 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 27 Apr 2012 07:15:20 +0000 Subject: [PATCH] This commit was generated by cvs2git to create tag 'TRIPOLI_323'. Sprout from V6_5_BR 2012-04-26 13:10:16 UTC gdd 'Debug' Cherrypick from V6_5_BR 2012-04-27 07:15:19 UTC rnv 'Win32 compilation.': configure.ac src/GEOM/Makefile.am src/GEOMAlgo/BlockFix.cdl src/GEOMAlgo/BlockFix.cxx src/GEOMAlgo/BlockFix.hxx src/GEOMAlgo/BlockFix.ixx src/GEOMAlgo/BlockFix_BlockFixAPI.cdl src/GEOMAlgo/BlockFix_BlockFixAPI.cxx src/GEOMAlgo/BlockFix_BlockFixAPI.hxx src/GEOMAlgo/BlockFix_BlockFixAPI.ixx src/GEOMAlgo/BlockFix_BlockFixAPI.lxx src/GEOMAlgo/BlockFix_CheckTool.cdl src/GEOMAlgo/BlockFix_CheckTool.cxx src/GEOMAlgo/BlockFix_CheckTool.hxx src/GEOMAlgo/BlockFix_CheckTool.ixx src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cdl src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.cxx src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx src/GEOMAlgo/BlockFix_SphereSpaceModifier.cdl src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx src/GEOMAlgo/BlockFix_SphereSpaceModifier.hxx src/GEOMAlgo/BlockFix_SphereSpaceModifier.ixx src/GEOMAlgo/BlockFix_UnionEdges.cdl src/GEOMAlgo/BlockFix_UnionEdges.cxx src/GEOMAlgo/BlockFix_UnionEdges.hxx src/GEOMAlgo/BlockFix_UnionEdges.ixx src/GEOMAlgo/BlockFix_UnionFaces.cdl src/GEOMAlgo/BlockFix_UnionFaces.hxx src/GEOMAlgo/BlockFix_UnionFaces.ixx src/GEOMAlgo/FILES src/GEOMAlgo/GEOMAlgo.cdl src/GEOMAlgo/GEOMAlgo_Algo.cxx src/GEOMAlgo/GEOMAlgo_Algo.hxx src/GEOMAlgo/GEOMAlgo_Builder.cxx src/GEOMAlgo/GEOMAlgo_Builder.hxx src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx src/GEOMAlgo/GEOMAlgo_BuilderArea.hxx src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx src/GEOMAlgo/GEOMAlgo_BuilderFace.hxx src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx src/GEOMAlgo/GEOMAlgo_BuilderShape.hxx src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx src/GEOMAlgo/GEOMAlgo_BuilderSolid.hxx src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx src/GEOMAlgo/GEOMAlgo_BuilderTools.hxx src/GEOMAlgo/GEOMAlgo_Builder_0.cxx src/GEOMAlgo/GEOMAlgo_Builder_1.cxx src/GEOMAlgo/GEOMAlgo_Builder_2.cxx src/GEOMAlgo/GEOMAlgo_Builder_3.cxx src/GEOMAlgo/GEOMAlgo_Builder_4.cxx src/GEOMAlgo/GEOMAlgo_Clsf.cxx src/GEOMAlgo/GEOMAlgo_Clsf.hxx src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx src/GEOMAlgo/GEOMAlgo_ClsfBox.hxx src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx src/GEOMAlgo/GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx src/GEOMAlgo/GEOMAlgo_DataMapOfOrientedShapeShape.hxx src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyInteger.hxx src/GEOMAlgo/GEOMAlgo_DataMapOfPassKeyShapeShape.hxx src/GEOMAlgo/GEOMAlgo_DataMapOfRealListOfShape.hxx src/GEOMAlgo/GEOMAlgo_DataMapOfShapeMapOfShape.hxx src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt.hxx src/GEOMAlgo/GEOMAlgo_DataMapOfShapeReal.hxx src/GEOMAlgo/GEOMAlgo_DataMapOfShapeShapeSet.hxx src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.hxx src/GEOMAlgo/GEOMAlgo_FinderShapeOnQuad.cxx src/GEOMAlgo/GEOMAlgo_GetInPlace.cxx src/GEOMAlgo/GEOMAlgo_GetInPlace.hxx src/GEOMAlgo/GEOMAlgo_GetInPlace_1.cxx src/GEOMAlgo/GEOMAlgo_GetInPlace_2.cxx src/GEOMAlgo/GEOMAlgo_GetInPlace_3.cxx src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx src/GEOMAlgo/GEOMAlgo_GlueDetector.cxx src/GEOMAlgo/GEOMAlgo_GlueDetector.hxx src/GEOMAlgo/GEOMAlgo_Gluer.cxx src/GEOMAlgo/GEOMAlgo_Gluer.hxx src/GEOMAlgo/GEOMAlgo_Gluer2.cxx src/GEOMAlgo/GEOMAlgo_Gluer2.hxx src/GEOMAlgo/GEOMAlgo_Gluer2_2.cxx src/GEOMAlgo/GEOMAlgo_Gluer2_3.cxx src/GEOMAlgo/GEOMAlgo_GluerAlgo.cxx src/GEOMAlgo/GEOMAlgo_GluerAlgo.hxx src/GEOMAlgo/GEOMAlgo_HAlgo.cxx src/GEOMAlgo/GEOMAlgo_HAlgo.hxx src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfIntegerShape.hxx src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeBox.hxx src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx src/GEOMAlgo/GEOMAlgo_IndexedDataMapOfShapeState.hxx src/GEOMAlgo/GEOMAlgo_KindOfBounds.hxx src/GEOMAlgo/GEOMAlgo_KindOfClosed.hxx src/GEOMAlgo/GEOMAlgo_KindOfName.hxx src/GEOMAlgo/GEOMAlgo_KindOfShape.hxx src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx src/GEOMAlgo/GEOMAlgo_ListIteratorOfListOfPnt.hxx src/GEOMAlgo/GEOMAlgo_ListOfCoupleOfShapes.hxx src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx src/GEOMAlgo/GEOMAlgo_PWireEdgeSet.hxx src/GEOMAlgo/GEOMAlgo_PassKey.cxx src/GEOMAlgo/GEOMAlgo_PassKey.hxx src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cxx src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.hxx src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx src/GEOMAlgo/GEOMAlgo_ShapeInfo.hxx src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.hxx src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx src/GEOMAlgo/GEOMAlgo_ShapeSet.hxx src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx src/GEOMAlgo/GEOMAlgo_Splitter.cxx src/GEOMAlgo/GEOMAlgo_Splitter.hxx src/GEOMAlgo/GEOMAlgo_State.hxx src/GEOMAlgo/GEOMAlgo_StateCollector.cxx src/GEOMAlgo/GEOMAlgo_StateCollector.hxx src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx src/GEOMAlgo/GEOMAlgo_Tools.cxx src/GEOMAlgo/GEOMAlgo_Tools.hxx src/GEOMAlgo/GEOMAlgo_Tools3D.cxx src/GEOMAlgo/GEOMAlgo_Tools3D.hxx src/GEOMAlgo/GEOMAlgo_Tools_1.cxx src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx src/GEOMAlgo/GEOMAlgo_WESCorrector.hxx src/GEOMAlgo/GEOMAlgo_WESScaler.cxx src/GEOMAlgo/GEOMAlgo_WESScaler.hxx src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx src/GEOMAlgo/GEOMAlgo_WireEdgeSet.hxx src/GEOMAlgo/GEOMAlgo_WireSolid.cxx src/GEOMAlgo/GEOMAlgo_WireSolid.hxx src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx src/GEOMAlgo/GEOMAlgo_WireSplitter.hxx src/GEOMAlgo/Handle_BlockFix_BlockFixAPI.hxx src/GEOMAlgo/Handle_BlockFix_PeriodicSurfaceModifier.hxx src/GEOMAlgo/Handle_BlockFix_SphereSpaceModifier.hxx src/GEOMAlgo/Makefile.am src/GEOMImpl/Makefile.am src/GEOM_I/Makefile.am src/GEOM_I_Superv/Makefile.am src/Makefile.am src/NMTDS/FILES src/NMTDS/Makefile.am src/NMTDS/NMTDS.cdl src/NMTDS/NMTDS_BndSphere.cxx src/NMTDS/NMTDS_BndSphere.hxx src/NMTDS/NMTDS_CArray1OfIndexRange.cxx src/NMTDS/NMTDS_CArray1OfIndexRange.hxx src/NMTDS/NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx src/NMTDS/NMTDS_DataMapOfIntegerMapOfInteger.hxx src/NMTDS/NMTDS_IndexRange.cxx src/NMTDS/NMTDS_IndexRange.hxx src/NMTDS/NMTDS_IndexedDataMapOfIntegerShape.hxx src/NMTDS/NMTDS_IndexedDataMapOfShapeBndSphere.hxx src/NMTDS/NMTDS_IndexedDataMapOfShapeBox.hxx src/NMTDS/NMTDS_InterfPool.cxx src/NMTDS/NMTDS_InterfPool.hxx src/NMTDS/NMTDS_InterfType.hxx src/NMTDS/NMTDS_Iterator.cxx src/NMTDS/NMTDS_Iterator.hxx src/NMTDS/NMTDS_IteratorCheckerSI.cxx src/NMTDS/NMTDS_IteratorCheckerSI.hxx src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx src/NMTDS/NMTDS_ListIteratorOfListOfPair.hxx src/NMTDS/NMTDS_ListIteratorOfListOfPairBoolean.hxx src/NMTDS/NMTDS_ListIteratorOfListOfPassKey.hxx src/NMTDS/NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx src/NMTDS/NMTDS_ListOfPair.hxx src/NMTDS/NMTDS_ListOfPairBoolean.hxx src/NMTDS/NMTDS_ListOfPassKey.hxx src/NMTDS/NMTDS_ListOfPassKeyBoolean.hxx src/NMTDS/NMTDS_MapIteratorOfMapOfPairBoolean.hxx src/NMTDS/NMTDS_MapIteratorOfMapOfPassKey.hxx src/NMTDS/NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx src/NMTDS/NMTDS_MapOfPairBoolean.hxx src/NMTDS/NMTDS_MapOfPassKey.hxx src/NMTDS/NMTDS_MapOfPassKeyBoolean.hxx src/NMTDS/NMTDS_PInterfPool.hxx src/NMTDS/NMTDS_PIterator.hxx src/NMTDS/NMTDS_PShapesDataStructure.hxx src/NMTDS/NMTDS_Pair.cxx src/NMTDS/NMTDS_Pair.hxx src/NMTDS/NMTDS_PairBoolean.cxx src/NMTDS/NMTDS_PairBoolean.hxx src/NMTDS/NMTDS_PairMapHasher.cxx src/NMTDS/NMTDS_PairMapHasher.hxx src/NMTDS/NMTDS_PassKey.cxx src/NMTDS/NMTDS_PassKey.hxx src/NMTDS/NMTDS_PassKeyBoolean.cxx src/NMTDS/NMTDS_PassKeyBoolean.hxx src/NMTDS/NMTDS_PassKeyMapHasher.cxx src/NMTDS/NMTDS_PassKeyMapHasher.hxx src/NMTDS/NMTDS_PassKeyShape.cxx src/NMTDS/NMTDS_PassKeyShape.hxx src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx src/NMTDS/NMTDS_PassKeyShapeMapHasher.hxx src/NMTDS/NMTDS_ShapesDataStructure.cxx src/NMTDS/NMTDS_ShapesDataStructure.hxx src/NMTDS/NMTDS_Tools.cxx src/NMTDS/NMTDS_Tools.hxx src/NMTTools/FILES src/NMTTools/Makefile.am src/NMTTools/NMTTools.cdl src/NMTTools/NMTTools_CheckerSI.cxx src/NMTTools/NMTTools_CheckerSI.hxx src/NMTTools/NMTTools_CheckerSI_1.cxx src/NMTTools/NMTTools_CommonBlock.cxx src/NMTTools/NMTTools_CommonBlock.hxx src/NMTTools/NMTTools_CommonBlockAPI.cxx src/NMTTools/NMTTools_CommonBlockAPI.hxx src/NMTTools/NMTTools_CommonBlockPool.cxx src/NMTTools/NMTTools_CommonBlockPool.hxx src/NMTTools/NMTTools_CoupleOfShape.cxx src/NMTTools/NMTTools_CoupleOfShape.hxx src/NMTTools/NMTTools_DEProcessor.cxx src/NMTTools/NMTTools_DEProcessor.hxx src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx src/NMTTools/NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx src/NMTTools/NMTTools_DataMapOfIntegerFaceInfo.hxx src/NMTTools/NMTTools_DataMapOfIntegerListOfPaveBlock.hxx src/NMTTools/NMTTools_FaceInfo.cxx src/NMTTools/NMTTools_FaceInfo.hxx src/NMTTools/NMTTools_FaceInfo.lxx src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx src/NMTTools/NMTTools_ListOfCommonBlock.hxx src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx src/NMTTools/NMTTools_MapIteratorOfMapOfPaveBlock.hxx src/NMTTools/NMTTools_MapOfPaveBlock.hxx src/NMTTools/NMTTools_PPaveFiller.hxx src/NMTTools/NMTTools_PaveFiller.cxx src/NMTTools/NMTTools_PaveFiller.hxx src/NMTTools/NMTTools_PaveFiller_0.cxx src/NMTTools/NMTTools_PaveFiller_1.cxx src/NMTTools/NMTTools_PaveFiller_2.cxx src/NMTTools/NMTTools_PaveFiller_3.cxx src/NMTTools/NMTTools_PaveFiller_4.cxx src/NMTTools/NMTTools_PaveFiller_5.cxx src/NMTTools/NMTTools_PaveFiller_6.cxx src/NMTTools/NMTTools_PaveFiller_7.cxx src/NMTTools/NMTTools_PaveFiller_8.cxx src/NMTTools/NMTTools_PaveFiller_9.cxx src/NMTTools/NMTTools_Tools.cxx src/NMTTools/NMTTools_Tools.hxx Cherrypick from V6_5_BR 2012-04-13 05:48:26 UTC vsr 'Update copyright information': src/GEOMAlgo_NEW/BlockFix.cxx src/GEOMAlgo_NEW/BlockFix.hxx src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cxx src/GEOMAlgo_NEW/BlockFix_UnionEdges.cxx --- configure.ac | 16 - src/GEOM/Makefile.am | 2 +- 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/FILES | 169 +++++ src/GEOMAlgo/GEOMAlgo.cdl | 525 +++++++++------- src/GEOMAlgo/GEOMAlgo_Algo.cxx | 18 +- src/GEOMAlgo/GEOMAlgo_Algo.hxx | 110 ++-- src/GEOMAlgo/GEOMAlgo_Builder.cxx | 62 +- src/GEOMAlgo/GEOMAlgo_Builder.hxx | 397 ++++++------ src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx | 28 +- src/GEOMAlgo/GEOMAlgo_BuilderArea.hxx | 162 ++--- src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx | 110 ++-- src/GEOMAlgo/GEOMAlgo_BuilderFace.hxx | 155 ++--- src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx | 32 +- src/GEOMAlgo/GEOMAlgo_BuilderShape.hxx | 174 ++---- src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx | 115 ++-- src/GEOMAlgo/GEOMAlgo_BuilderSolid.hxx | 130 ++-- src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx | 22 +- src/GEOMAlgo/GEOMAlgo_BuilderTools.hxx | 89 +-- 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.cxx | 27 +- src/GEOMAlgo/GEOMAlgo_Clsf.hxx | 126 ++-- src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx | 34 +- src/GEOMAlgo/GEOMAlgo_ClsfBox.hxx | 105 ++-- src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx | 21 +- src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx | 99 +-- src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx | 25 +- src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx | 115 ++-- src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx | 17 +- src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.hxx | 110 +--- ...pIteratorOfDataMapOfOrientedShapeShape.hxx | 96 +-- ...taMapIteratorOfDataMapOfPassKeyInteger.hxx | 103 +--- ...apIteratorOfDataMapOfPassKeyShapeShape.hxx | 98 +-- ...aMapIteratorOfDataMapOfRealListOfShape.hxx | 103 +--- ...aMapIteratorOfDataMapOfShapeMapOfShape.hxx | 95 +-- ...lgo_DataMapIteratorOfDataMapOfShapePnt.hxx | 95 +-- ...go_DataMapIteratorOfDataMapOfShapeReal.hxx | 102 +--- ...ataMapIteratorOfDataMapOfShapeShapeSet.hxx | 59 +- .../GEOMAlgo_DataMapOfOrientedShapeShape.hxx | 104 +--- .../GEOMAlgo_DataMapOfPassKeyInteger.hxx | 110 +--- .../GEOMAlgo_DataMapOfPassKeyShapeShape.hxx | 107 +--- .../GEOMAlgo_DataMapOfRealListOfShape.hxx | 113 +--- .../GEOMAlgo_DataMapOfShapeMapOfShape.hxx | 128 +--- src/GEOMAlgo/GEOMAlgo_DataMapOfShapePnt.hxx | 128 +--- src/GEOMAlgo/GEOMAlgo_DataMapOfShapeReal.hxx | 134 +--- .../GEOMAlgo_DataMapOfShapeShapeSet.hxx | 103 +--- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx | 63 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.hxx | 153 ++--- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx | 26 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.hxx | 223 +++---- src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx | 113 ++-- src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.hxx | 208 +++---- 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.cxx | 78 ++- src/GEOMAlgo/GEOMAlgo_GlueAnalyser.hxx | 135 ++-- src/GEOMAlgo/GEOMAlgo_GlueDetector.cxx | 320 +++++++--- src/GEOMAlgo/GEOMAlgo_GlueDetector.hxx | 89 ++- src/GEOMAlgo/GEOMAlgo_Gluer.cxx | 155 +++-- src/GEOMAlgo/GEOMAlgo_Gluer.hxx | 238 ++++---- 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.cxx | 21 +- src/GEOMAlgo/GEOMAlgo_HAlgo.hxx | 101 ++- .../GEOMAlgo_IndexedDataMapOfIntegerShape.hxx | 114 +--- ...ndexedDataMapOfPassKeyShapeListOfShape.hxx | 158 +---- .../GEOMAlgo_IndexedDataMapOfShapeBox.hxx | 155 +---- ...EOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx | 155 +---- .../GEOMAlgo_IndexedDataMapOfShapeState.hxx | 177 +----- 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 +--- .../GEOMAlgo_ListIteratorOfListOfPnt.hxx | 128 +--- .../GEOMAlgo_ListOfCoupleOfShapes.hxx | 184 +----- src/GEOMAlgo/GEOMAlgo_ListOfPnt.hxx | 183 +----- src/GEOMAlgo/GEOMAlgo_PWireEdgeSet.hxx | 5 + src/GEOMAlgo/GEOMAlgo_PassKey.cxx | 46 +- src/GEOMAlgo/GEOMAlgo_PassKey.hxx | 158 ++--- src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.hxx | 91 +-- src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx | 38 +- src/GEOMAlgo/GEOMAlgo_PassKeyShape.hxx | 156 ++--- .../GEOMAlgo_PassKeyShapeMapHasher.cxx | 8 +- .../GEOMAlgo_PassKeyShapeMapHasher.hxx | 96 +-- src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx | 59 +- src/GEOMAlgo/GEOMAlgo_ShapeAlgo.hxx | 87 ++- src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx | 198 +++--- src/GEOMAlgo/GEOMAlgo_ShapeInfo.hxx | 306 ++++------ src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx | 108 ++-- src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.hxx | 199 +++--- src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx | 2 +- src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx | 28 +- src/GEOMAlgo/GEOMAlgo_ShapeSet.hxx | 115 ++-- src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx | 14 +- src/GEOMAlgo/GEOMAlgo_ShapeSolid.hxx | 118 +--- src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx | 71 +-- src/GEOMAlgo/GEOMAlgo_ShellSolid.hxx | 99 +-- src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx | 28 +- src/GEOMAlgo/GEOMAlgo_SolidSolid.hxx | 102 +--- src/GEOMAlgo/GEOMAlgo_Splitter.cxx | 2 +- src/GEOMAlgo/GEOMAlgo_Splitter.hxx | 177 ++---- src/GEOMAlgo/GEOMAlgo_State.hxx | 20 +- src/GEOMAlgo/GEOMAlgo_StateCollector.cxx | 16 +- src/GEOMAlgo/GEOMAlgo_StateCollector.hxx | 96 +-- src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx | 38 +- src/GEOMAlgo/GEOMAlgo_SurfaceTools.hxx | 166 ++--- src/GEOMAlgo/GEOMAlgo_Tools.cxx | 56 +- src/GEOMAlgo/GEOMAlgo_Tools.hxx | 203 +++--- src/GEOMAlgo/GEOMAlgo_Tools3D.cxx | 107 +--- src/GEOMAlgo/GEOMAlgo_Tools3D.hxx | 270 ++++---- src/GEOMAlgo/GEOMAlgo_Tools_1.cxx | 34 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx | 35 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.hxx | 93 +-- src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx | 15 +- src/GEOMAlgo/GEOMAlgo_WESCorrector.hxx | 144 ++--- src/GEOMAlgo/GEOMAlgo_WESScaler.cxx | 48 +- src/GEOMAlgo/GEOMAlgo_WESScaler.hxx | 174 ++---- src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx | 24 +- src/GEOMAlgo/GEOMAlgo_WireEdgeSet.hxx | 118 +--- src/GEOMAlgo/GEOMAlgo_WireSolid.cxx | 20 +- src/GEOMAlgo/GEOMAlgo_WireSolid.hxx | 95 +-- src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx | 78 ++- src/GEOMAlgo/GEOMAlgo_WireSplitter.hxx | 130 ++-- src/GEOMAlgo/Handle_BlockFix_BlockFixAPI.hxx | 26 +- ...andle_BlockFix_PeriodicSurfaceModifier.hxx | 26 +- .../Handle_BlockFix_SphereSpaceModifier.hxx | 26 +- src/GEOMAlgo/Makefile.am | 224 +------ src/GEOMAlgo_NEW/BlockFix.cxx | 204 ++----- src/GEOMAlgo_NEW/BlockFix.hxx | 59 +- src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cxx | 20 +- src/GEOMAlgo_NEW/BlockFix_UnionEdges.cxx | 222 +------ src/GEOMImpl/Makefile.am | 8 +- src/GEOM_I/Makefile.am | 2 +- src/GEOM_I_Superv/Makefile.am | 2 +- src/Makefile.am | 17 +- src/NMTDS/FILES | 66 ++ src/NMTDS/Makefile.am | 165 +---- src/NMTDS/NMTDS.cdl | 150 ++--- src/NMTDS/NMTDS_BndSphere.cxx | 2 +- src/NMTDS/NMTDS_BndSphere.hxx | 116 +--- src/NMTDS/NMTDS_CArray1OfIndexRange.cxx | 40 ++ src/NMTDS/NMTDS_CArray1OfIndexRange.hxx | 206 +++---- ...IteratorOfDataMapOfIntegerMapOfInteger.hxx | 99 +-- .../NMTDS_DataMapOfIntegerMapOfInteger.hxx | 103 +--- src/NMTDS/NMTDS_IndexRange.cxx | 3 +- src/NMTDS/NMTDS_IndexRange.hxx | 109 +--- .../NMTDS_IndexedDataMapOfIntegerShape.hxx | 150 +---- .../NMTDS_IndexedDataMapOfShapeBndSphere.hxx | 134 +--- src/NMTDS/NMTDS_IndexedDataMapOfShapeBox.hxx | 159 +---- src/NMTDS/NMTDS_InterfPool.cxx | 2 +- src/NMTDS/NMTDS_InterfPool.hxx | 253 ++++---- src/NMTDS/NMTDS_InterfType.hxx | 11 +- src/NMTDS/NMTDS_Iterator.cxx | 3 +- src/NMTDS/NMTDS_Iterator.hxx | 184 +++--- src/NMTDS/NMTDS_IteratorCheckerSI.cxx | 4 +- src/NMTDS/NMTDS_IteratorCheckerSI.hxx | 82 +-- ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 130 +--- src/NMTDS/NMTDS_ListIteratorOfListOfPair.hxx | 124 +--- .../NMTDS_ListIteratorOfListOfPairBoolean.hxx | 124 +--- .../NMTDS_ListIteratorOfListOfPassKey.hxx | 130 +--- ...TDS_ListIteratorOfListOfPassKeyBoolean.hxx | 130 +--- ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 184 +----- src/NMTDS/NMTDS_ListOfPair.hxx | 164 +---- src/NMTDS/NMTDS_ListOfPairBoolean.hxx | 164 +---- src/NMTDS/NMTDS_ListOfPassKey.hxx | 184 +----- src/NMTDS/NMTDS_ListOfPassKeyBoolean.hxx | 184 +----- .../NMTDS_MapIteratorOfMapOfPairBoolean.hxx | 94 +-- src/NMTDS/NMTDS_MapIteratorOfMapOfPassKey.hxx | 95 +-- ...NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx | 95 +-- src/NMTDS/NMTDS_MapOfPairBoolean.hxx | 123 +--- src/NMTDS/NMTDS_MapOfPassKey.hxx | 126 +--- src/NMTDS/NMTDS_MapOfPassKeyBoolean.hxx | 126 +--- src/NMTDS/NMTDS_PInterfPool.hxx | 6 + src/NMTDS/NMTDS_PIterator.hxx | 6 + src/NMTDS/NMTDS_PShapesDataStructure.hxx | 3 + src/NMTDS/NMTDS_Pair.cxx | 2 +- src/NMTDS/NMTDS_Pair.hxx | 133 ++-- src/NMTDS/NMTDS_PairBoolean.cxx | 2 +- src/NMTDS/NMTDS_PairBoolean.hxx | 109 ++-- src/NMTDS/NMTDS_PairMapHasher.cxx | 2 +- src/NMTDS/NMTDS_PairMapHasher.hxx | 96 +-- src/NMTDS/NMTDS_PassKey.cxx | 6 +- src/NMTDS/NMTDS_PassKey.hxx | 181 +++--- src/NMTDS/NMTDS_PassKeyBoolean.cxx | 2 +- src/NMTDS/NMTDS_PassKeyBoolean.hxx | 105 +--- src/NMTDS/NMTDS_PassKeyMapHasher.cxx | 2 +- src/NMTDS/NMTDS_PassKeyMapHasher.hxx | 90 +-- src/NMTDS/NMTDS_PassKeyShape.cxx | 3 +- src/NMTDS/NMTDS_PassKeyShape.hxx | 188 +++--- src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx | 2 +- src/NMTDS/NMTDS_PassKeyShapeMapHasher.hxx | 91 +-- src/NMTDS/NMTDS_ShapesDataStructure.cxx | 2 +- src/NMTDS/NMTDS_ShapesDataStructure.hxx | 179 +++--- src/NMTDS/NMTDS_Tools.cxx | 5 +- src/NMTDS/NMTDS_Tools.hxx | 122 ++-- src/NMTTools/FILES | 52 ++ src/NMTTools/Makefile.am | 75 +-- src/NMTTools/NMTTools.cdl | 147 +++-- src/NMTTools/NMTTools_CheckerSI.cxx | 48 +- src/NMTTools/NMTTools_CheckerSI.hxx | 113 +--- src/NMTTools/NMTTools_CheckerSI_1.cxx | 18 +- src/NMTTools/NMTTools_CommonBlock.cxx | 32 +- src/NMTTools/NMTTools_CommonBlock.hxx | 140 ++--- src/NMTTools/NMTTools_CommonBlockAPI.cxx | 12 +- src/NMTTools/NMTTools_CommonBlockAPI.hxx | 113 +--- src/NMTTools/NMTTools_CommonBlockPool.cxx | 42 ++ src/NMTTools/NMTTools_CommonBlockPool.hxx | 164 ++--- src/NMTTools/NMTTools_CoupleOfShape.cxx | 12 +- src/NMTTools/NMTTools_CoupleOfShape.hxx | 101 +-- src/NMTTools/NMTTools_DEProcessor.cxx | 66 +- src/NMTTools/NMTTools_DEProcessor.hxx | 157 ++--- ...aMapIteratorOfDataMapOfIntegerFaceInfo.hxx | 102 +--- ...ratorOfDataMapOfIntegerListOfPaveBlock.hxx | 102 +--- .../NMTTools_DataMapOfIntegerFaceInfo.hxx | 144 +---- ...TTools_DataMapOfIntegerListOfPaveBlock.hxx | 133 +--- src/NMTTools/NMTTools_FaceInfo.cxx | 2 +- src/NMTTools/NMTTools_FaceInfo.hxx | 193 +++--- src/NMTTools/NMTTools_FaceInfo.lxx | 28 +- ...ls_IndexedDataMapOfIndexedMapOfInteger.hxx | 158 +---- ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 162 +---- ...MTTools_IndexedDataMapOfShapePaveBlock.hxx | 161 +---- ...TTools_ListIteratorOfListOfCommonBlock.hxx | 129 +--- ...ools_ListIteratorOfListOfCoupleOfShape.hxx | 129 +--- src/NMTTools/NMTTools_ListOfCommonBlock.hxx | 185 +----- src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx | 185 +----- .../NMTTools_MapIteratorOfMapOfPaveBlock.hxx | 96 +-- src/NMTTools/NMTTools_MapOfPaveBlock.hxx | 126 +--- src/NMTTools/NMTTools_PPaveFiller.hxx | 5 + src/NMTTools/NMTTools_PaveFiller.cxx | 88 ++- src/NMTTools/NMTTools_PaveFiller.hxx | 578 +++++++++++------- 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 +- src/NMTTools/NMTTools_Tools.cxx | 67 +- src/NMTTools/NMTTools_Tools.hxx | 150 ++--- 283 files changed, 8198 insertions(+), 17187 deletions(-) create mode 100644 src/GEOMAlgo/FILES create mode 100644 src/NMTDS/FILES create mode 100644 src/NMTDS/NMTDS_CArray1OfIndexRange.cxx create mode 100644 src/NMTTools/FILES create mode 100644 src/NMTTools/NMTTools_CommonBlockPool.cxx 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/GEOM/Makefile.am b/src/GEOM/Makefile.am index 7c4f64c4e..68f248fb6 100644 --- a/src/GEOM/Makefile.am +++ b/src/GEOM/Makefile.am @@ -72,6 +72,6 @@ libGEOMbasic_la_CPPFLAGS = \ libGEOMbasic_la_LDFLAGS = \ $(KERNEL_LDFLAGS) -lSALOMELocalTrace -lSALOMEBasics \ $(STDLIB) \ - $(CAS_LDPATH) -lTKXSBase \ + $(CAS_LDPATH) -lTKXSBase -lTKG3d \ $(CAS_OCAF) \ $(CAS_OCAFVIS) 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/FILES b/src/GEOMAlgo/FILES new file mode 100644 index 000000000..44aeb0c17 --- /dev/null +++ b/src/GEOMAlgo/FILES @@ -0,0 +1,169 @@ +GEOMAlgo_Builder_0.cxx +GEOMAlgo_Builder_1.cxx +GEOMAlgo_Builder_2.cxx +GEOMAlgo_Builder_3.cxx +GEOMAlgo_Builder_4.cxx +GEOMAlgo_ShapeInfoFiller_1.cxx +GEOMAlgo_Tools_1.cxx + +GEOMAlgo_Gluer2.hxx +GEOMAlgo_Gluer2.cxx +GEOMAlgo_Gluer2_1.cxx +GEOMAlgo_Gluer2_2.cxx +GEOMAlgo_Gluer2_3.cxx + +GEOMAlgo_GluerAlgo.hxx +GEOMAlgo_GluerAlgo.cxx + +GEOMAlgo_GlueDetector.hxx +GEOMAlgo_GlueDetector.cxx + +GEOMAlgo_GetInPlace.hxx +GEOMAlgo_GetInPlace.cxx +GEOMAlgo_GetInPlace_1.cxx +GEOMAlgo_GetInPlace_2.cxx +GEOMAlgo_GetInPlace_3.cxx + +GEOMAlgo_FinderShapeOnQuad.hxx +GEOMAlgo_FinderShapeOnQuad.cxx + +GEOMAlgo_WireSplitter.hxx +GEOMAlgo_WireSplitter.cxx +GEOMAlgo_WESScaler.hxx +GEOMAlgo_WESScaler.cxx +GEOMAlgo_WESCorrector.hxx +GEOMAlgo_WESCorrector.cxx +GEOMAlgo_WireEdgeSet.hxx +GEOMAlgo_WireEdgeSet.cxx +GEOMAlgo_GlueAnalyser.hxx +GEOMAlgo_GlueAnalyser.cxx +GEOMAlgo_Gluer.hxx +GEOMAlgo_Gluer.cxx +GEOMAlgo_FinderShapeOn2.hxx +GEOMAlgo_FinderShapeOn2.cxx +GEOMAlgo_FinderShapeOn1.hxx +GEOMAlgo_FinderShapeOn1.cxx +GEOMAlgo_FinderShapeOn.hxx +GEOMAlgo_FinderShapeOn.cxx +GEOMAlgo_ShapeAlgo.hxx +GEOMAlgo_ShapeAlgo.cxx +GEOMAlgo_SolidSolid.hxx +GEOMAlgo_SolidSolid.cxx +GEOMAlgo_ShellSolid.hxx +GEOMAlgo_ShellSolid.cxx +GEOMAlgo_VertexSolid.hxx +GEOMAlgo_VertexSolid.cxx +GEOMAlgo_WireSolid.hxx +GEOMAlgo_WireSolid.cxx +GEOMAlgo_ShapeSolid.hxx +GEOMAlgo_ShapeSolid.cxx +GEOMAlgo_Splitter.hxx +GEOMAlgo_Splitter.cxx +GEOMAlgo_Builder.hxx +GEOMAlgo_Builder.cxx +GEOMAlgo_BuilderShape.hxx +GEOMAlgo_BuilderShape.cxx +GEOMAlgo_BuilderArea.hxx +GEOMAlgo_BuilderArea.cxx +GEOMAlgo_BuilderFace.hxx +GEOMAlgo_BuilderFace.cxx +GEOMAlgo_BuilderSolid.hxx +GEOMAlgo_BuilderSolid.cxx +GEOMAlgo_ShapeInfoFiller.hxx +GEOMAlgo_ShapeInfoFiller.cxx +GEOMAlgo_Algo.hxx +GEOMAlgo_Algo.cxx +GEOMAlgo_ShapeSet.hxx +GEOMAlgo_ShapeSet.cxx +GEOMAlgo_SurfaceTools.hxx +GEOMAlgo_SurfaceTools.cxx +GEOMAlgo_State.hxx +GEOMAlgo_KindOfBounds.hxx +GEOMAlgo_KindOfClosed.hxx +GEOMAlgo_KindOfName.hxx +GEOMAlgo_KindOfShape.hxx +GEOMAlgo_ShapeInfo.hxx +GEOMAlgo_ShapeInfo.cxx +GEOMAlgo_CoupleOfShapes.hxx +GEOMAlgo_CoupleOfShapes.cxx +GEOMAlgo_BuilderTools.hxx +GEOMAlgo_BuilderTools.cxx +GEOMAlgo_Tools3D.hxx +GEOMAlgo_Tools3D.cxx +GEOMAlgo_Tools.hxx +GEOMAlgo_Tools.cxx +GEOMAlgo_PWireEdgeSet.hxx +GEOMAlgo_StateCollector.cxx +GEOMAlgo_StateCollector.hxx +GEOMAlgo_PassKey.hxx +GEOMAlgo_PassKey.cxx +GEOMAlgo_PassKeyMapHasher.hxx +GEOMAlgo_PassKeyMapHasher.cxx +GEOMAlgo_PassKeyShape.hxx +GEOMAlgo_PassKeyShape.cxx +GEOMAlgo_PassKeyShapeMapHasher.hxx +GEOMAlgo_PassKeyShapeMapHasher.cxx +GEOMAlgo_ClsfBox.hxx +GEOMAlgo_ClsfBox.cxx +GEOMAlgo_ClsfSolid.hxx +GEOMAlgo_ClsfSolid.cxx +GEOMAlgo_ClsfSurf.hxx +GEOMAlgo_ClsfSurf.cxx +GEOMAlgo_Clsf.hxx +GEOMAlgo_Clsf.cxx +GEOMAlgo_HAlgo.hxx +GEOMAlgo_HAlgo.cxx + +GEOMAlgo_ListOfCoupleOfShapes.hxx +GEOMAlgo_ListIteratorOfListOfCoupleOfShapes.hxx +GEOMAlgo_ListOfPnt.hxx +GEOMAlgo_ListIteratorOfListOfPnt.hxx +GEOMAlgo_DataMapOfShapeShapeSet.hxx +GEOMAlgo_DataMapIteratorOfDataMapOfShapeShapeSet.hxx +GEOMAlgo_DataMapOfShapeReal.hxx +GEOMAlgo_DataMapIteratorOfDataMapOfShapeReal.hxx +GEOMAlgo_DataMapOfRealListOfShape.hxx +GEOMAlgo_DataMapIteratorOfDataMapOfRealListOfShape.hxx +GEOMAlgo_DataMapOfPassKeyInteger.hxx +GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyInteger.hxx +GEOMAlgo_DataMapOfPassKeyShapeShape.hxx +GEOMAlgo_DataMapIteratorOfDataMapOfPassKeyShapeShape.hxx +GEOMAlgo_DataMapOfOrientedShapeShape.hxx +GEOMAlgo_DataMapIteratorOfDataMapOfOrientedShapeShape.hxx +GEOMAlgo_DataMapOfShapeMapOfShape.hxx +GEOMAlgo_DataMapIteratorOfDataMapOfShapeMapOfShape.hxx +GEOMAlgo_DataMapOfShapePnt.hxx +GEOMAlgo_DataMapIteratorOfDataMapOfShapePnt.hxx +GEOMAlgo_IndexedDataMapOfShapeBox.hxx + +GEOMAlgo_IndexedDataMapOfShapeShapeInfo.hxx +GEOMAlgo_IndexedDataMapOfShapeState.hxx +GEOMAlgo_IndexedDataMapOfIntegerShape.hxx +GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape.hxx + + + + + + + + + + + + + + + + + + + + + + + + + + + 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_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_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_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_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_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_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_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_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.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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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.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_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.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_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.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_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_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_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_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_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_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_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_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_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_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.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_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_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_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_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_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_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_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.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_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_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_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_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_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.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_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_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_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_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.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_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_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_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_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_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/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/Makefile.am b/src/GEOMAlgo/Makefile.am index db733bc4a..dacba0542 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) \ @@ -367,7 +207,7 @@ libGEOMAlgo_la_CPPFLAGS = \ libGEOMAlgo_la_LDFLAGS = \ ../NMTTools/libNMTTools.la \ $(STDLIB) \ - $(CAS_LDPATH) -lTKBO -lTKShHealing -lTKBool -lTKMesh \ + $(CAS_LDPATH) -lTKBO -lTKShHealing -lTKBool -lTKMesh -lTKOffset \ $(KERNEL_LDFLAGS) -lSALOMELocalTrace # extra distributed files @@ -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.cxx b/src/GEOMAlgo_NEW/BlockFix.cxx index 0e4f9bb21..22f230b9d 100644 --- a/src/GEOMAlgo_NEW/BlockFix.cxx +++ b/src/GEOMAlgo_NEW/BlockFix.cxx @@ -18,71 +18,52 @@ // Foundation, 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 @@ -149,6 +130,7 @@ static void FixResult(const TopoDS_Shape& result, } } + if(isDone) { TopoDS_Wire ResWire = sfw->Wire(); Context->Replace(ex_w.Current(), ResWire); @@ -161,17 +143,24 @@ static void FixResult(const TopoDS_Shape& result, if(sff->FixOrientation()) Context->Replace(aFixedFace,sff->Face()); } + } } } + + + + //======================================================================= -//function : RotateSphereSpace +//function : ConvertToAnalytical //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); @@ -194,129 +183,12 @@ TopoDS_Shape BlockFix::RotateSphereSpace (const TopoDS_Shape& S, 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) { diff --git a/src/GEOMAlgo_NEW/BlockFix.hxx b/src/GEOMAlgo_NEW/BlockFix.hxx index 34007be5c..a6a357276 100644 --- a/src/GEOMAlgo_NEW/BlockFix.hxx +++ b/src/GEOMAlgo_NEW/BlockFix.hxx @@ -26,7 +26,6 @@ #ifndef _Standard_Real_HeaderFile #include #endif - class TopoDS_Shape; class BlockFix_SphereSpaceModifier; class BlockFix_UnionFaces; @@ -35,6 +34,7 @@ class BlockFix_BlockFixAPI; class BlockFix_PeriodicSurfaceModifier; class BlockFix_CheckTool; + #ifndef _Standard_HeaderFile #include #endif @@ -46,27 +46,46 @@ 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); + 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) ; + + + + protected: + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + private: + // Methods PRIVATE + // + + + // Fields PRIVATE + // + friend class BlockFix_SphereSpaceModifier; friend class BlockFix_UnionFaces; friend class BlockFix_UnionEdges; @@ -76,6 +95,12 @@ friend class BlockFix_CheckTool; }; + + + + // other Inline functions and methods (like "C++: function call" methods) +// + #endif diff --git a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cxx b/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cxx index 3c82e4a84..2aefa654e 100644 --- a/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cxx +++ b/src/GEOMAlgo_NEW/BlockFix_BlockFixAPI.cxx @@ -18,21 +18,16 @@ // Foundation, 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 //======================================================================= @@ -57,23 +52,12 @@ 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_NEW/BlockFix_UnionEdges.cxx b/src/GEOMAlgo_NEW/BlockFix_UnionEdges.cxx index 95a1a713e..7c5d2a186 100644 --- a/src/GEOMAlgo_NEW/BlockFix_UnionEdges.cxx +++ b/src/GEOMAlgo_NEW/BlockFix_UnionEdges.cxx @@ -18,6 +18,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// // File: BlockFix_UnionEdges.cxx // Created: 07.12.04 15:27:30 @@ -25,31 +26,30 @@ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include - #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,206 +58,17 @@ #include #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 @@ -441,8 +252,6 @@ static Standard_Boolean MergeEdges(const TopTools_SequenceOfShape& SeqEdges, } if(NeedUnion) { MESSAGE ("can not make analitical union => make approximation"); - TopoDS_Edge E = GlueEdgesWithPCurves(aChain, VF, VL); - /* TopoDS_Wire W; B.MakeWire(W); for(j=1; j<=aChain.Length(); j++) { @@ -456,7 +265,6 @@ 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 { @@ -469,10 +277,12 @@ 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/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/FILES b/src/NMTDS/FILES new file mode 100644 index 000000000..e60c1fcdc --- /dev/null +++ b/src/NMTDS/FILES @@ -0,0 +1,66 @@ +Basics_OCCTVersion.hxx + +NMTDS_BoxBndTree.cxx +NMTDS_BoxBndTree.hxx +NMTDS_BndSphereTree.cxx +NMTDS_BndSphereTree.hxx +NMTDS_BndSphere.hxx +NMTDS_BndSphere.cxx +NMTDS_BndSphere.lxx +NMTDS_IndexRange.hxx +NMTDS_IndexRange.cxx +NMTDS_InterfPool.hxx +NMTDS_InterfPool.cxx +NMTDS_Iterator.hxx +NMTDS_Iterator.cxx +NMTDS_IteratorCheckerSI.hxx +NMTDS_IteratorCheckerSI.cxx +NMTDS_Pair.hxx +NMTDS_Pair.cxx +NMTDS_PairBoolean.hxx +NMTDS_PairBoolean.cxx +NMTDS_PairMapHasher.hxx +NMTDS_PairMapHasher.cxx +NMTDS_PassKey.hxx +NMTDS_PassKey.cxx +NMTDS_PassKeyBoolean.hxx +NMTDS_PassKeyBoolean.cxx +NMTDS_PassKeyMapHasher.hxx +NMTDS_PassKeyMapHasher.cxx +NMTDS_PassKeyShape.hxx +NMTDS_PassKeyShape.cxx +NMTDS_PassKeyShapeMapHasher.hxx +NMTDS_PassKeyShapeMapHasher.cxx +NMTDS_Tools.hxx +NMTDS_Tools.cxx +NMTDS_ShapesDataStructure.hxx +NMTDS_ShapesDataStructure.cxx +NMTDS_InterfType.hxx +NMTDS_PInterfPool.hxx +NMTDS_PIterator.hxx +NMTDS_PShapesDataStructure.hxx + +NMTDS_ListOfPassKey.hxx +NMTDS_ListIteratorOfListOfPassKey.hxx +NMTDS_ListOfPassKeyBoolean.hxx +NMTDS_ListIteratorOfListOfPassKeyBoolean.hxx +NMTDS_ListOfPair.hxx +NMTDS_ListIteratorOfListOfPair.hxx +NMTDS_ListOfPairBoolean.hxx +NMTDS_ListIteratorOfListOfPairBoolean.hxx +NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +NMTDS_MapOfPassKey.hxx +NMTDS_MapIteratorOfMapOfPassKey.hxx +NMTDS_MapOfPassKeyBoolean.hxx +NMTDS_MapIteratorOfMapOfPassKeyBoolean.hxx +NMTDS_MapOfPairBoolean.hxx +NMTDS_MapIteratorOfMapOfPairBoolean.hxx +NMTDS_IndexedDataMapOfShapeBox.hxx +NMTDS_IndexedDataMapOfIntegerShape.hxx +NMTDS_IndexedDataMapOfShapeBndSphere.hxx +NMTDS_DataMapOfIntegerMapOfInteger.hxx +NMTDS_DataMapIteratorOfDataMapOfIntegerMapOfInteger.hxx + +NMTDS_CArray1OfIndexRange.hxx +NMTDS_CArray1OfIndexRange.cxx 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_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_CArray1OfIndexRange.cxx b/src/NMTDS/NMTDS_CArray1OfIndexRange.cxx new file mode 100644 index 000000000..c984bebf2 --- /dev/null +++ b/src/NMTDS/NMTDS_CArray1OfIndexRange.cxx @@ -0,0 +1,40 @@ +// 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_CArray1OfIndexRange.hxx +// Created: +// Author: Peter KURNEV +// + +#include + +#ifndef _Standard_OutOfRange_HeaderFile +#include +#endif +#ifndef _Standard_OutOfMemory_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_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_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_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_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_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_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_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_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_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.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_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_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_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_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_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_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_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_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_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_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_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_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.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_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_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_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_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_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_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_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_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_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/NMTTools/FILES b/src/NMTTools/FILES new file mode 100644 index 000000000..63a775bc7 --- /dev/null +++ b/src/NMTTools/FILES @@ -0,0 +1,52 @@ +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_CoupleOfShape.hxx +NMTTools_CoupleOfShape.cxx +NMTTools_CommonBlock.hxx +NMTTools_CommonBlock.cxx +NMTTools_CommonBlockAPI.hxx +NMTTools_CommonBlockAPI.cxx +NMTTools_FaceInfo.hxx +NMTTools_FaceInfo.cxx +NMTTools_FaceInfo.lxx +NMTTools_Tools.hxx +NMTTools_Tools.cxx +NMTTools_PaveFiller.hxx +NMTTools_PaveFiller.cxx +NMTTools_PPaveFiller.hxx +NMTTools_DEProcessor.hxx +NMTTools_DEProcessor.cxx +NMTTools_CheckerSI.hxx +NMTTools_CheckerSI.cxx +NMTTools_CheckerSI_1.cxx + +NMTTools_ListOfCommonBlock.hxx +NMTTools_ListIteratorOfListOfCommonBlock.hxx +NMTTools_ListOfCoupleOfShape.hxx +NMTTools_ListIteratorOfListOfCoupleOfShape.hxx + +NMTTools_MapOfPaveBlock.hxx +NMTTools_MapIteratorOfMapOfPaveBlock.hxx + +NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx +NMTTools_IndexedDataMapOfShapePaveBlock.hxx +NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx + +NMTTools_DataMapOfIntegerListOfPaveBlock.hxx +NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx + +NMTTools_DataMapOfIntegerFaceInfo.hxx +NMTTools_DataMapIteratorOfDataMapOfIntegerFaceInfo.hxx + +NMTTools_CommonBlockPool.hxx +NMTTools_CommonBlockPool.cxx 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_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_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.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_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_CommonBlockPool.cxx b/src/NMTTools/NMTTools_CommonBlockPool.cxx new file mode 100644 index 000000000..d49252b41 --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlockPool.cxx @@ -0,0 +1,42 @@ +// 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.cxx +// Created: +// Author: Peter KURNEV +// +// + + +#include + +#ifndef _Standard_OutOfRange_HeaderFile +#include +#endif +#ifndef _Standard_OutOfMemory_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_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_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_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_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_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_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_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_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.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_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_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_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_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_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_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_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_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_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_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.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_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_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 -- 2.39.2