From 0b6826bc5f36b5420f41af1475e1a79371a25323 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 25 Dec 2009 11:28:58 +0000 Subject: [PATCH] untabify --- src/ARCHIMEDE/Archimede_VolumeSection.cxx | 194 ++--- src/BREPExport/BREPExport.cxx | 8 +- src/BREPImport/BREPImport.cxx | 10 +- src/BasicGUI/BasicGUI_ArcDlg.cxx | 112 +-- src/BasicGUI/BasicGUI_CircleDlg.cxx | 42 +- src/BasicGUI/BasicGUI_EllipseDlg.cxx | 26 +- src/BasicGUI/BasicGUI_LineDlg.cxx | 38 +- src/BasicGUI/BasicGUI_MarkerDlg.cxx | 184 ++--- src/BasicGUI/BasicGUI_PlaneDlg.cxx | 52 +- src/BasicGUI/BasicGUI_PointDlg.cxx | 54 +- src/BasicGUI/BasicGUI_VectorDlg.cxx | 32 +- src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx | 48 +- src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx | 28 +- src/BlocksGUI/BlocksGUI_PropagateDlg.cxx | 2 +- src/BlocksGUI/BlocksGUI_TrsfDlg.cxx | 12 +- src/BooleanGUI/BooleanGUI.cxx | 2 +- src/BooleanGUI/BooleanGUI_Dialog.cxx | 2 +- src/BooleanGUI/BooleanGUI_Dialog.h | 2 +- src/BuildGUI/BuildGUI_CompoundDlg.cxx | 8 +- src/BuildGUI/BuildGUI_EdgeDlg.cxx | 2 +- src/BuildGUI/BuildGUI_FaceDlg.cxx | 4 +- src/BuildGUI/BuildGUI_ShellDlg.cxx | 4 +- src/BuildGUI/BuildGUI_SolidDlg.cxx | 4 +- src/BuildGUI/BuildGUI_SolidDlg.h | 2 +- src/BuildGUI/BuildGUI_WireDlg.cxx | 4 +- src/DisplayGUI/DisplayGUI.cxx | 86 +-- src/DlgRef/DlgRef.cxx | 8 +- src/DlgRef/DlgRef.h | 14 +- src/EntityGUI/EntityGUI.cxx | 6 +- src/EntityGUI/EntityGUI_3DSketcherDlg.cxx | 96 +-- src/EntityGUI/EntityGUI_3DSketcherDlg.h | 20 +- src/EntityGUI/EntityGUI_SketcherDlg.cxx | 252 +++---- src/EntityGUI/EntityGUI_SketcherDlg.h | 30 +- src/EntityGUI/EntityGUI_SubShapeDlg.cxx | 30 +- src/EntityGUI/EntityGUI_SubShapeDlg.h | 2 +- src/GEOMAlgo/BlockFix.cxx | 6 +- src/GEOMAlgo/BlockFix_BlockFixAPI.hxx | 2 +- src/GEOMAlgo/BlockFix_BlockFixAPI.ixx | 8 +- .../BlockFix_PeriodicSurfaceModifier.hxx | 2 +- .../BlockFix_PeriodicSurfaceModifier.ixx | 8 +- src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx | 6 +- src/GEOMAlgo/BlockFix_SphereSpaceModifier.hxx | 2 +- src/GEOMAlgo/BlockFix_SphereSpaceModifier.ixx | 8 +- src/GEOMAlgo/GEOMAlgo_Algo.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_Builder.cxx | 28 +- src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx | 6 +- src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx | 144 ++-- src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx | 6 +- src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx | 296 ++++---- src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx | 34 +- src/GEOMAlgo/GEOMAlgo_Builder_1.cxx | 120 +-- src/GEOMAlgo/GEOMAlgo_Builder_2.cxx | 390 +++++----- src/GEOMAlgo/GEOMAlgo_Builder_3.cxx | 378 +++++----- src/GEOMAlgo/GEOMAlgo_Builder_4.cxx | 146 ++-- src/GEOMAlgo/GEOMAlgo_Clsf.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_Clsf.hxx | 2 +- src/GEOMAlgo/GEOMAlgo_Clsf.ixx | 8 +- src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx | 26 +- src/GEOMAlgo/GEOMAlgo_ClsfBox.hxx | 2 +- src/GEOMAlgo/GEOMAlgo_ClsfBox.ixx | 8 +- src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx | 2 +- src/GEOMAlgo/GEOMAlgo_ClsfSolid.ixx | 8 +- src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx | 12 +- src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx | 2 +- src/GEOMAlgo/GEOMAlgo_ClsfSurf.ixx | 8 +- src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx | 12 +- ...o_DataMapNodeOfDataMapOfPassKeyInteger.hxx | 2 +- ...DataMapNodeOfDataMapOfPassKeyInteger_0.cxx | 8 +- ...ataMapNodeOfDataMapOfPassKeyShapeShape.hxx | 2 +- ...aMapNodeOfDataMapOfPassKeyShapeShape_0.cxx | 8 +- ..._DataMapNodeOfDataMapOfRealListOfShape.hxx | 2 +- ...ataMapNodeOfDataMapOfRealListOfShape_0.cxx | 8 +- ...OMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx | 2 +- ...Algo_DataMapNodeOfDataMapOfShapeReal_0.cxx | 8 +- ...go_DataMapNodeOfDataMapOfShapeShapeSet.hxx | 2 +- ..._DataMapNodeOfDataMapOfShapeShapeSet_0.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx | 42 +- src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx | 166 ++--- src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx | 170 ++--- src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx | 18 +- src/GEOMAlgo/GEOMAlgo_Gluer.cxx | 170 ++--- src/GEOMAlgo/GEOMAlgo_Gluer1.cxx | 84 +-- src/GEOMAlgo/GEOMAlgo_HAlgo.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_HAlgo.hxx | 2 +- src/GEOMAlgo/GEOMAlgo_HAlgo.ixx | 8 +- ...aMapNodeOfIndexedDataMapOfIntegerShape.hxx | 2 +- ...apNodeOfIndexedDataMapOfIntegerShape_0.cxx | 8 +- ...deOfIndexedDataMapOfPassKeyListOfShape.hxx | 2 +- ...OfIndexedDataMapOfPassKeyListOfShape_0.cxx | 8 +- ...ndexedDataMapOfPassKeyShapeListOfShape.hxx | 2 +- ...exedDataMapOfPassKeyShapeListOfShape_0.cxx | 8 +- ...dDataMapNodeOfIndexedDataMapOfShapeBox.hxx | 2 +- ...ataMapNodeOfIndexedDataMapOfShapeBox_0.cxx | 8 +- ...apNodeOfIndexedDataMapOfShapeShapeInfo.hxx | 2 +- ...NodeOfIndexedDataMapOfShapeShapeInfo_0.cxx | 8 +- ...ataMapNodeOfIndexedDataMapOfShapeState.hxx | 2 +- ...aMapNodeOfIndexedDataMapOfShapeState_0.cxx | 8 +- ...EOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx | 2 +- ...MAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx | 2 +- .../GEOMAlgo_ListNodeOfListOfPnt_0.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_PassKey.cxx | 26 +- src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx | 12 +- src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx | 26 +- .../GEOMAlgo_PassKeyShapeMapHasher.cxx | 12 +- src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx | 6 +- src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx | 2 +- src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx | 108 +-- src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx | 12 +- src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx | 124 ++-- src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx | 42 +- src/GEOMAlgo/GEOMAlgo_StateCollector.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx | 48 +- src/GEOMAlgo/GEOMAlgo_Tools.cxx | 96 +-- src/GEOMAlgo/GEOMAlgo_Tools3D.cxx | 226 +++--- src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx | 20 +- src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx | 110 +-- src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx | 8 +- src/GEOMAlgo/GEOMAlgo_WireSolid.cxx | 58 +- src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx | 268 +++---- src/GEOMBase/GEOMBase.h | 28 +- src/GEOMBase/GEOMBase_Helper.cxx | 144 ++-- src/GEOMBase/GEOMBase_Helper.h | 4 +- src/GEOMBase/GEOMBase_Skeleton.cxx | 16 +- src/GEOMDS/GEOMDS_Commands.cxx | 32 +- src/GEOMFiltersSelection/GEOM_EdgeFilter.cxx | 2 +- src/GEOMFiltersSelection/GEOM_FaceFilter.cxx | 10 +- src/GEOMFiltersSelection/GEOM_TypeFilter.cxx | 4 +- src/GEOMGUI/GEOMGUI_Selection.cxx | 102 +-- src/GEOMGUI/GEOM_Displayer.cxx | 464 ++++++------ src/GEOMGUI/GEOM_Displayer.h | 6 +- src/GEOMGUI/GeometryGUI.cxx | 364 ++++----- src/GEOMGUI/GeometryGUI.h | 12 +- src/GEOMGUI/GeometryGUI_Swig.cxx | 372 +++++----- src/GEOMImpl/GEOMImpl_3DSketcherDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_ArcDriver.cxx | 34 +- src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_BooleanDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_BoxDriver.cxx | 12 +- src/GEOMImpl/GEOMImpl_CircleDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_ConeDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_CopyDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_CylinderDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_DiskDriver.cxx | 18 +- src/GEOMImpl/GEOMImpl_EllipseDriver.cxx | 22 +- src/GEOMImpl/GEOMImpl_ExportDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_FaceDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_Fillet1dDriver.cxx | 10 +- src/GEOMImpl/GEOMImpl_Fillet2dDriver.cxx | 10 +- src/GEOMImpl/GEOMImpl_FilletDriver.cxx | 16 +- src/GEOMImpl/GEOMImpl_FillingDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_GlueDriver.cxx | 20 +- src/GEOMImpl/GEOMImpl_GlueDriver.hxx | 4 +- src/GEOMImpl/GEOMImpl_HealingDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx | 88 +-- src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx | 46 +- src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx | 2 +- src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx | 4 +- src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx | 14 +- src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx | 6 +- src/GEOMImpl/GEOMImpl_IHealingOperations.cxx | 26 +- src/GEOMImpl/GEOMImpl_IInsertOperations.cxx | 42 +- src/GEOMImpl/GEOMImpl_IInsertOperations.hxx | 4 +- src/GEOMImpl/GEOMImpl_ILocalOperations.cxx | 4 +- src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx | 46 +- src/GEOMImpl/GEOMImpl_IShapesOperations.cxx | 80 +- src/GEOMImpl/GEOMImpl_IShapesOperations.hxx | 8 +- .../GEOMImpl_ITransformOperations.cxx | 46 +- .../GEOMImpl_ITransformOperations.hxx | 4 +- src/GEOMImpl/GEOMImpl_ImportDriver.cxx | 10 +- src/GEOMImpl/GEOMImpl_LineDriver.cxx | 32 +- src/GEOMImpl/GEOMImpl_MarkerDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_MeasureDriver.cxx | 10 +- src/GEOMImpl/GEOMImpl_MirrorDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_OffsetDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_PartitionDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_PipeDriver.hxx | 2 +- src/GEOMImpl/GEOMImpl_PlaneDriver.cxx | 10 +- src/GEOMImpl/GEOMImpl_PointDriver.cxx | 28 +- src/GEOMImpl/GEOMImpl_PolylineDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_PositionDriver.cxx | 10 +- src/GEOMImpl/GEOMImpl_PrismDriver.cxx | 52 +- src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx | 20 +- src/GEOMImpl/GEOMImpl_RotateDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_ScaleDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_ShapeDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_SketcherDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_SphereDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_SplineDriver.cxx | 12 +- src/GEOMImpl/GEOMImpl_ThruSectionsDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_TorusDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_TranslateDriver.cxx | 8 +- src/GEOMImpl/GEOMImpl_VectorDriver.cxx | 8 +- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 346 ++++----- src/GEOMToolsGUI/GEOMToolsGUI.h | 6 +- src/GEOMToolsGUI/GEOMToolsGUI_1.cxx | 438 +++++------ src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx | 4 +- src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx | 106 +-- src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx | 12 +- .../GEOMToolsGUI_TransparencyDlg.cxx | 24 +- .../GenerationGUI_FillingDlg.cxx | 8 +- src/GenerationGUI/GenerationGUI_PipeDlg.cxx | 114 +-- src/GenerationGUI/GenerationGUI_PrismDlg.cxx | 2 +- src/GenerationGUI/GenerationGUI_RevolDlg.cxx | 2 +- src/GroupGUI/GroupGUI.cxx | 20 +- src/IGESExport/IGESExport.cxx | 10 +- src/IGESImport/IGESImport.cxx | 78 +- src/MeasureGUI/MeasureGUI_BndBoxDlg.h | 4 +- src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx | 4 +- .../MeasureGUI_CheckCompoundOfBlocksDlg.h | 2 +- src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx | 2 +- src/MeasureGUI/MeasureGUI_DistanceDlg.h | 4 +- src/MeasureGUI/MeasureGUI_InertiaDlg.cxx | 8 +- src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx | 4 +- src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h | 2 +- src/MeasureGUI/MeasureGUI_NormaleDlg.cxx | 2 +- src/MeasureGUI/MeasureGUI_PropertiesDlg.h | 4 +- src/MeasureGUI/MeasureGUI_Skeleton.cxx | 22 +- src/MeasureGUI/MeasureGUI_Widgets.cxx | 4 +- src/NMTAlgo/NMTAlgo_Algo.cxx | 8 +- src/NMTAlgo/NMTAlgo_Builder.cxx | 156 ++-- src/NMTAlgo/NMTAlgo_Loop3d.cxx | 34 +- src/NMTAlgo/NMTAlgo_Splitter.cxx | 108 +-- src/NMTAlgo/NMTAlgo_Splitter1.cxx | 50 +- src/NMTAlgo/NMTAlgo_Splitter_1.cxx | 148 ++-- src/NMTAlgo/NMTAlgo_Splitter_2.cxx | 182 ++--- src/NMTAlgo/NMTAlgo_Tools.cxx | 120 +-- src/NMTDS/NMTDS_BoxBndTree.cxx | 8 +- src/NMTDS/NMTDS_BoxBndTree.hxx | 8 +- ...aMapNodeOfDataMapOfIntegerMapOfInteger.hxx | 2 +- ...apNodeOfDataMapOfIntegerMapOfInteger_0.cxx | 8 +- src/NMTDS/NMTDS_IndexRange.cxx | 8 +- ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 2 +- ...fIntegerIndexedDataMapOfShapeInteger_0.cxx | 8 +- ...aMapNodeOfIndexedDataMapOfIntegerShape.hxx | 2 +- ...apNodeOfIndexedDataMapOfIntegerShape_0.cxx | 8 +- ...dDataMapNodeOfIndexedDataMapOfShapeBox.hxx | 2 +- ...ataMapNodeOfIndexedDataMapOfShapeBox_0.cxx | 8 +- src/NMTDS/NMTDS_InterfPool.cxx | 26 +- src/NMTDS/NMTDS_Iterator.cxx | 180 ++--- src/NMTDS/NMTDS_IteratorCheckerSI.cxx | 94 +-- ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 2 +- ...xedDataMapOfShapeAncestorsSuccessors_0.cxx | 8 +- src/NMTDS/NMTDS_ListNodeOfListOfPassKey.hxx | 2 +- .../NMTDS_ListNodeOfListOfPassKeyBoolean.hxx | 2 +- ...NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx | 8 +- src/NMTDS/NMTDS_ListNodeOfListOfPassKey_0.cxx | 8 +- src/NMTDS/NMTDS_PassKey.cxx | 28 +- src/NMTDS/NMTDS_PassKeyBoolean.cxx | 8 +- src/NMTDS/NMTDS_PassKeyMapHasher.cxx | 12 +- src/NMTDS/NMTDS_PassKeyShape.cxx | 26 +- src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx | 12 +- src/NMTDS/NMTDS_ShapesDataStructure.cxx | 34 +- src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey.hxx | 2 +- .../NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx | 2 +- ...MTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx | 8 +- .../NMTDS_StdMapNodeOfMapOfPassKey_0.cxx | 8 +- src/NMTDS/NMTDS_Tools.cxx | 26 +- src/NMTTools/NMTTools_CheckerSI.cxx | 6 +- src/NMTTools/NMTTools_CheckerSI_1.cxx | 24 +- src/NMTTools/NMTTools_CommonBlock.cxx | 8 +- src/NMTTools/NMTTools_CommonBlockAPI.cxx | 14 +- src/NMTTools/NMTTools_CoupleOfShape.cxx | 8 +- src/NMTTools/NMTTools_DEProcessor.cxx | 214 +++--- src/NMTTools/NMTTools_DSFiller.cxx | 8 +- ...pNodeOfDataMapOfIntegerListOfPaveBlock.hxx | 2 +- ...odeOfDataMapOfIntegerListOfPaveBlock_0.cxx | 8 +- ...eOfIndexedDataMapOfIndexedMapOfInteger.hxx | 2 +- ...fIndexedDataMapOfIndexedMapOfInteger_0.cxx | 8 +- ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 2 +- ...dexedDataMapOfShapeIndexedMapOfShape_0.cxx | 8 +- ...apNodeOfIndexedDataMapOfShapePaveBlock.hxx | 2 +- ...NodeOfIndexedDataMapOfShapePaveBlock_0.cxx | 8 +- .../NMTTools_IteratorOfCoupleOfShape.cxx | 14 +- .../NMTTools_ListNodeOfListOfCommonBlock.hxx | 2 +- ...NMTTools_ListNodeOfListOfCommonBlock_0.cxx | 8 +- ...NMTTools_ListNodeOfListOfCoupleOfShape.hxx | 2 +- ...TTools_ListNodeOfListOfCoupleOfShape_0.cxx | 8 +- src/NMTTools/NMTTools_PCurveMaker.cxx | 8 +- src/NMTTools/NMTTools_PaveFiller.cxx | 8 +- src/NMTTools/NMTTools_PaveFiller_0.cxx | 12 +- src/NMTTools/NMTTools_PaveFiller_1.cxx | 26 +- src/NMTTools/NMTTools_PaveFiller_2.cxx | 152 ++-- src/NMTTools/NMTTools_PaveFiller_3.cxx | 58 +- src/NMTTools/NMTTools_PaveFiller_4.cxx | 688 +++++++++--------- src/NMTTools/NMTTools_PaveFiller_5.cxx | 236 +++--- src/NMTTools/NMTTools_PaveFiller_6.cxx | 466 ++++++------ src/NMTTools/NMTTools_PaveFiller_7.cxx | 160 ++-- src/NMTTools/NMTTools_PaveFiller_8.cxx | 104 +-- src/NMTTools/NMTTools_PaveFiller_9.cxx | 44 +- .../NMTTools_StdMapNodeOfMapOfPaveBlock.hxx | 2 +- .../NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx | 8 +- src/NMTTools/NMTTools_Tools.cxx | 68 +- src/OBJECT/GEOM_AISShape.cxx | 42 +- src/OBJECT/GEOM_AISShape.hxx | 44 +- src/OBJECT/GEOM_AISShape.ixx | 8 +- src/OBJECT/GEOM_Actor.cxx | 48 +- src/OBJECT/GEOM_Actor.h | 10 +- src/OBJECT/GEOM_AssemblyBuilder.cxx | 146 ++-- src/OBJECT/GEOM_AssemblyBuilder.h | 34 +- src/OBJECT/GEOM_EdgeSource.cxx | 2 +- src/OBJECT/GEOM_InteractiveObject.cxx | 6 +- src/OBJECT/GEOM_InteractiveObject.hxx | 8 +- src/OBJECT/GEOM_InteractiveObject.ixx | 8 +- src/OBJECT/GEOM_OCCReader.cxx | 370 +++++----- src/OBJECT/GEOM_OCCReader.h | 66 +- src/OBJECT/GEOM_ShadingFace.cxx | 2 +- src/OBJECT/GEOM_VTKTrihedron.cxx | 4 +- src/OBJECT/GEOM_WireframeFace.cxx | 226 +++--- src/OBJECT/GEOM_WireframeFace.h | 8 +- .../OperationGUI_ArchimedeDlg.cxx | 4 +- src/OperationGUI/OperationGUI_ChamferDlg.cxx | 90 +-- src/OperationGUI/OperationGUI_ChamferDlg.h | 10 +- src/OperationGUI/OperationGUI_ClippingDlg.cxx | 16 +- .../OperationGUI_Fillet1d2dDlg.cxx | 58 +- src/OperationGUI/OperationGUI_FilletDlg.cxx | 36 +- .../OperationGUI_GetShapesOnShapeDlg.cxx | 6 +- src/OperationGUI/OperationGUI_MaterialDlg.cxx | 6 +- src/OperationGUI/OperationGUI_MaterialDlg.h | 2 +- .../OperationGUI_PartitionDlg.cxx | 16 +- src/PARTITION/Partition_Inter3d.cxx | 204 +++--- src/PARTITION/Partition_Loop.cxx | 176 ++--- src/PARTITION/Partition_Loop3d.cxx | 32 +- src/PARTITION/Partition_Spliter.cxx | 296 ++++---- src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx | 8 +- src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx | 10 +- src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx | 8 +- src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx | 2 +- src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx | 34 +- src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx | 32 +- src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx | 8 +- .../RepairGUI_ChangeOrientationDlg.cxx | 8 +- src/RepairGUI/RepairGUI_CloseContourDlg.cxx | 2 +- src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx | 6 +- src/RepairGUI/RepairGUI_FreeBoundDlg.cxx | 12 +- src/RepairGUI/RepairGUI_FreeFacesDlg.cxx | 20 +- src/RepairGUI/RepairGUI_GlueDlg.cxx | 42 +- .../RepairGUI_RemoveExtraEdgesDlg.cxx | 10 +- src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx | 2 +- src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx | 2 +- src/RepairGUI/RepairGUI_SewingDlg.cxx | 20 +- src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx | 66 +- src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx | 32 +- src/RepairGUI/RepairGUI_SuppressFacesDlg.h | 2 +- src/STEPExport/STEPExport.cxx | 12 +- src/STEPImport/STEPImport.cxx | 78 +- src/STLExport/STLExport.cxx | 8 +- src/ShHealOper/ShHealOper_FillHoles.cxx | 6 +- .../TransformationGUI_MirrorDlg.cxx | 2 +- .../TransformationGUI_MirrorDlg.h | 2 +- .../TransformationGUI_MultiRotationDlg.cxx | 2 +- .../TransformationGUI_MultiRotationDlg.h | 2 +- .../TransformationGUI_MultiTranslationDlg.cxx | 6 +- .../TransformationGUI_MultiTranslationDlg.h | 2 +- .../TransformationGUI_OffsetDlg.cxx | 14 +- .../TransformationGUI_OffsetDlg.h | 2 +- .../TransformationGUI_PositionDlg.cxx | 34 +- .../TransformationGUI_PositionDlg.h | 2 +- .../TransformationGUI_RotationDlg.cxx | 10 +- .../TransformationGUI_RotationDlg.h | 2 +- .../TransformationGUI_ScaleDlg.cxx | 6 +- .../TransformationGUI_ScaleDlg.h | 2 +- .../TransformationGUI_TranslationDlg.cxx | 20 +- .../TransformationGUI_TranslationDlg.h | 2 +- 367 files changed, 7590 insertions(+), 7590 deletions(-) diff --git a/src/ARCHIMEDE/Archimede_VolumeSection.cxx b/src/ARCHIMEDE/Archimede_VolumeSection.cxx index 922098934..f9276aa46 100644 --- a/src/ARCHIMEDE/Archimede_VolumeSection.cxx +++ b/src/ARCHIMEDE/Archimede_VolumeSection.cxx @@ -88,29 +88,29 @@ void VolumeSection::CenterOfGravity() TopoDS_Face F = TopoDS::Face(ex.Current()); Handle(Poly_Triangulation) Tr = BRep_Tool::Triangulation(F, L); if(Tr.IsNull()) - MESSAGE("Error, null layer" ) + MESSAGE("Error, null layer" ) nbNodes = Tr->NbNodes(); const TColgp_Array1OfPnt& Nodes = Tr->Nodes(); // Calcul des dimensions de la boite englobante du solide for(i=1;i<=nbNodes;i++) - { - InitPoint = Nodes(i).Transformed(L.Transformation()); - if(InitPoint.X() < Xmin) - Xmin = InitPoint.X(); - if(InitPoint.X() > Xmax) - Xmax = InitPoint.X(); - if(InitPoint.Y() < Ymin) - Ymin = InitPoint.Y(); - if(InitPoint.Y() > Ymax) - Ymax = InitPoint.Y(); - if(InitPoint.Z() < Zmin) - Zmin = InitPoint.Z(); - if(InitPoint.Z() > Zmax) - Zmax = InitPoint.Z(); - - } + { + InitPoint = Nodes(i).Transformed(L.Transformation()); + if(InitPoint.X() < Xmin) + Xmin = InitPoint.X(); + if(InitPoint.X() > Xmax) + Xmax = InitPoint.X(); + if(InitPoint.Y() < Ymin) + Ymin = InitPoint.Y(); + if(InitPoint.Y() > Ymax) + Ymax = InitPoint.Y(); + if(InitPoint.Z() < Zmin) + Zmin = InitPoint.Z(); + if(InitPoint.Z() > Zmax) + Zmax = InitPoint.Z(); + + } } // Creation du point d'initialisation, c'est € dire le centre de gravit‰ @@ -141,7 +141,7 @@ Standard_Real VolumeSection::CalculateVolume(Standard_Real Elevation) TopoDS_Face F = TopoDS::Face(ex.Current()); Handle(Poly_Triangulation) Tr = BRep_Tool::Triangulation(F, L); if(Tr.IsNull()) - MESSAGE("Error, null layer" ) + MESSAGE("Error, null layer" ) const Poly_Array1OfTriangle& triangles = Tr->Triangles(); Standard_Integer nbTriangles = Tr->NbTriangles(); nbNodes = Tr->NbNodes(); @@ -151,70 +151,70 @@ Standard_Real VolumeSection::CalculateVolume(Standard_Real Elevation) //en tenant compte des triangles coup‰s par le plan de section for (i=1;i<=nbTriangles;i++) - { - Determinant=0; - //Gardons la meme orientation des noeuds - if (F.Orientation() == TopAbs_REVERSED) - triangles(i).Get(noeud[0], noeud[2], noeud[1]); - else - triangles(i).Get(noeud[0], noeud[1], noeud[2]); - + { + Determinant=0; + //Gardons la meme orientation des noeuds + if (F.Orientation() == TopAbs_REVERSED) + triangles(i).Get(noeud[0], noeud[2], noeud[1]); + else + triangles(i).Get(noeud[0], noeud[1], noeud[2]); + P[0] = Nodes(noeud[0]).Transformed(L.Transformation()); - z[0] = P[0].Z(); - P[1] = Nodes(noeud[1]).Transformed(L.Transformation()); - z[1] = P[1].Z(); + z[0] = P[0].Z(); + P[1] = Nodes(noeud[1]).Transformed(L.Transformation()); + z[1] = P[1].Z(); P[2] = Nodes(noeud[2]).Transformed(L.Transformation()); z[2] = P[2].Z(); - // Determination des cas aux limites pour les triangles - Standard_Integer i,compteur=0; + // Determination des cas aux limites pour les triangles + Standard_Integer i,compteur=0; - for (i=0;i<=2;i++) - { + for (i=0;i<=2;i++) + { flag[i]=Standard_False; - if(z[i]>=Elevation) - { - flag[i]=Standard_True; - compteur++; - } - } - - switch(compteur) - { - case 0: - Determinant = ElementaryVolume(P[0],P[1],P[2]); - break; - - case 1: - for (i=0;i<=2;i++) - { - if (flag[i]==Standard_True) - { - gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation); - gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation); - Determinant = ElementaryVolume(Result1,P[(i+1)%3],P[(i+2)%3]) - + ElementaryVolume(Result1,P[(i+2)%3],Result2); - } - } - break; - - case 2: - for (i=0;i<=2;i++) - { - if (flag[i]==Standard_False) - { - gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation); - gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation); - Determinant = ElementaryVolume(P[i],Result1,Result2); - } - } - break; - - case 3: - break; - } - Volume += Determinant; - } + if(z[i]>=Elevation) + { + flag[i]=Standard_True; + compteur++; + } + } + + switch(compteur) + { + case 0: + Determinant = ElementaryVolume(P[0],P[1],P[2]); + break; + + case 1: + for (i=0;i<=2;i++) + { + if (flag[i]==Standard_True) + { + gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation); + gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation); + Determinant = ElementaryVolume(Result1,P[(i+1)%3],P[(i+2)%3]) + + ElementaryVolume(Result1,P[(i+2)%3],Result2); + } + } + break; + + case 2: + for (i=0;i<=2;i++) + { + if (flag[i]==Standard_False) + { + gp_Pnt Result1 = Intersection(P[i],P[(i+1)%3],Elevation); + gp_Pnt Result2 = Intersection(P[i],P[(i+2)%3],Elevation); + Determinant = ElementaryVolume(P[i],Result1,Result2); + } + } + break; + + case 3: + break; + } + Volume += Determinant; + } } return Volume; @@ -258,30 +258,30 @@ Standard_Real VolumeSection::Archimede(Standard_Real Constante , Standard_Real E else { while((Bsup-Binf)>Epsilon) - { - if((tempBinfVolume-Constante)*(tempCVolume-Constante)>0 && Abs(tempCVolume-Constante)>Epsilon) - { - Binf = c; - tempBinfVolume=tempCVolume; - - c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante))) - /((tempBsupVolume-Constante)-(tempBinfVolume-Constante)); + { + if((tempBinfVolume-Constante)*(tempCVolume-Constante)>0 && Abs(tempCVolume-Constante)>Epsilon) + { + Binf = c; + tempBinfVolume=tempCVolume; + + c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante))) + /((tempBsupVolume-Constante)-(tempBinfVolume-Constante)); tempCVolume=CalculateVolume(c); - } - else if((tempBinfVolume-Constante)*(tempCVolume-Constante)<0 && Abs(tempCVolume-Constante)>Epsilon) - { - Bsup = c; - tempBsupVolume =tempCVolume; + } + else if((tempBinfVolume-Constante)*(tempCVolume-Constante)<0 && Abs(tempCVolume-Constante)>Epsilon) + { + Bsup = c; + tempBsupVolume =tempCVolume; - c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante))) - /((tempBsupVolume-Constante)-(tempBinfVolume-Constante)); + c = ((Binf*(tempBsupVolume-Constante))-(Bsup*(tempBinfVolume-Constante))) + /((tempBsupVolume-Constante)-(tempBinfVolume-Constante)); tempCVolume=CalculateVolume(c); - } - else - { - goto endMethod; - } - } + } + else + { + goto endMethod; + } + } goto endMethod; } diff --git a/src/BREPExport/BREPExport.cxx b/src/BREPExport/BREPExport.cxx index b8902150b..154d4986f 100644 --- a/src/BREPExport/BREPExport.cxx +++ b/src/BREPExport/BREPExport.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: BREPExport.cxx -// Created: Wed May 19 13:10:05 2004 -// Author: Pavel TELKOV -// +// File: BREPExport.cxx +// Created: Wed May 19 13:10:05 2004 +// Author: Pavel TELKOV +// // #include "utilities.h" diff --git a/src/BREPImport/BREPImport.cxx b/src/BREPImport/BREPImport.cxx index 79cc2b648..cb7d8692e 100644 --- a/src/BREPImport/BREPImport.cxx +++ b/src/BREPImport/BREPImport.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: BREPImport.cxx -// Created: Wed May 19 14:29:52 2004 -// Author: Pavel TELKOV -// +// File: BREPImport.cxx +// Created: Wed May 19 14:29:52 2004 +// Author: Pavel TELKOV +// // #include "utilities.h" @@ -63,7 +63,7 @@ BREPIMPORT_EXPORT TopoDS_Shape Import (const TCollection_AsciiString& theFileName, const TCollection_AsciiString& /*theFormatName*/, TCollection_AsciiString& theError, - const TDF_Label&) + const TDF_Label&) { MESSAGE("Import BREP from file " << theFileName); TopoDS_Shape aShape; diff --git a/src/BasicGUI/BasicGUI_ArcDlg.cxx b/src/BasicGUI/BasicGUI_ArcDlg.cxx index 626030ab5..59d131720 100644 --- a/src/BasicGUI/BasicGUI_ArcDlg.cxx +++ b/src/BasicGUI/BasicGUI_ArcDlg.cxx @@ -51,7 +51,7 @@ // TRUE to construct a modal dialog. //================================================================================= BasicGUI_ArcDlg::BasicGUI_ArcDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); @@ -198,7 +198,7 @@ void BasicGUI_ArcDlg::Init() connect( Group3Pnts3->LineEdit3, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_ARC" ) ); @@ -284,15 +284,15 @@ void BasicGUI_ArcDlg::SelectionIntoArgument() int anIndex = aMap(1); aName += QString(":vertex_%1").arg(anIndex); - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); - if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); - aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); - } - else - aSelectedObject = aFindedObject; // get Object from study + if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); + aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); + } + else + aSelectedObject = aFindedObject; // get Object from study } else // Global Selection { @@ -313,53 +313,53 @@ void BasicGUI_ArcDlg::SelectionIntoArgument() switch ( getConstructorId() ) { case 0: if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) { - myPoint1 = aSelectedObject; - if ( !myPoint1->_is_nil() && myPoint2->_is_nil() ) - Group3Pnts->PushButton2->click(); + myPoint1 = aSelectedObject; + if ( !myPoint1->_is_nil() && myPoint2->_is_nil() ) + Group3Pnts->PushButton2->click(); } else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) { - myPoint2 = aSelectedObject; - if ( !myPoint2->_is_nil() && myPoint3->_is_nil() ) - Group3Pnts->PushButton3->click(); + myPoint2 = aSelectedObject; + if ( !myPoint2->_is_nil() && myPoint3->_is_nil() ) + Group3Pnts->PushButton3->click(); } else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) { - myPoint3 = aSelectedObject; - if ( !myPoint3->_is_nil() && myPoint1->_is_nil() ) - Group3Pnts->PushButton1->click(); + myPoint3 = aSelectedObject; + if ( !myPoint3->_is_nil() && myPoint1->_is_nil() ) + Group3Pnts->PushButton1->click(); } break; case 1: if ( myEditCurrentArgument == Group3Pnts2->LineEdit1 ) { - myPoint1 = aSelectedObject; - if ( !myPoint1->_is_nil() && myPoint2->_is_nil() ) - Group3Pnts2->PushButton2->click(); + myPoint1 = aSelectedObject; + if ( !myPoint1->_is_nil() && myPoint2->_is_nil() ) + Group3Pnts2->PushButton2->click(); } else if ( myEditCurrentArgument == Group3Pnts2->LineEdit2 ) { - myPoint2 = aSelectedObject; - if ( !myPoint2->_is_nil() && myPoint3->_is_nil() ) - Group3Pnts2->PushButton3->click(); + myPoint2 = aSelectedObject; + if ( !myPoint2->_is_nil() && myPoint3->_is_nil() ) + Group3Pnts2->PushButton3->click(); } else if ( myEditCurrentArgument == Group3Pnts2->LineEdit3 ) { - myPoint3 = aSelectedObject; - if ( !myPoint3->_is_nil() && myPoint1->_is_nil() ) - Group3Pnts2->PushButton1->click(); + myPoint3 = aSelectedObject; + if ( !myPoint3->_is_nil() && myPoint1->_is_nil() ) + Group3Pnts2->PushButton1->click(); } break; case 2: if ( myEditCurrentArgument == Group3Pnts3->LineEdit1 ) { - myPoint1 = aSelectedObject; - if ( !myPoint1->_is_nil() && myPoint2->_is_nil() ) - Group3Pnts3->PushButton2->click(); + myPoint1 = aSelectedObject; + if ( !myPoint1->_is_nil() && myPoint2->_is_nil() ) + Group3Pnts3->PushButton2->click(); } else if ( myEditCurrentArgument == Group3Pnts3->LineEdit2 ) { - myPoint2 = aSelectedObject; - if ( !myPoint2->_is_nil() && myPoint3->_is_nil() ) - Group3Pnts3->PushButton3->click(); + myPoint2 = aSelectedObject; + if ( !myPoint2->_is_nil() && myPoint3->_is_nil() ) + Group3Pnts3->PushButton3->click(); } else if ( myEditCurrentArgument == Group3Pnts3->LineEdit3 ) { - myPoint3 = aSelectedObject; - if ( !myPoint3->_is_nil() && myPoint1->_is_nil() ) - Group3Pnts3->PushButton1->click(); + myPoint3 = aSelectedObject; + if ( !myPoint3->_is_nil() && myPoint1->_is_nil() ) + Group3Pnts3->PushButton1->click(); } break; } @@ -491,9 +491,9 @@ void BasicGUI_ArcDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), - this, - SLOT(SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), + this, + SLOT(SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -536,25 +536,25 @@ bool BasicGUI_ArcDlg::isValid( QString& msg ) case 0: { if (Group3Pnts->LineEdit1->text().trimmed().isEmpty() || - Group3Pnts->LineEdit2->text().trimmed().isEmpty() || - Group3Pnts->LineEdit3->text().trimmed().isEmpty()) - return false; + Group3Pnts->LineEdit2->text().trimmed().isEmpty() || + Group3Pnts->LineEdit3->text().trimmed().isEmpty()) + return false; break; } case 1: { if (Group3Pnts2->LineEdit1->text().trimmed().isEmpty() || - Group3Pnts2->LineEdit2->text().trimmed().isEmpty() || - Group3Pnts2->LineEdit3->text().trimmed().isEmpty()) - return false; + Group3Pnts2->LineEdit2->text().trimmed().isEmpty() || + Group3Pnts2->LineEdit3->text().trimmed().isEmpty()) + return false; break; } case 2: { if (Group3Pnts3->LineEdit1->text().trimmed().isEmpty() || - Group3Pnts3->LineEdit2->text().trimmed().isEmpty() || - Group3Pnts3->LineEdit3->text().trimmed().isEmpty()) - return false; + Group3Pnts3->LineEdit2->text().trimmed().isEmpty() || + Group3Pnts3->LineEdit3->text().trimmed().isEmpty()) + return false; break; } } @@ -577,8 +577,8 @@ bool BasicGUI_ArcDlg::execute( ObjectList& objects ) case 0: { if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) { - anObj = anOper->MakeArc( myPoint1, myPoint2, myPoint3 ); - res = true; + anObj = anOper->MakeArc( myPoint1, myPoint2, myPoint3 ); + res = true; } break; } @@ -586,16 +586,16 @@ bool BasicGUI_ArcDlg::execute( ObjectList& objects ) { bool Sense = Group3Pnts2->CheckButton1->isChecked(); if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) { - anObj = anOper->MakeArcCenter( myPoint1, myPoint2, myPoint3, Sense ); - res = true; + anObj = anOper->MakeArcCenter( myPoint1, myPoint2, myPoint3, Sense ); + res = true; } break; } case 2: { if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) ) { - anObj = anOper->MakeArcOfEllipse( myPoint1, myPoint2, myPoint3 ); - res = true; + anObj = anOper->MakeArcOfEllipse( myPoint1, myPoint2, myPoint3 ); + res = true; } break; } @@ -689,7 +689,7 @@ void BasicGUI_ArcDlg::ConstructorsClicked( int constructorId ) myEditCurrentArgument->setFocus(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); if ( CORBA::is_nil( myPoint1 ) ) SelectionIntoArgument(); diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx index 51e63bbe1..e92e92374 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.cxx +++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx @@ -50,7 +50,7 @@ // TRUE to construct a modal dialog. //================================================================================= BasicGUI_CircleDlg::BasicGUI_CircleDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CIRCLE_PV" ) ) ); @@ -250,7 +250,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId ) case 2: { GroupPntVecR->hide(); - Group3Pnts->hide(); + Group3Pnts->hide(); GroupCenter2Pnts->show(); myEditCurrentArgument = GroupCenter2Pnts->LineEdit1; @@ -276,7 +276,7 @@ void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId ) localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); displayPreview(); } @@ -353,16 +353,16 @@ void BasicGUI_CircleDlg::SelectionIntoArgument() else aName += QString( ":vertex_%1" ).arg( anIndex ); - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName ); + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName ); - if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); - aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); - } - else { - aSelectedObject = aFindedObject; // get Object from study - } + if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); + } + else { + aSelectedObject = aFindedObject; // get Object from study + } } else { // Global Selection if ( aShape.ShapeType() != aNeedType ) { @@ -382,42 +382,42 @@ void BasicGUI_CircleDlg::SelectionIntoArgument() if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) { myPoint = aSelectedObject; if ( !myPoint->_is_nil() && myDir->_is_nil() ) - GroupPntVecR->PushButton2->click(); + GroupPntVecR->PushButton2->click(); } else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) { myDir = aSelectedObject; if ( !myDir->_is_nil() && myPoint->_is_nil() ) - GroupPntVecR->PushButton1->click(); + GroupPntVecR->PushButton1->click(); } else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) { myPoint1 = aSelectedObject; if ( !myPoint1->_is_nil() && myPoint2->_is_nil() ) - Group3Pnts->PushButton2->click(); + Group3Pnts->PushButton2->click(); } else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) { myPoint2 = aSelectedObject; if ( !myPoint2->_is_nil() && myPoint3->_is_nil() ) - Group3Pnts->PushButton3->click(); + Group3Pnts->PushButton3->click(); } else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) { myPoint3 = aSelectedObject; if ( !myPoint3->_is_nil() && myPoint1->_is_nil() ) - Group3Pnts->PushButton1->click(); + Group3Pnts->PushButton1->click(); } else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit1 ) { myPoint4 = aSelectedObject; if ( !myPoint4->_is_nil() && myPoint5->_is_nil() ) - GroupCenter2Pnts->PushButton2->click(); + GroupCenter2Pnts->PushButton2->click(); } else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit2 ) { myPoint5 = aSelectedObject; if ( !myPoint5->_is_nil() && myPoint6->_is_nil() ) - GroupCenter2Pnts->PushButton3->click(); + GroupCenter2Pnts->PushButton3->click(); } else if ( myEditCurrentArgument == GroupCenter2Pnts->LineEdit3 ) { myPoint6 = aSelectedObject; if ( !myPoint6->_is_nil() && myPoint4->_is_nil() ) - GroupCenter2Pnts->PushButton1->click(); + GroupCenter2Pnts->PushButton1->click(); } } @@ -543,7 +543,7 @@ void BasicGUI_CircleDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.cxx b/src/BasicGUI/BasicGUI_EllipseDlg.cxx index a57188c08..549074327 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.cxx +++ b/src/BasicGUI/BasicGUI_EllipseDlg.cxx @@ -52,7 +52,7 @@ // TRUE to construct a modal dialog. //================================================================================= BasicGUI_EllipseDlg::BasicGUI_EllipseDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_ELLIPSE_PV" ) ) ); @@ -153,7 +153,7 @@ void BasicGUI_EllipseDlg::Init() connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_ELLIPSE" ) ); @@ -256,16 +256,16 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument() else aName += QString(":vertex_%1").arg(anIndex); - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); - if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study + if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); - } - else { - aSelectedObject = aFindedObject; // get Object from study - } + } + else { + aSelectedObject = aFindedObject; // get Object from study + } } else { // Global Selection if (aShape.ShapeType() != aNeedType) { @@ -285,17 +285,17 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument() if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) { myPoint = aSelectedObject; if ( !myPoint->_is_nil() && myDir->_is_nil() ) - GroupPoints->PushButton2->click(); + GroupPoints->PushButton2->click(); } else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) { myDir = aSelectedObject; if ( !myDir->_is_nil() && myMajor->_is_nil() ) - GroupPoints->PushButton3->click(); + GroupPoints->PushButton3->click(); } else if ( myEditCurrentArgument == GroupPoints->LineEdit3 ) { myMajor = aSelectedObject; if ( !myMajor->_is_nil() && myPoint->_is_nil() ) - GroupPoints->PushButton1->click(); + GroupPoints->PushButton1->click(); } } @@ -372,7 +372,7 @@ void BasicGUI_EllipseDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; diff --git a/src/BasicGUI/BasicGUI_LineDlg.cxx b/src/BasicGUI/BasicGUI_LineDlg.cxx index ed2ad5eb7..f094ed9a2 100644 --- a/src/BasicGUI/BasicGUI_LineDlg.cxx +++ b/src/BasicGUI/BasicGUI_LineDlg.cxx @@ -50,7 +50,7 @@ // TRUE to construct a modal dialog. //================================================================================= BasicGUI_LineDlg::BasicGUI_LineDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_LINE_2P" ) ) ); @@ -124,7 +124,7 @@ void BasicGUI_LineDlg::Init() localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); GroupPoints->PushButton1->setDown(true); - + /* signals and slots connections */ connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ); connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ); @@ -145,7 +145,7 @@ void BasicGUI_LineDlg::Init() connect( GroupFaces->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_LINE" ) ); @@ -258,7 +258,7 @@ void BasicGUI_LineDlg::SelectionIntoArgument() QString aName = GEOMBase::GetName( aSelectedObject ); TopAbs_ShapeEnum aNeedType = TopAbs_VERTEX; if ( myEditCurrentArgument == GroupFaces->LineEdit1 || - myEditCurrentArgument == GroupFaces->LineEdit2 ) + myEditCurrentArgument == GroupFaces->LineEdit2 ) aNeedType = TopAbs_FACE; TopoDS_Shape aShape; @@ -266,22 +266,22 @@ void BasicGUI_LineDlg::SelectionIntoArgument() TColStd_IndexedMapOfInteger aMap; aSelMgr->GetIndexes(aSelList.First(), aMap); if ( aMap.Extent() == 1 ) { // Local Selection - int anIndex = aMap( 1 ); + int anIndex = aMap( 1 ); if ( aNeedType == TopAbs_FACE ) aName += QString( ":face_%1" ).arg( anIndex ); else aName += QString( ":vertex_%1" ).arg( anIndex ); - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName ); + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName ); - if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); - aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); - } - else { - aSelectedObject = aFindedObject; // get Object from study - } + if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); + } + else { + aSelectedObject = aFindedObject; // get Object from study + } } else { // Global Selection if ( aShape.ShapeType() != aNeedType ) { @@ -301,22 +301,22 @@ void BasicGUI_LineDlg::SelectionIntoArgument() if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) { myPoint1 = aSelectedObject; if ( !myPoint1->_is_nil() && myPoint2->_is_nil() ) - GroupPoints->PushButton2->click(); + GroupPoints->PushButton2->click(); } else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) { myPoint2 = aSelectedObject; if ( !myPoint2->_is_nil() && myPoint1->_is_nil() ) - GroupPoints->PushButton1->click(); + GroupPoints->PushButton1->click(); } else if ( myEditCurrentArgument == GroupFaces->LineEdit1 ) { myFace1 = aSelectedObject; if ( !myFace1->_is_nil() && myFace2->_is_nil() ) - GroupFaces->PushButton2->click(); + GroupFaces->PushButton2->click(); } else if ( myEditCurrentArgument == GroupFaces->LineEdit2 ) { myFace2 = aSelectedObject; if ( !myFace2->_is_nil() && myFace1->_is_nil() ) - GroupFaces->PushButton1->click(); + GroupFaces->PushButton1->click(); } } @@ -393,7 +393,7 @@ void BasicGUI_LineDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } diff --git a/src/BasicGUI/BasicGUI_MarkerDlg.cxx b/src/BasicGUI/BasicGUI_MarkerDlg.cxx index 6c1ff31b9..9bc0adf13 100644 --- a/src/BasicGUI/BasicGUI_MarkerDlg.cxx +++ b/src/BasicGUI/BasicGUI_MarkerDlg.cxx @@ -57,7 +57,7 @@ //================================================================================= BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* theParent ) : GEOMBase_Skeleton( theGeometryGUI, theParent, false, - Qt::WindowTitleHint | Qt::WindowSystemMenuHint ) + Qt::WindowTitleHint | Qt::WindowSystemMenuHint ) { QPixmap iconCS1 ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER" ) ) ); QPixmap iconCS2 ( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_MARKER2" ) ) ); @@ -197,7 +197,7 @@ void BasicGUI_MarkerDlg::Init() connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( onApply() ) ); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) ); initName( tr( "LCS_NAME" ) ); @@ -304,7 +304,7 @@ void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId ) resize( minimumSizeHint() ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( onSelectionDone() ) ); + this, SLOT( onSelectionDone() ) ); onSelectionDone(); } @@ -355,37 +355,37 @@ void BasicGUI_MarkerDlg::onSelectionDone0() if ( aSelectedObj->GetType() == GEOM_MARKER && aShape.ShapeType() == TopAbs_FACE ) { TopoDS_Face aFace = TopoDS::Face( aShape ); Handle(Geom_Plane) aPlane = Handle(Geom_Plane)::DownCast( BRep_Tool::Surface( aFace ) ); - + if ( !aPlane.IsNull() ) { gp_Ax3 anAx3 = aPlane->Pln().Position(); gp_Pnt aLoc = anAx3.Location(); gp_Dir aXDir = anAx3.XDirection(); gp_Dir aYDir = anAx3.YDirection(); - + myData[ X ]->setValue( aLoc.X() ); myData[ Y ]->setValue( aLoc.Y() ); myData[ Z ]->setValue( aLoc.Z() ); - + myData[ DX1 ]->setValue( aXDir.X() ); myData[ DY1 ]->setValue( aXDir.Y() ); myData[ DZ1 ]->setValue( aXDir.Z() ); - + myData[ DX2 ]->setValue( aYDir.X() ); myData[ DY2 ]->setValue( aYDir.Y() ); myData[ DZ2 ]->setValue( aYDir.Z() ); - aSelMgr->clearSelected(); + aSelMgr->clearSelected(); } } else { - TColStd_IndexedMapOfInteger aMap; - aSelMgr->GetIndexes( anIO, aMap ); - if ( aMap.Extent() == 1 ) { // Local Selection - int anIndex = aMap( 1 ); - TopTools_IndexedMapOfShape aShapes; - TopExp::MapShapes( aShape, aShapes ); - aShape = aShapes.FindKey( anIndex ); - aSelMgr->clearSelected(); // ??? - } + TColStd_IndexedMapOfInteger aMap; + aSelMgr->GetIndexes( anIO, aMap ); + if ( aMap.Extent() == 1 ) { // Local Selection + int anIndex = aMap( 1 ); + TopTools_IndexedMapOfShape aShapes; + TopExp::MapShapes( aShape, aShapes ); + aShape = aShapes.FindKey( anIndex ); + aSelMgr->clearSelected(); // ??? + } if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) { gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); @@ -432,11 +432,11 @@ void BasicGUI_MarkerDlg::onSelectionDone() CORBA::Double Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz, Yx, Yy, Yz; Ox = Oy = Oz = Zx = Zy = Xy = Xz = Yx = Yz = 0; Zz = Xx = Yy = 1.; - + GEOM::GEOM_IMeasureOperations_ptr aMeasureOp = myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() ); aMeasureOp->GetPosition( aSelectedObj, Ox, Oy, Oz, Zx, Zy, Zz, Xx, Xy, Xz ); - + // Calculate Y direction if ( aMeasureOp->IsDone() ) { gp_Pnt aPnt ( Ox, Oy, Oz ); @@ -469,7 +469,7 @@ void BasicGUI_MarkerDlg::onSelectionDone() TopAbs_ShapeEnum aNeedType = TopAbs_EDGE; if ( myEditCurrentArgument == Group2->LineEdit1 ) aNeedType = TopAbs_VERTEX; - + TColStd_IndexedMapOfInteger aMap; aSelMgr->GetIndexes( anIO, aMap ); @@ -486,60 +486,60 @@ void BasicGUI_MarkerDlg::onSelectionDone() } if ( myEditCurrentArgument == Group2->LineEdit1 ) { - if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) { - gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); - myData[ X ]->setValue( aPnt.X() ); - myData[ Y ]->setValue( aPnt.Y() ); - myData[ Z ]->setValue( aPnt.Z() ); - myEditCurrentArgument->setText( aName ); - if (Group2->LineEdit2->text() == "") - Group2->PushButton2->click(); - } - else { - myData[ X ]->setValue( 0 ); - myData[ Y ]->setValue( 0 ); - myData[ Z ]->setValue( 0 ); - } - } - else if (myEditCurrentArgument == Group2->LineEdit2) { - if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) { - gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) ); - gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) ); - gp_Dir aDir( gp_Vec( aP1, aP2 ) ); - - myData[ DX1 ]->setValue( aDir.X() ); - myData[ DY1 ]->setValue( aDir.Y() ); - myData[ DZ1 ]->setValue( aDir.Z() ); - myEditCurrentArgument->setText( aName ); - if (Group2->LineEdit3->text() == "") - Group2->PushButton3->click(); - } - else { - myData[ DX1 ]->setValue( 0 ); - myData[ DY1 ]->setValue( 0 ); - myData[ DZ1 ]->setValue( 0 ); - } - } - else if ( myEditCurrentArgument == Group2->LineEdit3 ) { - if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) { - gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) ); - gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) ); - gp_Dir aDir(gp_Vec( aP1, aP2 )); - - myData[ DX2 ]->setValue( aDir.X() ); - myData[ DY2 ]->setValue( aDir.Y() ); - myData[ DZ2 ]->setValue( aDir.Z() ); - myEditCurrentArgument->setText( aName ); - if (Group2->LineEdit1->text() == "") - Group2->PushButton1->click(); - } - else { - myData[ DX2 ]->setValue( 0 ); - myData[ DY2 ]->setValue( 0 ); - myData[ DZ2 ]->setValue( 0 ); - } - } - } + if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) { + gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); + myData[ X ]->setValue( aPnt.X() ); + myData[ Y ]->setValue( aPnt.Y() ); + myData[ Z ]->setValue( aPnt.Z() ); + myEditCurrentArgument->setText( aName ); + if (Group2->LineEdit2->text() == "") + Group2->PushButton2->click(); + } + else { + myData[ X ]->setValue( 0 ); + myData[ Y ]->setValue( 0 ); + myData[ Z ]->setValue( 0 ); + } + } + else if (myEditCurrentArgument == Group2->LineEdit2) { + if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) { + gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) ); + gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) ); + gp_Dir aDir( gp_Vec( aP1, aP2 ) ); + + myData[ DX1 ]->setValue( aDir.X() ); + myData[ DY1 ]->setValue( aDir.Y() ); + myData[ DZ1 ]->setValue( aDir.Z() ); + myEditCurrentArgument->setText( aName ); + if (Group2->LineEdit3->text() == "") + Group2->PushButton3->click(); + } + else { + myData[ DX1 ]->setValue( 0 ); + myData[ DY1 ]->setValue( 0 ); + myData[ DZ1 ]->setValue( 0 ); + } + } + else if ( myEditCurrentArgument == Group2->LineEdit3 ) { + if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) { + gp_Pnt aP1 = BRep_Tool::Pnt( TopExp::FirstVertex( TopoDS::Edge( aShape ) ) ); + gp_Pnt aP2 = BRep_Tool::Pnt( TopExp::LastVertex( TopoDS::Edge( aShape ) ) ); + gp_Dir aDir(gp_Vec( aP1, aP2 )); + + myData[ DX2 ]->setValue( aDir.X() ); + myData[ DY2 ]->setValue( aDir.Y() ); + myData[ DZ2 ]->setValue( aDir.Z() ); + myEditCurrentArgument->setText( aName ); + if (Group2->LineEdit1->text() == "") + Group2->PushButton1->click(); + } + else { + myData[ DX2 ]->setValue( 0 ); + myData[ DY2 ]->setValue( 0 ); + myData[ DZ2 ]->setValue( 0 ); + } + } + } } } } @@ -559,19 +559,19 @@ void BasicGUI_MarkerDlg::onSelectionDone() } else if ( getConstructorId() == 2 ) { if ( myEditCurrentArgument == Group2->LineEdit1 ) { - myData[ X ]->setValue( 0 ); - myData[ Y ]->setValue( 0 ); - myData[ Z ]->setValue( 0 ); + myData[ X ]->setValue( 0 ); + myData[ Y ]->setValue( 0 ); + myData[ Z ]->setValue( 0 ); } else if ( myEditCurrentArgument == Group2->LineEdit2 ) { - myData[ DX1 ]->setValue( 0 ); - myData[ DY1 ]->setValue( 0 ); - myData[ DZ1 ]->setValue( 0 ); + myData[ DX1 ]->setValue( 0 ); + myData[ DY1 ]->setValue( 0 ); + myData[ DZ1 ]->setValue( 0 ); } else if ( myEditCurrentArgument == Group2->LineEdit3 ) { - myData[ DX2 ]->setValue( 0 ); - myData[ DY2 ]->setValue( 0 ); - myData[ DZ2 ]->setValue( 0 ); + myData[ DX2 ]->setValue( 0 ); + myData[ DY2 ]->setValue( 0 ); + myData[ DZ2 ]->setValue( 0 ); } } } @@ -645,7 +645,7 @@ void BasicGUI_MarkerDlg::onActivate() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( onSelectionDone() ) ); + this, SLOT( onSelectionDone() ) ); ConstructorsClicked( getConstructorId() ); } @@ -722,14 +722,14 @@ bool BasicGUI_MarkerDlg::execute( ObjectList& objects ) { GEOM::GEOM_IBasicOperations_var anOper = GEOM::GEOM_IBasicOperations::_narrow( getOperation() ); GEOM::GEOM_Object_var anObj = anOper->MakeMarker( myData[ X ]->value(), - myData[ Y ]->value(), - myData[ Z ]->value(), - myData[ DX1 ]->value(), - myData[ DY1 ]->value(), - myData[ DZ1 ]->value(), - myData[ DX2 ]->value(), - myData[ DY2 ]->value(), - myData[ DZ2 ]->value() ); + myData[ Y ]->value(), + myData[ Z ]->value(), + myData[ DX1 ]->value(), + myData[ DY1 ]->value(), + myData[ DZ1 ]->value(), + myData[ DX2 ]->value(), + myData[ DY2 ]->value(), + myData[ DZ2 ]->value() ); QStringList aParameters; aParameters<text(); aParameters<text(); diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx index feca255ea..075a0c86b 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx @@ -53,7 +53,7 @@ // TRUE to construct a modal dialog. //================================================================================= BasicGUI_PlaneDlg::BasicGUI_PlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_PLANE_PV" ) ) ); @@ -366,7 +366,7 @@ void BasicGUI_PlaneDlg::ConstructorsClicked( int constructorId ) myEditCurrentArgument->setFocus(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); displayPreview(); } @@ -465,16 +465,16 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument() else aName += QString( ":vertex_%1" ).arg( anIndex ); - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName ); + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName ); - if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); - aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); - } - else { - aSelectedObject = aFindedObject; // get Object from study - } + if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); + } + else { + aSelectedObject = aFindedObject; // get Object from study + } } else { // Global Selection if ( aShape.ShapeType() != aNeedType ) { @@ -489,50 +489,50 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument() /* if (!aSelectedObject->_is_nil()) { // clear selection if something selected globalSelection(); if ( myEditCurrentArgument == GroupFace->LineEdit1 ) { - TColStd_MapOfInteger aMap; - aMap.Add( GEOM_PLANE ); - aMap.Add( GEOM_MARKER ); - globalSelection( aMap ); + TColStd_MapOfInteger aMap; + aMap.Add( GEOM_PLANE ); + aMap.Add( GEOM_MARKER ); + globalSelection( aMap ); } else - localSelection( GEOM::GEOM_Object::_nil(), aNeedType ); - }*/ + localSelection( GEOM::GEOM_Object::_nil(), aNeedType ); + }*/ if ( myEditCurrentArgument == GroupPntDir->LineEdit1 ) { myPoint = aSelectedObject; if ( !myPoint->_is_nil() && myDir->_is_nil() ) - GroupPntDir->PushButton2->click(); + GroupPntDir->PushButton2->click(); } else if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ) { myDir = aSelectedObject; if ( !myDir->_is_nil() && myPoint->_is_nil() ) - GroupPntDir->PushButton1->click(); + GroupPntDir->PushButton1->click(); } else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) { myPoint1 = aSelectedObject; if ( !myPoint1->_is_nil() && myPoint2->_is_nil() ) - Group3Pnts->PushButton2->click(); + Group3Pnts->PushButton2->click(); } else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) { myPoint2 = aSelectedObject; if ( !myPoint2->_is_nil() && myPoint3->_is_nil() ) - Group3Pnts->PushButton3->click(); + Group3Pnts->PushButton3->click(); } else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) { myPoint3 = aSelectedObject; if ( !myPoint3->_is_nil() && myPoint1->_is_nil() ) - Group3Pnts->PushButton1->click(); + Group3Pnts->PushButton1->click(); } else if ( myEditCurrentArgument == GroupFace->LineEdit1 ) myFace = aSelectedObject; else if ( myEditCurrentArgument == Group2Vec->LineEdit1 ) { myVec1 = aSelectedObject; if ( !myVec1->_is_nil() && myVec2->_is_nil() ) - Group2Vec->PushButton2->click(); + Group2Vec->PushButton2->click(); } else if ( myEditCurrentArgument == Group2Vec->LineEdit2 ) { myVec2 = aSelectedObject; if ( !myVec2->_is_nil() && myVec1->_is_nil() ) - Group2Vec->PushButton1->click(); + Group2Vec->PushButton1->click(); } else if ( myEditCurrentArgument == GroupLCS->LineEdit1 ) myLCS = aSelectedObject; @@ -660,7 +660,7 @@ void BasicGUI_PlaneDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); SelectionIntoArgument(); @@ -741,7 +741,7 @@ GEOM::GEOM_IOperations_ptr BasicGUI_PlaneDlg::createOperation() //================================================================================= static bool isEqual( const GEOM::GEOM_Object_var& thePnt1, const GEOM::GEOM_Object_var& thePnt2 ) { - return thePnt1->_is_equivalent( thePnt2 ); + return thePnt1->_is_equivalent( thePnt2 ); } //================================================================================= diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index 972c39dfa..b2f79aa23 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -70,7 +70,7 @@ // TRUE to construct a modal dialog. //================================================================================= BasicGUI_PointDlg::BasicGUI_PointDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_POINT") ) ); @@ -275,7 +275,7 @@ void BasicGUI_PointDlg::Init() connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged() ), - this, SLOT(SelectionIntoArgument() ) ); + this, SLOT(SelectionIntoArgument() ) ); initName( tr( "GEOM_VERTEX" ) ); @@ -496,18 +496,18 @@ void BasicGUI_PointDlg::SelectionIntoArgument() else aName += QString( ":vertex_%1" ).arg( anIndex ); - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); - - if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); + + if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); - aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); - } - else { - aSelectedObject = aFindedObject; // get Object from study - } - GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ); + aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); + } + else { + aSelectedObject = aFindedObject; // get Object from study + } + GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ); } else { // Global Selection if ( aShape.ShapeType() != aNeedType ) { @@ -519,7 +519,7 @@ void BasicGUI_PointDlg::SelectionIntoArgument() } if ( aShape.IsNull() || aShape.ShapeType() != aNeedType) - return; + return; if ( id == GEOM_POINT_XYZ ) { gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); @@ -536,24 +536,24 @@ void BasicGUI_PointDlg::SelectionIntoArgument() GroupOnCurve->LineEdit1->setText( aName ); } else if ( id == GEOM_POINT_INTINT ) { - myEditCurrentArgument->setText( aName ); - globalSelection(); - localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE ); + myEditCurrentArgument->setText( aName ); + globalSelection(); + localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE ); if ( myEditCurrentArgument == GroupLineIntersection->LineEdit1 ) { myLine1 = aSelectedObject; - if ( !myLine1->_is_nil() && myLine2->_is_nil() ) - GroupLineIntersection->PushButton2->click(); + if ( !myLine1->_is_nil() && myLine2->_is_nil() ) + GroupLineIntersection->PushButton2->click(); } else if ( myEditCurrentArgument == GroupLineIntersection->LineEdit2 ) { myLine2 = aSelectedObject; - if ( !myLine2->_is_nil() && myLine1->_is_nil() ) - GroupLineIntersection->PushButton1->click(); + if ( !myLine2->_is_nil() && myLine1->_is_nil() ) + GroupLineIntersection->PushButton1->click(); } } else if ( id == GEOM_POINT_SURF ) { - myFace = aSelectedObject; - GroupOnSurface->LineEdit1->setText( aName ); + myFace = aSelectedObject; + GroupOnSurface->LineEdit1->setText( aName ); } } } @@ -648,7 +648,7 @@ void BasicGUI_PointDlg::ActivateThisDialog( ) GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -869,9 +869,9 @@ bool BasicGUI_PointDlg::execute( ObjectList& objects ) const int id = getConstructorId(); if(!anObj->_is_nil() && !IsPreview() && (id == GEOM_POINT_XYZ || - id == GEOM_POINT_REF || - id == GEOM_POINT_EDGE || - id == GEOM_POINT_SURF) ) { + id == GEOM_POINT_REF || + id == GEOM_POINT_EDGE || + id == GEOM_POINT_SURF) ) { anObj->SetParameters(aParameters.join(":").toLatin1().constData()); } diff --git a/src/BasicGUI/BasicGUI_VectorDlg.cxx b/src/BasicGUI/BasicGUI_VectorDlg.cxx index 829f636da..ff085f0fb 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.cxx +++ b/src/BasicGUI/BasicGUI_VectorDlg.cxx @@ -50,7 +50,7 @@ // TRUE to construct a modal dialog. //================================================================================= BasicGUI_VectorDlg::BasicGUI_VectorDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_VECTOR_2P" ) ) ); @@ -161,7 +161,7 @@ void BasicGUI_VectorDlg::Init() connect( GroupDimensions->CheckButton1, SIGNAL( stateChanged( int ) ), this, SLOT( ReverseVector( int ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr("GEOM_VECTOR") ); @@ -208,7 +208,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId ) globalSelection(); // close local contexts, if any localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); break; } case 1: @@ -297,16 +297,16 @@ void BasicGUI_VectorDlg::SelectionIntoArgument() int anIndex = aMap(1); aName += QString(":vertex_%1").arg(anIndex); - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); - - if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); - aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); - } - else { - aSelectedObject = aFindedObject; // get Object from study - } + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); + + if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); + aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); + } + else { + aSelectedObject = aFindedObject; // get Object from study + } } else { // Global Selection if (aShape.ShapeType() != TopAbs_VERTEX) { @@ -326,12 +326,12 @@ void BasicGUI_VectorDlg::SelectionIntoArgument() if (myEditCurrentArgument == GroupPoints->LineEdit1) { myPoint1 = aSelectedObject; if (!myPoint1->_is_nil() && myPoint2->_is_nil()) - GroupPoints->PushButton2->click(); + GroupPoints->PushButton2->click(); } else if (myEditCurrentArgument == GroupPoints->LineEdit2) { myPoint2 = aSelectedObject; if (!myPoint2->_is_nil() && myPoint1->_is_nil()) - GroupPoints->PushButton1->click(); + GroupPoints->PushButton1->click(); } } @@ -389,7 +389,7 @@ void BasicGUI_VectorDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); - + ConstructorsClicked( getConstructorId() ); } diff --git a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx index 5fd3838c9..e3207ab76 100644 --- a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx @@ -59,7 +59,7 @@ // TRUE to construct a modal dialog. //================================================================================= BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); @@ -174,7 +174,7 @@ void BasicGUI_WorkingPlaneDlg::Init() connect( myReverseCB, SIGNAL( clicked() ), this, SLOT( onReverse() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_WPLANE" ) ); @@ -322,7 +322,7 @@ void BasicGUI_WorkingPlaneDlg::SelectionIntoArgument() if ( myEditCurrentArgument == Group1->LineEdit1 ) myFace = aSelectedObject; else if ( myEditCurrentArgument == Group2->LineEdit1 || - myEditCurrentArgument == Group2->LineEdit2 ) { + myEditCurrentArgument == Group2->LineEdit2 ) { if ( aRes && !aSelectedObject->_is_nil() ) { TopoDS_Shape aShape; if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) { @@ -332,18 +332,18 @@ void BasicGUI_WorkingPlaneDlg::SelectionIntoArgument() int anIndex = aMap( 1 ); aName = aName + ":edge_" + QString::number( anIndex ); - GEOM::GEOM_IShapesOperations_var aShapesOp = - getGeomEngine()->GetIShapesOperations( getStudyId() ); - if ( myEditCurrentArgument == Group2->LineEdit1 ) - myVectX = aShapesOp->GetSubShape( aSelectedObject, anIndex ); - else - myVectZ = aShapesOp->GetSubShape( aSelectedObject, anIndex ); + GEOM::GEOM_IShapesOperations_var aShapesOp = + getGeomEngine()->GetIShapesOperations( getStudyId() ); + if ( myEditCurrentArgument == Group2->LineEdit1 ) + myVectX = aShapesOp->GetSubShape( aSelectedObject, anIndex ); + else + myVectZ = aShapesOp->GetSubShape( aSelectedObject, anIndex ); } else { - if ( aShape.ShapeType() != TopAbs_EDGE ) { - aSelectedObject = GEOM::GEOM_Object::_nil(); - aName = ""; - } + if ( aShape.ShapeType() != TopAbs_EDGE ) { + aSelectedObject = GEOM::GEOM_Object::_nil(); + aName = ""; + } } aSelMgr->clearSelected(); } @@ -437,7 +437,7 @@ void BasicGUI_WorkingPlaneDlg::ActivateThisDialog( ) { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication( ) ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -476,7 +476,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview ) if ( id == 0 ) { // by planar face selection if ( CORBA::is_nil( myFace ) ) { if ( !showPreview ) - showError( "Face has to be selected" ); + showError( "Face has to be selected" ); return false; } @@ -498,14 +498,14 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview ) } else { if ( !showPreview ) - showError( "Wrong shape selected (has to be a planar face)" ); + showError( "Wrong shape selected (has to be a planar face)" ); return false; } } else if ( id == 1 ) { // by two vectors (Ox & Oz) if ( CORBA::is_nil( myVectX ) || CORBA::is_nil( myVectZ ) ) { if ( !showPreview ) - showError( "Two vectors have to be selected" ); + showError( "Two vectors have to be selected" ); return false; } @@ -514,9 +514,9 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview ) gp_Vec aVX, aVZ; if ( !GEOMBase::GetShape( myVectX, aVectX, TopAbs_EDGE ) || - !GEOMBase::GetShape( myVectZ, aVectZ, TopAbs_EDGE ) ) { + !GEOMBase::GetShape( myVectZ, aVectZ, TopAbs_EDGE ) ) { if ( !showPreview ) - showError( "Wrong shape selected (two vectors(edges) have to be selected)" ); + showError( "Wrong shape selected (two vectors(edges) have to be selected)" ); return false; } @@ -525,12 +525,12 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview ) if ( VX1.IsNull() || VX2.IsNull() ) { if ( !showPreview ) - showError( "Bad OX vector" ); + showError( "Bad OX vector" ); return false; } if ( VZ1.IsNull() || VZ2.IsNull() ) { if ( !showPreview ) - showError( "Bad OZ vector" ); + showError( "Bad OZ vector" ); return false; } @@ -539,12 +539,12 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview ) if ( aVX.Magnitude() < Precision::Confusion() ) { if ( !showPreview ) - showError( "Bad OX vector" ); + showError( "Bad OX vector" ); return false; } if ( aVZ.Magnitude() < Precision::Confusion() ) { if ( !showPreview ) - showError( "Bad OZ vector" ); + showError( "Bad OZ vector" ); return false; } @@ -553,7 +553,7 @@ bool BasicGUI_WorkingPlaneDlg::updateWPlane( const bool showPreview ) if ( aDirX.IsParallel( aDirZ, Precision::Angular() ) ) { if ( !showPreview ) - showError( "Parallel vectors selected" ); + showError( "Parallel vectors selected" ); return false; } diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx index 6db2e767a..6f8983e59 100644 --- a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx @@ -121,7 +121,7 @@ void BlocksGUI_ExplodeDlg::Init() connect( myGrp1->CheckBox1, SIGNAL( stateChanged( int ) ), this, SLOT( SubShapeToggled() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); myConstructorId = -1; ConstructorsClicked( 0 ); @@ -179,10 +179,10 @@ bool BlocksGUI_ExplodeDlg::ClickOnApply() // More than 30 subshapes : ask confirmation if ( myNbBlocks > 30 ) { if ( SUIT_MessageBox::warning( this, - tr( "GEOM_CONFIRM" ), - tr( "GEOM_CONFIRM_INFO" ).arg( myNbBlocks ), - tr( "GEOM_BUT_EXPLODE" ), - tr( "GEOM_BUT_CANCEL" ) ) != 0 ) + tr( "GEOM_CONFIRM" ), + tr( "GEOM_CONFIRM_INFO" ).arg( myNbBlocks ), + tr( "GEOM_BUT_EXPLODE" ), + tr( "GEOM_BUT_CANCEL" ) ) != 0 ) return false; /* aborted */ } } @@ -249,7 +249,7 @@ void BlocksGUI_ExplodeDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); activateSelection(); } @@ -297,13 +297,13 @@ void BlocksGUI_ExplodeDlg::activateSelection() if ( isAllSubShapes() ) { // Sub-shapes selection disabled disconnect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); globalSelection( GEOM_ALLSHAPES ); if ( myObject->_is_nil() ) { SelectionIntoArgument(); } connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); } else { displayPreview( true, true, false ); @@ -334,9 +334,9 @@ void BlocksGUI_ExplodeDlg::updateButtonState() else { GEOM::GEOM_IBlocksOperations_var anOper = GEOM::GEOM_IBlocksOperations::_narrow(getOperation()); bool isOnlyBlocks = anOper->IsCompoundOfBlocks( myObject, - myGrp1->SpinBox1->value(), - myGrp1->SpinBox2->value(), - myNbBlocks ); + myGrp1->SpinBox1->value(), + myGrp1->SpinBox2->value(), + myNbBlocks ); if ( isOnlyBlocks ) myGrp1->TextBrowser1->setText( tr( "GEOM_NB_BLOCKS_NO_OTHERS" ).arg( myNbBlocks ) ); else @@ -406,8 +406,8 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects ) switch ( getConstructorId() ) { case 0: aList = anOper->ExplodeCompoundOfBlocks( myObject, - myGrp1->SpinBox1->value(), - myGrp1->SpinBox2->value() ); + myGrp1->SpinBox1->value(), + myGrp1->SpinBox2->value() ); break; } @@ -452,7 +452,7 @@ bool BlocksGUI_ExplodeDlg::execute( ObjectList& objects ) CORBA::String_var objStr = myGeomGUI->getApp()->orb()->object_to_string( *anIter ); if ( selected.contains( QString( objStr.in() ) ) ) { - if ( !IsPreview() ) + if ( !IsPreview() ) (*anIter)->SetParameters(aParameters.join(":").toLatin1().constData()); objects.push_back( *anIter ); } diff --git a/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx b/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx index 83989caa9..2ebcdda45 100644 --- a/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_PropagateDlg.cxx @@ -267,7 +267,7 @@ void BlocksGUI_PropagateDlg::activateSelection() SelectionIntoArgument(); } connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); } //================================================================ diff --git a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx index b5d681c4e..27143ade1 100644 --- a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx @@ -581,8 +581,8 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects) switch (getConstructorId()) { case 0: anObj = anOper->MakeMultiTransformation1D(myShape, - myFaces[Face1], myFaces[Face2], - mySpinBox[SpinBox1]->value()); + myFaces[Face1], myFaces[Face2], + mySpinBox[SpinBox1]->value()); if (!anObj->_is_nil() && !IsPreview()) { QStringList aParameters; @@ -594,10 +594,10 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects) break; case 1: anObj = anOper->MakeMultiTransformation2D (myShape, - myFaces[Face1U], myFaces[Face2U], - mySpinBox[SpinBox2U]->value(), - myFaces[Face1V], myFaces[Face2V], - mySpinBox[SpinBox2V]->value()); + myFaces[Face1U], myFaces[Face2U], + mySpinBox[SpinBox2U]->value(), + myFaces[Face1V], myFaces[Face2V], + mySpinBox[SpinBox2V]->value()); if (!anObj->_is_nil() && !IsPreview()) { QStringList aParameters; diff --git a/src/BooleanGUI/BooleanGUI.cxx b/src/BooleanGUI/BooleanGUI.cxx index 4284340e3..c05c03462 100644 --- a/src/BooleanGUI/BooleanGUI.cxx +++ b/src/BooleanGUI/BooleanGUI.cxx @@ -55,7 +55,7 @@ bool BooleanGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) { getGeometryGUI()->EmitSignalDeactivateDialog(); - int anOperation = 0; + int anOperation = 0; if ( theCommandID == 5011 ) anOperation = FUSE; else if ( theCommandID == 5012 ) diff --git a/src/BooleanGUI/BooleanGUI_Dialog.cxx b/src/BooleanGUI/BooleanGUI_Dialog.cxx index 6f4ca138b..85ea087c2 100644 --- a/src/BooleanGUI/BooleanGUI_Dialog.cxx +++ b/src/BooleanGUI/BooleanGUI_Dialog.cxx @@ -283,7 +283,7 @@ void BooleanGUI_Dialog::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); displayPreview(); } diff --git a/src/BooleanGUI/BooleanGUI_Dialog.h b/src/BooleanGUI/BooleanGUI_Dialog.h index c9ac5a5c2..7187896b3 100644 --- a/src/BooleanGUI/BooleanGUI_Dialog.h +++ b/src/BooleanGUI/BooleanGUI_Dialog.h @@ -40,7 +40,7 @@ class BooleanGUI_Dialog : public GEOMBase_Skeleton public: BooleanGUI_Dialog( const int, GeometryGUI*, QWidget* = 0, - bool = false, Qt::WindowFlags = 0 ); + bool = false, Qt::WindowFlags = 0 ); ~BooleanGUI_Dialog(); protected: diff --git a/src/BuildGUI/BuildGUI_CompoundDlg.cxx b/src/BuildGUI/BuildGUI_CompoundDlg.cxx index a839123b1..6090bb469 100644 --- a/src/BuildGUI/BuildGUI_CompoundDlg.cxx +++ b/src/BuildGUI/BuildGUI_CompoundDlg.cxx @@ -107,7 +107,7 @@ void BuildGUI_CompoundDlg::Init() connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); connect( GroupShapes->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( ( (SalomeApp_Application*)(SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); globalSelection( GEOM_ALLSHAPES ); @@ -192,7 +192,7 @@ void BuildGUI_CompoundDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); globalSelection( GEOM_ALLSHAPES ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); } @@ -249,7 +249,7 @@ void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { // empty list of arguments means that all arguments should be restored getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), - /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame - /*theInheritFirstArg=*/false ); + /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame + /*theInheritFirstArg=*/false ); } } diff --git a/src/BuildGUI/BuildGUI_EdgeDlg.cxx b/src/BuildGUI/BuildGUI_EdgeDlg.cxx index ceee5f69a..9bf572613 100644 --- a/src/BuildGUI/BuildGUI_EdgeDlg.cxx +++ b/src/BuildGUI/BuildGUI_EdgeDlg.cxx @@ -254,7 +254,7 @@ void BuildGUI_EdgeDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); displayPreview(); } diff --git a/src/BuildGUI/BuildGUI_FaceDlg.cxx b/src/BuildGUI/BuildGUI_FaceDlg.cxx index c06a1fa15..1a1ae8134 100644 --- a/src/BuildGUI/BuildGUI_FaceDlg.cxx +++ b/src/BuildGUI/BuildGUI_FaceDlg.cxx @@ -112,7 +112,7 @@ void BuildGUI_FaceDlg::Init() connect( GroupWire->LineEdit1, SIGNAL( returnPressed()), this, SLOT( LineEditReturnPressed() ) ); connect( GroupWire->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_FACE" ) ); } @@ -203,7 +203,7 @@ void BuildGUI_FaceDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); TColStd_MapOfInteger aMap; aMap.Add( GEOM_EDGE ); aMap.Add( GEOM_WIRE ); diff --git a/src/BuildGUI/BuildGUI_ShellDlg.cxx b/src/BuildGUI/BuildGUI_ShellDlg.cxx index 1e4b38a8f..ebaad3b07 100644 --- a/src/BuildGUI/BuildGUI_ShellDlg.cxx +++ b/src/BuildGUI/BuildGUI_ShellDlg.cxx @@ -119,7 +119,7 @@ void BuildGUI_ShellDlg::Init() connect( GroupShell->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_SHELL" ) ); } @@ -213,7 +213,7 @@ void BuildGUI_ShellDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); TColStd_MapOfInteger aMap; aMap.Add( GEOM_SHELL ); aMap.Add( GEOM_FACE ); diff --git a/src/BuildGUI/BuildGUI_SolidDlg.cxx b/src/BuildGUI/BuildGUI_SolidDlg.cxx index 592fa436b..5e1154a2a 100644 --- a/src/BuildGUI/BuildGUI_SolidDlg.cxx +++ b/src/BuildGUI/BuildGUI_SolidDlg.cxx @@ -113,7 +113,7 @@ void BuildGUI_SolidDlg::Init() connect( GroupSolid->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( EnableNameField( bool ) ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_SOLID" ) ); } @@ -208,7 +208,7 @@ void BuildGUI_SolidDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); globalSelection( GEOM_SHELL ); } diff --git a/src/BuildGUI/BuildGUI_SolidDlg.h b/src/BuildGUI/BuildGUI_SolidDlg.h index 3236ad4aa..3a40326b8 100644 --- a/src/BuildGUI/BuildGUI_SolidDlg.h +++ b/src/BuildGUI/BuildGUI_SolidDlg.h @@ -56,7 +56,7 @@ private: private: GEOM::ListOfGO myShells; bool myOkShells; /* to check when arguments is defined and - all shells are closed */ + all shells are closed */ DlgRef_1Sel1Check* GroupSolid; diff --git a/src/BuildGUI/BuildGUI_WireDlg.cxx b/src/BuildGUI/BuildGUI_WireDlg.cxx index 58d24c027..29f54f671 100644 --- a/src/BuildGUI/BuildGUI_WireDlg.cxx +++ b/src/BuildGUI/BuildGUI_WireDlg.cxx @@ -119,7 +119,7 @@ void BuildGUI_WireDlg::Init() connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); connect( GroupArgs->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_WIRE" ) ); } @@ -209,7 +209,7 @@ void BuildGUI_WireDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); TColStd_MapOfInteger aMap; aMap.Add( GEOM_WIRE ); aMap.Add( GEOM_EDGE ); diff --git a/src/DisplayGUI/DisplayGUI.cxx b/src/DisplayGUI/DisplayGUI.cxx index 44a14839c..c3238572b 100644 --- a/src/DisplayGUI/DisplayGUI.cxx +++ b/src/DisplayGUI/DisplayGUI.cxx @@ -212,8 +212,8 @@ void DisplayGUI::EraseAll() SalomeApp_Study* appStudy = dynamic_cast( app->activeStudy() ); SUIT_ViewManager* vman = vw->getViewManager(); if ( vman->getType() == OCCViewer_Viewer::Type() || - vman->getType() == SVTK_Viewer::Type() ) { - GEOM_Displayer( appStudy ).EraseAll(); + vman->getType() == SVTK_Viewer::Type() ) { + GEOM_Displayer( appStudy ).EraseAll(); } } } @@ -258,25 +258,25 @@ void DisplayGUI::Display() if ( anIObject->hasEntry() ) { _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) ); if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) { - _PTR(SComponent) SC ( SO->GetFatherComponent() ); - // if component is selected - listIO.Clear(); - _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) ); - anIter->InitEx( true ); - while( anIter->More() ) { - _PTR(SObject) valSO ( anIter->Value() ); - _PTR(SObject) refSO; - if ( !valSO->ReferencedObject( refSO ) ) { - listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(), + _PTR(SComponent) SC ( SO->GetFatherComponent() ); + // if component is selected + listIO.Clear(); + _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) ); + anIter->InitEx( true ); + while( anIter->More() ) { + _PTR(SObject) valSO ( anIter->Value() ); + _PTR(SObject) refSO; + if ( !valSO->ReferencedObject( refSO ) ) { + listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(), SC->ComponentDataType().c_str(), valSO->GetName().c_str()) ); - } - anIter->Next(); - } - break; + } + anIter->Next(); + } + break; } else { - listIO.Append( anIObject ); + listIO.Append( anIObject ); } } else { @@ -316,25 +316,25 @@ void DisplayGUI::Erase() if ( anIObject->hasEntry() ) { _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) ); if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) { - _PTR(SComponent) SC ( SO->GetFatherComponent() ); - // if component is selected - listIO.Clear(); - _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) ); - anIter->InitEx( true ); - while( anIter->More() ) { - _PTR(SObject) valSO ( anIter->Value() ); - _PTR(SObject) refSO; - if ( !valSO->ReferencedObject( refSO ) ) { - listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(), + _PTR(SComponent) SC ( SO->GetFatherComponent() ); + // if component is selected + listIO.Clear(); + _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) ); + anIter->InitEx( true ); + while( anIter->More() ) { + _PTR(SObject) valSO ( anIter->Value() ); + _PTR(SObject) refSO; + if ( !valSO->ReferencedObject( refSO ) ) { + listIO.Append( new SALOME_InteractiveObject(valSO->GetID().c_str(), SC->ComponentDataType().c_str(), valSO->GetName().c_str()) ); - } - anIter->Next(); - } - break; + } + anIter->Next(); + } + break; } else { - listIO.Append( anIObject ); + listIO.Append( anIObject ); } } else { @@ -378,8 +378,8 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow ) AIS_ListIteratorOfListOfInteractive ite( List ); while( ite.More() ) { if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) { - Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() ); - ic->SetDisplayMode( aSh, Standard_Integer( newmode ),true ); + Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() ); + ic->SetDisplayMode( aSh, Standard_Integer( newmode ),true ); } ite.Next(); } @@ -427,12 +427,12 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow ) allActors->InitTraversal(); while (vtkActor* actor = allActors->GetNextActor()) { if (actor->GetVisibility()) { // only for visible actors - GEOM_Actor* aGeomActor = 0; - if ( actor->IsA( "GEOM_Actor" ) ) { - aGeomActor = GEOM_Actor::SafeDownCast( actor ); - if ( aGeomActor ) - aGeomActor->SetVectorMode( mode ); - } + GEOM_Actor* aGeomActor = 0; + if ( actor->IsA( "GEOM_Actor" ) ) { + aGeomActor = GEOM_Actor::SafeDownCast( actor ); + if ( aGeomActor ) + aGeomActor->SetVectorMode( mode ); + } } } } @@ -449,9 +449,9 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow ) AIS_ListIteratorOfListOfInteractive ite( List ); while( ite.More() ) { if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) { - Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() ); - aSh->SetDisplayVectors(mode); - ic->RecomputePrsOnly(ite.Value()); + Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() ); + aSh->SetDisplayVectors(mode); + ic->RecomputePrsOnly(ite.Value()); } ite.Next(); } diff --git a/src/DlgRef/DlgRef.cxx b/src/DlgRef/DlgRef.cxx index 2d876aed2..ab784081c 100644 --- a/src/DlgRef/DlgRef.cxx +++ b/src/DlgRef/DlgRef.cxx @@ -581,7 +581,7 @@ void DlgRef_3Sel3Spin1Check::ShowRows( int fromRow, int toRow, bool toShow ) int row, col, rowspan, colspan; gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan ); if ( w && row >= fromRow && row <= toRow ) - w->setVisible( toShow ); + w->setVisible( toShow ); } } } @@ -611,7 +611,7 @@ void DlgRef_3Sel3Spin2Check::ShowRows( int fromRow, int toRow, bool toShow ) int row, col, rowspan, colspan; gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan ); if ( w && row >= fromRow && row <= toRow ) - w->setVisible( toShow ); + w->setVisible( toShow ); } } } @@ -725,7 +725,7 @@ void DlgRef_4Sel1Spin2Check::ShowRows( int fromRow, int toRow, bool toShow ) int row, col, rowspan, colspan; gridLayout1->getItemPosition( i, &row, &col, &rowspan, &colspan ); if ( w && row >= fromRow && row <= toRow ) - w->setVisible( toShow ); + w->setVisible( toShow ); } } } @@ -793,7 +793,7 @@ QString DlgRef::PrintDoubleValue( double theValue, int thePrecision ) double v = aRes.toDouble(); double err = qAbs( theValue - v ); if ( err > 0 && err <= prec ) - break; + break; } } diff --git a/src/DlgRef/DlgRef.h b/src/DlgRef/DlgRef.h index d64030f43..b7ec04faa 100644 --- a/src/DlgRef/DlgRef.h +++ b/src/DlgRef/DlgRef.h @@ -42,7 +42,7 @@ #include "ui_DlgRef_1List1Spin1Btn_QTD.h" class DLGREF_EXPORT DlgRef_1List1Spin1Btn : public QWidget, - public Ui::DlgRef_1List1Spin1Btn_QTD + public Ui::DlgRef_1List1Spin1Btn_QTD { Q_OBJECT @@ -58,7 +58,7 @@ public: #include "ui_DlgRef_1Sel1Check1List_QTD.h" class DLGREF_EXPORT DlgRef_1Sel1Check1List : public QWidget, - public Ui::DlgRef_1Sel1Check1List_QTD + public Ui::DlgRef_1Sel1Check1List_QTD { Q_OBJECT @@ -74,7 +74,7 @@ public: #include "ui_DlgRef_1Sel1Check1Sel_QTD.h" class DLGREF_EXPORT DlgRef_1Sel1Check1Sel : public QWidget, - public Ui::DlgRef_1Sel1Check1Sel_QTD + public Ui::DlgRef_1Sel1Check1Sel_QTD { Q_OBJECT @@ -90,7 +90,7 @@ public: #include "ui_DlgRef_1Sel1Check_QTD.h" class DLGREF_EXPORT DlgRef_1Sel1Check : public QWidget, - public Ui::DlgRef_1Sel1Check_QTD + public Ui::DlgRef_1Sel1Check_QTD { Q_OBJECT @@ -106,7 +106,7 @@ public: #include "ui_DlgRef_1Sel1List1Check3Btn_QTD.h" class DLGREF_EXPORT DlgRef_1Sel1List1Check3Btn : public QWidget, - public Ui::DlgRef_1Sel1List1Check3Btn_QTD + public Ui::DlgRef_1Sel1List1Check3Btn_QTD { Q_OBJECT @@ -122,7 +122,7 @@ public: #include "ui_DlgRef_1Sel1Spin1Check_QTD.h" class DLGREF_EXPORT DlgRef_1Sel1Spin1Check : public QWidget, - public Ui::DlgRef_1Sel1Spin1Check_QTD + public Ui::DlgRef_1Sel1Spin1Check_QTD { Q_OBJECT @@ -138,7 +138,7 @@ public: #include "ui_DlgRef_1Sel1Spin_QTD.h" class DLGREF_EXPORT DlgRef_1Sel1Spin : public QWidget, - public Ui::DlgRef_1Sel1Spin_QTD + public Ui::DlgRef_1Sel1Spin_QTD { Q_OBJECT diff --git a/src/EntityGUI/EntityGUI.cxx b/src/EntityGUI/EntityGUI.cxx index 25e0103f6..5a03fc00f 100644 --- a/src/EntityGUI/EntityGUI.cxx +++ b/src/EntityGUI/EntityGUI.cxx @@ -195,13 +195,13 @@ bool EntityGUI::SObjectExist( const _PTR(SObject)& theFatherObject, const char* if ( SO->FindAttribute( anAttr, "AttributeIOR" ) ) { _PTR(AttributeIOR) anIOR ( anAttr ); if ( strcmp( anIOR->Value().c_str(), IOR ) == 0 ) - return true; + return true; } if ( SO->ReferencedObject( RefSO ) ) { if ( RefSO->FindAttribute( anAttr, "AttributeIOR" ) ) { _PTR(AttributeIOR) anIOR ( anAttr ); - if ( strcmp( anIOR->Value().c_str(), IOR ) == 0 ) - return true; + if ( strcmp( anIOR->Value().c_str(), IOR ) == 0 ) + return true; } } } diff --git a/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx b/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx index 1152b7f3e..0f2c9092a 100755 --- a/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx @@ -67,8 +67,8 @@ private: // TRUE to construct a modal dialog. //================================================================================= EntityGUI_3DSketcherDlg::EntityGUI_3DSketcherDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl, - const double lineWidth ) + bool modal, Qt::WindowFlags fl, + const double lineWidth ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ), myGeometryGUI( theGeometryGUI ), myLineWidth( lineWidth ) @@ -306,45 +306,45 @@ void EntityGUI_3DSketcherDlg::SelectionIntoArgument() if (!CORBA::is_nil(aSelectedObject) && aRes) { TopoDS_Shape aShape; if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_SHAPE)) { // Explore the shape if its a local selection - TColStd_IndexedMapOfInteger aMap; - aSelMgr->GetIndexes(aSelList.First(), aMap); - if (aMap.Extent() == 1) - { - int anIndex = aMap(1); - GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); - aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); - } + TColStd_IndexedMapOfInteger aMap; + aSelMgr->GetIndexes(aSelList.First(), aMap); + if (aMap.Extent() == 1) + { + int anIndex = aMap(1); + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations(getStudyId()); + aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); + } } bool isOk = true; if ( aShape.ShapeType() != TopAbs_VERTEX ) - isOk = GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_VERTEX); + isOk = GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_VERTEX); if (isOk) { - gp_Pnt aPnt; - if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) { - // set coordinates to the Spin Boxes - double aX, aY, aZ; - aX = aPnt.X(); - aY = aPnt.Y(); - aZ = aPnt.Z(); - bool blocked = Group3Spin->SpinBox_DX->signalsBlocked(); - Group3Spin->SpinBox_DX->blockSignals(true); - Group3Spin->SpinBox_DY->blockSignals(true); - Group3Spin->SpinBox_DZ->blockSignals(true); - if ( GroupType->RadioButton1->isChecked() ) { - Group3Spin->SpinBox_DX->setValue( aX ); - Group3Spin->SpinBox_DY->setValue( aY ); - Group3Spin->SpinBox_DZ->setValue( aZ ); - } else if ( GroupType->RadioButton2->isChecked() ) { - double x, y, z; - GetLastPoints(x, y, z); - Group3Spin->SpinBox_DX->setValue( aX - x ); - Group3Spin->SpinBox_DY->setValue( aY - y ); - Group3Spin->SpinBox_DZ->setValue( aZ - z ); - } - Group3Spin->SpinBox_DX->blockSignals(blocked); - Group3Spin->SpinBox_DY->blockSignals(blocked); - Group3Spin->SpinBox_DZ->blockSignals(blocked); - } + gp_Pnt aPnt; + if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) { + // set coordinates to the Spin Boxes + double aX, aY, aZ; + aX = aPnt.X(); + aY = aPnt.Y(); + aZ = aPnt.Z(); + bool blocked = Group3Spin->SpinBox_DX->signalsBlocked(); + Group3Spin->SpinBox_DX->blockSignals(true); + Group3Spin->SpinBox_DY->blockSignals(true); + Group3Spin->SpinBox_DZ->blockSignals(true); + if ( GroupType->RadioButton1->isChecked() ) { + Group3Spin->SpinBox_DX->setValue( aX ); + Group3Spin->SpinBox_DY->setValue( aY ); + Group3Spin->SpinBox_DZ->setValue( aZ ); + } else if ( GroupType->RadioButton2->isChecked() ) { + double x, y, z; + GetLastPoints(x, y, z); + Group3Spin->SpinBox_DX->setValue( aX - x ); + Group3Spin->SpinBox_DY->setValue( aY - y ); + Group3Spin->SpinBox_DZ->setValue( aZ - z ); + } + Group3Spin->SpinBox_DX->blockSignals(blocked); + Group3Spin->SpinBox_DY->blockSignals(blocked); + Group3Spin->SpinBox_DZ->blockSignals(blocked); + } } } } @@ -375,7 +375,7 @@ void EntityGUI_3DSketcherDlg::ActivateThisDialog() myGeomGUI->SetActiveDialogBox( this ); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); GEOMBase_Helper::displayPreview( false, true, true, myLineWidth ); @@ -461,8 +461,8 @@ bool EntityGUI_3DSketcherDlg::execute( ObjectList& objects ) //================================================================================= void EntityGUI_3DSketcherDlg::initSpinBox( QDoubleSpinBox* spinBox, - double min, double max, - double step, int decimals ) + double min, double max, + double step, int decimals ) { spinBox->setDecimals( decimals ); spinBox->setRange( min, max ); @@ -551,12 +551,12 @@ void EntityGUI_3DSketcherDlg::GetCurrentPoints(double& x, double& y, double& z) // Redefined from GEOMBase_Helper. //================================================================ void EntityGUI_3DSketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object, - const bool append, - const bool activate, - const bool update, - const double lineWidth, - const int displayMode, - const int color ) + const bool append, + const bool activate, + const bool update, + const double lineWidth, + const int displayMode, + const int color ) { // Set color for preview shape getDisplayer()->SetColor( Quantity_NOC_RED ); @@ -597,8 +597,8 @@ void EntityGUI_3DSketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object, // Purpose : Create applyed wire, and last segment from entry object //================================================================ bool EntityGUI_3DSketcherDlg::createShapes( GEOM::GEOM_Object_ptr theObject, - TopoDS_Shape& theApplyedWire, - TopoDS_Shape& theLastSegment ) + TopoDS_Shape& theApplyedWire, + TopoDS_Shape& theLastSegment ) { TopoDS_Shape aShape; if ( !GEOMBase::GetShape( theObject, aShape ) || diff --git a/src/EntityGUI/EntityGUI_3DSketcherDlg.h b/src/EntityGUI/EntityGUI_3DSketcherDlg.h index 19cdb327d..2fc2b8605 100755 --- a/src/EntityGUI/EntityGUI_3DSketcherDlg.h +++ b/src/EntityGUI/EntityGUI_3DSketcherDlg.h @@ -53,8 +53,8 @@ public: protected: void initSpinBox( QDoubleSpinBox*, - double, double, double = 0.1, - int = 3 ); + double, double, double = 0.1, + int = 3 ); // redefined from GEOMBase_Helper virtual GEOM::GEOM_IOperations_ptr createOperation(); @@ -66,16 +66,16 @@ private: void enterEvent( QEvent* ); virtual void displayPreview( GEOM::GEOM_Object_ptr, - const bool = false, - const bool = false, - const bool = true, - const double = -1, - const int = -1, - const int = -1); + const bool = false, + const bool = false, + const bool = true, + const double = -1, + const int = -1, + const int = -1); bool createShapes( GEOM::GEOM_Object_ptr, - TopoDS_Shape&, - TopoDS_Shape& ); + TopoDS_Shape&, + TopoDS_Shape& ); private: QList myPointsList; diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index 0ffb81344..472a52eb4 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -64,8 +64,8 @@ // TRUE to construct a modal dialog. //================================================================================= EntityGUI_SketcherDlg::EntityGUI_SketcherDlg( GeometryGUI* GUI, QWidget* parent, - bool modal, Qt::WindowFlags fl, - const double lineWidth ) + bool modal, Qt::WindowFlags fl, + const double lineWidth ) : QDialog( parent, fl ), myIsAllAdded( false ), myIsApply( false ), @@ -466,7 +466,7 @@ void EntityGUI_SketcherDlg::PointClicked( int constructorId ) mySketchType = PT_SEL; myEditCurrentArgument = Group1Sel->LineEdit1; connect( myGeometryGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); Group1Sel->show(); Group1Sel->buttonApply->setFocus(); SelectionIntoArgument(); @@ -512,19 +512,19 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId ) Group2Spin->show(); if ( constructorId == 2 ) { // Length - mySketchType = DIR_ANGLE_LENGTH; - Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_LENGTH2" ) ); - Group2Spin->SpinBox_DY->setValue( myLength ); + mySketchType = DIR_ANGLE_LENGTH; + Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_LENGTH2" ) ); + Group2Spin->SpinBox_DY->setValue( myLength ); } else if ( constructorId == 0 ) { // X - mySketchType = DIR_ANGLE_X; - Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_X3" ) ); - Group2Spin->SpinBox_DY->setValue( myX ); + mySketchType = DIR_ANGLE_X; + Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_X3" ) ); + Group2Spin->SpinBox_DY->setValue( myX ); } else if ( constructorId == 1 ) { // Y - mySketchType = DIR_ANGLE_Y; - Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y3" ) ); - Group2Spin->SpinBox_DY->setValue( myY ); + mySketchType = DIR_ANGLE_Y; + Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_Y3" ) ); + Group2Spin->SpinBox_DY->setValue( myY ); } } else if ( myConstructorDirId == 0 ) { // Perpendicular @@ -532,19 +532,19 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId ) Group1Spin->buttonApply->setFocus(); if ( constructorId == 2 ) { // Length - mySketchType = DIR_PER_LENGTH; - Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) ); - Group1Spin->SpinBox_DX->setValue( myLength ); + mySketchType = DIR_PER_LENGTH; + Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) ); + Group1Spin->SpinBox_DX->setValue( myLength ); } else if ( constructorId == 0 ) { // X - mySketchType = DIR_PER_X; - Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) ); - Group1Spin->SpinBox_DX->setValue( myX ); + mySketchType = DIR_PER_X; + Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) ); + Group1Spin->SpinBox_DX->setValue( myX ); } else if ( constructorId == 1 ) { // Y - mySketchType = DIR_PER_Y; - Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) ); - Group1Spin->SpinBox_DX->setValue( myY ); + mySketchType = DIR_PER_Y; + Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) ); + Group1Spin->SpinBox_DX->setValue( myY ); } } else if ( myConstructorDirId == 1 ) { // Tangent @@ -552,19 +552,19 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId ) Group1Spin->buttonApply->setFocus(); if ( constructorId == 2 ) { // Length - mySketchType = DIR_TAN_LENGTH; - Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) ); - Group1Spin->SpinBox_DX->setValue( myLength ); + mySketchType = DIR_TAN_LENGTH; + Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_LENGTH2" ) ); + Group1Spin->SpinBox_DX->setValue( myLength ); } else if ( constructorId == 0 ) { // X - mySketchType = DIR_TAN_X; - Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) ); - Group1Spin->SpinBox_DX->setValue( myX ); + mySketchType = DIR_TAN_X; + Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_X3" ) ); + Group1Spin->SpinBox_DX->setValue( myX ); } else if ( constructorId == 1 ) { // Y - mySketchType = DIR_TAN_Y; - Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) ); - Group1Spin->SpinBox_DX->setValue( myY ); + mySketchType = DIR_TAN_Y; + Group1Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_Y3" ) ); + Group1Spin->SpinBox_DX->setValue( myY ); } } else if ( myConstructorDirId == 3 ) { // DXDY @@ -581,88 +581,88 @@ void EntityGUI_SketcherDlg::Dir2Clicked( int constructorId ) Group3Spin->buttonApply->setFocus(); if ( constructorId == 2 ) { // Length - mySketchType = DIR_DXDY_LENGTH; - Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_LENGTH2" ) ); - Group3Spin->SpinBox_DZ->setValue( myLength ); + mySketchType = DIR_DXDY_LENGTH; + Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_LENGTH2" ) ); + Group3Spin->SpinBox_DZ->setValue( myLength ); } else if ( constructorId == 0 ) { // X - mySketchType = DIR_DXDY_X; - Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_X3" ) ); - Group3Spin->SpinBox_DZ->setValue( myX ); + mySketchType = DIR_DXDY_X; + Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_X3" ) ); + Group3Spin->SpinBox_DZ->setValue( myX ); } else if ( constructorId == 1 ) { // Y - mySketchType = DIR_DXDY_Y; - Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_Y3" ) ); - Group3Spin->SpinBox_DZ->setValue( myY ); + mySketchType = DIR_DXDY_Y; + Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_Y3" ) ); + Group3Spin->SpinBox_DZ->setValue( myY ); } } } else if ( myConstructorId == 1 ) { // ARC if ( myConstructorDirId == 2 ) { // Angle if ( constructorId == 2 ) { // Length - mySketchType = DIR_ANGLE_LENGTH; - initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY - initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY - initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY - Group3Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_ANGLE2" ) ); - Group3Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_RADIUS2" ) ); - Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_ANGLE2" )); - Group3Spin->SpinBox_DX->setValue( myAngle ); - myRadius = 100.0; - Group3Spin->SpinBox_DY->setValue( myRadius ); - myLength = 30.0; - Group3Spin->SpinBox_DZ->setValue( myLength ); - Group3Spin->show(); - Group3Spin->buttonApply->setFocus(); + mySketchType = DIR_ANGLE_LENGTH; + initSpinBox( Group3Spin->SpinBox_DX, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY + initSpinBox( Group3Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY + initSpinBox( Group3Spin->SpinBox_DZ, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY + Group3Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_ANGLE2" ) ); + Group3Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_RADIUS2" ) ); + Group3Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_ANGLE2" )); + Group3Spin->SpinBox_DX->setValue( myAngle ); + myRadius = 100.0; + Group3Spin->SpinBox_DY->setValue( myRadius ); + myLength = 30.0; + Group3Spin->SpinBox_DZ->setValue( myLength ); + Group3Spin->show(); + Group3Spin->buttonApply->setFocus(); } } else if ( myConstructorDirId == 0 ) { // Perpendicular if ( constructorId == 2 ) { // Length - mySketchType = DIR_PER_LENGTH; - initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY - initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY - Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) ); - Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) ); - myRadius = 100.0; - Group2Spin->SpinBox_DX->setValue( myRadius ); - myLength = 30.0; - Group2Spin->SpinBox_DY->setValue( myLength ); - Group2Spin->show(); - Group2Spin->buttonApply->setFocus(); + mySketchType = DIR_PER_LENGTH; + initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY + initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY + Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) ); + Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) ); + myRadius = 100.0; + Group2Spin->SpinBox_DX->setValue( myRadius ); + myLength = 30.0; + Group2Spin->SpinBox_DY->setValue( myLength ); + Group2Spin->show(); + Group2Spin->buttonApply->setFocus(); } } else if ( myConstructorDirId == 1 ) { // Tangent if ( constructorId == 2 ) { // Length - mySketchType = DIR_TAN_LENGTH; - initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY - initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY - Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) ); - Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) ); - myRadius = 100.0; - Group2Spin->SpinBox_DX->setValue( myRadius ); - myLength = 30.0; - Group2Spin->SpinBox_DY->setValue( myLength ); - Group2Spin->show(); - Group2Spin->buttonApply->setFocus(); + mySketchType = DIR_TAN_LENGTH; + initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, step, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY + initSpinBox( Group2Spin->SpinBox_DY, COORD_MIN, COORD_MAX, 5., 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY + Group2Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_RADIUS2" ) ); + Group2Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_ANGLE2" ) ); + myRadius = 100.0; + Group2Spin->SpinBox_DX->setValue( myRadius ); + myLength = 30.0; + Group2Spin->SpinBox_DY->setValue( myLength ); + Group2Spin->show(); + Group2Spin->buttonApply->setFocus(); } } else if ( myConstructorDirId == 3 ) { // DXDY if ( constructorId == 2 ) { // Length - mySketchType = DIR_DXDY_LENGTH; - Group4Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_VX2" ) ); - Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_VY2" ) ); - Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_RADIUS2" ) ); - Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_ANGLE2" ) ); - myDX = 0.0; - Group4Spin->SpinBox_DX->setValue( myDX ); - myDY = 0.0; - Group4Spin->SpinBox_DY->setValue( myDY ); - myRadius = 100.0; - Group4Spin->SpinBox_DZ->setValue( myRadius ); - myLength = 30.0; - Group4Spin->SpinBox_DS->setValue( myLength ); - Group4Spin->show(); - Group4Spin->buttonApply->setFocus(); + mySketchType = DIR_DXDY_LENGTH; + Group4Spin->TextLabel1->setText( tr( "GEOM_SKETCHER_VX2" ) ); + Group4Spin->TextLabel2->setText( tr( "GEOM_SKETCHER_VY2" ) ); + Group4Spin->TextLabel3->setText( tr( "GEOM_SKETCHER_RADIUS2" ) ); + Group4Spin->TextLabel4->setText( tr( "GEOM_SKETCHER_ANGLE2" ) ); + myDX = 0.0; + Group4Spin->SpinBox_DX->setValue( myDX ); + myDY = 0.0; + Group4Spin->SpinBox_DY->setValue( myDY ); + myRadius = 100.0; + Group4Spin->SpinBox_DZ->setValue( myRadius ); + myLength = 30.0; + Group4Spin->SpinBox_DS->setValue( myLength ); + Group4Spin->show(); + Group4Spin->buttonApply->setFocus(); } } } @@ -691,7 +691,7 @@ void EntityGUI_SketcherDlg::ClickOnEnd() // Verify validity of commands if ( myCommand.count() <= 2 ) { SUIT_MessageBox::critical( SUIT_Session::session()->activeApplication()->desktop(), - tr( "GEOM_ERROR_STATUS" ), tr( "CANNOT_CLOSE" ), tr( "BUT_OK" ) ); + tr( "GEOM_ERROR_STATUS" ), tr( "CANNOT_CLOSE" ), tr( "BUT_OK" ) ); return; } @@ -711,10 +711,10 @@ void EntityGUI_SketcherDlg::ClickOnEnd() else { // PAL16008 (Sketcher Validation should be equal to Apply&Close) if ( Group1Spin->buttonApply->isEnabled() && Group1Spin->isVisible() || - Group2Spin->buttonApply->isEnabled() && Group2Spin->isVisible() || - Group3Spin->buttonApply->isEnabled() && Group3Spin->isVisible() || - Group4Spin->buttonApply->isEnabled() && Group4Spin->isVisible() || - Group1Sel ->buttonApply->isEnabled() && Group1Sel->isVisible() ) { + Group2Spin->buttonApply->isEnabled() && Group2Spin->isVisible() || + Group3Spin->buttonApply->isEnabled() && Group3Spin->isVisible() || + Group4Spin->buttonApply->isEnabled() && Group4Spin->isVisible() || + Group1Sel ->buttonApply->isEnabled() && Group1Sel->isVisible() ) { ClickOnApply(); } myIsAllAdded = true; @@ -794,9 +794,9 @@ void EntityGUI_SketcherDlg::ClickOnHelp() #endif SUIT_MessageBox::warning( 0, QObject::tr( "WRN_WARNING" ), - QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ). - arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ), - QObject::tr( "BUT_OK" ) ); + QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ). + arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ), + QObject::tr( "BUT_OK" ) ); } } @@ -899,19 +899,19 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument() if (!CORBA::is_nil(aSelectedObject) && aRes) { TopoDS_Shape aShape; if (GEOMBase::GetShape(aSelectedObject, aShape, TopAbs_VERTEX)) { - gp_Trsf aTrans; - gp_Ax3 aWPlane = GetActiveLocalCS(); + gp_Trsf aTrans; + gp_Ax3 aWPlane = GetActiveLocalCS(); - aTrans.SetTransformation(aWPlane); - BRepBuilderAPI_Transform aTransformation (aShape, aTrans, Standard_False); - aShape = aTransformation.Shape(); + aTrans.SetTransformation(aWPlane); + BRepBuilderAPI_Transform aTransformation (aShape, aTrans, Standard_False); + aShape = aTransformation.Shape(); - gp_Pnt aPnt; + gp_Pnt aPnt; if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) { - myX = aPnt.X(); - myY = aPnt.Y(); - Group1Sel->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) ); - } + myX = aPnt.X(); + myY = aPnt.Y(); + Group1Sel->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) ); + } } } } @@ -985,7 +985,7 @@ void EntityGUI_SketcherDlg::ActivateThisDialog() myGeometryGUI->SetActiveDialogBox( this ); connect( myGeometryGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); //myGeometryGUI->SetState( 0 ); globalSelection( GEOM_POINT ); @@ -1397,16 +1397,16 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects ) TopoDS_Vertex V1, V2; gp_Pnt pt; if ( myShape1.ShapeType() == TopAbs_VERTEX ) { - //the last shape is the first point - pt = BRep_Tool::Pnt( TopoDS::Vertex( myShape1 ) ); - myLastX1 = pt.X(); - myLastY1 = pt.Y(); + //the last shape is the first point + pt = BRep_Tool::Pnt( TopoDS::Vertex( myShape1 ) ); + myLastX1 = pt.X(); + myLastY1 = pt.Y(); } else { - TopExp::Vertices( TopoDS::Wire( myShape1 ), V1, V2 ); - pt = BRep_Tool::Pnt( V2 ); - myLastX1 = pt.X(); - myLastY1 = pt.Y(); + TopExp::Vertices( TopoDS::Wire( myShape1 ), V1, V2 ); + pt = BRep_Tool::Pnt( V2 ); + myLastX1 = pt.X(); + myLastY1 = pt.Y(); } TopExp::Vertices( TopoDS::Wire( myShape2 ), V1, V2 ); pt = BRep_Tool::Pnt( V2 ); @@ -1417,7 +1417,7 @@ bool EntityGUI_SketcherDlg::execute( ObjectList& objects ) QString cmd; if ( ( mySketchState != FIRST_POINT && - myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) { + myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) { cmd = myCommand.join( "" ); if ( Group1Sel->isVisible() ) { @@ -1603,8 +1603,8 @@ void EntityGUI_SketcherDlg::keyPressEvent( QKeyEvent* e ) } void EntityGUI_SketcherDlg::initSpinBox( SalomeApp_DoubleSpinBox* spinBox, - double min, double max, - double step, int decimals ) + double min, double max, + double step, int decimals ) { spinBox->setDecimals( decimals ); spinBox->setRange( min, max ); @@ -1682,12 +1682,12 @@ void EntityGUI_SketcherDlg::FindLocalCS() gp_Ax3 aLCS; aLCS.Transform(aShape.Location().Transformation()); if (aShape.ShapeType() == TopAbs_FACE) { - Handle(Geom_Surface) aGS = BRep_Tool::Surface(TopoDS::Face(aShape)); - if (!aGS.IsNull() && aGS->IsKind(STANDARD_TYPE(Geom_Plane))) { - Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast(aGS); - gp_Pln aPln = aGPlane->Pln(); - aLCS = aPln.Position(); - } + Handle(Geom_Surface) aGS = BRep_Tool::Surface(TopoDS::Face(aShape)); + if (!aGS.IsNull() && aGS->IsKind(STANDARD_TYPE(Geom_Plane))) { + Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast(aGS); + gp_Pln aPln = aGPlane->Pln(); + aLCS = aPln.Position(); + } } myLCSList.push_back(aLCS); } diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.h b/src/EntityGUI/EntityGUI_SketcherDlg.h index 774068fc1..13d2a880e 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.h +++ b/src/EntityGUI/EntityGUI_SketcherDlg.h @@ -64,15 +64,15 @@ class EntityGUI_SketcherDlg : public QDialog, GEOMBase_Helper public: EntityGUI_SketcherDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0, - const double = 2. ); + const double = 2. ); ~EntityGUI_SketcherDlg(); bool eventFilter (QObject* object, QEvent* event); protected: void initSpinBox( SalomeApp_DoubleSpinBox*, - double, double, double = 0.1, - int = 3 ); + double, double, double = 0.1, + int = 3 ); // redefined from GEOMBase_Helper virtual GEOM::GEOM_IOperations_ptr createOperation(); @@ -92,16 +92,16 @@ private: QString GetNewCommand( QString& ); virtual void displayPreview( GEOM::GEOM_Object_ptr, - const bool = false, - const bool = false, - const bool = true, - const double = -1, - const int = -1, - const int = -1); + const bool = false, + const bool = false, + const bool = true, + const double = -1, + const int = -1, + const int = -1); bool createShapes( GEOM::GEOM_Object_ptr, - TopoDS_Shape&, - TopoDS_Shape& ); + TopoDS_Shape&, + TopoDS_Shape& ); private: int myConstructorId; @@ -157,10 +157,10 @@ private: enum SketchState { FIRST_POINT, NEXT_POINT }; enum SketchType { PT_ABS, PT_RELATIVE, PT_SEL, - DIR_ANGLE_LENGTH, DIR_ANGLE_X, DIR_ANGLE_Y, - DIR_PER_LENGTH, DIR_PER_X, DIR_PER_Y, - DIR_TAN_LENGTH, DIR_TAN_X, DIR_TAN_Y, - DIR_DXDY_LENGTH, DIR_DXDY_X, DIR_DXDY_Y }; + DIR_ANGLE_LENGTH, DIR_ANGLE_X, DIR_ANGLE_Y, + DIR_PER_LENGTH, DIR_PER_X, DIR_PER_Y, + DIR_TAN_LENGTH, DIR_TAN_X, DIR_TAN_Y, + DIR_DXDY_LENGTH, DIR_DXDY_X, DIR_DXDY_Y }; private slots: void ClickOnEnd(); diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx index 9dc4679bf..1510f79f0 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx @@ -53,7 +53,7 @@ // TRUE to construct a modal dialog. //================================================================================= EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_SUBSHAPE" ) ) ); @@ -140,7 +140,7 @@ void EntityGUI_SubShapeDlg::Init() connect( GroupPoints->CheckButton1, SIGNAL( stateChanged( int ) ), this, SLOT( SubShapeToggled() ) ); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged( )), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged( )), this, SLOT( SelectionIntoArgument() ) ); updateButtonState(); resize(100,100); @@ -344,7 +344,7 @@ void EntityGUI_SubShapeDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); SubShapeToggled(); updateButtonState(); } @@ -427,7 +427,7 @@ void EntityGUI_SubShapeDlg::ComboTextChanged() // purpose : //================================================================================= unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes( const TopoDS_Shape& S, - const int shapeType ) const + const int shapeType ) const { if ( S.IsNull() ) return 0; @@ -437,13 +437,13 @@ unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes( const TopoDS_Shape& S, if ( S.ShapeType() == TopAbs_COMPOUND && ( TopAbs_ShapeEnum(shapeType) == TopAbs_SHAPE || - TopAbs_ShapeEnum(shapeType) == TopAbs_COMPSOLID || - TopAbs_ShapeEnum(shapeType) == TopAbs_COMPOUND ) ) { + TopAbs_ShapeEnum(shapeType) == TopAbs_COMPSOLID || + TopAbs_ShapeEnum(shapeType) == TopAbs_COMPOUND ) ) { TopoDS_Iterator It( S, Standard_True, Standard_True ); for ( ; It.More(); It.Next() ) { if ( M.Add( It.Value() ) ) { if ( TopAbs_ShapeEnum( shapeType ) == TopAbs_SHAPE || - TopAbs_ShapeEnum( shapeType ) == It.Value().ShapeType() ) { + TopAbs_ShapeEnum( shapeType ) == It.Value().ShapeType() ) { index++; } } @@ -574,18 +574,18 @@ bool EntityGUI_SubShapeDlg::execute (ObjectList& objects) if (aSelList.Extent() == 1) { Standard_Boolean aResult = Standard_False; GEOM::GEOM_Object_var anObj = - GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult); + GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult); if (aResult && !anObj->_is_nil()) { - TColStd_IndexedMapOfInteger aMapIndex; - aSelMgr->GetIndexes(aSelList.First(), aMapIndex); + TColStd_IndexedMapOfInteger aMapIndex; + aSelMgr->GetIndexes(aSelList.First(), aMapIndex); - GEOM::GEOM_ILocalOperations_var aLocOp = - getGeomEngine()->GetILocalOperations(getStudyId()); + GEOM::GEOM_ILocalOperations_var aLocOp = + getGeomEngine()->GetILocalOperations(getStudyId()); - for (int i = 0, n = aList->length(); i < n; i++) - if (aMapIndex.Contains(aLocOp->GetSubShapeIndex(myObject, aList[i]))) - objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i])); + for (int i = 0, n = aList->length(); i < n; i++) + if (aMapIndex.Contains(aLocOp->GetSubShapeIndex(myObject, aList[i]))) + objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i])); } } } diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.h b/src/EntityGUI/EntityGUI_SubShapeDlg.h index 6dbd0cb8f..943d21e8a 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.h +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.h @@ -67,7 +67,7 @@ private: void ResetStateOfDialog(); unsigned int NumberOfSubShapes( const TopoDS_Shape&, - const int ) const; + const int ) const; void updateButtonState(); bool isAllSubShapes() const; diff --git a/src/GEOMAlgo/BlockFix.cxx b/src/GEOMAlgo/BlockFix.cxx index a8c47b09d..67e07c676 100644 --- a/src/GEOMAlgo/BlockFix.cxx +++ b/src/GEOMAlgo/BlockFix.cxx @@ -19,9 +19,9 @@ // // 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 +// File: BlockFix.cxx +// Created: Tue Dec 7 11:59:05 2004 +// Author: Pavel DURANDIN // #include #include diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.hxx b/src/GEOMAlgo/BlockFix_BlockFixAPI.hxx index d2511898a..686bc170d 100644 --- a/src/GEOMAlgo/BlockFix_BlockFixAPI.hxx +++ b/src/GEOMAlgo/BlockFix_BlockFixAPI.hxx @@ -77,7 +77,7 @@ public: // Standard_EXPORT friend Handle_Standard_Type& BlockFix_BlockFixAPI_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; private: // Fields PRIVATE diff --git a/src/GEOMAlgo/BlockFix_BlockFixAPI.ixx b/src/GEOMAlgo/BlockFix_BlockFixAPI.ixx index 1b68aba32..52c772bac 100644 --- a/src/GEOMAlgo/BlockFix_BlockFixAPI.ixx +++ b/src/GEOMAlgo/BlockFix_BlockFixAPI.ixx @@ -40,10 +40,10 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_BlockFixAPI_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL}; static Handle_Standard_Type _aType = new Standard_Type("BlockFix_BlockFixAPI", - sizeof(BlockFix_BlockFixAPI), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(BlockFix_BlockFixAPI), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx index 248723046..842398a2f 100644 --- a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx +++ b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.hxx @@ -101,7 +101,7 @@ Standard_EXPORT ~BlockFix_PeriodicSurfaceModifier(); // Standard_EXPORT friend Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx index 5ab8be7b8..d400fa4a0 100644 --- a/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx +++ b/src/GEOMAlgo/BlockFix_PeriodicSurfaceModifier.ixx @@ -42,10 +42,10 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_PeriodicSurfaceModifier_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("BlockFix_PeriodicSurfaceModifier", - sizeof(BlockFix_PeriodicSurfaceModifier), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(BlockFix_PeriodicSurfaceModifier), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx index a66e7b242..1b21e3648 100644 --- a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx +++ b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.cxx @@ -19,9 +19,9 @@ // // 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 +// File: BlockFix.cxx +// Created: Tue Dec 7 11:59:05 2004 +// Author: Pavel DURANDIN // #include diff --git a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.hxx b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.hxx index acdb3bda8..095dfd3ad 100644 --- a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.hxx +++ b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.hxx @@ -102,7 +102,7 @@ Standard_EXPORT ~BlockFix_SphereSpaceModifier(); // Standard_EXPORT friend Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.ixx b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.ixx index 31ea8a258..3dfcebe53 100644 --- a/src/GEOMAlgo/BlockFix_SphereSpaceModifier.ixx +++ b/src/GEOMAlgo/BlockFix_SphereSpaceModifier.ixx @@ -42,10 +42,10 @@ Standard_EXPORT Handle_Standard_Type& BlockFix_SphereSpaceModifier_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("BlockFix_SphereSpaceModifier", - sizeof(BlockFix_SphereSpaceModifier), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(BlockFix_SphereSpaceModifier), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_Algo.cxx b/src/GEOMAlgo/GEOMAlgo_Algo.cxx index a3426fffe..f31a91b74 100755 --- a/src/GEOMAlgo/GEOMAlgo_Algo.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Algo.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Algo.cxx -// Created: Sat Dec 04 12:39:47 2004 -// Author: Peter KURNEV -// +// File: GEOMAlgo_Algo.cxx +// Created: Sat Dec 04 12:39:47 2004 +// Author: Peter KURNEV +// // #include diff --git a/src/GEOMAlgo/GEOMAlgo_Builder.cxx b/src/GEOMAlgo/GEOMAlgo_Builder.cxx index 8631ecd42..a98fed716 100755 --- a/src/GEOMAlgo/GEOMAlgo_Builder.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Builder.cxx -// Created: -// Author: Peter KURNEV +// File: GEOMAlgo_Builder.cxx +// Created: +// Author: Peter KURNEV // #include @@ -223,19 +223,19 @@ aType=aS.ShapeType(); if (aType==theType) { if (myImages.HasImage(aS)){ - const TopTools_ListOfShape& aLSIm=myImages.Image(aS); - aItIm.Initialize(aLSIm); - for (; aItIm.More(); aItIm.Next()) { - const TopoDS_Shape& aSIm=aItIm.Value(); - if (aM.Add(aSIm)) { - aBB.Add(myShape, aSIm); - } - } + const TopTools_ListOfShape& aLSIm=myImages.Image(aS); + aItIm.Initialize(aLSIm); + for (; aItIm.More(); aItIm.Next()) { + const TopoDS_Shape& aSIm=aItIm.Value(); + if (aM.Add(aSIm)) { + aBB.Add(myShape, aSIm); + } + } } else { - if (aM.Add(aS)) { - aBB.Add(myShape, aS); - } + if (aM.Add(aS)) { + aBB.Add(myShape, aS); + } } } } diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx b/src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx index dbc4f51fb..60bff6cb9 100755 --- a/src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_BuilderArea.cxx -// Created: -// Author: Peter KURNEV +// File: GEOMAlgo_BuilderArea.cxx +// Created: +// Author: Peter KURNEV // #include diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx b/src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx index c6b7d4bf5..86f0fd709 100755 --- a/src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderFace.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_BuilderFace.cxx -// Created: -// Author: Peter KURNEV +// File: GEOMAlgo_BuilderFace.cxx +// Created: +// Author: Peter KURNEV // #include @@ -83,15 +83,15 @@ static Standard_Boolean IsGrowthWire(const TopoDS_Shape& , - const TopTools_IndexedMapOfShape& ); + const TopTools_IndexedMapOfShape& ); static Standard_Boolean IsInside(const TopoDS_Shape& , - const TopoDS_Shape& , - IntTools_PContext& ); + const TopoDS_Shape& , + IntTools_PContext& ); static void MakeInternalWires(const TopTools_MapOfShape& , - TopTools_ListOfShape& ); + TopTools_ListOfShape& ); //======================================================================= //function : @@ -187,10 +187,10 @@ static for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aE=aIt.Value(); if (!myShapesToAvoid.Contains(aE)) { - TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE); + TopExp::MapShapesAndAncestors(aE, TopAbs_VERTEX, TopAbs_EDGE, aMVE); } else { - int a=0; + int a=0; } } aNbV=aMVE.Extent(); @@ -202,33 +202,33 @@ static TopTools_ListOfShape& aLE=aMVE.ChangeFromKey(aV); aNbE=aLE.Extent(); if (!aNbE) { - continue; + continue; } // const TopoDS_Edge& aE1=TopoDS::Edge(aLE.First()); if (aNbE==1) { - if (BRep_Tool::Degenerated(aE1)) { - continue; - } - if (aV.Orientation()==TopAbs_INTERNAL) { - continue; - } - bFound=Standard_True; - myShapesToAvoid.Add(aE1); + if (BRep_Tool::Degenerated(aE1)) { + continue; + } + if (aV.Orientation()==TopAbs_INTERNAL) { + continue; + } + bFound=Standard_True; + myShapesToAvoid.Add(aE1); } else if (aNbE==2) { - const TopoDS_Edge& aE2=TopoDS::Edge(aLE.Last()); - if (aE2.IsSame(aE1)) { - TopoDS_Vertex aV1x, aV2x; - // - TopExp::Vertices(aE1, aV1x, aV2x); - if (aV1x.IsSame(aV2x)) { - continue; - } - bFound=Standard_True; - myShapesToAvoid.Add(aE1); - myShapesToAvoid.Add(aE2); - } + const TopoDS_Edge& aE2=TopoDS::Edge(aLE.Last()); + if (aE2.IsSame(aE1)) { + TopoDS_Vertex aV1x, aV2x; + // + TopExp::Vertices(aE1, aV1x, aV2x); + if (aV1x.IsSame(aV2x)) { + continue; + } + bFound=Standard_True; + myShapesToAvoid.Add(aE1); + myShapesToAvoid.Add(aE2); + } } }// for (i=1; i<=aNbE; ++i) { // @@ -342,18 +342,18 @@ static // TopoDS_Iterator aItE(aE); for (; aItE.More()&&bFlag; aItE.Next()) { - const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value()); - const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV); - aIt.Initialize(aLE); - for (; aIt.More()&&bFlag; aIt.Next()) { - const TopoDS_Shape& aEx=aIt.Value(); - if (aMAdded.Add(aEx)) { - aBB.Add(aW, aEx); - if(aMAdded.Extent()==aNbEA) { - bFlag=!bFlag; - } - } - }//for (; aIt.More(); aIt.Next()) { + const TopoDS_Vertex& aV = TopoDS::Vertex(aItE.Value()); + const TopTools_ListOfShape& aLE=aVEMap.FindFromKey(aV); + aIt.Initialize(aLE); + for (; aIt.More()&&bFlag; aIt.Next()) { + const TopoDS_Shape& aEx=aIt.Value(); + if (aMAdded.Add(aEx)) { + aBB.Add(aW, aEx); + if(aMAdded.Extent()==aNbEA) { + bFlag=!bFlag; + } + } + }//for (; aIt.More(); aIt.Next()) { }//for (; aItE.More(); aItE.Next()) { }//for (; aItW.More(); aItW.Next()) { myLoopsInternal.Append(aW); @@ -406,16 +406,16 @@ static bIsHole=GEOMAlgo_BuilderTools::IsHole(aWire, myFace); //XX if (bIsHole) { - aHoleWires.Append(aWire); - TopExp::MapShapes(aWire, TopAbs_EDGE, aMHE); + aHoleWires.Append(aWire); + TopExp::MapShapes(aWire, TopAbs_EDGE, aMHE); } else { - // make a growth face from a wire - TopoDS_Face aFace; - aBB.MakeFace(aFace, aS, aLoc, aTol); - aBB.Add (aFace, aWire); - // - aNewFaces.Append (aFace); + // make a growth face from a wire + TopoDS_Face aFace; + aBB.MakeFace(aFace, aS, aLoc, aTol); + aBB.Add (aFace, aWire); + // + aNewFaces.Append (aFace); } } } @@ -449,13 +449,13 @@ static if (aInOutMap.IsBound(aHole)){ const TopoDS_Shape& aF=aInOutMap(aHole); if (aMSH.IsBound(aF)) { - TopTools_ListOfShape& aLH=aMSH.ChangeFind(aF); - aLH.Append(aHole); + TopTools_ListOfShape& aLH=aMSH.ChangeFind(aF); + aLH.Append(aHole); } else { - TopTools_ListOfShape aLH; - aLH.Append(aHole); - aMSH.Bind(aF, aLH); + TopTools_ListOfShape aLH; + aLH.Append(aHole); + aMSH.Bind(aF, aLH); } } }// for (; aIt2.More(); aIt2.Next()) @@ -531,7 +531,7 @@ static for (; aItME.More(); aItME.Next()) { const TopoDS_Edge& aE=TopoDS::Edge(aItME.Key()); if (IsInside(aE, aF, myContext)) { - aMEP.Add(aE); + aMEP.Add(aE); } } // @@ -564,7 +564,7 @@ static //purpose : //======================================================================= void MakeInternalWires(const TopTools_MapOfShape& theME, - TopTools_ListOfShape& theWires) + TopTools_ListOfShape& theWires) { TopTools_MapIteratorOfMapOfShape aItM; TopTools_MapOfShape aAddedMap; @@ -598,15 +598,15 @@ void MakeInternalWires(const TopTools_MapOfShape& theME, TopExp_Explorer aExp(aE, TopAbs_VERTEX); for (; aExp.More(); aExp.Next()) { const TopoDS_Shape& aV =aExp.Current(); - const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV); - aItE.Initialize(aLE); - for (; aItE.More(); aItE.Next()) { - TopoDS_Shape aEL=aItE.Value(); - if (aAddedMap.Add(aEL)){ - aEL.Orientation(TopAbs_INTERNAL); - aBB.Add(aW, aEL); - } - } + const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV); + aItE.Initialize(aLE); + for (; aItE.More(); aItE.Next()) { + TopoDS_Shape aEL=aItE.Value(); + if (aAddedMap.Add(aEL)){ + aEL.Orientation(TopAbs_INTERNAL); + aBB.Add(aW, aEL); + } + } } } theWires.Append(aW); @@ -617,8 +617,8 @@ void MakeInternalWires(const TopTools_MapOfShape& theME, //purpose : //======================================================================= Standard_Boolean IsInside(const TopoDS_Shape& theHole, - const TopoDS_Shape& theF2, - IntTools_PContext& theContext) + const TopoDS_Shape& theF2, + IntTools_PContext& theContext) { Standard_Boolean bRet; Standard_Real aT, aU, aV; @@ -658,7 +658,7 @@ Standard_Boolean IsInside(const TopoDS_Shape& theHole, //purpose : //======================================================================= Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire, - const TopTools_IndexedMapOfShape& theMHE) + const TopTools_IndexedMapOfShape& theMHE) { Standard_Boolean bRet; TopoDS_Iterator aIt; @@ -669,7 +669,7 @@ Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire, for(; aIt.More(); aIt.Next()) { const TopoDS_Shape& aE=aIt.Value(); if (theMHE.Contains(aE)) { - return !bRet; + return !bRet; } } } @@ -688,8 +688,8 @@ Standard_Boolean IsGrowthWire(const TopoDS_Shape& theWire, //purpose : //======================================================================= Standard_Boolean IsInside(const TopoDS_Shape& theHole, - const TopoDS_Shape& theF2, - IntTools_PContext& theContext) + const TopoDS_Shape& theF2, + IntTools_PContext& theContext) { Standard_Real aT, aU, aV; TopExp_Explorer aExp; diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx b/src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx index 5d09fde72..b205905d0 100755 --- a/src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderShape.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_BuilderShape.cxx -// Created: -// Author: Peter KURNEV +// File: GEOMAlgo_BuilderShape.cxx +// Created: +// Author: Peter KURNEV // #include //======================================================================= diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx b/src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx index 6ea231c3e..f1f0bf227 100755 --- a/src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderSolid.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_BuilderSolid.cxx -// Created: -// Author: Peter KURNEV +// File: GEOMAlgo_BuilderSolid.cxx +// Created: +// Author: Peter KURNEV // #include @@ -82,17 +82,17 @@ // static Standard_Boolean IsGrowthShell(const TopoDS_Shape& , - const TopTools_IndexedMapOfShape& ); + const TopTools_IndexedMapOfShape& ); static Standard_Boolean IsHole(const TopoDS_Shape& , - IntTools_PContext& ); + IntTools_PContext& ); static Standard_Boolean IsInside(const TopoDS_Shape& , - const TopoDS_Shape& , - IntTools_PContext& ); + const TopoDS_Shape& , + IntTools_PContext& ); static void MakeInternalShells(const TopTools_MapOfShape& , - TopTools_ListOfShape& ); + TopTools_ListOfShape& ); //modified by NIZNHY-PKV Tue Aug 5 15:06:50 2008f static @@ -184,10 +184,10 @@ static for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aF=aIt.Value(); if (!myShapesToAvoid.Contains(aF)) { - TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF); + TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, aMEF); } else { - int a=0; + int a=0; } } aNbE=aMEF.Extent(); @@ -196,51 +196,51 @@ static for (i=1; i<=aNbE; ++i) { const TopoDS_Edge& aE=TopoDS::Edge(aMEF.FindKey(i)); if (BRep_Tool::Degenerated(aE)) { - continue; + continue; } // TopTools_ListOfShape& aLF=aMEF.ChangeFromKey(aE); // aNbF=aLF.Extent(); if (!aNbF) { - continue; + continue; } // aOrE=aE.Orientation(); // const TopoDS_Face& aF1=TopoDS::Face(aLF.First()); if (aNbF==1) { - if (aOrE==TopAbs_INTERNAL) { - continue; - } - bFound=Standard_True; - myShapesToAvoid.Add(aF1); + if (aOrE==TopAbs_INTERNAL) { + continue; + } + bFound=Standard_True; + myShapesToAvoid.Add(aF1); } else if (aNbF==2) { - const TopoDS_Face& aF2=TopoDS::Face(aLF.Last()); - if (aF2.IsSame(aF1)) { - if (BRep_Tool::IsClosed(aE, aF1)) { - continue; - } - // - if (aOrE==TopAbs_INTERNAL) { - continue; - } - // - bFound=Standard_True; - myShapesToAvoid.Add(aF1); - myShapesToAvoid.Add(aF2); - } + const TopoDS_Face& aF2=TopoDS::Face(aLF.Last()); + if (aF2.IsSame(aF1)) { + if (BRep_Tool::IsClosed(aE, aF1)) { + continue; + } + // + if (aOrE==TopAbs_INTERNAL) { + continue; + } + // + bFound=Standard_True; + myShapesToAvoid.Add(aF1); + myShapesToAvoid.Add(aF2); + } } //DEB else { - TopTools_ListIteratorOfListOfShape aItLF; - // - aItLF.Initialize (aLF); - for (; aItLF.More(); aItLF.Next()) { - const TopoDS_Shape& aFx=aItLF.Value(); - int a=0; - } + TopTools_ListIteratorOfListOfShape aItLF; + // + aItLF.Initialize (aLF); + for (; aItLF.More(); aItLF.Next()) { + const TopoDS_Shape& aFx=aItLF.Value(); + int a=0; + } } //DEB }// for (i=1; i<=aNbE; ++i) { @@ -309,78 +309,78 @@ static TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE); for (; aEdgeExp.More(); aEdgeExp.Next()) { const TopoDS_Edge& aE = TopoDS::Edge(aEdgeExp.Current()); - // - //1 - if (aMEFP.Contains(aE)) { - const TopTools_ListOfShape& aLFP=aMEFP.FindFromKey(aE); - aNbFP=aLFP.Extent(); - if (aNbFP>1) { - continue; - } - } - //2 - anOr=aE.Orientation(); - if (anOr==TopAbs_INTERNAL) { - continue; - } - //3 - if (BRep_Tool::Degenerated(aE)) { - continue; - } - // - // candidate faces list + // + //1 + if (aMEFP.Contains(aE)) { + const TopTools_ListOfShape& aLFP=aMEFP.FindFromKey(aE); + aNbFP=aLFP.Extent(); + if (aNbFP>1) { + continue; + } + } + //2 + anOr=aE.Orientation(); + if (anOr==TopAbs_INTERNAL) { + continue; + } + //3 + if (BRep_Tool::Degenerated(aE)) { + continue; + } + // + // candidate faces list const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE); - aNbLF=aLF.Extent(); + aNbLF=aLF.Extent(); if (!aNbLF) { continue; - } - // - // try to select one of neighbors - // check if a face already added to Shell shares E - Standard_Boolean bFound; - TopTools_ListIteratorOfListOfShape aItLF; - NMTTools_ListOfCoupleOfShape aLCSOff; - // - aItLF.Initialize(aLF); - for (; aItLF.More(); aItLF.Next()) { - const TopoDS_Face& aFL=TopoDS::Face(aItLF.Value()); - if (myShapesToAvoid.Contains(aFL)) { - continue; - } - if (aF.IsSame(aFL)) { - continue; - } - if (AddedFacesMap.Contains(aFL)){ - continue; - } - // - bFound=GEOMAlgo_Tools3D::GetEdgeOff(aE, aFL, aEL); - if (!bFound) { - continue; - } - // - aCSOff.SetShape1(aEL); - aCSOff.SetShape2(aFL); - aLCSOff.Append(aCSOff); - }//for (; aItLF.More(); aItLF.Next()) { - // - aNbOff=aLCSOff.Extent(); - if (!aNbOff){ - continue; - } - // - TopoDS_Face aSelF; - if (aNbOff==1) { - aSelF=TopoDS::Face(aLCSOff.First().Shape2()); - } - else if (aNbOff>1){ - GEOMAlgo_Tools3D::GetFaceOff(aE, aF, aLCSOff, aSelF); - } - // + } + // + // try to select one of neighbors + // check if a face already added to Shell shares E + Standard_Boolean bFound; + TopTools_ListIteratorOfListOfShape aItLF; + NMTTools_ListOfCoupleOfShape aLCSOff; + // + aItLF.Initialize(aLF); + for (; aItLF.More(); aItLF.Next()) { + const TopoDS_Face& aFL=TopoDS::Face(aItLF.Value()); + if (myShapesToAvoid.Contains(aFL)) { + continue; + } + if (aF.IsSame(aFL)) { + continue; + } + if (AddedFacesMap.Contains(aFL)){ + continue; + } + // + bFound=GEOMAlgo_Tools3D::GetEdgeOff(aE, aFL, aEL); + if (!bFound) { + continue; + } + // + aCSOff.SetShape1(aEL); + aCSOff.SetShape2(aFL); + aLCSOff.Append(aCSOff); + }//for (; aItLF.More(); aItLF.Next()) { + // + aNbOff=aLCSOff.Extent(); + if (!aNbOff){ + continue; + } + // + TopoDS_Face aSelF; + if (aNbOff==1) { + aSelF=TopoDS::Face(aLCSOff.First().Shape2()); + } + else if (aNbOff>1){ + GEOMAlgo_Tools3D::GetFaceOff(aE, aF, aLCSOff, aSelF); + } + // if (!aSelF.IsNull() && AddedFacesMap.Add(aSelF)) { aBB.Add(aShell, aSelF); - TopExp::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP); - } + TopExp::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP); + } } // for (; aEdgeExp.More(); aEdgeExp.Next()) { } //for (; aItAddedF.More(); aItAddedF.Next()) { //modified by NIZNHY-PKV Tue Aug 5 15:07:08 2008f @@ -393,8 +393,8 @@ static TopoDS_Iterator aItS; aItS.Initialize(aShell); for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aFs=aItS.Value(); - aMFP.Add(aFs); + const TopoDS_Shape& aFs=aItS.Value(); + aMFP.Add(aFs); } } */ @@ -468,14 +468,14 @@ static TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE); for (; aEdgeExp.More(); aEdgeExp.Next()) { const TopoDS_Edge& aE = TopoDS::Edge(aEdgeExp.Current()); - const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE); - aItF.Initialize(aLF); - for (; aItF.More(); aItF.Next()) { - const TopoDS_Face& aFL=TopoDS::Face(aItF.Value()); - if (AddedFacesMap.Add(aFL)){ - aBB.Add(aShell, aFL); - } - } + const TopTools_ListOfShape& aLF=aEFMap.FindFromKey(aE); + aItF.Initialize(aLF); + for (; aItF.More(); aItF.Next()) { + const TopoDS_Face& aFL=TopoDS::Face(aItF.Value()); + if (AddedFacesMap.Add(aFL)){ + aBB.Add(aShell, aFL); + } + } } } myLoopsInternal.Append(aShell); @@ -522,16 +522,16 @@ static //bIsHole=GEOMAlgo_BuilderTools::IsHole(aShell); //XX if (bIsHole) { - aHoleShells.Append(aShell); - TopExp::MapShapes(aShell, TopAbs_FACE, aMHF); + aHoleShells.Append(aShell); + TopExp::MapShapes(aShell, TopAbs_FACE, aMHF); } else { - // make a growth solid from a shell - TopoDS_Solid Solid; - aBB.MakeSolid(Solid); - aBB.Add (Solid, aShell); - // - aNewSolids.Append (Solid); + // make a growth solid from a shell + TopoDS_Solid Solid; + aBB.MakeSolid(Solid); + aBB.Add (Solid, aShell); + // + aNewSolids.Append (Solid); } } } @@ -565,13 +565,13 @@ static if (aInOutMap.IsBound(aHole)){ const TopoDS_Shape& aSolid=aInOutMap(aHole); if (aMSH.IsBound(aSolid)) { - TopTools_ListOfShape& aLH=aMSH.ChangeFind(aSolid); - aLH.Append(aHole); + TopTools_ListOfShape& aLH=aMSH.ChangeFind(aSolid); + aLH.Append(aHole); } else { - TopTools_ListOfShape aLH; - aLH.Append(aHole); - aMSH.Bind(aSolid, aLH); + TopTools_ListOfShape aLH; + aLH.Append(aHole); + aMSH.Bind(aSolid, aLH); } //aBB.Add (aSolid, aHole); } @@ -647,7 +647,7 @@ static for (; aItMF.More(); aItMF.Next()) { const TopoDS_Face& aF=TopoDS::Face(aItMF.Key()); if (GEOMAlgo_Tools3D::IsInternalFace(aF, aSolid, aMEF, 1.e-14, *myContext)) { - aMFP.Add(aF); + aMFP.Add(aF); } } // @@ -681,7 +681,7 @@ static //purpose : //======================================================================= void MakeInternalShells(const TopTools_MapOfShape& theMF, - TopTools_ListOfShape& theShells) + TopTools_ListOfShape& theShells) { TopTools_MapIteratorOfMapOfShape aItM; TopTools_MapOfShape aAddedFacesMap; @@ -715,15 +715,15 @@ void MakeInternalShells(const TopTools_MapOfShape& theMF, TopExp_Explorer aEdgeExp(aF, TopAbs_EDGE); for (; aEdgeExp.More(); aEdgeExp.Next()) { const TopoDS_Shape& aE =aEdgeExp.Current(); - const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE); - aItF.Initialize(aLF); - for (; aItF.More(); aItF.Next()) { - TopoDS_Shape aFL=aItF.Value(); - if (aAddedFacesMap.Add(aFL)){ - aFL.Orientation(TopAbs_INTERNAL); - aBB.Add(aShell, aFL); - } - } + const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE); + aItF.Initialize(aLF); + for (; aItF.More(); aItF.Next()) { + TopoDS_Shape aFL=aItF.Value(); + if (aAddedFacesMap.Add(aFL)){ + aFL.Orientation(TopAbs_INTERNAL); + aBB.Add(aShell, aFL); + } + } } } theShells.Append(aShell); @@ -734,7 +734,7 @@ void MakeInternalShells(const TopTools_MapOfShape& theMF, //purpose : //======================================================================= Standard_Boolean IsHole(const TopoDS_Shape& theS2, - IntTools_PContext& theContext) + IntTools_PContext& theContext) { TopoDS_Solid *pS2=(TopoDS_Solid *)&theS2; BRepClass3d_SolidClassifier& aClsf=theContext->SolidClassifier(*pS2); @@ -748,8 +748,8 @@ Standard_Boolean IsHole(const TopoDS_Shape& theS2, //purpose : //======================================================================= Standard_Boolean IsInside(const TopoDS_Shape& theS1, - const TopoDS_Shape& theS2, - IntTools_PContext& theContext) + const TopoDS_Shape& theS2, + IntTools_PContext& theContext) { TopExp_Explorer aExp; TopAbs_State aState; @@ -774,7 +774,7 @@ Standard_Boolean IsInside(const TopoDS_Shape& theS1, //purpose : //======================================================================= Standard_Boolean IsGrowthShell(const TopoDS_Shape& theShell, - const TopTools_IndexedMapOfShape& theMHF) + const TopTools_IndexedMapOfShape& theMHF) { Standard_Boolean bRet; TopoDS_Iterator aIt; @@ -785,7 +785,7 @@ Standard_Boolean IsGrowthShell(const TopoDS_Shape& theShell, for(; aIt.More(); aIt.Next()) { const TopoDS_Shape& aF=aIt.Value(); if (theMHF.Contains(aF)) { - return !bRet; + return !bRet; } } } @@ -812,18 +812,18 @@ Standard_Boolean IsClosedShell(const TopoDS_Shell& theShell) for (; aExp.More(); aExp.Next()) { const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current()); if (BRep_Tool::Degenerated(aE)) { - continue; + continue; } /* if (BRep_Tool::IsClosed(aE, aF)) { - continue; + continue; } */ if (aE.Orientation()==TopAbs_INTERNAL) { - continue; + continue; } if (!aM.Add(aE)) { - aM.Remove(aE); + aM.Remove(aE); } } } diff --git a/src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx b/src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx index 1ecab1312..bcf98d27d 100755 --- a/src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_BuilderTools.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_BuilderTools.cxx -// Created: -// Author: Peter KURNEV -// +// File: GEOMAlgo_BuilderTools.cxx +// Created: +// Author: Peter KURNEV +// // #include @@ -60,8 +60,8 @@ static Standard_Integer ComputeProps(const TopoDS_Face& aF, - Standard_Real& aA, - Standard_Real& aV); + Standard_Real& aA, + Standard_Real& aV); static void BuildTriangulation(const TopoDS_Face& aF); @@ -70,7 +70,7 @@ static //purpose : //======================================================================= Standard_Boolean GEOMAlgo_BuilderTools::IsHole(const TopoDS_Shape& aW, - const TopoDS_Shape& aFace) + const TopoDS_Shape& aFace) { Standard_Boolean bIsHole; Standard_Integer i, aNbS; @@ -96,7 +96,7 @@ static const TopoDS_Edge& aE=TopoDS::Edge(aItW.Value()); aOr=aE.Orientation(); if (!(aOr==TopAbs_FORWARD || - aOr==TopAbs_REVERSED)) { + aOr==TopAbs_REVERSED)) { continue; } // @@ -168,8 +168,8 @@ static //purpose : //======================================================================= Standard_Integer ComputeProps(const TopoDS_Face& aF, - Standard_Real& aA, - Standard_Real& aV) + Standard_Real& aA, + Standard_Real& aV) { Standard_Integer j, i, i1, i2, aNbNodes, aNbTrigs, n[3]; Standard_Real aAi, aVi; @@ -225,7 +225,7 @@ Standard_Integer ComputeProps(const TopoDS_Face& aF, Standard_Real aSx, aZx; gp_Dir aDN(aVN); if (aOr==TopAbs_REVERSED) { - aDN.Reverse(); + aDN.Reverse(); } // aSx=aAi*aDN.Z(); @@ -269,11 +269,11 @@ void BuildTriangulation(const TopoDS_Face& aF) aDiscret=aCoeff*dMax; // BRepMesh_FastDiscret aMesher(aDiscret, - aAngle, - aBox, - bWithShare, - Standard_True, - Standard_False, - Standard_True); + aAngle, + aBox, + bWithShare, + Standard_True, + Standard_False, + Standard_True); aMesher.Add(aF); } diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx index b84058616..5698a5869 100755 --- a/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder_1.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Builder_1.cxx -// Created: -// Author: Peter KURNEV +// File: GEOMAlgo_Builder_1.cxx +// Created: +// Author: Peter KURNEV // #include // @@ -64,12 +64,12 @@ static void FillImagesCompounds(const TopTools_MapOfShape& , - BRepAlgo_Image& ); + BRepAlgo_Image& ); static void FillImagesCompound(const TopoDS_Shape& , - BRepAlgo_Image& , - TopTools_MapOfShape& ); + BRepAlgo_Image& , + TopTools_MapOfShape& ); //======================================================================= //function : FillImagesVertices @@ -90,12 +90,12 @@ static if (aV.ShapeType()==TopAbs_VERTEX) { iV=pPF->FindSDVertex(i); if (iV) { - const TopoDS_Shape& aVSD=aDS.Shape(iV); - if (!myImages.HasImage(aV)) { - myImages.Bind(aV, aVSD); - // - mySameDomainShapes.Add(aV, aVSD); - } + const TopoDS_Shape& aVSD=aDS.Shape(iV); + if (!myImages.HasImage(aV)) { + myImages.Bind(aV, aVSD); + // + mySameDomainShapes.Add(aV, aVSD); + } } } } @@ -158,22 +158,22 @@ static //modified by NIZNHY-PKV Fri Nov 30 10:41:39 2007f //if (aSpR.IsSame(aSp) && aSpR.IsSame(aE)) { if (aSpR.IsSame(aSp) && aSpR.IsSame(aE) && !aIsCB) { - //modified by NIZNHY-PKV Fri Nov 30 10:41:46 2007t - continue; + //modified by NIZNHY-PKV Fri Nov 30 10:41:46 2007t + continue; } // aESpR=TopoDS::Edge(aSpR); bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx); if (bToReverse) { - aESpR.Reverse(); + aESpR.Reverse(); } aLSp.Append(aESpR); // aItLB.Initialize(aLB); for (; aItLB.More(); aItLB.Next()) { - nSpx=aItLB.Value(); - const TopoDS_Shape& aSpx=aDS.Shape(nSpx); - mySameDomainShapes.Add(aSpx ,aSpR); + nSpx=aItLB.Value(); + const TopoDS_Shape& aSpx=aDS.Shape(nSpx); + mySameDomainShapes.Add(aSpx ,aSpR); } // // @@ -181,28 +181,28 @@ static else { aIt.Initialize(aLPB); for (; aIt.More(); aIt.Next()) { - const BOPTools_PaveBlock& aPB=aIt.Value(); - //modified by NIZNHY-PKV Fri Nov 30 10:42:15 2007f - //const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB); - const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB, aIsCB); - //modified by NIZNHY-PKV Fri Nov 30 10:42:20 2007t - nSpR=aPBR.Edge(); - const TopoDS_Shape& aSpR=aDS.Shape(nSpR); - // - aESpR=TopoDS::Edge(aSpR); - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx); - if (bToReverse) { - aESpR.Reverse(); - } - aLSp.Append(aESpR); - // - aItLB.Initialize(aLB); - for (; aItLB.More(); aItLB.Next()) { - nSpx=aItLB.Value(); - const TopoDS_Shape& aSpx=aDS.Shape(nSpx); - mySameDomainShapes.Add(aSpx ,aSpR); - } - // + const BOPTools_PaveBlock& aPB=aIt.Value(); + //modified by NIZNHY-PKV Fri Nov 30 10:42:15 2007f + //const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB); + const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB, aLB, aIsCB); + //modified by NIZNHY-PKV Fri Nov 30 10:42:20 2007t + nSpR=aPBR.Edge(); + const TopoDS_Shape& aSpR=aDS.Shape(nSpR); + // + aESpR=TopoDS::Edge(aSpR); + bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aESpR, aEE, aCtx); + if (bToReverse) { + aESpR.Reverse(); + } + aLSp.Append(aESpR); + // + aItLB.Initialize(aLB); + for (; aItLB.More(); aItLB.Next()) { + nSpx=aItLB.Value(); + const TopoDS_Shape& aSpx=aDS.Shape(nSpx); + mySameDomainShapes.Add(aSpx ,aSpR); + } + // } } // @@ -254,8 +254,8 @@ static for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aF=aIt.Value(); if (myImages.HasImage(aF)) { - bInterferred=!bInterferred; - break; + bInterferred=!bInterferred; + break; } } if (!bInterferred){ @@ -269,20 +269,20 @@ static for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aF=aIt.Value(); if (myImages.HasImage(aF)) { - const TopTools_ListOfShape& aLFIm=myImages.Image(aF); - aItIm.Initialize(aLFIm); - for (; aItIm.More(); aItIm.Next()) { - TopoDS_Shape aFIm=aItIm.Value(); - // - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFIm, aF, aCtx); - if (bToReverse) { - aFIm.Reverse(); - } - aBB.Add(aCIm, aFIm); - } + const TopTools_ListOfShape& aLFIm=myImages.Image(aF); + aItIm.Initialize(aLFIm); + for (; aItIm.More(); aItIm.Next()) { + TopoDS_Shape aFIm=aItIm.Value(); + // + bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFIm, aF, aCtx); + if (bToReverse) { + aFIm.Reverse(); + } + aBB.Add(aCIm, aFIm); + } } else { - aBB.Add(aCIm, aF); + aBB.Add(aCIm, aF); } } myImages.Bind(aC, aCIm); @@ -293,7 +293,7 @@ static // purpose: //======================================================================= void FillImagesCompounds(const TopTools_MapOfShape& theMS, - BRepAlgo_Image& theImages) + BRepAlgo_Image& theImages) { TopTools_MapOfShape aMFP; TopTools_MapIteratorOfMapOfShape aItS; @@ -309,8 +309,8 @@ void FillImagesCompounds(const TopTools_MapOfShape& theMS, //purpose : //======================================================================= void FillImagesCompound(const TopoDS_Shape& theS, - BRepAlgo_Image& theImages, - TopTools_MapOfShape& theMFP) + BRepAlgo_Image& theImages, + TopTools_MapOfShape& theMFP) { Standard_Boolean bInterferred; TopAbs_ShapeEnum aTypeX; @@ -350,9 +350,9 @@ void FillImagesCompound(const TopoDS_Shape& theS, const TopTools_ListOfShape& aLFIm=theImages.Image(aSX); aItIm.Initialize(aLFIm); for (; aItIm.More(); aItIm.Next()) { - TopoDS_Shape aSXIm=aItIm.Value(); - aSXIm.Orientation(aOrX); - aBB.Add(aCIm, aSXIm); + TopoDS_Shape aSXIm=aItIm.Value(); + aSXIm.Orientation(aOrX); + aBB.Add(aCIm, aSXIm); } } else { diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx index 45e7543b4..dc60d6967 100755 --- a/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder_2.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Builder_2.cxx -// Created: -// Author: Peter KURNEV +// File: GEOMAlgo_Builder_2.cxx +// Created: +// Author: Peter KURNEV // #include @@ -87,8 +87,8 @@ static void UpdateCandidates(const Standard_Integer , - const Standard_Integer , - NMTTools_IndexedDataMapOfIndexedMapOfInteger& ); + const Standard_Integer , + NMTTools_IndexedDataMapOfIndexedMapOfInteger& ); //======================================================================= //function : FillImagesFaces @@ -145,15 +145,15 @@ static NMTTools_ListOfCommonBlock& aLCB=aCBP(j); aItCB.Initialize(aLCB); for (; aItCB.More(); aItCB.Next()) { - NMTTools_CommonBlock& aCB=aItCB.Value(); - if (aCB.IsPaveBlockOnFace(nF)) { - const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(); - nSpIn=aPB1.Edge(); - const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn); - if (aMFence.Add(aSpIn)){ - aLSpIn.Append(aSpIn); - } - } + NMTTools_CommonBlock& aCB=aItCB.Value(); + if (aCB.IsPaveBlockOnFace(nF)) { + const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(); + nSpIn=aPB1.Edge(); + const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn); + if (aMFence.Add(aSpIn)){ + aLSpIn.Append(aSpIn); + } + } } } // @@ -162,24 +162,24 @@ static BOPTools_SSInterference& aFF=aFFs(j); aFF.Indices(n1, n2); if (!(n1==nF || n2==nF)) { - continue; + continue; } BOPTools_SequenceOfCurves& aSC=aFF.Curves(); aNbCurves=aSC.Length(); if (!aNbCurves) { - continue; + continue; } // const BOPTools_Curve& aBC=aSC(1); const BOPTools_ListOfPaveBlock& aLPB=aBC.NewPaveBlocks(); aItPB.Initialize(aLPB); for (; aItPB.More(); aItPB.Next()) { - const BOPTools_PaveBlock& aPBSc=aItPB.Value(); - nSpSc=aPBSc.Edge(); - const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc); - if (aMFence.Add(aSpSc)){ - aLSpIn.Append(aSpSc); - } + const BOPTools_PaveBlock& aPBSc=aItPB.Value(); + nSpSc=aPBSc.Edge(); + const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc); + if (aMFence.Add(aSpSc)){ + aLSpIn.Append(aSpSc); + } } } aNbSpIn=aLSpIn.Extent(); @@ -232,8 +232,8 @@ static for (; anExp.More(); anExp.Next()) { const TopoDS_Shape& aE=anExp.Current(); if (myImages.HasImage(aE)) { - aMFP.Add(i); - break; + aMFP.Add(i); + break; } } // @@ -243,17 +243,17 @@ static // aNbFFs=aFFs.Extent(); for (j=1; j<=aNbFFs; ++j) { - BOPTools_SSInterference& aFFj=aFFs(j); - aFFj.Indices(n1, n2); - if (!(n1==i || n2==i)) { - continue; - } - // - const TColStd_ListOfInteger& aLSE=aFFj.SharedEdges(); - aNbSE=aLSE.Extent(); - if (aNbSE) { - aMFP.Add(i); - } + BOPTools_SSInterference& aFFj=aFFs(j); + aFFj.Indices(n1, n2); + if (!(n1==i || n2==i)) { + continue; + } + // + const TColStd_ListOfInteger& aLSE=aFFj.SharedEdges(); + aNbSE=aLSE.Extent(); + if (aNbSE) { + aMFP.Add(i); + } } } //=== @@ -282,17 +282,17 @@ static anOriE=aE.Orientation(); // if (!myImages.HasImage(aE)) { - if (anOriE==TopAbs_INTERNAL) { - aEE=aE; - aEE.Orientation(TopAbs_FORWARD); - aWES.AddStartElement(aEE); - aEE.Orientation(TopAbs_REVERSED); - aWES.AddStartElement(aEE); - } - else { - aWES.AddStartElement(aE); - } - continue; + if (anOriE==TopAbs_INTERNAL) { + aEE=aE; + aEE.Orientation(TopAbs_FORWARD); + aWES.AddStartElement(aEE); + aEE.Orientation(TopAbs_REVERSED); + aWES.AddStartElement(aEE); + } + else { + aWES.AddStartElement(aE); + } + continue; } // bIsDegenerated=BRep_Tool::Degenerated(aE); @@ -301,43 +301,43 @@ static const TopTools_ListOfShape& aLIE=myImages.Image(aE); aIt.Initialize(aLIE); for (; aIt.More(); aIt.Next()) { - aSp=TopoDS::Edge(aIt.Value()); - // - if (bIsDegenerated) { - aSp.Orientation(anOriE); - aWES.AddStartElement(aSp); - continue; - } - // - if (anOriE==TopAbs_INTERNAL) { - aSp.Orientation(TopAbs_FORWARD); - aWES.AddStartElement(aSp); - aSp.Orientation(TopAbs_REVERSED); - aWES.AddStartElement(aSp); - continue; - } - // - if (bIsClosed){ - if (aMFence.Add(aSp)) { - // - if (!BRep_Tool::IsClosed(aSp, aF)){ - BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF); - } - // - aSp.Orientation(TopAbs_FORWARD); - aWES.AddStartElement(aSp); - aSp.Orientation(TopAbs_REVERSED); - aWES.AddStartElement(aSp); - } - continue; - }// if (aMFence.Add(aSp)) - // - aSp.Orientation(anOriE); - bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx); - if (bToReverse) { - aSp.Reverse(); - } - aWES.AddStartElement(aSp); + aSp=TopoDS::Edge(aIt.Value()); + // + if (bIsDegenerated) { + aSp.Orientation(anOriE); + aWES.AddStartElement(aSp); + continue; + } + // + if (anOriE==TopAbs_INTERNAL) { + aSp.Orientation(TopAbs_FORWARD); + aWES.AddStartElement(aSp); + aSp.Orientation(TopAbs_REVERSED); + aWES.AddStartElement(aSp); + continue; + } + // + if (bIsClosed){ + if (aMFence.Add(aSp)) { + // + if (!BRep_Tool::IsClosed(aSp, aF)){ + BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF); + } + // + aSp.Orientation(TopAbs_FORWARD); + aWES.AddStartElement(aSp); + aSp.Orientation(TopAbs_REVERSED); + aWES.AddStartElement(aSp); + } + continue; + }// if (aMFence.Add(aSp)) + // + aSp.Orientation(anOriE); + bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx); + if (bToReverse) { + aSp.Reverse(); + } + aWES.AddStartElement(aSp); }// for (; aIt.More(); aIt.Next()) { }// for (; anExp.More(); anExp.Next()) { // @@ -346,13 +346,13 @@ static const TopTools_ListOfShape& aLE=myInParts.FindFromKey(aF); aIt.Initialize(aLE); for (; aIt.More(); aIt.Next()) { - aSp=TopoDS::Edge(aIt.Value()); - // - aSp.Orientation(TopAbs_FORWARD); - aWES.AddStartElement(aSp); - // - aSp.Orientation(TopAbs_REVERSED); - aWES.AddStartElement(aSp); + aSp=TopoDS::Edge(aIt.Value()); + // + aSp.Orientation(TopAbs_FORWARD); + aWES.AddStartElement(aSp); + // + aSp.Orientation(TopAbs_REVERSED); + aWES.AddStartElement(aSp); } } // @@ -374,8 +374,8 @@ static aBBx.Add(aCx, aFF); aItx.Initialize(aSE); for (; aItx.More(); aItx.Next()) { - TopoDS_Shape& aEx=aItx.Value(); - aBBx.Add(aCx, aEx); + TopoDS_Shape& aEx=aItx.Value(); + aBBx.Add(aCx, aEx); } int a=0; } @@ -394,7 +394,7 @@ static for (; aIt.More(); aIt.Next()) { TopoDS_Shape& aFR=aIt.Value(); if (anOriF==TopAbs_REVERSED) { - aFR.Orientation(TopAbs_REVERSED); + aFR.Orientation(TopAbs_REVERSED); } aLFR.Append(aFR); } @@ -466,35 +466,35 @@ static // aItF2.Initialize(aLF2); for (; aItF2.More(); aItF2.Next()) { - const TopoDS_Face& aF2y=TopoDS::Face(aItF2.Value()); - bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx); - if (bIsSDF) { - if (aMFence.Contains(aF1x) || - aMFence.Contains(aF2y)) { - continue; - } - aMFence.Add(aF1x); - aMFence.Add(aF2y); - // - NMTTools_CoupleOfShape aCS; - // - aCS.SetShape1(aF1x); - aCS.SetShape2(aF2y); - aLCS.Append(aCS); - // - if (aF1x==aF1) { - if (!mySplitFaces.HasImage(aF1)) { - mySplitFaces.Bind(aF1, aF1); - } - } - if (aF2y==aF2) { - if (!mySplitFaces.HasImage(aF2)) { - mySplitFaces.Bind(aF2, aF2); - } - } - // - - } + const TopoDS_Face& aF2y=TopoDS::Face(aItF2.Value()); + bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx); + if (bIsSDF) { + if (aMFence.Contains(aF1x) || + aMFence.Contains(aF2y)) { + continue; + } + aMFence.Add(aF1x); + aMFence.Add(aF2y); + // + NMTTools_CoupleOfShape aCS; + // + aCS.SetShape1(aF1x); + aCS.SetShape2(aF2y); + aLCS.Append(aCS); + // + if (aF1x==aF1) { + if (!mySplitFaces.HasImage(aF1)) { + mySplitFaces.Bind(aF1, aF1); + } + } + if (aF2y==aF2) { + if (!mySplitFaces.HasImage(aF2)) { + mySplitFaces.Bind(aF2, aF2); + } + } + // + + } } } }//for (i=1; i<=aNbFF; ++i) @@ -555,16 +555,16 @@ static for (; aIt.More(); aIt.Next()) { aFSp=TopoDS::Face(aIt.Value()); if (!mySameDomainShapes.Contains(aFSp)) { - aLFx.Append(aFSp); + aLFx.Append(aFSp); } else { - const TopoDS_Shape& aSx=mySameDomainShapes.FindFromKey(aFSp); - aFSD=TopoDS::Face(aSx); - iSense=GEOMAlgo_Tools3D::Sense(aFSp, aFSD); - if (iSense<0) { - aFSD.Reverse(); - } - aLFx.Append(aFSD); + const TopoDS_Shape& aSx=mySameDomainShapes.FindFromKey(aFSp); + aFSD=TopoDS::Face(aSx); + iSense=GEOMAlgo_Tools3D::Sense(aFSp, aFSD); + if (iSense<0) { + aFSD.Reverse(); + } + aLFx.Append(aFSD); } } if (!myImages.HasImage(aF)) {//XX @@ -659,13 +659,13 @@ static const TColStd_IndexedMapOfInteger& aMAVF=aMAV.FindFromKey(nF); aNbAVF=aMAVF.Extent(); for (j=1; j<=aNbAVF; ++j) { - nV=aMAVF(j); - nVSD=pPF->FindSDVertex(nV); - if (nVSD) { - nV=nVSD; - } - // - UpdateCandidates(nF, nV, aMFMV); + nV=aMAVF(j); + nVSD=pPF->FindSDVertex(nV); + if (nVSD) { + nV=nVSD; + } + // + UpdateCandidates(nF, nV, aMFMV); } } // @@ -676,12 +676,12 @@ static nV=aExp.Current(); const TopoDS_Shape& aV=aDS.Shape(nV); if (aV.Orientation()==TopAbs_INTERNAL) { - nVSD=pPF->FindSDVertex(nV); - if (nVSD) { - nV=nVSD; - } - // - UpdateCandidates(nF, nV, aMFMV); + nVSD=pPF->FindSDVertex(nV); + if (nVSD) { + nV=nVSD; + } + // + UpdateCandidates(nF, nV, aMFMV); } } // @@ -705,25 +705,25 @@ static const TopTools_ListOfShape& aLFx=myImages.Image(aF); aIt.Initialize(aLFx); for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aFx=aIt.Value(); - TopExp::MapShapesAndAncestors(aFx, TopAbs_VERTEX, TopAbs_EDGE, aMVE); + const TopoDS_Shape& aFx=aIt.Value(); + TopExp::MapShapesAndAncestors(aFx, TopAbs_VERTEX, TopAbs_EDGE, aMVE); } } - else { + else { Standard_Boolean bFaceToProcess; // TopExp::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE); bFaceToProcess=Standard_False; for (j=1; j<=aNbVC; ++j) { - nV=aMVC(j); - const TopoDS_Shape& aV=aDS.Shape(nV); - if (!aMVE.Contains(aV)) { - bFaceToProcess=!bFaceToProcess; - break; - } + nV=aMVC(j); + const TopoDS_Shape& aV=aDS.Shape(nV); + if (!aMVE.Contains(aV)) { + bFaceToProcess=!bFaceToProcess; + break; + } } if (!bFaceToProcess) { - continue; + continue; } }// else // @@ -731,11 +731,11 @@ static nV=aMVC(j); const TopoDS_Shape& aV=aDS.Shape(nV); if (aMVE.Contains(aV)) { - const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV); - aNbE=aLE.Extent(); - if (aNbE) { - continue; - } + const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV); + aNbE=aLE.Extent(); + if (aNbE) { + continue; + } } aLV.Append(aV); } @@ -745,41 +745,41 @@ static // 3. Try to put vertices into the face(s) aItV.Initialize(aLV); for (; aItV.More(); aItV.Next()) { - TopoDS_Vertex aV=TopoDS::Vertex(aItV.Value()); - aV.Orientation(TopAbs_INTERNAL); - // - bHasImage=myImages.HasImage(aF); - if (bHasImage) { - const TopTools_ListOfShape& aLFx=myImages.Image(aF); - aIt.Initialize(aLFx); - for (; aIt.More(); aIt.Next()) { - TopoDS_Face aFx=TopoDS::Face(aIt.Value()); - // update classifier - IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx); - aClsf.Init(aFx, aTol); - // - iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2); - if (!iFlag) { - aBB.Add(aFx, aV); - break; - } - } - } - else { - const TopoDS_Face& aFx=TopoDS::Face(aF); - // update classifier - IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx); - aClsf.Init(aFx, aTol); - // - iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2); - if (!iFlag) { - TopoDS_Face aFz; - // - GEOMAlgo_Tools3D::CopyFace(aFx, aFz); - aBB.Add(aFz, aV); - myImages.Bind(aF, aFz); - } - } + TopoDS_Vertex aV=TopoDS::Vertex(aItV.Value()); + aV.Orientation(TopAbs_INTERNAL); + // + bHasImage=myImages.HasImage(aF); + if (bHasImage) { + const TopTools_ListOfShape& aLFx=myImages.Image(aF); + aIt.Initialize(aLFx); + for (; aIt.More(); aIt.Next()) { + TopoDS_Face aFx=TopoDS::Face(aIt.Value()); + // update classifier + IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx); + aClsf.Init(aFx, aTol); + // + iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2); + if (!iFlag) { + aBB.Add(aFx, aV); + break; + } + } + } + else { + const TopoDS_Face& aFx=TopoDS::Face(aF); + // update classifier + IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx); + aClsf.Init(aFx, aTol); + // + iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2); + if (!iFlag) { + TopoDS_Face aFz; + // + GEOMAlgo_Tools3D::CopyFace(aFx, aFz); + aBB.Add(aFz, aV); + myImages.Bind(aF, aFz); + } + } }// for (; aItV.More(); aItV.Next()) { }// if (aNbV) { }// for (nF=1; nF<=aNb; ++nF) { @@ -789,8 +789,8 @@ static // purpose: //======================================================================= void UpdateCandidates(const Standard_Integer theNF, - const Standard_Integer theNV, - NMTTools_IndexedDataMapOfIndexedMapOfInteger& theMFMV) + const Standard_Integer theNV, + NMTTools_IndexedDataMapOfIndexedMapOfInteger& theMFMV) { if (theMFMV.Contains(theNF)) { TColStd_IndexedMapOfInteger& aMV=theMFMV.ChangeFromKey(theNF); diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx index 1a3b5b566..0c354b72c 100755 --- a/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder_3.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Builder_3.cxx -// Created: -// Author: Peter KURNEV +// File: GEOMAlgo_Builder_3.cxx +// Created: +// Author: Peter KURNEV // #include @@ -70,7 +70,7 @@ static void OwnInternalShapes(const TopoDS_Shape& , - TopTools_IndexedMapOfShape& ); + TopTools_IndexedMapOfShape& ); //======================================================================= //function : FillImagesSolids @@ -89,8 +89,8 @@ static //purpose : //======================================================================= void GEOMAlgo_Builder::BuildDraftSolid(const TopoDS_Shape& theSolid, - TopoDS_Shape& theDraftSolid, - TopTools_ListOfShape& theLIF) + TopoDS_Shape& theDraftSolid, + TopTools_ListOfShape& theLIF) { myErrorStatus=0; // @@ -102,7 +102,7 @@ static Standard_Integer iFlag; TopAbs_Orientation aOrF, aOrSh, aOrSd; TopoDS_Iterator aIt1, aIt2; - TopTools_ListIteratorOfListOfShape aItS; + TopTools_ListIteratorOfListOfShape aItS; BRep_Builder aBB; TopoDS_Shell aShD; TopoDS_Shape aFSDx, aFx; @@ -128,49 +128,49 @@ static aOrF=aF.Orientation(); // if (myImages.HasImage(aF)) { - const TopTools_ListOfShape& aLSp=myImages.Image(aF); - aItS.Initialize(aLSp); - for (; aItS.More(); aItS.Next()) { - aFx=aItS.Value(); - // - if (mySameDomainShapes.Contains(aFx)) { - aFSDx=mySameDomainShapes.FindFromKey(aFx); - // - if (aOrF==TopAbs_INTERNAL) { - aFSDx.Orientation(aOrF); - theLIF.Append(aFSDx); - } - else { - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFSDx, aF, aCtx); - if (bToReverse) { - aFSDx.Reverse(); - } - // - iFlag=1; - aBB.Add(aShD, aFSDx); - } - }// if (mySameDomainShapes.Contains(aFx)) { - else { - aFx.Orientation(aOrF); - if (aOrF==TopAbs_INTERNAL) { - theLIF.Append(aFx); - } - else{ - iFlag=1; - aBB.Add(aShD, aFx); - } - } - } + const TopTools_ListOfShape& aLSp=myImages.Image(aF); + aItS.Initialize(aLSp); + for (; aItS.More(); aItS.Next()) { + aFx=aItS.Value(); + // + if (mySameDomainShapes.Contains(aFx)) { + aFSDx=mySameDomainShapes.FindFromKey(aFx); + // + if (aOrF==TopAbs_INTERNAL) { + aFSDx.Orientation(aOrF); + theLIF.Append(aFSDx); + } + else { + bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aFSDx, aF, aCtx); + if (bToReverse) { + aFSDx.Reverse(); + } + // + iFlag=1; + aBB.Add(aShD, aFSDx); + } + }// if (mySameDomainShapes.Contains(aFx)) { + else { + aFx.Orientation(aOrF); + if (aOrF==TopAbs_INTERNAL) { + theLIF.Append(aFx); + } + else{ + iFlag=1; + aBB.Add(aShD, aFx); + } + } + } } //if (myImages.HasImage(aF)) { // else { - if (aOrF==TopAbs_INTERNAL) { - theLIF.Append(aF); - } - else{ - iFlag=1; - aBB.Add(aShD, aF); - } + if (aOrF==TopAbs_INTERNAL) { + theLIF.Append(aF); + } + else{ + iFlag=1; + aBB.Add(aShD, aF); + } } } //for (; aIt2.More(); aIt2.Next()) { // @@ -198,7 +198,7 @@ static TopTools_IndexedMapOfShape aMSolids, aMS, aMFaces, aMFIN; TopTools_MapOfShape aMFDone; TopTools_IndexedDataMapOfShapeListOfShape aMEF; - TopTools_ListIteratorOfListOfShape aItS; + TopTools_ListIteratorOfListOfShape aItS; TopoDS_Iterator aIt, aItF; BRep_Builder aBB; TopoDS_Solid aSolidSp; @@ -218,28 +218,28 @@ static else if (aType==TopAbs_FACE) { // all faces (originals from DS or theirs images) if (myImages.HasImage(aS)) { - const TopTools_ListOfShape& aLS=myImages.Image(aS); - aItS.Initialize(aLS); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aFx=aItS.Value(); - // - if (mySameDomainShapes.Contains(aFx)) { - const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aFx); - aMFaces.Add(aFSDx); - } - else { - aMFaces.Add(aFx); - } - } + const TopTools_ListOfShape& aLS=myImages.Image(aS); + aItS.Initialize(aLS); + for (; aItS.More(); aItS.Next()) { + const TopoDS_Shape& aFx=aItS.Value(); + // + if (mySameDomainShapes.Contains(aFx)) { + const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aFx); + aMFaces.Add(aFSDx); + } + else { + aMFaces.Add(aFx); + } + } } else { - if (mySameDomainShapes.Contains(aS)) { - const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aS); - aMFaces.Add(aFSDx); - } - else { - aMFaces.Add(aS); - } + if (mySameDomainShapes.Contains(aS)) { + const TopoDS_Shape& aFSDx=mySameDomainShapes.FindFromKey(aS); + aMFaces.Add(aFSDx); + } + else { + aMFaces.Add(aS); + } } } } @@ -268,22 +268,22 @@ static const TopoDS_Shape& aShell=aIt.Value(); // if (myImages.HasImage(aShell)) { - bHasImage=Standard_True; - // - const TopTools_ListOfShape& aLS=myImages.Image(aShell); - aItS.Initialize(aLS); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aSx=aItS.Value(); - aMS.Add(aSx); - TopExp::MapShapes(aSx, TopAbs_FACE, aMS); - TopExp::MapShapes(aSx, TopAbs_EDGE, aMS); - TopExp::MapShapesAndAncestors(aSx, TopAbs_EDGE, TopAbs_FACE, aMEF); - } + bHasImage=Standard_True; + // + const TopTools_ListOfShape& aLS=myImages.Image(aShell); + aItS.Initialize(aLS); + for (; aItS.More(); aItS.Next()) { + const TopoDS_Shape& aSx=aItS.Value(); + aMS.Add(aSx); + TopExp::MapShapes(aSx, TopAbs_FACE, aMS); + TopExp::MapShapes(aSx, TopAbs_EDGE, aMS); + TopExp::MapShapesAndAncestors(aSx, TopAbs_EDGE, TopAbs_FACE, aMEF); + } } else { - //aMS.Add(aShell); - TopExp::MapShapes(aShell, TopAbs_FACE, aMS); - TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF); + //aMS.Add(aShell); + TopExp::MapShapes(aShell, TopAbs_FACE, aMS); + TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEF); } } // @@ -298,7 +298,7 @@ static for (j=1; j<=aNbFaces; ++j) { const TopoDS_Shape& aFace=aMFaces(j); if (!aMS.Contains(aFace)) { - TopExp::MapShapesAndAncestors(aFace, TopAbs_EDGE, TopAbs_FACE, aMEFP); + TopExp::MapShapesAndAncestors(aFace, TopAbs_EDGE, TopAbs_FACE, aMEFP); } } // @@ -311,17 +311,17 @@ static const TopoDS_Shape& aE=aMEFP.FindKey(j); // if (aMEF.Contains(aE)) { // !! - const TopTools_ListOfShape& aLF=aMEFP(j); - aItFP.Initialize(aLF); - for (; aItFP.More(); aItFP.Next()) { - const TopoDS_Shape& aF=aItFP.Value(); - if (aMFence.Add(aF)) { - aLFP1.Append(aF); - } - } + const TopTools_ListOfShape& aLF=aMEFP(j); + aItFP.Initialize(aLF); + for (; aItFP.More(); aItFP.Next()) { + const TopoDS_Shape& aF=aItFP.Value(); + if (aMFence.Add(aF)) { + aLFP1.Append(aF); + } + } } else { - aLEx.Append(aE); + aLEx.Append(aE); } } // @@ -331,10 +331,10 @@ static const TopTools_ListOfShape& aLF=aMEFP.FindFromKey(aE); aItFP.Initialize(aLF); for (; aItFP.More(); aItFP.Next()) { - const TopoDS_Shape& aF=aItFP.Value(); - if (aMFence.Add(aF)) { - aLFP2.Append(aF); - } + const TopoDS_Shape& aF=aItFP.Value(); + if (aMFence.Add(aF)) { + aLFP2.Append(aF); + } } } aLFP1.Append(aLFP2); @@ -346,7 +346,7 @@ static for (; aItFP.More(); aItFP.Next()) { const TopoDS_Shape& aSP=aItFP.Value(); if (!aMFDone.Add(aSP)) { - continue; + continue; } // @@ -360,10 +360,10 @@ static aLFP.Append(aFP); aItS.Initialize(aLFP1); for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aSk=aItS.Value(); - if (!aMFDone.Contains(aSk)) { - aLFP.Append(aSk); - } + const TopoDS_Shape& aSk=aItS.Value(); + if (!aMFDone.Contains(aSk)) { + aLFP.Append(aSk); + } } // // Connexity Block that spreads from aFP the Bound @@ -374,16 +374,16 @@ static // fill states for the Connexity Block aItS.Initialize(aLCBF); for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aSx=aItS.Value(); - aMFDone.Add(aSx); - if (aState==TopAbs_IN) { - aMFIN.Add(aSx); - } + const TopoDS_Shape& aSx=aItS.Value(); + aMFDone.Add(aSx); + if (aState==TopAbs_IN) { + aMFIN.Add(aSx); + } } // aNbFPx=aMFDone.Extent(); if (aNbFPx==aNbFP) { - break; + break; } }//for (; aItFP.More(); aItFP.Next()) // @@ -392,14 +392,14 @@ static aNbFIN=aMFIN.Extent(); if (aNbFIN || aNbLIF) { for (j=1; j<=aNbFIN; ++j) { - const TopoDS_Shape& aFIN=aMFIN(j); - aLFIN.Append(aFIN); + const TopoDS_Shape& aFIN=aMFIN(j); + aLFIN.Append(aFIN); } // aItS.Initialize(aLIF); for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aFIN=aItS.Value(); - aLFIN.Append(aFIN); + const TopoDS_Shape& aFIN=aItS.Value(); + aLFIN.Append(aFIN); } // myInParts.Add(aSolid, aLFIN); @@ -499,18 +499,18 @@ static const TopoDS_Shape& aSR=aItSS.Key(); const GEOMAlgo_ShapeSet& aSSR=aItSS.Value(); if (aSSi.Contains(aSSR)) { - // the aSR is SD solid for aS - aSSi.Subtract(aSSR); - // update images - if(myImages.HasImage(aS)) { - myImages.Add(aS, aSR); - } - else { - myImages.Bind(aS, aSR); - } - // - // update SD Shapes - mySameDomainShapes.Add(aSR, aSR); + // the aSR is SD solid for aS + aSSi.Subtract(aSSR); + // update images + if(myImages.HasImage(aS)) { + myImages.Add(aS, aSR); + } + else { + myImages.Bind(aS, aSR); + } + // + // update SD Shapes + mySameDomainShapes.Add(aSR, aSR); } } const TopTools_ListOfShape& aSFS1=aSSi.GetSet(); @@ -535,8 +535,8 @@ static aSSi.Clear(); aExp.Init(aSR, TopAbs_FACE); for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aF=aExp.Current(); - aSSi.Add(aF); + const TopoDS_Shape& aF=aExp.Current(); + aSSi.Add(aF); } aMSS.Bind(aSR, aSSi); } @@ -574,8 +574,8 @@ static const TopoDS_Shape& aSR=aItSS.Key(); const GEOMAlgo_ShapeSet& aSSR=aItSS.Value(); if (aSSi.Contains(aSSR)) { - myImages.Bind(aS, aSR); - break; + myImages.Bind(aS, aSR); + break; } } } //for (i=1; i<=aNbS; ++i) @@ -618,7 +618,7 @@ static for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aS=aIt.Value(); if (aMFence.Add(aS)) { - aLSI.Append(aS); + aLSI.Append(aS); } } } @@ -631,10 +631,10 @@ static const TopoDS_Shape& aW=aIt.Value(); aItS.Initialize(aW); for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aE=aItS.Value(); - if (aMFence.Add(aE)) { - aLSI.Append(aE); - } + const TopoDS_Shape& aE=aItS.Value(); + if (aMFence.Add(aE)) { + aLSI.Append(aE); + } } } } @@ -646,8 +646,8 @@ static const TopTools_ListOfShape &aLSp=myImages.Image(aS); aIt.Initialize(aLSp); for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSI=aIt.Value(); - aMSI.Add(aSI); + const TopoDS_Shape& aSI=aIt.Value(); + aMSI.Add(aSI); } } else { @@ -672,42 +672,42 @@ static // aNbSx=aMx.Extent(); for (j=1; j<=aNbSx; ++j) { - const TopoDS_Shape& aSI=aMx(j); - if (myImages.HasImage(aSI)) { - const TopTools_ListOfShape &aLSp=myImages.Image(aSI); - aIt.Initialize(aLSp); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSp=aIt.Value(); - aMSI.Add(aSp); - } - } - else { - aMSI.Add(aSI); - } + const TopoDS_Shape& aSI=aMx(j); + if (myImages.HasImage(aSI)) { + const TopTools_ListOfShape &aLSp=myImages.Image(aSI); + aIt.Initialize(aLSp); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aSp=aIt.Value(); + aMSI.Add(aSp); + } + } + else { + aMSI.Add(aSI); + } } // // build aux map from splits of solids if (myImages.HasImage(aS)) { - const TopTools_ListOfShape &aLSp=myImages.Image(aS); - aIt.Initialize(aLSp); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSp=aIt.Value(); - if (aMFence.Add(aSp)) { - TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_EDGE, aMSx); - TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_FACE, aMSx); - TopExp::MapShapesAndAncestors(aSp, TopAbs_EDGE , TopAbs_FACE, aMSx); - aLSd.Append(aSp); - } - } + const TopTools_ListOfShape &aLSp=myImages.Image(aS); + aIt.Initialize(aLSp); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aSp=aIt.Value(); + if (aMFence.Add(aSp)) { + TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_EDGE, aMSx); + TopExp::MapShapesAndAncestors(aSp, TopAbs_VERTEX, TopAbs_FACE, aMSx); + TopExp::MapShapesAndAncestors(aSp, TopAbs_EDGE , TopAbs_FACE, aMSx); + aLSd.Append(aSp); + } + } } else { - if (aMFence.Add(aS)) { - TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_EDGE, aMSx); - TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_FACE, aMSx); - TopExp::MapShapesAndAncestors(aS, TopAbs_EDGE , TopAbs_FACE, aMSx); - aLSd.Append(aS); - aMSOr.Add(aS); - } + if (aMFence.Add(aS)) { + TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_EDGE, aMSx); + TopExp::MapShapesAndAncestors(aS, TopAbs_VERTEX, TopAbs_FACE, aMSx); + TopExp::MapShapesAndAncestors(aS, TopAbs_EDGE , TopAbs_FACE, aMSx); + aLSd.Append(aS); + aMSOr.Add(aS); + } } }//if (aType==TopAbs_SOLID) } @@ -723,7 +723,7 @@ static const TopTools_ListOfShape &aLSx=aMSx.FindFromKey(aSI); aNbSx=aLSx.Extent(); if (aNbSx) { - aMSI.Remove(aSI); + aMSI.Remove(aSI); } } } @@ -747,29 +747,29 @@ static // aState=GEOMAlgo_Tools3D::ComputeStateByOnePoint(aSI, aSd, 1.e-11, aCtx); if (aState==TopAbs_IN) { - // - if(aMSOr.Contains(aSd)) { - // - TopoDS_Solid aSdx; - // - aBB.MakeSolid(aSdx); - aItS.Initialize(aSd); - for (; aItS.More(); aItS.Next()) { - const TopoDS_Shape& aSh=aItS.Value(); - aBB.Add(aSdx, aSh); - } - // - aBB.Add(aSdx, aSI); - // - myImages.Bind(aSd, aSdx); - aMSOr.Remove(aSd); - aSd=aSdx; - } - else { - aBB.Add(aSd, aSI); - } - // - aMSI.Remove(aSI); + // + if(aMSOr.Contains(aSd)) { + // + TopoDS_Solid aSdx; + // + aBB.MakeSolid(aSdx); + aItS.Initialize(aSd); + for (; aItS.More(); aItS.Next()) { + const TopoDS_Shape& aSh=aItS.Value(); + aBB.Add(aSdx, aSh); + } + // + aBB.Add(aSdx, aSI); + // + myImages.Bind(aSd, aSdx); + aMSOr.Remove(aSd); + aSd=aSdx; + } + else { + aBB.Add(aSd, aSI); + } + // + aMSI.Remove(aSI); } //if (aState==TopAbs_IN) { }// for (; aItM.More(); aItM.Next()) { }//for (; aIt1.More(); aIt1.Next()) { @@ -779,7 +779,7 @@ static //purpose : //======================================================================= void OwnInternalShapes(const TopoDS_Shape& theS, - TopTools_IndexedMapOfShape& theMx) + TopTools_IndexedMapOfShape& theMx) { TopoDS_Iterator aIt; // diff --git a/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx b/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx index bc755e492..9c2334979 100755 --- a/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Builder_4.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Builder_4.cxx -// Created: -// Author: Peter KURNEV +// File: GEOMAlgo_Builder_4.cxx +// Created: +// Author: Peter KURNEV // #include @@ -42,7 +42,7 @@ static void MapShapes(const TopoDS_Shape& aS, - TopTools_MapOfShape& aM); + TopTools_MapOfShape& aM); //======================================================================= //function : Generated @@ -78,21 +78,21 @@ static for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aSp=aIt.Value(); if (mySameDomainShapes.Contains(aSp)) { - if (myMapShape.Contains(aSp)) { - TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp); - // - if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { - aSpR.Orientation(theS.Orientation()); - } - else { - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSpR, theS, aCtx); - if (bToReverse) { - aSpR.Reverse(); - } - } - // - myHistShapes.Append(aSpR); - } + if (myMapShape.Contains(aSp)) { + TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp); + // + if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { + aSpR.Orientation(theS.Orientation()); + } + else { + bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSpR, theS, aCtx); + if (bToReverse) { + aSpR.Reverse(); + } + } + // + myHistShapes.Append(aSpR); + } } } } @@ -133,20 +133,20 @@ static for (; aIt.More(); aIt.Next()) { TopoDS_Shape aSp=aIt.Value(); if (!mySameDomainShapes.Contains(aSp)) { - if (myMapShape.Contains(aSp)) { - // - if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { - aSp.Orientation(theS.Orientation()); - } - else { - bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSp, theS, aCtx); - if (bToReverse) { - aSp.Reverse(); - } - } - // - myHistShapes.Append(aSp); - } + if (myMapShape.Contains(aSp)) { + // + if (aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { + aSp.Orientation(theS.Orientation()); + } + else { + bToReverse=GEOMAlgo_Tools3D::IsSplitToReverse(aSp, theS, aCtx); + if (bToReverse) { + aSp.Reverse(); + } + } + // + myHistShapes.Append(aSp); + } } } } @@ -188,15 +188,15 @@ static TopoDS_Shape aSp=aIt.Value(); // if (!mySameDomainShapes.Contains(aSp)) { - if (myMapShape.Contains(aSp)) { - return bRet; //false - } + if (myMapShape.Contains(aSp)) { + return bRet; //false + } } else { - TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp); - if (myMapShape.Contains(aSpR)) { - return bRet; //false - } + TopoDS_Shape aSpR=mySameDomainShapes.FindFromKey(aSp); + if (myMapShape.Contains(aSpR)) { + return bRet; //false + } } } } @@ -244,18 +244,18 @@ static bHasImage=myImages.HasImage(aSx); if (!bHasImage) { if (myMapShape.Contains(aSx)) { - aLSx.Append(aSx); - myImagesResult.Add(aSx, aLSx); + aLSx.Append(aSx); + myImagesResult.Add(aSx, aLSx); } } else { const TopTools_ListOfShape& aLSp=myImages.Image(aSx); aIt.Initialize(aLSp); for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSp=aIt.Value(); - if (myMapShape.Contains(aSp)) { - aLSx.Append(aSp); - } + const TopoDS_Shape& aSp=aIt.Value(); + if (myMapShape.Contains(aSp)) { + aLSx.Append(aSp); + } } myImagesResult.Add(aSx, aLSx); } @@ -269,32 +269,32 @@ static // if (!myHasGenerated || !myHasModified) { if (aType==TopAbs_EDGE || aType==TopAbs_FACE || - aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { - //modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f - //bHasImage=myImages.HasImage(aSx); - //modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t - if (bHasImage) { - const TopTools_ListOfShape& aLSp=myImages.Image(aSx); - aIt.Initialize(aLSp); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSp=aIt.Value(); - // - if (myMapShape.Contains(aSp)) { - bContainsSD=mySameDomainShapes.Contains(aSp); - // - if (!myHasGenerated) { - if (bContainsSD) { - myHasGenerated=Standard_True; - } - } - if (!myHasModified) { - if (!bContainsSD) { - myHasModified=Standard_True; - } - } - } // if (myMapShape.Contains(aSp)) - } - } + aType==TopAbs_VERTEX || aType==TopAbs_SOLID) { + //modified by NIZNHY-PKV Thu Dec 7 11:53:01 2006f + //bHasImage=myImages.HasImage(aSx); + //modified by NIZNHY-PKV Thu Dec 7 11:53:04 2006t + if (bHasImage) { + const TopTools_ListOfShape& aLSp=myImages.Image(aSx); + aIt.Initialize(aLSp); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aSp=aIt.Value(); + // + if (myMapShape.Contains(aSp)) { + bContainsSD=mySameDomainShapes.Contains(aSp); + // + if (!myHasGenerated) { + if (bContainsSD) { + myHasGenerated=Standard_True; + } + } + if (!myHasModified) { + if (!bContainsSD) { + myHasModified=Standard_True; + } + } + } // if (myMapShape.Contains(aSp)) + } + } } } } @@ -305,7 +305,7 @@ static //purpose : //======================================================================= void MapShapes(const TopoDS_Shape& theS, - TopTools_MapOfShape& theM) + TopTools_MapOfShape& theM) { theM.Add(theS); TopoDS_Iterator anIt; diff --git a/src/GEOMAlgo/GEOMAlgo_Clsf.cxx b/src/GEOMAlgo/GEOMAlgo_Clsf.cxx index 01d273327..fa7d711dc 100644 --- a/src/GEOMAlgo/GEOMAlgo_Clsf.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Clsf.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Classifier.cxx -// Created: Wed Nov 22 10:23:04 2006 -// Author: Peter KURNEV -// +// File: GEOMAlgo_Classifier.cxx +// Created: Wed Nov 22 10:23:04 2006 +// Author: Peter KURNEV +// // #include diff --git a/src/GEOMAlgo/GEOMAlgo_Clsf.hxx b/src/GEOMAlgo/GEOMAlgo_Clsf.hxx index 70fbc60c9..ae1b76918 100644 --- a/src/GEOMAlgo/GEOMAlgo_Clsf.hxx +++ b/src/GEOMAlgo/GEOMAlgo_Clsf.hxx @@ -90,7 +90,7 @@ Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aS // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_Clsf.ixx b/src/GEOMAlgo/GEOMAlgo_Clsf.ixx index ed35cae59..be7494b00 100644 --- a/src/GEOMAlgo/GEOMAlgo_Clsf.ixx +++ b/src/GEOMAlgo/GEOMAlgo_Clsf.ixx @@ -39,10 +39,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_Clsf_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_Clsf", - sizeof(GEOMAlgo_Clsf), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_Clsf), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx b/src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx index b74c54e3e..9df83756c 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfBox.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_ClsfSurf.cxx -// Created: Wed Nov 22 10:41:47 2006 -// Author: Peter KURNEV -// +// File: GEOMAlgo_ClsfSurf.cxx +// Created: Wed Nov 22 10:41:47 2006 +// Author: Peter KURNEV +// // #include #include @@ -165,18 +165,18 @@ switch (aSt) { case TopAbs_OUT: myState=aSt; - iNext=0; - break; + iNext=0; + break; case TopAbs_ON: - ++aNbON; - break; + ++aNbON; + break; case TopAbs_IN: - ++aNbIN; - break; + ++aNbIN; + break; default: - myState=TopAbs_UNKNOWN; - iNext=0; - break; + myState=TopAbs_UNKNOWN; + iNext=0; + break; } } // diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfBox.hxx b/src/GEOMAlgo/GEOMAlgo_ClsfBox.hxx index 03fd2b123..37a6c6897 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfBox.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfBox.hxx @@ -88,7 +88,7 @@ Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aS // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfBox.ixx b/src/GEOMAlgo/GEOMAlgo_ClsfBox.ixx index 5cc2da30c..90df38e33 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfBox.ixx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfBox.ixx @@ -40,10 +40,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfBox_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfBox", - sizeof(GEOMAlgo_ClsfBox), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_ClsfBox), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx index f05fbaf92..5e31dcf9c 100755 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_ClsfSolid.cxx -// Created: Mon Jan 29 10:35:46 2007 -// Author: Peter KURNEV -// +// File: GEOMAlgo_ClsfSolid.cxx +// Created: Mon Jan 29 10:35:46 2007 +// Author: Peter KURNEV +// // #include diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx index 5012fed2f..f3831e73f 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.hxx @@ -71,7 +71,7 @@ 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; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.ixx b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.ixx index b777f32a4..df6e8b8a2 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSolid.ixx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfSolid.ixx @@ -40,10 +40,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfSolid_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfSolid", - sizeof(GEOMAlgo_ClsfSolid), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_ClsfSolid), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx index 2d32d4448..1339c7a62 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_ClsfSurf.cxx -// Created: Wed Nov 22 10:41:47 2006 -// Author: Peter KURNEV -// +// File: GEOMAlgo_ClsfSurf.cxx +// Created: Wed Nov 22 10:41:47 2006 +// Author: Peter KURNEV +// // #include #include @@ -79,8 +79,8 @@ myGAS.Load(myS); aType=myGAS.GetType(); if (!(aType==GeomAbs_Plane || - aType==GeomAbs_Cylinder || - aType==GeomAbs_Sphere)) { + aType==GeomAbs_Cylinder || + aType==GeomAbs_Sphere)) { myErrorStatus=11; // unallowed surface type } } diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx index 54925be60..76a6b66ec 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.hxx @@ -84,7 +84,7 @@ Standard_EXPORT virtual Standard_Boolean CanBeON(const Handle(Geom_Surface)& aS // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.ixx b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.ixx index 2ffee719f..e884810ee 100644 --- a/src/GEOMAlgo/GEOMAlgo_ClsfSurf.ixx +++ b/src/GEOMAlgo/GEOMAlgo_ClsfSurf.ixx @@ -40,10 +40,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ClsfSurf_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ClsfSurf", - sizeof(GEOMAlgo_ClsfSurf), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_ClsfSurf), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx index 1047c2ba5..43c92330b 100644 --- a/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx +++ b/src/GEOMAlgo/GEOMAlgo_CoupleOfShapes.cxx @@ -19,10 +19,10 @@ // // 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 -// +// File: GEOMAlgo_CoupleOfShapes.cxx +// Created: Wed Dec 15 13:03:52 2004 +// Author: Peter KURNEV +// // #include //======================================================================= @@ -36,7 +36,7 @@ GEOMAlgo_CoupleOfShapes::GEOMAlgo_CoupleOfShapes() //purpose : //======================================================================= void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) + const TopoDS_Shape& aS2) { myShape1=aS1; myShape2=aS2; @@ -46,7 +46,7 @@ void GEOMAlgo_CoupleOfShapes::SetShapes(const TopoDS_Shape& aS1, //purpose : //======================================================================= void GEOMAlgo_CoupleOfShapes::Shapes(TopoDS_Shape& aS1, - TopoDS_Shape& aS2)const + TopoDS_Shape& aS2)const { aS1=myShape1; aS2=myShape2; diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx index a16e26ba8..40b3407e3 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger.hxx @@ -67,7 +67,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger(const GEOMAlgo_PassKey& K,const St // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx index c1457e733..c772158ff 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInte static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyInteger), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx index e88ed19e0..53e2ed84d 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape.hxx @@ -68,7 +68,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape(const GEOMAlgo_PassKeyShape& K, // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx index f4e15a426..565be05b6 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape_0.cxx @@ -54,10 +54,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShap static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_DataMapNodeOfDataMapOfPassKeyShapeShape), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx index 1ba3c8bc2..24b977a06 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape.hxx @@ -67,7 +67,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape(const Standard_Real& K,const TopT // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx index 9bcbe1201..0b16f3ff7 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfRealListOfS static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_DataMapNodeOfDataMapOfRealListOfShape), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx index 5b418a034..b1f6b3a51 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal.hxx @@ -67,7 +67,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfShapeReal(const TopoDS_Shape& K,const Standard_Re // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx index 729f0996b..7cb7daf9f 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeReal_T static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeReal", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeReal), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx index b354f9719..5429a89e4 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet.hxx @@ -68,7 +68,7 @@ GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet(const TopoDS_Shape& K,const GEOMAlg // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx index b0e5fee23..f8377247c 100644 --- a/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet_0.cxx @@ -54,10 +54,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeS static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet", - sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_DataMapNodeOfDataMapOfShapeShapeSet), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx index 372edf653..8460480b4 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_FinderShapeOn.cxx -// Created: Tue Jan 11 14:44:31 2005 -// Author: Peter KURNEV -// +// File: GEOMAlgo_FinderShapeOn.cxx +// Created: Tue Jan 11 14:44:31 2005 +// Author: Peter KURNEV +// // #include @@ -352,12 +352,12 @@ void GEOMAlgo_FinderShapeOn::Find(const TopoDS_Shape& aS) for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aSImage=aIt.Value(); if (myImages.IsBound(aSImage)) { - const TopoDS_Shape& aSx=myImages.Find(aSImage); - myMSS.Add(aSx, aSts[i]); + const TopoDS_Shape& aSx=myImages.Find(aSImage); + myMSS.Add(aSx, aSts[i]); } else { - myErrorStatus=33;// can not find original shape - return; + myErrorStatus=33;// can not find original shape + return; } } } @@ -403,21 +403,21 @@ void GEOMAlgo_FinderShapeOn::MakeArgument1() switch (aType) { case TopAbs_VERTEX: { const TopoDS_Vertex& aVx=TopoDS::Vertex(aS); - aBB.UpdateVertex(aVx, myTolerance); + aBB.UpdateVertex(aVx, myTolerance); } - break; + break; case TopAbs_EDGE: { const TopoDS_Edge& aEx=TopoDS::Edge(aS); - aBB.UpdateEdge(aEx, myTolerance); + aBB.UpdateEdge(aEx, myTolerance); } - break; + break; case TopAbs_FACE: { const TopoDS_Face& aFx=TopoDS::Face(aS); - aBB.UpdateFace(aFx, myTolerance); + aBB.UpdateFace(aFx, myTolerance); } - break; + break; default: - break; + break; } } } // @@ -468,9 +468,9 @@ void GEOMAlgo_FinderShapeOn::CheckData() } // if (!(myShapeType==TopAbs_VERTEX || - myShapeType==TopAbs_EDGE || - myShapeType==TopAbs_FACE || - myShapeType==TopAbs_SOLID)) { + myShapeType==TopAbs_EDGE || + myShapeType==TopAbs_FACE || + myShapeType==TopAbs_SOLID)) { myErrorStatus=12; // unallowed subshape type return; } @@ -487,9 +487,9 @@ void GEOMAlgo_FinderShapeOn::CheckData() //purpose : //======================================================================= void GEOMAlgo_FinderShapeOn::CopySource(const TopoDS_Shape& aE, - TopTools_DataMapOfShapeShape& aImages, - TopTools_DataMapOfShapeShape& aOriginals, - TopoDS_Shape& aEx) + TopTools_DataMapOfShapeShape& aImages, + TopTools_DataMapOfShapeShape& aOriginals, + TopoDS_Shape& aEx) { Standard_Boolean bFree; TopAbs_ShapeEnum aType; diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx index 24f5ed55e..5776b5b2f 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_FinderShapeOn1.cxx -// Created: Fri Mar 4 10:31:06 2005 -// Author: Peter KURNEV -// +// File: GEOMAlgo_FinderShapeOn1.cxx +// Created: Fri Mar 4 10:31:06 2005 +// Author: Peter KURNEV +// // #include #include @@ -280,7 +280,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessVertices() // if (myShapeType==TopAbs_VERTEX){ if (bIsConformState) { - myMSS.Add(aV, aSt); + myMSS.Add(aV, aSt); } } else if (bIsConformState || aSt==TopAbs_ON) { @@ -320,11 +320,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges() // bIsConformState=myMSS.Contains(aV); if (!bIsConformState) { - break;// vertex has non-conformed state + break;// vertex has non-conformed state } else { - aSt=myMSS.FindFromKey(aV); - aSC.AppendState(aSt); + aSt=myMSS.FindFromKey(aV); + aSC.AppendState(aSt); } } // @@ -348,7 +348,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges() // aType2=aGAC.GetType(); if (aType2==GeomAbs_Line) { - continue; + continue; } } // @@ -361,16 +361,16 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges() aIt.Initialize(aLP); for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { if (myNbPntsMax) { - if (iCnt > myNbPntsMax) { - break; - } + if (iCnt > myNbPntsMax) { + break; + } } // const gp_Pnt& aP=aIt.Value(); aSt = GetPointState( aP ); bIsToBreak=aSC.AppendState(aSt); if (bIsToBreak) { - break; + break; } } // @@ -379,7 +379,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessEdges() bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); if (myShapeType==TopAbs_EDGE) { if (bIsConformState) { - myMSS.Add(aE, aSt); + myMSS.Add(aE, aSt); } } else if (bIsConformState || aSt==TopAbs_ON) { @@ -421,7 +421,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces() aGAS.Load(aS); aType2=aGAS.GetType(); if (aType2!=aType1) { - continue; + continue; } } // @@ -430,11 +430,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces() const TopoDS_Shape& aE=aExp.Current(); bIsConformState=myMSS.Contains(aE); if (!bIsConformState) { - break;// edge has non-conformed state + break;// edge has non-conformed state } else { - aSt=myMSS.FindFromKey(aE); - aSC.AppendState(aSt); + aSt=myMSS.FindFromKey(aE); + aSC.AppendState(aSt); } } // @@ -451,16 +451,16 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces() aIt.Initialize(aLP); for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { if (myNbPntsMax) { - if (iCnt > myNbPntsMax) { - break; - } + if (iCnt > myNbPntsMax) { + break; + } } // const gp_Pnt& aP=aIt.Value(); aSt = GetPointState( aP ); bIsToBreak=aSC.AppendState(aSt); if (bIsToBreak) { - break; + break; } } // @@ -469,7 +469,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessFaces() bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); if (myShapeType==TopAbs_FACE) { if (bIsConformState) { - myMSS.Add(aF, aSt); + myMSS.Add(aF, aSt); } } else if (bIsConformState || aSt==TopAbs_ON) { @@ -503,11 +503,11 @@ void GEOMAlgo_FinderShapeOn1::ProcessSolids() const TopoDS_Shape& aF=aMF(j); bIsConformState=myMSS.Contains(aF); if (!bIsConformState) { - break;// face has non-conformed state + break;// face has non-conformed state } else { - aSt=myMSS.FindFromKey(aF); - aSC.AppendState(aSt); + aSt=myMSS.FindFromKey(aF); + aSC.AppendState(aSt); } } // @@ -529,7 +529,7 @@ void GEOMAlgo_FinderShapeOn1::ProcessSolids() //purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, - GEOMAlgo_ListOfPnt& aLP) + GEOMAlgo_ListOfPnt& aLP) { myErrorStatus=0; // @@ -568,11 +568,11 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, // aPK.SetIds(n[k], n[k+1]); if (aMPKI.IsBound(aPK)) { - Standard_Integer& iCntX=aMPKI.ChangeFind(aPK); - ++iCntX; + Standard_Integer& iCntX=aMPKI.ChangeFind(aPK); + ++iCntX; } else { - aMPKI.Bind(aPK, 1); + aMPKI.Bind(aPK, 1); } } } @@ -589,8 +589,8 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, aNbMax=aPK.NbMax(); pIds=(Standard_Integer*)aPK.Key(); for (k=1; k<3; ++k) { - aNx=*(pIds+aNbMax-k); - aMBN.Add(aNx); + aNx=*(pIds+aNbMax-k); + aMBN.Add(aNx); } */ aNx=(Standard_Integer)aPK.Id(1); @@ -629,49 +629,49 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, aNbLinks=aMPKI.Extent(); aIt.Initialize(aMPKI); for (; aIt.More(); aIt.Next()) { - iCnt=aIt.Value(); - if (iCnt>1) { - // take the first having occured inner link - // and discretize it - const GEOMAlgo_PassKey& aPK=aIt.Key(); - //qf - /* - aNbMax=aPK.NbMax(); - pIds=(Standard_Integer*)aPK.Key(); - aN1=*(pIds+aNbMax-1); - aN2=*(pIds+aNbMax-2); - */ - // - aN1=(Standard_Integer)aPK.Id(1); - aN2=(Standard_Integer)aPK.Id(2); - //qt - aP1=aNodes(aN1).Transformed(aTrsf); - aP2=aNodes(aN2).Transformed(aTrsf); - // - if (aType==GeomAbs_Cylinder) { - Standard_Real aTolSM; - gp_Cylinder aCyl; - // - aTolSM=1.523e-6;//~1.-cos(0.1 deg) - aCyl=aGAS.Cylinder(); - if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) { - continue; - } - } - // - BRepLib_MakeEdge aBME(aP1, aP2); - bIsDone=aBME.IsDone(); - if (!bIsDone) { - myErrorStatus=30; //can not obtain the line fron the link - return; - } - // - const TopoDS_Shape& aSx=aBME.Shape(); - const TopoDS_Edge& aE=TopoDS::Edge(aSx); - // - InnerPoints(aE, myNbPntsMin, aLP); - break; - }// if (iCnt>1) + iCnt=aIt.Value(); + if (iCnt>1) { + // take the first having occured inner link + // and discretize it + const GEOMAlgo_PassKey& aPK=aIt.Key(); + //qf + /* + aNbMax=aPK.NbMax(); + pIds=(Standard_Integer*)aPK.Key(); + aN1=*(pIds+aNbMax-1); + aN2=*(pIds+aNbMax-2); + */ + // + aN1=(Standard_Integer)aPK.Id(1); + aN2=(Standard_Integer)aPK.Id(2); + //qt + aP1=aNodes(aN1).Transformed(aTrsf); + aP2=aNodes(aN2).Transformed(aTrsf); + // + if (aType==GeomAbs_Cylinder) { + Standard_Real aTolSM; + gp_Cylinder aCyl; + // + aTolSM=1.523e-6;//~1.-cos(0.1 deg) + aCyl=aGAS.Cylinder(); + if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) { + continue; + } + } + // + BRepLib_MakeEdge aBME(aP1, aP2); + bIsDone=aBME.IsDone(); + if (!bIsDone) { + myErrorStatus=30; //can not obtain the line fron the link + return; + } + // + const TopoDS_Shape& aSx=aBME.Shape(); + const TopoDS_Edge& aE=TopoDS::Edge(aSx); + // + InnerPoints(aE, myNbPntsMin, aLP); + break; + }// if (iCnt>1) }// for (; aIt.More(); aIt.Next()) }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) }// if (!aNb && myNbPntsMin) { @@ -681,7 +681,7 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, //purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE, - GEOMAlgo_ListOfPnt& aLP) + GEOMAlgo_ListOfPnt& aLP) { myErrorStatus=0; // @@ -737,8 +737,8 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE, //purpose : //======================================================================= void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Edge& aE, - const Standard_Integer aNbPntsMin, - GEOMAlgo_ListOfPnt& aLP) + const Standard_Integer aNbPntsMin, + GEOMAlgo_ListOfPnt& aLP) { // try to fill it yourself Standard_Boolean bInf1, bInf2; @@ -786,9 +786,9 @@ void GEOMAlgo_FinderShapeOn1::CheckData() } // if (!(myShapeType==TopAbs_VERTEX || - myShapeType==TopAbs_EDGE || - myShapeType==TopAbs_FACE || - myShapeType==TopAbs_SOLID)) { + myShapeType==TopAbs_EDGE || + myShapeType==TopAbs_FACE || + myShapeType==TopAbs_SOLID)) { myErrorStatus=12; // unallowed subshape type return; } @@ -804,8 +804,8 @@ void GEOMAlgo_FinderShapeOn1::CheckData() myGAS.Load(mySurface); aType=myGAS.GetType(); if (!(aType==GeomAbs_Plane || - aType==GeomAbs_Cylinder || - aType==GeomAbs_Sphere)) { + aType==GeomAbs_Cylinder || + aType==GeomAbs_Sphere)) { myErrorStatus=14; // unallowed surface type } } diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx index b7f70f544..54a8f0fb4 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_FinderShapeOn1.cxx -// Created: Fri Mar 4 10:31:06 2005 -// Author: Peter KURNEV -// +// File: GEOMAlgo_FinderShapeOn1.cxx +// Created: Fri Mar 4 10:31:06 2005 +// Author: Peter KURNEV +// // #include #include @@ -285,9 +285,9 @@ } // if (!(myShapeType==TopAbs_VERTEX || - myShapeType==TopAbs_EDGE || - myShapeType==TopAbs_FACE || - myShapeType==TopAbs_SOLID)) { + myShapeType==TopAbs_EDGE || + myShapeType==TopAbs_FACE || + myShapeType==TopAbs_SOLID)) { myErrorStatus=12; // unallowed subshape type return; } @@ -331,7 +331,7 @@ // if (myShapeType==TopAbs_VERTEX){ if (bIsConformState) { - myMSS.Add(aV, aSt); + myMSS.Add(aV, aSt); } } else if (bIsConformState || aSt==TopAbs_ON) { @@ -368,11 +368,11 @@ // bIsConformState=myMSS.Contains(aV); if (!bIsConformState) { - break;// vertex has non-conformed state + break;// vertex has non-conformed state } else { - aSt=myMSS.FindFromKey(aV); - aSC.AppendState(aSt); + aSt=myMSS.FindFromKey(aV); + aSC.AppendState(aSt); } } // @@ -393,7 +393,7 @@ aC=BRep_Tool::Curve(aE, aT1, aT2); bCanBeON=myClsf->CanBeON(aC); if(!bCanBeON) { - continue; + continue; } } // @@ -406,9 +406,9 @@ aIt.Initialize(aLP); for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { if (myNbPntsMax) { - if (iCnt > myNbPntsMax) { - break; - } + if (iCnt > myNbPntsMax) { + break; + } } // const gp_Pnt& aP=aIt.Value(); @@ -417,15 +417,15 @@ myClsf->Perform(); iErr=myClsf->ErrorStatus(); if (iErr) { - myErrorStatus=40; // point can not be classified - return; + myErrorStatus=40; // point can not be classified + return; } // aSt=myClsf->State(); // bIsToBreak=aSC.AppendState(aSt); if (bIsToBreak) { - break; + break; } } // @@ -434,7 +434,7 @@ bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); if (myShapeType==TopAbs_EDGE) { if (bIsConformState) { - myMSS.Add(aE, aSt); + myMSS.Add(aE, aSt); } } else if (bIsConformState || aSt==TopAbs_ON) { @@ -471,7 +471,7 @@ aS=BRep_Tool::Surface(aF); bCanBeON=myClsf->CanBeON(aS); if(!bCanBeON) { - continue; + continue; } } // @@ -480,11 +480,11 @@ const TopoDS_Shape& aE=aExp.Current(); bIsConformState=myMSS.Contains(aE); if (!bIsConformState) { - break;// edge has non-conformed state + break;// edge has non-conformed state } else { - aSt=myMSS.FindFromKey(aE); - aSC.AppendState(aSt); + aSt=myMSS.FindFromKey(aE); + aSC.AppendState(aSt); } } // @@ -501,9 +501,9 @@ aIt.Initialize(aLP); for (iCnt=0; aIt.More(); aIt.Next(), ++iCnt) { if (myNbPntsMax) { - if (iCnt > myNbPntsMax) { - break; - } + if (iCnt > myNbPntsMax) { + break; + } } // const gp_Pnt& aP=aIt.Value(); @@ -512,15 +512,15 @@ myClsf->Perform(); iErr=myClsf->ErrorStatus(); if (iErr) { - myErrorStatus=40; // point can not be classified - return; + myErrorStatus=40; // point can not be classified + return; } // aSt=myClsf->State(); // bIsToBreak=aSC.AppendState(aSt); if (bIsToBreak) { - break; + break; } } // @@ -529,7 +529,7 @@ bIsConformState=GEOMAlgo_SurfaceTools::IsConformState(aSt, myState); if (myShapeType==TopAbs_FACE) { if (bIsConformState) { - myMSS.Add(aF, aSt); + myMSS.Add(aF, aSt); } } else if (bIsConformState || aSt==TopAbs_ON) { @@ -563,11 +563,11 @@ const TopoDS_Shape& aF=aMF(j); bIsConformState=myMSS.Contains(aF); if (!bIsConformState) { - break;// face has non-conformed state + break;// face has non-conformed state } else { - aSt=myMSS.FindFromKey(aF); - aSC.AppendState(aSt); + aSt=myMSS.FindFromKey(aF); + aSC.AppendState(aSt); } } // @@ -589,7 +589,7 @@ //purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Face& aF, - GEOMAlgo_ListOfPnt& aLP) + GEOMAlgo_ListOfPnt& aLP) { myErrorStatus=0; // @@ -628,11 +628,11 @@ // aPK.SetIds(n[k], n[k+1]); if (aMPKI.IsBound(aPK)) { - Standard_Integer& iCntX=aMPKI.ChangeFind(aPK); - ++iCntX; + Standard_Integer& iCntX=aMPKI.ChangeFind(aPK); + ++iCntX; } else { - aMPKI.Bind(aPK, 1); + aMPKI.Bind(aPK, 1); } } } @@ -649,8 +649,8 @@ aNbMax=aPK.NbMax(); pIds=(Standard_Integer*)aPK.Key(); for (k=1; k<3; ++k) { - aNx=*(pIds+aNbMax-k); - aMBN.Add(aNx); + aNx=*(pIds+aNbMax-k); + aMBN.Add(aNx); } */ aNx=(Standard_Integer)aPK.Id(1); @@ -689,49 +689,49 @@ aNbLinks=aMPKI.Extent(); aIt.Initialize(aMPKI); for (; aIt.More(); aIt.Next()) { - iCnt=aIt.Value(); - if (iCnt>1) { - // take the first having occured inner link - // and discretize it - const GEOMAlgo_PassKey& aPK=aIt.Key(); - //qf - /* - aNbMax=aPK.NbMax(); - pIds=(Standard_Integer*)aPK.Key(); - aN1=*(pIds+aNbMax-1); - aN2=*(pIds+aNbMax-2); - */ - // - aN1=(Standard_Integer)aPK.Id(1); - aN2=(Standard_Integer)aPK.Id(2); - //qt - aP1=aNodes(aN1).Transformed(aTrsf); - aP2=aNodes(aN2).Transformed(aTrsf); - // - if (aType==GeomAbs_Cylinder) { - Standard_Real aTolSM; - gp_Cylinder aCyl; - // - aTolSM=1.523e-6;//~1.-cos(0.1 deg) - aCyl=aGAS.Cylinder(); - if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) { - continue; - } - } - // - BRepLib_MakeEdge aBME(aP1, aP2); - bIsDone=aBME.IsDone(); - if (!bIsDone) { - myErrorStatus=30; //can not obtain the line fron the link - return; - } - // - const TopoDS_Shape& aSx=aBME.Shape(); - const TopoDS_Edge& aE=TopoDS::Edge(aSx); - // - InnerPoints(aE, myNbPntsMin, aLP); - break; - }// if (iCnt>1) + iCnt=aIt.Value(); + if (iCnt>1) { + // take the first having occured inner link + // and discretize it + const GEOMAlgo_PassKey& aPK=aIt.Key(); + //qf + /* + aNbMax=aPK.NbMax(); + pIds=(Standard_Integer*)aPK.Key(); + aN1=*(pIds+aNbMax-1); + aN2=*(pIds+aNbMax-2); + */ + // + aN1=(Standard_Integer)aPK.Id(1); + aN2=(Standard_Integer)aPK.Id(2); + //qt + aP1=aNodes(aN1).Transformed(aTrsf); + aP2=aNodes(aN2).Transformed(aTrsf); + // + if (aType==GeomAbs_Cylinder) { + Standard_Real aTolSM; + gp_Cylinder aCyl; + // + aTolSM=1.523e-6;//~1.-cos(0.1 deg) + aCyl=aGAS.Cylinder(); + if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) { + continue; + } + } + // + BRepLib_MakeEdge aBME(aP1, aP2); + bIsDone=aBME.IsDone(); + if (!bIsDone) { + myErrorStatus=30; //can not obtain the line fron the link + return; + } + // + const TopoDS_Shape& aSx=aBME.Shape(); + const TopoDS_Edge& aE=TopoDS::Edge(aSx); + // + InnerPoints(aE, myNbPntsMin, aLP); + break; + }// if (iCnt>1) }// for (; aIt.More(); aIt.Next()) }// if (aType==GeomAbs_Plane || aType==GeomAbs_Cylinder) }// if (!aNb && myNbPntsMin) { @@ -741,7 +741,7 @@ //purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE, - GEOMAlgo_ListOfPnt& aLP) + GEOMAlgo_ListOfPnt& aLP) { myErrorStatus=0; // @@ -797,8 +797,8 @@ //purpose : //======================================================================= void GEOMAlgo_FinderShapeOn2::InnerPoints(const TopoDS_Edge& aE, - const Standard_Integer aNbPntsMin, - GEOMAlgo_ListOfPnt& aLP) + const Standard_Integer aNbPntsMin, + GEOMAlgo_ListOfPnt& aLP) { // try to fill it yourself Standard_Boolean bInf1, bInf2; diff --git a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx index 8a7124c31..44180a5e3 100644 --- a/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx +++ b/src/GEOMAlgo/GEOMAlgo_GlueAnalyser.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_GlueDetector.cxx -// Created: Wed Dec 15 11:08:09 2004 -// Author: Peter KURNEV -// +// File: GEOMAlgo_GlueDetector.cxx +// Created: Wed Dec 15 11:08:09 2004 +// Author: Peter KURNEV +// // #include @@ -212,7 +212,7 @@ aIndex=aIt.Value(); const TopoDS_Shape& aVx=aMIS.FindFromKey(aIndex); if(!j) { - aVF=aVx; + aVF=aVx; } aLVSD.Append(aVx); aMVProcessed.Add(aVx); @@ -229,7 +229,7 @@ for (; aItS.More(); aItS.Next()) { const TopoDS_Shape& aVSD=aItS.Value(); if (!myOrigins.IsBound(aVSD)) { - myOrigins.Bind(aVSD, aV); + myOrigins.Bind(aVSD, aV); } } } @@ -323,7 +323,7 @@ for (; aItS.More(); aItS.Next()) { const TopoDS_Shape& aFSD=aItS.Value(); if (!myOrigins.IsBound(aFSD)) { - myOrigins.Bind(aFSD, aNewShape); + myOrigins.Bind(aFSD, aNewShape); } } } @@ -370,13 +370,13 @@ aFx[1]=aLF.Last(); for (i=0; i<2; ++i) { if (!aMFS.Contains(aFx[i])) { - continue;// it must not be so + continue;// it must not be so } // const TopTools_ListOfShape& aLS=aMFS.FindFromKey(aFx[i]); aNbS=aLS.Extent(); if (aNbS!=1) { - continue; + continue; } aSx[i]=aLS.First(); } diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx index a147c90b0..800021259 100755 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Gluer.cxx -// Created: Sat Dec 04 12:45:53 2004 -// Author: Peter KURNEV -// +// File: GEOMAlgo_Gluer.cxx +// Created: Sat Dec 04 12:45:53 2004 +// Author: Peter KURNEV +// // #include @@ -90,7 +90,7 @@ static void GetSubShapes(const TopoDS_Shape& aS, - TopTools_IndexedMapOfShape& aMSS); + TopTools_IndexedMapOfShape& aMSS); //======================================================================= //function : GEOMAlgo_Gluer @@ -251,49 +251,49 @@ void GEOMAlgo_Gluer::MakeVertices() aNbIP=aMIP.Extent(); aIt1.Initialize(aMIP); for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - if (aMIPC.Contains(aIP)) { - continue; - } - // - const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); - const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP); - // - aSelector.Clear(); - aSelector.SetBox(aBoxVP); - // - aNbVSD=aBBTree.Select(aSelector); - if (!aNbVSD) { - continue; // it must not be - } - // - const TColStd_ListOfInteger& aLI=aSelector.Indices(); - aIt.Initialize(aLI); - for (; aIt.More(); aIt.Next()) { - aIP1=aIt.Value(); - if (aMIP.Contains(aIP1)) { - continue; - } - aMIP1.Add(aIP1); - } //for (; aIt.More(); aIt.Next()) { + aIP=aIt1.Key(); + if (aMIPC.Contains(aIP)) { + continue; + } + // + const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); + const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP); + // + aSelector.Clear(); + aSelector.SetBox(aBoxVP); + // + aNbVSD=aBBTree.Select(aSelector); + if (!aNbVSD) { + continue; // it must not be + } + // + const TColStd_ListOfInteger& aLI=aSelector.Indices(); + aIt.Initialize(aLI); + for (; aIt.More(); aIt.Next()) { + aIP1=aIt.Value(); + if (aMIP.Contains(aIP1)) { + continue; + } + aMIP1.Add(aIP1); + } //for (; aIt.More(); aIt.Next()) { }//for(; aIt1.More(); aIt1.Next()) { // aNbIP1=aMIP1.Extent(); if (!aNbIP1) { - break; + 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) @@ -309,13 +309,13 @@ void GEOMAlgo_Gluer::MakeVertices() else { // SD vertices founded [ aMIPC ] aIt1.Initialize(aMIPC); for(j=0; aIt1.More(); aIt1.Next(), ++j) { - aIP=aIt1.Key(); - const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); - if (!j) { - aVF=aVP; - } - aLVSD.Append(aVP); - aMVProcessed.Add(aVP); + aIP=aIt1.Key(); + const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); + if (!j) { + aVF=aVP; + } + aLVSD.Append(aVP); + aMVProcessed.Add(aVP); } } myImages.Bind(aVF, aLVSD); @@ -360,7 +360,7 @@ void GEOMAlgo_Gluer::MakeVertices() for (; aItS.More(); aItS.Next()) { const TopoDS_Shape& aVSD=aItS.Value(); if (!myOrigins.IsBound(aVSD)) { - myOrigins.Bind(aVSD, aV); + myOrigins.Bind(aVSD, aV); } } } @@ -532,12 +532,12 @@ void GEOMAlgo_Gluer::MakeShells() const TopoDS_Face& aF=TopoDS::Face(aExp.Current()); aFR=TopoDS::Face(myOrigins.Find(aF)); if (aFR.IsSame(aF)) { - aBB.Add(aNewShell, aF); - continue; + aBB.Add(aNewShell, aF); + continue; } bIsToReverse=IsToReverse(aFR, aF); if (bIsToReverse) { - aFR.Reverse(); + aFR.Reverse(); } aBB.Add(aNewShell, aFR); } @@ -638,25 +638,25 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) if (aNbSDF==1) { bHasNewSubShape=HasNewSubShape(aS1); if (!bHasNewSubShape) { - aNewShape=aS1; - aNewShape.Orientation(TopAbs_FORWARD); + aNewShape=aS1; + aNewShape.Orientation(TopAbs_FORWARD); } } // if (bHasNewSubShape) { if (aType==TopAbs_FACE) { - TopoDS_Face aNewFace; - // - const TopoDS_Face& aF1=TopoDS::Face(aS1); - MakeFace(aF1, aNewFace); - aNewShape=aNewFace; + TopoDS_Face aNewFace; + // + const TopoDS_Face& aF1=TopoDS::Face(aS1); + MakeFace(aF1, aNewFace); + aNewShape=aNewFace; } else if (aType==TopAbs_EDGE) { - TopoDS_Edge aNewEdge; - // - const TopoDS_Edge& aE1=TopoDS::Edge(aS1); - MakeEdge(aE1, aNewEdge); - aNewShape=aNewEdge; + TopoDS_Edge aNewEdge; + // + const TopoDS_Edge& aE1=TopoDS::Edge(aS1); + MakeEdge(aE1, aNewEdge); + aNewShape=aNewEdge; } } // @@ -666,7 +666,7 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) for (; aItS.More(); aItS.Next()) { const TopoDS_Shape& aFSD=aItS.Value(); if (!myOrigins.IsBound(aFSD)) { - myOrigins.Bind(aFSD, aNewShape); + myOrigins.Bind(aFSD, aNewShape); } } } @@ -706,12 +706,12 @@ void GEOMAlgo_Gluer::CheckResult() for (j=1; j<=aNbFS; ++j) { const TopoDS_Shape& aFS=aMFS(j); if (aMFR.Contains(aFS)) { - const TopTools_ListOfShape& aLSx=aMFR.FindFromKey(aFS); - aNbSx=aLSx.Extent(); - if (aNbSx==2) { - bFound=!bFound; - break; - } + const TopTools_ListOfShape& aLSx=aMFR.FindFromKey(aFS); + aNbSx=aLSx.Extent(); + if (aNbSx==2) { + bFound=!bFound; + break; + } } } // @@ -773,7 +773,7 @@ void GEOMAlgo_Gluer::InnerTolerance() //purpose : //======================================================================= void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, - GEOMAlgo_PassKeyShape& aPK) + GEOMAlgo_PassKeyShape& aPK) { Standard_Integer i, aNbE; TopTools_ListOfShape aLE; @@ -798,7 +798,7 @@ void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, //purpose : //======================================================================= void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE, - GEOMAlgo_PassKeyShape& aPK) + GEOMAlgo_PassKeyShape& aPK) { TopoDS_Vertex aV1, aV2; // @@ -817,7 +817,7 @@ void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE, //purpose : //======================================================================= void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV, - TopoDS_Vertex& aNewVertex) + TopoDS_Vertex& aNewVertex) { Standard_Integer aNbV; Standard_Real aTolV, aD, aDmax; @@ -863,7 +863,7 @@ void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV, //purpose : //======================================================================= void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE, - TopoDS_Edge& aNewEdge) + TopoDS_Edge& aNewEdge) { myErrorStatus=0; // @@ -917,7 +917,7 @@ void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE, //purpose : //======================================================================= void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF, - TopoDS_Face& aNewFace) + TopoDS_Face& aNewFace) { myErrorStatus=0; // @@ -953,20 +953,20 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF, // aER.Orientation(TopAbs_FORWARD); if (!BRep_Tool::Degenerated(aER)) { - // build p-curve - if (bIsUPeriodic) { - GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax); - } - BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD); - - // orient image - bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext); - if (bIsToReverse) { - aER.Reverse(); - } + // build p-curve + if (bIsUPeriodic) { + GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax); + } + BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD); + + // orient image + bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext); + if (bIsToReverse) { + aER.Reverse(); + } } else { - aER.Orientation(aE.Orientation()); + aER.Orientation(aE.Orientation()); } // aBB.Add(newWire, aER); @@ -987,7 +987,7 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF, //purpose : //======================================================================= Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR, - const TopoDS_Face& aF) + const TopoDS_Face& aF) { Standard_Boolean bRet; Standard_Real aT, aT1, aT2, aTR, aScPr; @@ -1066,7 +1066,7 @@ Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape(const TopoDS_Shape& aS)const //purpose : //======================================================================= void GetSubShapes(const TopoDS_Shape& aS, - TopTools_IndexedMapOfShape& aMSS) + TopTools_IndexedMapOfShape& aMSS) { Standard_Integer aR; TopAbs_ShapeEnum aType; @@ -1105,7 +1105,7 @@ const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS) if(myOrigins.IsBound(aS)) { const TopoDS_Shape& aSnew=myOrigins.Find(aS); if (!aSnew.IsSame(aS)) { - myGenerated.Append(aSnew); + myGenerated.Append(aSnew); } } } diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer1.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer1.cxx index fbcec0512..da4a919c9 100755 --- a/src/GEOMAlgo/GEOMAlgo_Gluer1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer1.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Gluer1.cxx -// Created: Wed Jan 24 11:52:27 2007 -// Author: Peter KURNEV -// +// File: GEOMAlgo_Gluer1.cxx +// Created: Wed Jan 24 11:52:27 2007 +// Author: Peter KURNEV +// // #include @@ -72,7 +72,7 @@ class GEOMAlgo_CoupleOfInteger { } // void SetValues(const Standard_Integer aI1, - const Standard_Integer aI2) { + const Standard_Integer aI2) { myInt1=aI1; myInt2=aI2; } @@ -86,7 +86,7 @@ class GEOMAlgo_CoupleOfInteger { } // void Values(Standard_Integer& aI1, - Standard_Integer& aI2) const { + Standard_Integer& aI2) const { aI1=myInt1; aI2=myInt2; } @@ -108,14 +108,14 @@ class GEOMAlgo_CoupleOfInteger { // static void SortShell(const Standard_Integer , - GEOMAlgo_CoupleOfInteger* ); + GEOMAlgo_CoupleOfInteger* ); static void RefineSolid(const TopoDS_Shape& , - const TopTools_DataMapOfShapeShape& , - TopTools_DataMapOfShapeShape& ); + const TopTools_DataMapOfShapeShape& , + TopTools_DataMapOfShapeShape& ); static void MakeFaceToReplace(const TopoDS_Face& , - TopoDS_Face& ); + TopoDS_Face& ); // //======================================================================= //function : GEOMAlgo_Gluer1 @@ -276,10 +276,10 @@ static aPKS.Clear(); aPKS.SetShapes(aS1, aS2); if (!myMapGN.IsBound(aPKS)) { - //some faces, wanted to unglue, are not glued at all; - myWarningStatus=2; - myRejectedFaces.Append(aCS); - continue; + //some faces, wanted to unglue, are not glued at all; + myWarningStatus=2; + myRejectedFaces.Append(aCS); + continue; } // const TopoDS_Shape& aFN=myMapGN.Find(aPKS); @@ -316,13 +316,13 @@ static for (; aItLS.More(); aItLS.Next()) { const TopoDS_Shape& aS=aItLS.Value(); if (aMSF.Contains(aS)) { - TopTools_ListOfShape& aLF=aMSF.ChangeFromKey(aS); - aLF.Append(aFN); + TopTools_ListOfShape& aLF=aMSF.ChangeFromKey(aS); + aLF.Append(aFN); } else { - TopTools_ListOfShape aLF; - aLF.Append(aFN); - aMSF.Add(aS, aLF); + TopTools_ListOfShape aLF; + aLF.Append(aFN); + aMSF.Add(aS, aLF); } } } @@ -373,7 +373,7 @@ static for (; aItLS.More(); aItLS.Next()) { const TopoDS_Shape& aFN=aItLS.Value(); if (!aMFNP.Add(aFN)) { - continue; + continue; } // // original face from original solid -> FD @@ -383,12 +383,12 @@ static const TopTools_ListOfShape& aLFD=myImages.Find(aFN); aItLS1.Initialize(aLFD); for (; aItLS1.More(); aItLS1.Next()) { - const TopoDS_Shape& aFDx=aItLS1.Value(); - if (aMFD.Contains(aFDx)) { - aFD=aFDx; - bFound=Standard_True; - break; - } + const TopoDS_Shape& aFDx=aItLS1.Value(); + if (aMFD.Contains(aFDx)) { + aFD=aFDx; + bFound=Standard_True; + break; + } } //if (!bFound) {...} aMFNFD.Bind(aFN, aFD); @@ -418,10 +418,10 @@ static TopTools_ListOfShape& aLFD=myImages.ChangeFind(aFN); aItLS.Initialize(aLFD); for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aFDx=aItLS.Value(); - if (!aFDx.IsSame(aFD)) { - aLFDx.Append(aFDx); - } + const TopoDS_Shape& aFDx=aItLS.Value(); + if (!aFDx.IsSame(aFD)) { + aLFDx.Append(aFDx); + } } aLFD=aLFDx; // @@ -438,8 +438,8 @@ static // purpose : replace faces (aMFN) of solid aSd by new ones //======================================================================= void RefineSolid(const TopoDS_Shape& aSd, - const TopTools_DataMapOfShapeShape& aMFNFD, - TopTools_DataMapOfShapeShape& aMFNFN2) + const TopTools_DataMapOfShapeShape& aMFNFD, + TopTools_DataMapOfShapeShape& aMFNFN2) { TopoDS_Shape *pSh; TopoDS_Face aF2; @@ -458,7 +458,7 @@ void RefineSolid(const TopoDS_Shape& aSd, for (; aItSh.More(); aItSh.Next()) { const TopoDS_Shape& aF=aItSh.Value(); if (aMFNFD.IsBound(aF)) { - aLF.Append(aF); + aLF.Append(aF); } } // @@ -480,7 +480,7 @@ void RefineSolid(const TopoDS_Shape& aSd, //purpose : //======================================================================= void MakeFaceToReplace(const TopoDS_Face& aF, - TopoDS_Face& aFR) + TopoDS_Face& aFR) { Standard_Real aTol; Handle(Geom_Surface) aS; @@ -508,7 +508,7 @@ void MakeFaceToReplace(const TopoDS_Face& aF, // purpose : //======================================================================= void SortShell(const Standard_Integer n, - GEOMAlgo_CoupleOfInteger* a) + GEOMAlgo_CoupleOfInteger* a) { Standard_Integer nd, i, j, l, d=1; GEOMAlgo_CoupleOfInteger x; @@ -526,13 +526,13 @@ void SortShell(const Standard_Integer n, m30:; l=j+d; if (a[l].Value1() < a[j].Value1()) { - x=a[j]; - a[j]=a[l]; - a[l]=x; - j-=d; - if (j > -1) { - goto m30; - } + x=a[j]; + a[j]=a[l]; + a[l]=x; + j-=d; + if (j > -1) { + goto m30; + } }//if (a[l] < a[j]){ }//for (i=0; i +// File: GEOMAlgo_Algo.cxx +// Created: Sat Dec 04 12:39:47 2004 +// Author: Peter KURNEV +// // #include diff --git a/src/GEOMAlgo/GEOMAlgo_HAlgo.hxx b/src/GEOMAlgo/GEOMAlgo_HAlgo.hxx index c7002b5da..dba798166 100644 --- a/src/GEOMAlgo/GEOMAlgo_HAlgo.hxx +++ b/src/GEOMAlgo/GEOMAlgo_HAlgo.hxx @@ -66,7 +66,7 @@ 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; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_HAlgo.ixx b/src/GEOMAlgo/GEOMAlgo_HAlgo.ixx index 810ccc9e2..0914f0cdd 100644 --- a/src/GEOMAlgo/GEOMAlgo_HAlgo.ixx +++ b/src/GEOMAlgo/GEOMAlgo_HAlgo.ixx @@ -38,10 +38,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_HAlgo_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_HAlgo", - sizeof(GEOMAlgo_HAlgo), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_HAlgo), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx index 965ff0a27..de824bea8 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx @@ -70,7 +70,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape(const Standard_Integer // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx index 300973d78..9f6a90ac7 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx index c4f5752fc..3576d32f5 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape.hxx @@ -82,7 +82,7 @@ Standard_EXPORT ~GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape // Standard_EXPORT friend Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx index 3703fb54a..1c3778a37 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape_0.cxx @@ -54,10 +54,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyListOfShape), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx index 71466b812..7fbe3e900 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape.hxx @@ -74,7 +74,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape(const GEOMA // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx index fa5437fc8..05eb76ce9 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfPassKeyShapeListOfShape), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx index d01bc565d..78a8ef08c 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx @@ -74,7 +74,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox(const TopoDS_Shape& K1,con // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx index 06f91398d..540167684 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeBox), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx index e974bb3c6..215eefe28 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo.hxx @@ -74,7 +74,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo(const TopoDS_Shape& // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx index 799e63395..d62e1b1b9 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeShapeInfo), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx index ab44e2fe2..e73e2fd97 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState.hxx @@ -73,7 +73,7 @@ GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState(const TopoDS_Shape& K1,c // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx index eb0fcc7db..a17fe5a64 100644 --- a/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_IndexedDataMapNodeOfIndexedDataMa static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState", - sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_IndexedDataMapNodeOfIndexedDataMapOfShapeState), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx index 04439ff5e..dba83ac06 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes.hxx @@ -61,7 +61,7 @@ GEOMAlgo_ListNodeOfListOfCoupleOfShapes(const GEOMAlgo_CoupleOfShapes& I,const T // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx index d8786cc70..29ee711a3 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfCoupleOfShapes_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfCoupleOfShapes_Ty static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ListNodeOfListOfCoupleOfShapes", - sizeof(GEOMAlgo_ListNodeOfListOfCoupleOfShapes), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_ListNodeOfListOfCoupleOfShapes), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx index 908c29be4..304a3d98e 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx +++ b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt.hxx @@ -61,7 +61,7 @@ GEOMAlgo_ListNodeOfListOfPnt(const gp_Pnt& I,const TCollection_MapNodePtr& n); // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx index 3587b7daa..6bb1f8b4f 100644 --- a/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ListNodeOfListOfPnt_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMAlgo_ListNodeOfListOfPnt_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMAlgo_ListNodeOfListOfPnt", - sizeof(GEOMAlgo_ListNodeOfListOfPnt), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMAlgo_ListNodeOfListOfPnt), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMAlgo/GEOMAlgo_PassKey.cxx b/src/GEOMAlgo/GEOMAlgo_PassKey.cxx index 254ca6e59..3c072fe86 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKey.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKey.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Algo.cxx -// Created: Sat Dec 04 12:39:47 2004 -// Author: Peter KURNEV -// +// File: GEOMAlgo_Algo.cxx +// Created: Sat Dec 04 12:39:47 2004 +// Author: Peter KURNEV +// // #include @@ -37,7 +37,7 @@ static Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv); + const Standard_Integer aDiv); //======================================================================= //function : @@ -90,7 +90,7 @@ static //purpose : //======================================================================= void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1) - + { Clear(); myNbIds=1; @@ -102,7 +102,7 @@ static //purpose : //======================================================================= void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2) + const Standard_Integer aId2) { TColStd_ListOfInteger aLI; // @@ -115,8 +115,8 @@ static //purpose : //======================================================================= void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2, - const Standard_Integer aId3) + const Standard_Integer aId2, + const Standard_Integer aId3) { TColStd_ListOfInteger aLI; // @@ -130,9 +130,9 @@ static //purpose : //======================================================================= void GEOMAlgo_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2, - const Standard_Integer aId3, - const Standard_Integer aId4) + const Standard_Integer aId2, + const Standard_Integer aId3, + const Standard_Integer aId4) { TColStd_ListOfInteger aLI; // @@ -225,7 +225,7 @@ static // purpose : //======================================================================= Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv) + const Standard_Integer aDiv) { Standard_Integer aMax, aTresh, aIdRet; // diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx index 8db75c81c..94108f3af 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyMapHasher.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_PassKeyMapHasher.cxx -// Created: -// Author: Peter KURNEV -// +// File: GEOMAlgo_PassKeyMapHasher.cxx +// Created: +// Author: Peter KURNEV +// // #include @@ -31,7 +31,7 @@ //purpose : //======================================================================= Standard_Integer GEOMAlgo_PassKeyMapHasher::HashCode(const GEOMAlgo_PassKey& aPK, - const Standard_Integer Upper) + const Standard_Integer Upper) { return aPK.HashCode(Upper); } @@ -40,7 +40,7 @@ //purpose : //======================================================================= Standard_Boolean GEOMAlgo_PassKeyMapHasher::IsEqual(const GEOMAlgo_PassKey& aPK1, - const GEOMAlgo_PassKey& aPK2) + const GEOMAlgo_PassKey& aPK2) { return aPK1.IsEqual(aPK2); } diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx index 41debf27e..43c881a4b 100755 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShape.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_PassKeyShape.cxx -// Created: -// Author: Peter KURNEV -// +// File: GEOMAlgo_PassKeyShape.cxx +// Created: +// Author: Peter KURNEV +// // #include @@ -32,7 +32,7 @@ static Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv); + const Standard_Integer aDiv); //======================================================================= //function : //purpose : @@ -86,7 +86,7 @@ static //purpose : //======================================================================= void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1) - + { Standard_Integer aHC; // @@ -101,7 +101,7 @@ static //purpose : //======================================================================= void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) + const TopoDS_Shape& aS2) { TopTools_ListOfShape aLS; // @@ -114,8 +114,8 @@ static //purpose : //======================================================================= void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2, - const TopoDS_Shape& aS3) + const TopoDS_Shape& aS2, + const TopoDS_Shape& aS3) { TopTools_ListOfShape aLS; // @@ -129,9 +129,9 @@ static //purpose : //======================================================================= void GEOMAlgo_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2, - const TopoDS_Shape& aS3, - const TopoDS_Shape& aS4) + const TopoDS_Shape& aS2, + const TopoDS_Shape& aS3, + const TopoDS_Shape& aS4) { TopTools_ListOfShape aLS; // @@ -214,7 +214,7 @@ static // purpose : //======================================================================= Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv) + const Standard_Integer aDiv) { Standard_Integer aMax, aTresh, aIdRet; // diff --git a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cxx b/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cxx index 036cddde9..708355023 100644 --- a/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cxx +++ b/src/GEOMAlgo/GEOMAlgo_PassKeyShapeMapHasher.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_PassKeyMapHasher.cxx -// Created: -// Author: Peter KURNEV -// +// File: GEOMAlgo_PassKeyMapHasher.cxx +// Created: +// Author: Peter KURNEV +// // #include @@ -31,7 +31,7 @@ //purpose : //======================================================================= Standard_Integer GEOMAlgo_PassKeyShapeMapHasher::HashCode(const GEOMAlgo_PassKeyShape& aPK, - const Standard_Integer Upper) + const Standard_Integer Upper) { return aPK.HashCode(Upper); } @@ -40,7 +40,7 @@ //purpose : //======================================================================= Standard_Boolean GEOMAlgo_PassKeyShapeMapHasher::IsEqual(const GEOMAlgo_PassKeyShape& aPK1, - const GEOMAlgo_PassKeyShape& aPK2) + const GEOMAlgo_PassKeyShape& aPK2) { return aPK1.IsEqual(aPK2); } diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx index 9e93ba6ca..65929b63a 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_ShapeAlgo.cxx -// Created: Tue Dec 7 12:06:54 2004 -// Author: Peter KURNEV -// +// File: GEOMAlgo_ShapeAlgo.cxx +// Created: Tue Dec 7 12:06:54 2004 +// Author: Peter KURNEV +// // #include diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx index afcd3b550..9614524e5 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeInfo.cxx @@ -103,7 +103,7 @@ static //purpose : //======================================================================= void GEOMAlgo_ShapeInfo::SetNbSubShapes(const TopAbs_ShapeEnum aType, - const Standard_Integer aNb) + const Standard_Integer aNb) { Standard_Integer iN; @@ -599,8 +599,8 @@ Standard_Integer TypeToInteger(const TopAbs_ShapeEnum aType) printf(" Width : %.3lf\n", myWidth); } else if (aKN==GEOMAlgo_KN_TRIANGLE || - aKN==GEOMAlgo_KN_QUADRANGLE|| - aKN==GEOMAlgo_KN_POLYGON) { + aKN==GEOMAlgo_KN_QUADRANGLE|| + aKN==GEOMAlgo_KN_POLYGON) { DumpLocation (myLocation); DumpPosition (myPosition); } diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx index 4c5690521..136b73a7a 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller.cxx @@ -700,7 +700,7 @@ static //purpose : //======================================================================= void GEOMAlgo_ShapeInfoFiller::FillNbSubShapes(const TopoDS_Shape& aS, - GEOMAlgo_ShapeInfo& aInfo) + GEOMAlgo_ShapeInfo& aInfo) { myErrorStatus=0; // diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx index 152a4f3ad..3395151f7 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeInfoFiller_1.cxx @@ -79,13 +79,13 @@ GEOMAlgo_ShapeInfo& aInfoF=myMapInfo.ChangeFromKey(aF); aKNF=aInfoF.KindOfName(); // mb: sphere, torus if (aKNF==GEOMAlgo_KN_SPHERE || - aKNF==GEOMAlgo_KN_TORUS) { + aKNF==GEOMAlgo_KN_TORUS) { aInfo.SetKindOfName(aKNF); aInfo.SetLocation(aInfoF.Location()); aInfo.SetPosition(aInfoF.Position()); aInfo.SetRadius1(aInfoF.Radius1()); if(aKNF==GEOMAlgo_KN_TORUS) { - aInfo.SetRadius2(aInfoF.Radius2()); + aInfo.SetRadius2(aInfoF.Radius2()); } return; } @@ -112,8 +112,8 @@ ++aNbCrc; } else if (aKNF==GEOMAlgo_KN_POLYGON || - aKNF==GEOMAlgo_KN_TRIANGLE || - aKNF==GEOMAlgo_KN_QUADRANGLE) { + aKNF==GEOMAlgo_KN_TRIANGLE || + aKNF==GEOMAlgo_KN_QUADRANGLE) { ++aNbPgn; } @@ -200,7 +200,7 @@ // for (j=i+1; j<=aNbF; ++j) { if (aMp.Contains(j)) { - continue; + continue; } // const TopoDS_Shape& aFj=aMF(j); @@ -209,10 +209,10 @@ // aDot=aDNi*aDNj; if (fabs(1.-aDot)<0.0001) { - aMp.Add(i); - aMp.Add(j); - aMFi.Add(aFi); - break; + aMp.Add(i); + aMp.Add(j); + aMFi.Add(aFi); + break; } // } @@ -267,7 +267,7 @@ //purpose : //======================================================================= void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF, - const gp_Pln& aPln) + const gp_Pln& aPln) { Standard_Integer aNbV, aNbE, i, j; Standard_Real aDot, aD0, aD1, aLength, aWidth; @@ -336,7 +336,7 @@ const GEOMAlgo_ShapeInfo& aInfoE=myMapInfo.FindFromKey(aE); aKNE=aInfoE.KindOfName(); if (aKNE!=GEOMAlgo_KN_SEGMENT) { - return; + return; } } // @@ -348,11 +348,11 @@ aXYZc.SetCoord(0.,0.,0.); TopExp::MapShapes(aF, TopAbs_VERTEX, aMV); for (i=1; i<=aNbV; ++i) { - const TopoDS_Vertex& aV=TopoDS::Vertex(aMV(i)); - aP=BRep_Tool::Pnt(aV); - const gp_XYZ& aXYZ=aP.XYZ(); - aXYZc=aXYZc+aXYZ; - aPx[i-1]=aP; + const TopoDS_Vertex& aV=TopoDS::Vertex(aMV(i)); + aP=BRep_Tool::Pnt(aV); + const gp_XYZ& aXYZ=aP.XYZ(); + aXYZc=aXYZc+aXYZ; + aPx[i-1]=aP; } aXYZc.Divide(3.); // @@ -394,8 +394,8 @@ j=(i==3) ? 0 : i+1; aDot=aDx[i]*aDx[j]; if (fabs (aDot) > myTolerance) { - aInfo.SetKindOfName(GEOMAlgo_KN_QUADRANGLE); - return; + aInfo.SetKindOfName(GEOMAlgo_KN_QUADRANGLE); + return; } } // @@ -454,7 +454,7 @@ //purpose : //======================================================================= void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF, - const gp_Sphere& ) + const gp_Sphere& ) { Standard_Integer aNbV, aNbE, aNbSE, aNbDE; TopoDS_Edge aE; @@ -486,10 +486,10 @@ aKSE=aInfoE.KindOfShape(); // if (BRep_Tool::IsClosed(aE, aF)) { - ++aNbSE; + ++aNbSE; } else if (aKSE==GEOMAlgo_KS_DEGENERATED) { - ++aNbDE; + ++aNbDE; } } } @@ -504,7 +504,7 @@ //purpose : //======================================================================= void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF, - const gp_Cone& )//aCone) + const gp_Cone& )//aCone) { Standard_Integer aNbV, aNbE, aNbCE, aNbSE, aNbDE, i; Standard_Real aR[3], aHeight; @@ -550,34 +550,34 @@ aKCE=aInfoE.KindOfClosed(); aKSE=aInfoE.KindOfShape(); if (aKNE==GEOMAlgo_KN_CIRCLE && aKCE==GEOMAlgo_KC_CLOSED) { - aPC[i]=aInfoE.Location(); - aR[i]=aInfoE.Radius1(); - // - aIt.Initialize(aE); - for (; aIt.More(); aIt.Next()) { - aVD=TopoDS::Vertex(aIt.Value()); - break; - } - aPX[i]=BRep_Tool::Pnt(aVD); - // - ++i; - ++aNbCE; + aPC[i]=aInfoE.Location(); + aR[i]=aInfoE.Radius1(); + // + aIt.Initialize(aE); + for (; aIt.More(); aIt.Next()) { + aVD=TopoDS::Vertex(aIt.Value()); + break; + } + aPX[i]=BRep_Tool::Pnt(aVD); + // + ++i; + ++aNbCE; } else if (aKNE==GEOMAlgo_KN_SEGMENT) { - if (BRep_Tool::IsClosed(aE, aF)) { - ++aNbSE; - } + if (BRep_Tool::IsClosed(aE, aF)) { + ++aNbSE; + } } else if (aKSE==GEOMAlgo_KS_DEGENERATED) { - aIt.Initialize(aE); - for (; aIt.More(); aIt.Next()) { - aVD=TopoDS::Vertex(aIt.Value()); - break; - } - // - aPD=BRep_Tool::Pnt(aVD); - // - ++aNbDE; + aIt.Initialize(aE); + for (; aIt.More(); aIt.Next()) { + aVD=TopoDS::Vertex(aIt.Value()); + break; + } + // + aPD=BRep_Tool::Pnt(aVD); + // + ++aNbDE; } } } @@ -633,7 +633,7 @@ //purpose : //======================================================================= void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF, - const gp_Cylinder& aCyl) + const gp_Cylinder& aCyl) { Standard_Integer i, aNbV, aNbE, aNbCE, aNbSE; Standard_Real aT0, aT1, aHeight; @@ -675,13 +675,13 @@ aKNE=aInfoE.KindOfName(); aKCE=aInfoE.KindOfClosed(); if (aKNE==GEOMAlgo_KN_CIRCLE && aKCE==GEOMAlgo_KC_CLOSED) { - aPC[aNbCE]=aInfoE.Location(); - ++aNbCE; + aPC[aNbCE]=aInfoE.Location(); + ++aNbCE; } else if (aKNE==GEOMAlgo_KN_SEGMENT) { - if (BRep_Tool::IsClosed(aE, aF)) { - ++aNbSE; - } + if (BRep_Tool::IsClosed(aE, aF)) { + ++aNbSE; + } } } } @@ -718,7 +718,7 @@ //purpose : //======================================================================= void GEOMAlgo_ShapeInfoFiller::FillDetails(const TopoDS_Face& aF, - const gp_Torus& ) + const gp_Torus& ) { Standard_Integer aNbV, aNbE, aNbSE; TopoDS_Edge aE; @@ -747,7 +747,7 @@ if (aM.Add(aE)) { //const GEOMAlgo_ShapeInfo& aInfoE=myMapInfo.FindFromKey(aE); if (BRep_Tool::IsClosed(aE, aF)) { - ++aNbSE; + ++aNbSE; } } } diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx index e48672d62..a702c6fc6 100755 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeSet.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_ShapeSet.cxx -// Created: -// Author: Peter KURNEV +// File: GEOMAlgo_ShapeSet.cxx +// Created: +// Author: Peter KURNEV // #include @@ -61,7 +61,7 @@ //purpose : //======================================================================= void GEOMAlgo_ShapeSet::Add(const TopoDS_Shape& theShape, - const TopAbs_ShapeEnum theType) + const TopAbs_ShapeEnum theType) { TopExp_Explorer aExp; // @@ -127,7 +127,7 @@ if (aOr==TopAbs_FORWARD || aOr==TopAbs_REVERSED) { bRet=myMap.Contains(aF); if (!bRet) { - break; + break; } } } @@ -158,7 +158,7 @@ const TopoDS_Shape& aS=aIt.Value(); if (!theOther.myMap.Contains(aS)) { if(myMap.Add(aS)){ - aLS.Append(aS); + aLS.Append(aS); } } } diff --git a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx index 1883de4a0..8787d4314 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShapeSolid.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_ShapeSolid.cxx -// Created: Thu Jan 13 12:54:48 2005 -// Author: Peter KURNEV -// +// File: GEOMAlgo_ShapeSolid.cxx +// Created: Thu Jan 13 12:54:48 2005 +// Author: Peter KURNEV +// // #include diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx index c4dca68d0..a781e9f58 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_ShellSolid.cxx -// Created: Wed Jan 12 12:49:45 2005 -// Author: Peter KURNEV -// +// File: GEOMAlgo_ShellSolid.cxx +// Created: Wed Jan 12 12:49:45 2005 +// Author: Peter KURNEV +// // #include @@ -217,7 +217,7 @@ void GEOMAlgo_ShellSolid::BuildResult() const BOPTools_ListOfPaveBlock& aSectEdges=aBC.NewPaveBlocks(); aNbS=aSectEdges.Extent(); if (aNbS) { - break; + break; } } // @@ -229,7 +229,7 @@ void GEOMAlgo_ShellSolid::BuildResult() for (; anExp.More(); anExp.Next()) { const TopoDS_Edge& aE=TopoDS::Edge(anExp.Current()); if (BRep_Tool::Degenerated(aE)) { - continue; + continue; } // nE=aDS.ShapeIndex(aE, myRank); @@ -237,46 +237,46 @@ void GEOMAlgo_ShellSolid::BuildResult() aNbPB=aLPB.Extent(); // if (aNbPB<2) { - nSp=nE; - if (aNbPB) { - const BOPTools_PaveBlock& aPB=aLPB.First(); - nSp=aPB.Edge(); - } - const TopoDS_Shape& aSp=aDS.Shape(nSp); - // - aState=aDS.GetState(nSp); - if (aState==BooleanOperations_IN) { - myLSIN.Append(aF1); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aF1); - } - else if (aState==BooleanOperations_ON) { - Standard_Real aTol; - TopAbs_State aSt; - // - //const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape((iRank1==myRank)? nF2 : nF1)); - //aTol=BRep_Tool::Tolerance(aF2); - aTol=1.e-7; - // - BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP3D); - const TopoDS_Solid& aRefSolid=(myRank==1) ? - TopoDS::Solid(aDS.Tool()) : TopoDS::Solid(aDS.Object()); - // - BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)& aPaveFiller; - IntTools_Context& aCtx=pPF->ChangeContext(); - // - BRepClass3d_SolidClassifier& aSC=aCtx.SolidClassifier(aRefSolid); - aSC.Perform(aP3D, aTol); - aSt=aSC.State(); - if (aSt==TopAbs_IN) { - myLSIN.Append(aF1); - } - else if (aSt==TopAbs_OUT) { - myLSOUT.Append(aF1); - } - } - break; + nSp=nE; + if (aNbPB) { + const BOPTools_PaveBlock& aPB=aLPB.First(); + nSp=aPB.Edge(); + } + const TopoDS_Shape& aSp=aDS.Shape(nSp); + // + aState=aDS.GetState(nSp); + if (aState==BooleanOperations_IN) { + myLSIN.Append(aF1); + } + else if (aState==BooleanOperations_OUT) { + myLSOUT.Append(aF1); + } + else if (aState==BooleanOperations_ON) { + Standard_Real aTol; + TopAbs_State aSt; + // + //const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape((iRank1==myRank)? nF2 : nF1)); + //aTol=BRep_Tool::Tolerance(aF2); + aTol=1.e-7; + // + BOPTools_Tools3D::PointNearEdge(aE, aF1, aP2D, aP3D); + const TopoDS_Solid& aRefSolid=(myRank==1) ? + TopoDS::Solid(aDS.Tool()) : TopoDS::Solid(aDS.Object()); + // + BOPTools_PaveFiller* pPF=(BOPTools_PaveFiller*)& aPaveFiller; + IntTools_Context& aCtx=pPF->ChangeContext(); + // + BRepClass3d_SolidClassifier& aSC=aCtx.SolidClassifier(aRefSolid); + aSC.Perform(aP3D, aTol); + aSt=aSC.State(); + if (aSt==TopAbs_IN) { + myLSIN.Append(aF1); + } + else if (aSt==TopAbs_OUT) { + myLSOUT.Append(aF1); + } + } + break; } // if (aNbPB<2) { } //for (; anExp.More(); anExp.Next()) } @@ -340,26 +340,26 @@ void GEOMAlgo_ShellSolid::DetectSDFaces() iZone=0; TopTools_ListIteratorOfListOfShape anIt(aLF); for (; anIt.More(); anIt.Next()) { - const TopoDS_Shape& aFR=anIt.Value(); + const TopoDS_Shape& aFR=anIt.Value(); - if (aFR.ShapeType()==TopAbs_FACE) { - const TopoDS_Face& aFaceResult=TopoDS::Face(aFR); - // - Standard_Boolean bIsValidIn2D, bNegativeFlag; - bIsValidIn2D=BOPTools_Tools3D::IsValidArea (aFaceResult, bNegativeFlag); - if (bIsValidIn2D) { - //if(CheckSameDomainFaceInside(aFaceResult, aF2)) { - iZone=1; - break; - //} - } - // - } + if (aFR.ShapeType()==TopAbs_FACE) { + const TopoDS_Face& aFaceResult=TopoDS::Face(aFR); + // + Standard_Boolean bIsValidIn2D, bNegativeFlag; + bIsValidIn2D=BOPTools_Tools3D::IsValidArea (aFaceResult, bNegativeFlag); + if (bIsValidIn2D) { + //if(CheckSameDomainFaceInside(aFaceResult, aF2)) { + iZone=1; + break; + //} + } + // + } } if (iZone) { - bFlag=Standard_True; - aFF.SetStatesMap(aWESFiller.StatesMap()); + bFlag=Standard_True; + aFF.SetStatesMap(aWESFiller.StatesMap()); } }// if (iSenseFlag) diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx index b64df9d55..cc31557db 100644 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_SolidSolid.cxx -// Created: Wed Jan 26 12:06:26 2005 -// Author: Peter KURNEV -// +// File: GEOMAlgo_SolidSolid.cxx +// Created: Wed Jan 26 12:06:26 2005 +// Author: Peter KURNEV +// // #include @@ -163,39 +163,39 @@ void GEOMAlgo_SolidSolid::BuildResult() const TopoDS_Shape& aF=aMF(j); // if (!aMFS.Contains(aF)) {// the face is intesected - ++aNbFINTR; - break; + ++aNbFINTR; + break; } // aState=aMFS.FindFromKey(aF); switch (aState) { case TopAbs_IN: - ++aNbFIN; - break; - case TopAbs_OUT: - ++aNbFOUT; - break; - case TopAbs_ON: - ++aNbFON; - break; - default: - break; + ++aNbFIN; + break; + case TopAbs_OUT: + ++aNbFOUT; + break; + case TopAbs_ON: + ++aNbFON; + break; + default: + break; } if (aNbFIN && aNbFOUT) { - ++aNbFINTR; - break; + ++aNbFINTR; + break; } } // if (!aNbFINTR) { if (aNbFON==aNbF) { - myLSON.Append(aSolid); + myLSON.Append(aSolid); } else if (aNbFIN) { - myLSIN.Append(aSolid); + myLSIN.Append(aSolid); } else if (aNbFOUT) { - myLSOUT.Append(aSolid); + myLSOUT.Append(aSolid); } } } diff --git a/src/GEOMAlgo/GEOMAlgo_StateCollector.cxx b/src/GEOMAlgo/GEOMAlgo_StateCollector.cxx index 5f43ce8d3..20b8faf03 100644 --- a/src/GEOMAlgo/GEOMAlgo_StateCollector.cxx +++ b/src/GEOMAlgo/GEOMAlgo_StateCollector.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_StateCollector.cxx -// Created: Thu Mar 10 09:42:11 2005 -// Author: Peter KURNEV -// +// File: GEOMAlgo_StateCollector.cxx +// Created: Thu Mar 10 09:42:11 2005 +// Author: Peter KURNEV +// // #include diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx index 9039a1f18..f8073e40b 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_SurfaceTools.cxx -// Created: Thu Jan 27 11:05:16 2005 -// Author: Peter KURNEV -// +// File: GEOMAlgo_SurfaceTools.cxx +// Created: Thu Jan 27 11:05:16 2005 +// Author: Peter KURNEV +// // #include @@ -47,9 +47,9 @@ //purpose : //======================================================================= Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP, - const GeomAdaptor_Surface& aGAS, - const Standard_Real aTol, - TopAbs_State& aState) + const GeomAdaptor_Surface& aGAS, + const Standard_Real aTol, + TopAbs_State& aState) { Standard_Integer iErr; Standard_Real aDp, aR; @@ -103,9 +103,9 @@ //purpose : //======================================================================= Standard_Integer GEOMAlgo_SurfaceTools::GetState(const gp_Pnt& aP, - const Handle(Geom_Surface)& aSurf, - const Standard_Real aTol, - TopAbs_State& aState) + const Handle(Geom_Surface)& aSurf, + const Standard_Real aTol, + TopAbs_State& aState) { Standard_Integer iErr; GeomAdaptor_Surface aGAS; @@ -143,7 +143,7 @@ //purpose : //======================================================================= Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, - const gp_Sphere& aSph) + const gp_Sphere& aSph) { Standard_Real aD; // @@ -157,7 +157,7 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, //purpose : //======================================================================= Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, - const gp_Cylinder& aCyl) + const gp_Cylinder& aCyl) { Standard_Real aD; // @@ -172,7 +172,7 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, //purpose : //======================================================================= Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, - const gp_Pln& aPL) + const gp_Pln& aPL) { Standard_Real aD; // @@ -190,9 +190,9 @@ Standard_Real GEOMAlgo_SurfaceTools::Distance(const gp_Pnt& aP, //purpose : //======================================================================= Standard_Boolean GEOMAlgo_SurfaceTools::IsCoaxial(const gp_Pnt& aP1, - const gp_Pnt& aP2, - const gp_Cylinder& aCyl, - const Standard_Real aTol) + const gp_Pnt& aP2, + const gp_Cylinder& aCyl, + const Standard_Real aTol) { Standard_Boolean bRet=Standard_False; Standard_Real aSM; @@ -223,8 +223,8 @@ Standard_Boolean GEOMAlgo_SurfaceTools::IsAnalytic(const Handle(Geom_Surface)& a aGAS.Load(aSurf); aType=aGAS.GetType(); bRet=(aType==GeomAbs_Plane || - aType==GeomAbs_Cylinder || - aType==GeomAbs_Sphere); + aType==GeomAbs_Cylinder || + aType==GeomAbs_Sphere); return bRet; } //======================================================================= @@ -232,34 +232,34 @@ Standard_Boolean GEOMAlgo_SurfaceTools::IsAnalytic(const Handle(Geom_Surface)& a //purpose : //======================================================================= Standard_Boolean GEOMAlgo_SurfaceTools::IsConformState(const TopAbs_State aST1, - const GEOMAlgo_State aST2) + const GEOMAlgo_State aST2) { Standard_Boolean bRet=Standard_False; // switch (aST2) { case GEOMAlgo_ST_IN: if (aST1==TopAbs_IN) { - bRet=!bRet; + bRet=!bRet; } break; case GEOMAlgo_ST_OUT: if (aST1==TopAbs_OUT) { - bRet=!bRet; + bRet=!bRet; } break; case GEOMAlgo_ST_ON: if (aST1==TopAbs_ON) { - bRet=!bRet; + bRet=!bRet; } break; case GEOMAlgo_ST_ONIN: if (aST1==TopAbs_ON || aST1==TopAbs_IN) { - bRet=!bRet; + bRet=!bRet; } break; case GEOMAlgo_ST_ONOUT: if (aST1==TopAbs_ON || aST1==TopAbs_OUT) { - bRet=!bRet; + bRet=!bRet; } break; default: diff --git a/src/GEOMAlgo/GEOMAlgo_Tools.cxx b/src/GEOMAlgo/GEOMAlgo_Tools.cxx index a265c785f..bc9249f32 100644 --- a/src/GEOMAlgo/GEOMAlgo_Tools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Tools.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_Tools.cxx -// Created: Mon Dec 6 11:35:29 2004 -// Author: Peter KURNEV -// +// File: GEOMAlgo_Tools.cxx +// Created: Mon Dec 6 11:35:29 2004 +// Author: Peter KURNEV +// // #include @@ -59,7 +59,7 @@ static void GetCount(const TopoDS_Shape& aS, - Standard_Integer& iCnt); + Standard_Integer& iCnt); //======================================================================= //function : IsCompositeShape @@ -83,7 +83,7 @@ Standard_Boolean GEOMAlgo_Tools::IsCompositeShape(const TopoDS_Shape& aS) //purpose : //======================================================================= void GetCount(const TopoDS_Shape& aS, - Standard_Integer& iCnt) + Standard_Integer& iCnt) { TopoDS_Iterator aIt; TopAbs_ShapeEnum aTS; @@ -110,8 +110,8 @@ void GetCount(const TopoDS_Shape& aS, //purpose : //======================================================================= Standard_Integer GEOMAlgo_Tools::RefineSDShapes(GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape& aMPKLE, - const Standard_Real aTol, - IntTools_Context& aCtx) + const Standard_Real aTol, + IntTools_Context& aCtx) { Standard_Integer i, aNbE, iErr, j, aNbEE, aNbToAdd; TopTools_IndexedDataMapOfShapeListOfShape aMEE, aMSDE, aMEToAdd; @@ -137,12 +137,12 @@ void GetCount(const TopoDS_Shape& aS, TopTools_ListOfShape& aLEE=aMEE.ChangeFromIndex(j); // if (j==1) { - aLSDE.Clear(); - aLSDE.Append(aLEE); + aLSDE.Clear(); + aLSDE.Append(aLEE); } else { - const TopoDS_Shape& aE1=aLEE.First(); - aMEToAdd.Add(aE1, aLEE); + const TopoDS_Shape& aE1=aLEE.First(); + aMEToAdd.Add(aE1, aLEE); } } } @@ -172,9 +172,9 @@ void GetCount(const TopoDS_Shape& aS, //purpose : //======================================================================= Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopTools_ListOfShape& aLE, - const Standard_Real aTol, - TopTools_IndexedDataMapOfShapeListOfShape& aMEE, - IntTools_Context& aCtx) + const Standard_Real aTol, + TopTools_IndexedDataMapOfShapeListOfShape& aMEE, + IntTools_Context& aCtx) { Standard_Integer aNbE, aNbEProcessed, aNbESD, iErr; TopTools_ListOfShape aLESD; @@ -203,37 +203,37 @@ Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopTools_ListOfShape& aLE, const TopoDS_Shape& aS=aIt.Value(); // if (aMProcessed.Contains(aS)) { - continue; + continue; } // //modified by NIZNHY-PKV Thu Dec 30 10:57:01 2004 f aType=aS.ShapeType(); if (aType==TopAbs_EDGE) { - const TopoDS_Edge& aE=TopoDS::Edge(aS); - if (BRep_Tool::Degenerated(aE)) { - aMProcessed.Add(aE); - continue; - } + const TopoDS_Edge& aE=TopoDS::Edge(aS); + if (BRep_Tool::Degenerated(aE)) { + aMProcessed.Add(aE); + continue; + } } //modified by NIZNHY-PKV Thu Dec 30 10:57:03 2004 t // aLESD.Clear(); iErr=GEOMAlgo_Tools::FindSDShapes(aS, aLE, aTol, aLESD, aCtx); if (iErr) { - return 2; // Err + return 2; // Err } // aNbESD=aLESD.Extent(); if (!aNbESD) { - return 1; // Err + return 1; // Err } // aMEE.Add(aS, aLESD); // aIt1.Initialize(aLESD); for (; aIt1.More(); aIt1.Next()) { - const TopoDS_Shape& aE1=aIt1.Value(); - aMProcessed.Add(aE1); + const TopoDS_Shape& aE1=aIt1.Value(); + aMProcessed.Add(aE1); } } } @@ -244,10 +244,10 @@ Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopTools_ListOfShape& aLE, //purpose : //======================================================================= Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopoDS_Shape& aE1, - const TopTools_ListOfShape& aLE, - const Standard_Real aTol, - TopTools_ListOfShape& aLESD, - IntTools_Context& aCtx) + const TopTools_ListOfShape& aLE, + const Standard_Real aTol, + TopTools_ListOfShape& aLESD, + IntTools_Context& aCtx) { Standard_Boolean bIsDone; Standard_Real aTol2, aD2; @@ -266,12 +266,12 @@ Standard_Integer GEOMAlgo_Tools::FindSDShapes(const TopoDS_Shape& aE1, else { bIsDone=GEOMAlgo_Tools::ProjectPointOnShape(aP1, aE2, aP2, aCtx); if (!bIsDone) { - //return 1; - continue; // jfa BUG 20361 + //return 1; + continue; // jfa BUG 20361 } aD2=aP1.SquareDistance(aP2); if(aD2 @@ -92,32 +92,32 @@ // static Standard_Boolean FindFacePairs (const TopoDS_Edge& , - const TopTools_ListOfShape& , - NMTTools_ListOfCoupleOfShape& ); + const TopTools_ListOfShape& , + NMTTools_ListOfCoupleOfShape& ); static Standard_Real AngleWithRef(const gp_Dir& , - const gp_Dir& , - const gp_Dir& ); + const gp_Dir& , + const gp_Dir& ); static void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aE, - const TopoDS_Face& aF, - Standard_Real aT, - gp_Pnt& aPF, - gp_Dir& aDNF, - IntTools_Context& aCtx); + const TopoDS_Face& aF, + Standard_Real aT, + gp_Pnt& aPF, + gp_Dir& aDNF, + IntTools_Context& aCtx); //======================================================================= //function : IsInternalFace //purpose : //======================================================================= Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Solid& theSolid, - const TopTools_IndexedDataMapOfShapeListOfShape& theMEF, - const Standard_Real theTol, - IntTools_Context& theContext) + const TopoDS_Solid& theSolid, + const TopTools_IndexedDataMapOfShapeListOfShape& theMEF, + const Standard_Real theTol, + IntTools_Context& theContext) { Standard_Boolean bRet; Standard_Integer aNbF; @@ -151,9 +151,9 @@ static const TopoDS_Face& aF2=TopoDS::Face(aLF.Last()); // if (aF2.IsSame(aF1) && BRep_Tool::IsClosed(aE, aF1)) { - // treat as it was for 1 face - bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, aE, aF1, aF2, theContext); - return bRet; + // treat as it was for 1 face + bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, aE, aF1, aF2, theContext); + return bRet; } } if (aNbF%2) { @@ -181,9 +181,9 @@ static //purpose : //======================================================================= Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Edge& theEdge, - const TopTools_ListOfShape& theLF, - IntTools_Context& theContext) + const TopoDS_Edge& theEdge, + const TopTools_ListOfShape& theLF, + IntTools_Context& theContext) { Standard_Boolean bRet; Standard_Boolean aNbF; @@ -212,7 +212,7 @@ static const TopoDS_Face& aF2=TopoDS::Face(aCSFF.Shape2()); bRet=GEOMAlgo_Tools3D::IsInternalFace(theFace, theEdge, aF1, aF2, theContext); if (bRet) { - return bRet; + return bRet; } } } @@ -223,10 +223,10 @@ static //purpose : //======================================================================= Standard_Boolean GEOMAlgo_Tools3D::IsInternalFace(const TopoDS_Face& theFace, - const TopoDS_Edge& theEdge, - const TopoDS_Face& theFace1, - const TopoDS_Face& theFace2, - IntTools_Context& theContext) + const TopoDS_Edge& theEdge, + const TopoDS_Face& theFace1, + const TopoDS_Face& theFace2, + IntTools_Context& theContext) { Standard_Boolean bRet; Standard_Real aT1, aT2, aT, aDt2D, aDt2Dx; @@ -303,9 +303,9 @@ static //purpose : //======================================================================= void GEOMAlgo_Tools3D::GetFaceOff(const TopoDS_Edge& theE1, - const TopoDS_Face& theF1, - const NMTTools_ListOfCoupleOfShape& theLCSOff, - TopoDS_Face& theFOff) + const TopoDS_Face& theF1, + const NMTTools_ListOfCoupleOfShape& theLCSOff, + TopoDS_Face& theFOff) { Standard_Real aT, aT1, aT2, aAngle, aTwoPI, aAngleMin; gp_Pnt aPn1, aPn2; @@ -342,7 +342,7 @@ static // Angle aAngle=AngleWithRef(aDN1, aDN2, aDTtgt); if(aAngle<0.) { - aAngle=aTwoPI+aAngle; + aAngle=aTwoPI+aAngle; } } // @@ -357,8 +357,8 @@ static //purpose : //======================================================================= Standard_Boolean GEOMAlgo_Tools3D::GetEdgeOnFace(const TopoDS_Edge& theE1, - const TopoDS_Face& theF2, - TopoDS_Edge& theE2) + const TopoDS_Face& theF2, + TopoDS_Edge& theE2) { Standard_Boolean bFound; TopoDS_Iterator aItF, aItW; @@ -372,9 +372,9 @@ static for (; aItW.More(); aItW.Next()) { const TopoDS_Shape& aE=aItW.Value(); if (aE.IsSame(theE1)) { - theE2=TopoDS::Edge(aE); - bFound=!bFound; - return bFound; + theE2=TopoDS::Edge(aE); + bFound=!bFound; + return bFound; } } } @@ -385,8 +385,8 @@ static //purpose : //======================================================================= Standard_Boolean GEOMAlgo_Tools3D::GetEdgeOff(const TopoDS_Edge& theE1, - const TopoDS_Face& theF2, - TopoDS_Edge& theE2) + const TopoDS_Face& theF2, + TopoDS_Edge& theE2) { Standard_Boolean bFound; @@ -403,9 +403,9 @@ static if (aEF2.IsSame(theE1)) { aOr2=aEF2.Orientation(); if (aOr2==aOr1C) { - theE2=aEF2; - bFound=!bFound; - return bFound; + theE2=aEF2; + bFound=!bFound; + return bFound; } } } @@ -416,10 +416,10 @@ static // purpose: //======================================================================= TopAbs_State GEOMAlgo_Tools3D::ComputeState(const TopoDS_Face& theF, - const TopoDS_Solid& theRef, - const Standard_Real theTol, - const TopTools_IndexedMapOfShape& theBounds, - IntTools_Context& theCtx) + const TopoDS_Solid& theRef, + const Standard_Real theTol, + const TopTools_IndexedMapOfShape& theBounds, + IntTools_Context& theCtx) { TopAbs_State aState; TopExp_Explorer aExp; @@ -458,9 +458,9 @@ static // purpose: //======================================================================= TopAbs_State GEOMAlgo_Tools3D::ComputeStateByOnePoint(const TopoDS_Shape& theS, - const TopoDS_Solid& theRef, - const Standard_Real theTol, - IntTools_Context& theCtx) + const TopoDS_Solid& theRef, + const Standard_Real theTol, + IntTools_Context& theCtx) { TopAbs_State aState; TopAbs_ShapeEnum aType; @@ -482,9 +482,9 @@ static // purpose: //======================================================================= TopAbs_State GEOMAlgo_Tools3D::ComputeState(const TopoDS_Vertex& theV, - const TopoDS_Solid& theRef, - const Standard_Real theTol, - IntTools_Context& theCtx) + const TopoDS_Solid& theRef, + const Standard_Real theTol, + IntTools_Context& theCtx) { TopAbs_State aState; gp_Pnt aP3D; @@ -498,9 +498,9 @@ static // purpose: //======================================================================= TopAbs_State GEOMAlgo_Tools3D::ComputeState(const TopoDS_Edge& theE, - const TopoDS_Solid& theRef, - const Standard_Real theTol, - IntTools_Context& theCtx) + const TopoDS_Solid& theRef, + const Standard_Real theTol, + IntTools_Context& theCtx) { Standard_Real aT1, aT2, aT = 0.; TopAbs_State aState; @@ -548,9 +548,9 @@ static // purpose: //======================================================================= TopAbs_State GEOMAlgo_Tools3D::ComputeState(const gp_Pnt& theP, - const TopoDS_Solid& theRef, - const Standard_Real theTol, - IntTools_Context& theCtx) + const TopoDS_Solid& theRef, + const Standard_Real theTol, + IntTools_Context& theCtx) { TopAbs_State aState; // @@ -566,8 +566,8 @@ static // purpose: //======================================================================= Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Shape& theSp, - const TopoDS_Shape& theSr, - IntTools_Context& theCtx) + const TopoDS_Shape& theSr, + IntTools_Context& theCtx) { Standard_Boolean bRet; TopAbs_ShapeEnum aType; @@ -600,8 +600,8 @@ static //purpose : //======================================================================= Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Face& theFSp, - const TopoDS_Face& theFSr, - IntTools_Context& theContext) + const TopoDS_Face& theFSr, + IntTools_Context& theContext) { Standard_Boolean bRet, bFound, bInFace; Standard_Real aT1, aT2, aT, aU, aV, aScPr; @@ -630,8 +630,8 @@ static aESp=TopoDS::Edge(anExp.Current()); if (!BRep_Tool::Degenerated(aESp)) { if (!BRep_Tool::IsClosed(aESp, theFSp)) { - bFound=!bFound; - break; + bFound=!bFound; + break; } } } @@ -675,8 +675,8 @@ static //purpose : //======================================================================= Standard_Boolean GEOMAlgo_Tools3D::IsSplitToReverse(const TopoDS_Edge& theSplit, - const TopoDS_Edge& theEdge, - IntTools_Context& theContext) + const TopoDS_Edge& theEdge, + IntTools_Context& theContext) { Standard_Boolean bRet, aFlag, bIsDegenerated; Standard_Real aTE, aTS, aScPr, aTa, aTb, aT1, aT2; @@ -688,7 +688,7 @@ static bRet=Standard_False; // bIsDegenerated=(BRep_Tool::Degenerated(theSplit) || - BRep_Tool::Degenerated(theEdge)); + BRep_Tool::Degenerated(theEdge)); if (bIsDegenerated) { return bRet; } @@ -723,7 +723,7 @@ static // purpose: //======================================================================= Standard_Integer GEOMAlgo_Tools3D::Sense (const TopoDS_Face& theF1, - const TopoDS_Face& theF2) + const TopoDS_Face& theF2) { Standard_Integer iSense=0; gp_Dir aDNF1, aDNF2; @@ -735,7 +735,7 @@ static aE1=TopoDS::Edge(anExp.Current()); if (!BRep_Tool::Degenerated(aE1)) { if (!BRep_Tool::IsClosed(aE1, theF1)) { - break; + break; } } } @@ -745,10 +745,10 @@ static aE2=TopoDS::Edge(anExp.Current()); if (!BRep_Tool::Degenerated(aE2)) { if (!BRep_Tool::IsClosed(aE2, theF2)) { - if (aE2.IsSame(aE1)) { - iSense=1; - break; - } + if (aE2.IsSame(aE1)) { + iSense=1; + break; + } } } } @@ -769,7 +769,7 @@ static // purpose: //======================================================================= void GEOMAlgo_Tools3D::CopyFace (const TopoDS_Face& theF1, - TopoDS_Face& theF2) + TopoDS_Face& theF2) { Standard_Real aTol; TopLoc_Location aLoc; @@ -795,7 +795,7 @@ static // purpose: //======================================================================= void GEOMAlgo_Tools3D::MakeContainer(const TopAbs_ShapeEnum theType, - TopoDS_Shape& theC) + TopoDS_Shape& theC) { BRep_Builder aBB; // @@ -845,8 +845,8 @@ static // purpose: //======================================================================= void GEOMAlgo_Tools3D::MakeConnexityBlock (const TopTools_ListOfShape& theLFIn, - const TopTools_IndexedMapOfShape& theMEAvoid, - TopTools_ListOfShape& theLCB) + const TopTools_IndexedMapOfShape& theMEAvoid, + TopTools_ListOfShape& theLCB) { Standard_Integer aNbF, aNbAdd1; TopExp_Explorer aExp; @@ -876,23 +876,23 @@ static //aMAdd1.Clear(); aExp.Init(aF, TopAbs_EDGE); for (; aExp.More(); aExp.Next()) { - const TopoDS_Shape& aE=aExp.Current(); - if (theMEAvoid.Contains(aE)){ - continue; - } - // - const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE); - aIt.Initialize(aLF); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aFx=aIt.Value(); - if (aFx.IsSame(aF)) { - continue; - } - if (aMCB.Contains(aFx)) { - continue; - } - aMAdd1.Add(aFx); - } + const TopoDS_Shape& aE=aExp.Current(); + if (theMEAvoid.Contains(aE)){ + continue; + } + // + const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE); + aIt.Initialize(aLF); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aFx=aIt.Value(); + if (aFx.IsSame(aF)) { + continue; + } + if (aMCB.Contains(aFx)) { + continue; + } + aMAdd1.Add(aFx); + } }//for (; aExp.More(); aExp.Next()){ aMCB.Add(aF); }// for (; aItM.More(); aItM.Next()) { @@ -924,8 +924,8 @@ static //purpose : //======================================================================= Standard_Boolean FindFacePairs (const TopoDS_Edge& theE, - const TopTools_ListOfShape& thLF, - NMTTools_ListOfCoupleOfShape& theLCFF) + const TopTools_ListOfShape& thLF, + NMTTools_ListOfCoupleOfShape& theLCFF) { Standard_Boolean bFound; Standard_Integer i, aNbCEF; @@ -969,16 +969,16 @@ Standard_Boolean FindFacePairs (const TopoDS_Edge& theE, aOr=aEx.Orientation(); // if (!i) { - aOrC=TopAbs::Reverse(aOr); - aE1=TopoDS::Edge(aEx); - aF1=TopoDS::Face(aFx); - aMFP.Add(aFx); - continue; + aOrC=TopAbs::Reverse(aOr); + aE1=TopoDS::Edge(aEx); + aF1=TopoDS::Face(aFx); + aMFP.Add(aFx); + continue; } // if (aOr==aOrC) { - aLCEFx.Append(aCSx); - aMFP.Add(aFx); + aLCEFx.Append(aCSx); + aMFP.Add(aFx); } } // @@ -1001,7 +1001,7 @@ Standard_Boolean FindFacePairs (const TopoDS_Edge& theE, const NMTTools_CoupleOfShape& aCSx=aIt.Value(); const TopoDS_Shape& aFx=aCSx.Shape2(); if (!aMFP.Contains(aFx)) { - aLCEF.Append(aCSx); + aLCEF.Append(aCSx); } } // @@ -1016,8 +1016,8 @@ Standard_Boolean FindFacePairs (const TopoDS_Edge& theE, //purpose : //======================================================================= Standard_Real AngleWithRef(const gp_Dir& theD1, - const gp_Dir& theD2, - const gp_Dir& theDRef) + const gp_Dir& theD2, + const gp_Dir& theDRef) { Standard_Real aCosinus, aSinus, aBeta, aHalfPI, aScPr; gp_XYZ aXYZ; @@ -1049,11 +1049,11 @@ Standard_Real AngleWithRef(const gp_Dir& theD1, //purpose : //======================================================================= void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx, - const TopoDS_Face& aFx, - Standard_Real aT, - gp_Pnt& aPF, - gp_Dir& aDNF, - IntTools_Context& aCtx) + const TopoDS_Face& aFx, + Standard_Real aT, + gp_Pnt& aPF, + gp_Dir& aDNF, + IntTools_Context& aCtx) { Standard_Boolean bReverse; Standard_Real aT1, aT2, dT, aU, aV; @@ -1097,8 +1097,8 @@ void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx, aGAS.Load(aS); aTS=aGAS.GetType(); if (aTS==GeomAbs_BSplineSurface || - aTS==GeomAbs_BezierSurface || - aTS==GeomAbs_Plane) {//modified by NIZNHY-PKV Fri Dec 4 08:23:24 2009ft + aTS==GeomAbs_BezierSurface || + aTS==GeomAbs_Plane) {//modified by NIZNHY-PKV Fri Dec 4 08:23:24 2009ft Standard_Real aTolEx, aTolFx, aTol, dUR, dVR, dR; // aTolEx=BRep_Tool::Tolerance(aEx); @@ -1108,7 +1108,7 @@ void GetApproxNormalToFaceOnEdge (const TopoDS_Edge& aEx, dVR=aGAS.VResolution(aTol); dR=(dUR>dVR)? dUR : dVR; if (dR>dT) { - dT=dR; + dT=dR; } } } diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx index bff0fb1e2..7dce34f44 100644 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_VertexSolid.cxx -// Created: Wed Jan 12 16:36:40 2005 -// Author: Peter KURNEV -// +// File: GEOMAlgo_VertexSolid.cxx +// Created: Wed Jan 12 16:36:40 2005 +// Author: Peter KURNEV +// // #include @@ -162,8 +162,8 @@ void GEOMAlgo_VertexSolid::Prepare() // aState=aDS.GetState(i); if (aState==BooleanOperations_ON || - aState==BooleanOperations_IN || - aState==BooleanOperations_OUT) { + aState==BooleanOperations_IN || + aState==BooleanOperations_OUT) { continue; } // @@ -173,10 +173,10 @@ void GEOMAlgo_VertexSolid::Prepare() BOPTools_VVInterference& aVV=aVVs(j); aVV.Indices(n1, n2); if (n1==i || n2==i) { - pDS->SetState (n1, BooleanOperations_ON); - pDS->SetState (n2, BooleanOperations_ON); - iFound=1; - break; + pDS->SetState (n1, BooleanOperations_ON); + pDS->SetState (n2, BooleanOperations_ON); + iFound=1; + break; } } if (iFound) { diff --git a/src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx b/src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx index b56d73ced..26280fd0d 100755 --- a/src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx +++ b/src/GEOMAlgo/GEOMAlgo_WESCorrector.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTAlgo_WESCorrector.cxx -// Created: -// Author: Peter KURNEV -// +// File: NMTAlgo_WESCorrector.cxx +// Created: +// Author: Peter KURNEV +// // #include @@ -56,7 +56,7 @@ static void MakeWire(const TopTools_ListOfShape& aLE, - TopoDS_Wire& newWire); + TopoDS_Wire& newWire); //======================================================================= // function: @@ -164,36 +164,36 @@ static while(1) { aNbVP=aMVP.Extent(); for (j=1; j<=aNbVP; ++j) { - const TopoDS_Shape& aVP=aMVP(j); - const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aVP); - aIt.Initialize(aLE); - for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aE=aIt.Value(); - if (aMEC.Contains(aE)) { - continue; - } - aMEC.Add(aE); - // - aItE.Initialize(aE); - for (; aItE.More(); aItE.Next()) { - const TopoDS_Shape& aVE=aItE.Value(); - if (!aMVS.Contains(aVE)) { - aMVS.Add(aVE); - aMVAdd.Add(aVE); - } - } - } + const TopoDS_Shape& aVP=aMVP(j); + const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aVP); + aIt.Initialize(aLE); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aE=aIt.Value(); + if (aMEC.Contains(aE)) { + continue; + } + aMEC.Add(aE); + // + aItE.Initialize(aE); + for (; aItE.More(); aItE.Next()) { + const TopoDS_Shape& aVE=aItE.Value(); + if (!aMVS.Contains(aVE)) { + aMVS.Add(aVE); + aMVAdd.Add(aVE); + } + } + } }//for (j=1; j<=aNbVP; ++j) // aNbVP=aMVAdd.Extent(); if (!aNbVP) { - break; // from while(1) + break; // from while(1) } // aMVP.Clear(); for (j=1; j<=aNbVP; ++j) { - const TopoDS_Shape& aVE=aMVAdd(j); - aMVP.Add(aVE); + const TopoDS_Shape& aVE=aMVAdd(j); + aMVP.Add(aVE); } aMVAdd.Clear(); }// while(1) { @@ -209,24 +209,24 @@ static aER=aMEC(j); // if (aMER.Contains(aER)) { - aER.Orientation(TopAbs_FORWARD); - aLEC.Append(aER); - aER.Orientation(TopAbs_REVERSED); - aLEC.Append(aER); - // - //modified by NIZNHY-PKV Tue Nov 28 12:02:29 2006f - //bClosed=BRep_Tool::IsClosed(TopoDS::Edge(aER), myWES->Face()); - //if (!bClosed) { - bRegular=Standard_False; - //} - //modified by NIZNHY-PKV Tue Nov 28 12:02:33 2006t + aER.Orientation(TopAbs_FORWARD); + aLEC.Append(aER); + aER.Orientation(TopAbs_REVERSED); + aLEC.Append(aER); + // + //modified by NIZNHY-PKV Tue Nov 28 12:02:29 2006f + //bClosed=BRep_Tool::IsClosed(TopoDS::Edge(aER), myWES->Face()); + //if (!bClosed) { + bRegular=Standard_False; + //} + //modified by NIZNHY-PKV Tue Nov 28 12:02:33 2006t } else { - aLEC.Append(aER); + aLEC.Append(aER); } // if (bRegular) { - TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER); + TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER); } }//for (j=1; j<=aNbC; ++j) { // @@ -235,20 +235,20 @@ static // aNbVR=aMVER.Extent(); for (k=1; k<=aNbVR; ++k) { - const TopTools_ListOfShape& aLER=aMVER(k); - aNbER=aLER.Extent(); - if (aNbER==1) { - const TopoDS_Edge& aEx=TopoDS::Edge(aER); - bClosed=BRep_Tool::IsClosed(aEx, myWES->Face()); - if (!bClosed) { - bRegular=!bRegular; - break; - } - } - if (aNbER>2) { - bRegular=!bRegular; - break; - } + const TopTools_ListOfShape& aLER=aMVER(k); + aNbER=aLER.Extent(); + if (aNbER==1) { + const TopoDS_Edge& aEx=TopoDS::Edge(aER); + bClosed=BRep_Tool::IsClosed(aEx, myWES->Face()); + if (!bClosed) { + bRegular=!bRegular; + break; + } + } + if (aNbER>2) { + bRegular=!bRegular; + break; + } } } // @@ -319,7 +319,7 @@ static // purpose: //======================================================================= void MakeWire(const TopTools_ListOfShape& aLE, - TopoDS_Wire& newWire) + TopoDS_Wire& newWire) { BRep_Builder aBB; aBB.MakeWire(newWire); diff --git a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx b/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx index 8e5936281..9245e57e9 100755 --- a/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx +++ b/src/GEOMAlgo/GEOMAlgo_WireEdgeSet.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_WireEdgeSet.cxx -// Created: -// Author: Peter KURNEV -// +// File: GEOMAlgo_WireEdgeSet.cxx +// Created: +// Author: Peter KURNEV +// // #include diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx b/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx index 62c3f4e20..df7e97792 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_WireSolid.cxx -// Created: Wed Jan 12 10:19:31 2005 -// Author: Peter KURNEV -// +// File: GEOMAlgo_WireSolid.cxx +// Created: Wed Jan 12 10:19:31 2005 +// Author: Peter KURNEV +// // #include @@ -138,34 +138,34 @@ void GEOMAlgo_WireSolid::BuildResult() aNbPB=aLPB.Extent(); // if (!aNbPB) { - aState=aDS.GetState(i); - // - if (aState==BooleanOperations_IN) { - myLSIN.Append(aE); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aE); - } - else if (aState==BooleanOperations_ON) { - myLSON.Append(aE); - } + aState=aDS.GetState(i); + // + if (aState==BooleanOperations_IN) { + myLSIN.Append(aE); + } + else if (aState==BooleanOperations_OUT) { + myLSOUT.Append(aE); + } + else if (aState==BooleanOperations_ON) { + myLSON.Append(aE); + } } // else if (aNbPB==1) { - const BOPTools_PaveBlock& aPB=aLPB.First(); - nSp=aPB.Edge(); - const TopoDS_Shape& aSp=aDS.Shape(nSp); - aState=aDS.GetState(nSp); - // - if (aState==BooleanOperations_IN) { - myLSIN.Append(aE); - } - else if (aState==BooleanOperations_OUT) { - myLSOUT.Append(aE); - } - else if (aState==BooleanOperations_ON) { - myLSON.Append(aE); - } + const BOPTools_PaveBlock& aPB=aLPB.First(); + nSp=aPB.Edge(); + const TopoDS_Shape& aSp=aDS.Shape(nSp); + aState=aDS.GetState(nSp); + // + if (aState==BooleanOperations_IN) { + myLSIN.Append(aE); + } + else if (aState==BooleanOperations_OUT) { + myLSOUT.Append(aE); + } + else if (aState==BooleanOperations_ON) { + myLSON.Append(aE); + } } } } diff --git a/src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx b/src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx index ddfe74f80..909c4ea7d 100755 --- a/src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx +++ b/src/GEOMAlgo/GEOMAlgo_WireSplitter.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: GEOMAlgo_WireSplitter.cxx -// Created: -// Author: Peter KURNEV -// +// File: GEOMAlgo_WireSplitter.cxx +// Created: +// Author: Peter KURNEV +// // #include @@ -73,15 +73,15 @@ static void Path (const GeomAdaptor_Surface& aGAS, - const TopoDS_Face& myFace, - const TopoDS_Vertex& aVa, - const TopoDS_Edge& aEOuta, - BOP_EdgeInfo& anEdgeInfo, - TopTools_SequenceOfShape& aLS, - TopTools_SequenceOfShape& aVertVa, - TColgp_SequenceOfPnt2d& aCoordVa, - BOPTColStd_ListOfListOfShape& myShapes, - BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap); + const TopoDS_Face& myFace, + const TopoDS_Vertex& aVa, + const TopoDS_Edge& aEOuta, + BOP_EdgeInfo& anEdgeInfo, + TopTools_SequenceOfShape& aLS, + TopTools_SequenceOfShape& aVertVa, + TColgp_SequenceOfPnt2d& aCoordVa, + BOPTColStd_ListOfListOfShape& myShapes, + BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap); static @@ -90,32 +90,32 @@ static static void GetNextVertex(const TopoDS_Vertex& aV, - const TopoDS_Edge& aE, - TopoDS_Vertex& aV1); + const TopoDS_Edge& aE, + TopoDS_Vertex& aV1); static Standard_Real ClockWiseAngle(const Standard_Real aAngleIn, - const Standard_Real aAngleOut); + const Standard_Real aAngleOut); static Standard_Real AngleIn(const TopoDS_Edge& aEIn, - const BOP_ListOfEdgeInfo& aLEInfo); + const BOP_ListOfEdgeInfo& aLEInfo); static Standard_Real Angle2D (const TopoDS_Vertex& aV, - const TopoDS_Edge& anEdge, - const TopoDS_Face& myFace, - const GeomAdaptor_Surface& aGAS, - const Standard_Boolean aFlag); + const TopoDS_Edge& anEdge, + const TopoDS_Face& myFace, + const GeomAdaptor_Surface& aGAS, + const Standard_Boolean aFlag); static gp_Pnt2d Coord2d (const TopoDS_Vertex& aV1, - const TopoDS_Edge& aE1, - const TopoDS_Face& aF); + const TopoDS_Edge& aE1, + const TopoDS_Face& aF); static gp_Pnt2d Coord2dVf (const TopoDS_Edge& aE, - const TopoDS_Face& aF); + const TopoDS_Face& aF); static Standard_Real Tolerance2D (const TopoDS_Vertex& aV, - const GeomAdaptor_Surface& aGAS); + const GeomAdaptor_Surface& aGAS); static Standard_Integer NbWaysOut(const BOP_ListOfEdgeInfo& ); @@ -231,7 +231,7 @@ static index = mySmartMap.FindIndex(aVertex); if (!index) { - index=mySmartMap.Add(aVertex, emptyInfo); + index=mySmartMap.Add(aVertex, emptyInfo); } BOP_ListOfEdgeInfo& aListOfEInfo=mySmartMap(index); @@ -242,11 +242,11 @@ static TopAbs_Orientation anOr=aVertex.Orientation(); if (anOr==TopAbs_FORWARD) { - aEInfo.SetInFlag(Standard_False); + aEInfo.SetInFlag(Standard_False); } else if (anOr==TopAbs_REVERSED) { - aEInfo.SetInFlag(Standard_True); + aEInfo.SetInFlag(Standard_True); } aListOfEInfo.Append(aEInfo); @@ -267,10 +267,10 @@ static const BOP_EdgeInfo& anEdgeInfo=anIt.Value(); anIsIn=anEdgeInfo.IsIn(); if (anIsIn) { - aCntIn++; + aCntIn++; } else { - aCntOut++; + aCntOut++; } } if (aCntIn!=1 || aCntOut!=1) { @@ -293,13 +293,13 @@ static const TopoDS_Shape& aE = anItList.Value(); if (!aMapEE.Contains(aE)) { - TopTools_ListOfShape aLEx; - aLEx.Append(aE); - aMapEE.Add(aE, aLEx); + TopTools_ListOfShape aLEx; + aLEx.Append(aE); + aMapEE.Add(aE, aLEx); } else { - TopTools_ListOfShape& aLEx=aMapEE.ChangeFromKey(aE); - aLEx.Append(aE); + TopTools_ListOfShape& aLEx=aMapEE.ChangeFromKey(aE); + aLEx.Append(aE); } } @@ -310,20 +310,20 @@ static const TopTools_ListOfShape& aLEx=aMapEE(i); aNbE=aLEx.Extent(); if (aNbE==1) { - // usual case - continue; + // usual case + continue; } else if (aNbE==2){ - const TopoDS_Shape& aE1=aLEx.First(); - const TopoDS_Shape& aE2=aLEx.Last(); - if (aE1.IsSame(aE2)) { - bFlag=Standard_False; - break; - } + const TopoDS_Shape& aE1=aLEx.First(); + const TopoDS_Shape& aE2=aLEx.Last(); + if (aE1.IsSame(aE2)) { + bFlag=Standard_False; + break; + } } else { - bFlag=Standard_False; - break; + bFlag=Standard_False; + break; } } myNothingToDo=myNothingToDo && bFlag; @@ -351,15 +351,15 @@ static // anIsIn=anEdgeInfo.IsIn(); if (anIsIn) { - // - aVV.Orientation(TopAbs_REVERSED); - anAngle=Angle2D (aVV, aE, myFace, aGAS, Standard_True); + // + aVV.Orientation(TopAbs_REVERSED); + anAngle=Angle2D (aVV, aE, myFace, aGAS, Standard_True); } // else { // OUT - // - aVV.Orientation(TopAbs_FORWARD); - anAngle=Angle2D (aVV, aE, myFace, aGAS, Standard_False); + // + aVV.Orientation(TopAbs_FORWARD); + anAngle=Angle2D (aVV, aE, myFace, aGAS, Standard_False); } anEdgeInfo.SetAngle(anAngle); @@ -388,13 +388,13 @@ static anIsNotPassed=!anEdgeInfo.Passed(); if (anIsOut && anIsNotPassed) { - // - aLS.Clear(); - aVertVa.Clear(); - aCoordVa.Clear(); - // - Path(aGAS, myFace, aVa, aEOuta, anEdgeInfo, aLS, - aVertVa, aCoordVa, myShapes, mySmartMap); + // + aLS.Clear(); + aVertVa.Clear(); + aCoordVa.Clear(); + // + Path(aGAS, myFace, aVa, aEOuta, anEdgeInfo, aLS, + aVertVa, aCoordVa, myShapes, mySmartMap); } } } @@ -410,16 +410,16 @@ static const TopTools_ListOfShape& aLE=anItW.Value(); TopTools_ListIteratorOfListOfShape anItE(aLE); for (; anItE.More(); anItE.Next()) { - const TopoDS_Edge& aE=TopoDS::Edge(anItE.Value()); - aME.Add(aE); - TopExp::Vertices(aE, aV1, aV2); - aMV.Add(aV1); - aMV.Add(aV2); + const TopoDS_Edge& aE=TopoDS::Edge(anItE.Value()); + aME.Add(aE); + TopExp::Vertices(aE, aV1, aV2); + aMV.Add(aV1); + aMV.Add(aV2); } aNbV=aMV.Extent(); aNbE=aME.Extent(); if (aNbV<=aNbE) { - aShapes.Append(aLE); + aShapes.Append(aLE); } } // @@ -438,16 +438,16 @@ static // purpose: //======================================================================= void Path (const GeomAdaptor_Surface& aGAS, - const TopoDS_Face& myFace, - const TopoDS_Vertex& aVa, - const TopoDS_Edge& aEOuta, - BOP_EdgeInfo& anEdgeInfo, - TopTools_SequenceOfShape& aLS, - TopTools_SequenceOfShape& aVertVa, - TColgp_SequenceOfPnt2d& aCoordVa, - BOPTColStd_ListOfListOfShape& myShapes, - BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap) - + const TopoDS_Face& myFace, + const TopoDS_Vertex& aVa, + const TopoDS_Edge& aEOuta, + BOP_EdgeInfo& anEdgeInfo, + TopTools_SequenceOfShape& aLS, + TopTools_SequenceOfShape& aVertVa, + TColgp_SequenceOfPnt2d& aCoordVa, + BOPTColStd_ListOfListOfShape& myShapes, + BOP_IndexedDataMapOfVertexListEdgeInfo& mySmartMap) + { Standard_Integer i,j, aNb, aNbj; Standard_Real aTol, anAngleIn, anAngleOut, anAngle, aMinAngle; @@ -506,45 +506,45 @@ static anIsSameV2d=Standard_False; if (anIsSameV) { - anIsSameV2d = Standard_True; - // - aD2=aPaPrev.SquareDistance(aPb); - anIsSameV2d =aD2 aTol2D2){ - continue; + continue; } // // @@ -607,9 +607,9 @@ static // anAngle=ClockWiseAngle(anAngleIn, anAngleOut); if (anAngle < aMinAngle) { - aMinAngle=anAngle; - pEdgeInfo=&anEI; - anIsFound=Standard_True; + aMinAngle=anAngle; + pEdgeInfo=&anEI; + anIsFound=Standard_True; } } } // for (; anIt.More(); anIt.Next()) @@ -622,14 +622,14 @@ static aEOutb=pEdgeInfo->Edge(); // Path (aGAS, myFace, aVb, aEOutb, *pEdgeInfo, aLS, - aVertVa, aCoordVa, myShapes, mySmartMap); + aVertVa, aCoordVa, myShapes, mySmartMap); } //======================================================================= // function: Coord2dVf // purpose: //======================================================================= gp_Pnt2d Coord2dVf (const TopoDS_Edge& aE, - const TopoDS_Face& aF) + const TopoDS_Face& aF) { Standard_Real aCoord=99.; gp_Pnt2d aP2D1(aCoord, aCoord); @@ -651,7 +651,7 @@ static // purpose: //======================================================================= Standard_Real Tolerance2D (const TopoDS_Vertex& aV, - const GeomAdaptor_Surface& aGAS) + const GeomAdaptor_Surface& aGAS) { Standard_Real aTol2D, anUr, aVr, aTolV3D; GeomAbs_SurfaceType aType; @@ -682,8 +682,8 @@ static // purpose: //======================================================================= gp_Pnt2d Coord2d (const TopoDS_Vertex& aV1, - const TopoDS_Edge& aE1, - const TopoDS_Face& aF) + const TopoDS_Edge& aE1, + const TopoDS_Face& aF) { Standard_Real aT, aFirst, aLast; Handle(Geom2d_Curve) aC2D; @@ -700,7 +700,7 @@ static // purpose: //======================================================================= Standard_Real AngleIn(const TopoDS_Edge& aEIn, - const BOP_ListOfEdgeInfo& aLEInfo) + const BOP_ListOfEdgeInfo& aLEInfo) { Standard_Real anAngleIn; Standard_Boolean anIsIn; @@ -725,7 +725,7 @@ static // purpose: //======================================================================= Standard_Real ClockWiseAngle(const Standard_Real aAngleIn, - const Standard_Real aAngleOut) + const Standard_Real aAngleOut) { Standard_Real aTwoPi=Standard_PI+Standard_PI; Standard_Real dA, A1, A2, AIn, AOut ; @@ -764,8 +764,8 @@ static // purpose: //======================================================================= void GetNextVertex(const TopoDS_Vertex& aV, - const TopoDS_Edge& aE, - TopoDS_Vertex& aV1) + const TopoDS_Edge& aE, + TopoDS_Vertex& aV1) { TopoDS_Iterator aIt; // @@ -784,10 +784,10 @@ static // purpose: //======================================================================= Standard_Real Angle2D (const TopoDS_Vertex& aV, - const TopoDS_Edge& anEdge, - const TopoDS_Face& myFace, - const GeomAdaptor_Surface& aGAS, - const Standard_Boolean aFlag) + const TopoDS_Edge& anEdge, + const TopoDS_Face& myFace, + const GeomAdaptor_Surface& aGAS, + const Standard_Boolean aFlag) { Standard_Real aFirst, aLast, aToler, dt, aTV, aTV1, anAngle, aTX; gp_Pnt2d aPV, aPV1; @@ -800,7 +800,7 @@ static } // BOPTools_Tools2D::CurveOnSurface (anEdge, myFace, aC2D, - aFirst, aLast, aToler, Standard_True); + aFirst, aLast, aToler, Standard_True); //dt=1.e-7; //modified by NIZNHY-PKV Wed Sep 10 14:06:04 2008f //dt=Tolerance2D(aV, aGAS); diff --git a/src/GEOMBase/GEOMBase.h b/src/GEOMBase/GEOMBase.h index 360fd1318..33c4b15a0 100644 --- a/src/GEOMBase/GEOMBase.h +++ b/src/GEOMBase/GEOMBase.h @@ -56,36 +56,36 @@ public : static int GetIndex(const TopoDS_Shape& subshape, const TopoDS_Shape& shape, int ShapeType); static TopoDS_Shape GetShapeFromIOR(QString IOR); static bool GetShape(const GEOM::GEOM_Object_ptr&, TopoDS_Shape&, - const TopAbs_ShapeEnum = TopAbs_SHAPE); + const TopAbs_ShapeEnum = TopAbs_SHAPE); static bool GetTopoFromSelection(const SALOME_ListIO& aList, TopoDS_Shape& tds); static int GetNameOfSelectedIObjects(const SALOME_ListIO& aList, QString& aName, - const bool theShapesOnly = false); + const bool theShapesOnly = false); static bool GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString& aTypeString); /* Convertions */ static GEOM::GEOM_Object_ptr ConvertIOinGEOMShape(const Handle(SALOME_InteractiveObject)& IO, - Standard_Boolean& testResult); + Standard_Boolean& testResult); static Handle(GEOM_AISShape) ConvertIOinGEOMAISShape(const Handle(SALOME_InteractiveObject)& IO, - Standard_Boolean& testResult, - bool onlyInActiveView = false); + Standard_Boolean& testResult, + bool onlyInActiveView = false); static Handle(AIS_InteractiveObject) GetAIS(const Handle(SALOME_InteractiveObject)& theIO, - const bool isOnlyInActiveView = false); + const bool isOnlyInActiveView = false); static void ConvertListOfIOInListOfIOR(const SALOME_ListIO& aList, - GEOM::string_array& listIOR); + GEOM::string_array& listIOR); static Handle(GEOM_AISShape) ConvertIORinGEOMAISShape(const char * IOR, - Standard_Boolean& testResult, - bool onlyInActiveView = false); + Standard_Boolean& testResult, + bool onlyInActiveView = false); static GEOM_Actor* ConvertIORinGEOMActor(const char * IOR, Standard_Boolean& testResult, - bool onlyInActiveView = false); + bool onlyInActiveView = false); static GEOM::GEOM_Object_ptr ConvertIOinGEOMObject(const Handle(SALOME_InteractiveObject)& IO, - Standard_Boolean& testResult); + Standard_Boolean& testResult); static void ConvertListOfIOInListOfGO(const SALOME_ListIO& aList, - GEOM::ListOfGO& listGO, - const bool theShapesOnly = false); + GEOM::ListOfGO& listGO, + const bool theShapesOnly = false); static GEOM::GEOM_Object_ptr GetObjectFromIOR(const char* theIOR); @@ -103,7 +103,7 @@ public : /* Generates default names */ static bool SelectionByNameInDialogs(QWidget* aWidget, const QString& userObjectName, - const SALOME_ListIO& aList); + const SALOME_ListIO& aList); /* Shows message box with error code */ static bool DefineDlgPosition(QWidget* aDlg, int& x, int& y); diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index 70c5ebd6d..c17facd82 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -179,8 +179,8 @@ void GEOMBase_Helper::erase( GEOM::GEOM_Object_ptr object, const bool updateView // Purpose : //================================================================ void GEOMBase_Helper::redisplay( const ObjectList& objList, - const bool withChildren, - const bool updateView ) + const bool withChildren, + const bool updateView ) { ObjectList::const_iterator it = objList.begin(); for ( ; it != objList.end(); it++ ) { @@ -195,8 +195,8 @@ void GEOMBase_Helper::redisplay( const ObjectList& objList, // Purpose : //================================================================ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object, - const bool withChildren, - const bool updateView ) + const bool withChildren, + const bool updateView ) { if ( !object->_is_nil() ) { // Unset color of shape ( this color may be set during preview displaying ) @@ -219,18 +219,18 @@ void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object, CORBA::String_var objStr = SalomeApp_Application::orb()->object_to_string(object); _PTR(SObject) aSObj (aStudy->FindObjectIOR(std::string(objStr.in()))); if ( aSObj ) { - _PTR(ChildIterator) anIt ( aStudy->NewChildIterator( aSObj ) ); - for ( anIt->InitEx( true ); anIt->More(); anIt->Next() ) { - GEOM::GEOM_Object_var aChild = GEOM::GEOM_Object::_narrow + _PTR(ChildIterator) anIt ( aStudy->NewChildIterator( aSObj ) ); + for ( anIt->InitEx( true ); anIt->More(); anIt->Next() ) { + GEOM::GEOM_Object_var aChild = GEOM::GEOM_Object::_narrow (GeometryGUI::ClientSObjectToObject(anIt->Value())); - if ( !CORBA::is_nil( aChild ) ) { - if ( !aChild->_is_nil() ) { - std::string entry = getEntry( aChild ); - getDisplayer()->Redisplay( new SALOME_InteractiveObject( + if ( !CORBA::is_nil( aChild ) ) { + if ( !aChild->_is_nil() ) { + std::string entry = getEntry( aChild ); + getDisplayer()->Redisplay( new SALOME_InteractiveObject( entry.c_str(), "GEOM", strdup( GEOMBase::GetName( aChild ).toLatin1().constData() ) ), false ); - } - } - } + } + } + } } } } @@ -270,10 +270,10 @@ void GEOMBase_Helper::displayPreview( const bool activate, else { for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) { - GEOM::GEOM_Object_var obj=*it; + GEOM::GEOM_Object_var obj=*it; displayPreview( obj, true, activate, false, lineWidth, displayMode, color ); if ( toRemoveFromEngine ) - obj->Destroy(); + obj->Destroy(); } } } @@ -356,7 +356,7 @@ void GEOMBase_Helper::displayPreview( const SALOME_Prs* prs, SUIT_ViewModel* aViewModel = aViewManager->getViewModel(); SALOME_View* aView = dynamic_cast(aViewModel); if (aView) - aView->Display( prs ); + aView->Display( prs ); } // Add prs to the preview list @@ -379,15 +379,15 @@ void GEOMBase_Helper::erasePreview( const bool update ) for ( PrsList::iterator anIter = myPreview.begin(); anIter != myPreview.end(); ++anIter ) { if ( vfOK ) { - SUIT_ViewManager* aViewManager = myViewWindow->getViewManager(); - if ( aViewManager->getType() == OCCViewer_Viewer::Type() || - aViewManager->getType() == SVTK_Viewer::Type() ) - { - SUIT_ViewModel* aViewModel = aViewManager->getViewModel(); - SALOME_View* aView = dynamic_cast(aViewModel); - if (aView) - aView->Erase( *anIter, true ); - } + SUIT_ViewManager* aViewManager = myViewWindow->getViewManager(); + if ( aViewManager->getType() == OCCViewer_Viewer::Type() || + aViewManager->getType() == SVTK_Viewer::Type() ) + { + SUIT_ViewModel* aViewModel = aViewManager->getViewModel(); + SALOME_View* aView = dynamic_cast(aViewModel); + if (aView) + aView->Erase( *anIter, true ); + } } delete *anIter; } @@ -491,7 +491,7 @@ void GEOMBase_Helper::globalSelection( const int theMode, const bool update ) // in accordance with mode. theMode is from GEOMImpl_Types //================================================================ void GEOMBase_Helper::globalSelection( const TColStd_MapOfInteger& theModes, - const bool update ) + const bool update ) { getDisplayer()->GlobalSelection( theModes, update ); } @@ -503,7 +503,7 @@ void GEOMBase_Helper::globalSelection( const TColStd_MapOfInteger& theModes, //================================================================ void GEOMBase_Helper::globalSelection( const TColStd_MapOfInteger& theModes, const QList& subShapes, - const bool update ) + const bool update ) { getDisplayer()->GlobalSelection( theModes, update, &subShapes ); } @@ -607,7 +607,7 @@ SalomeApp_Study* GEOMBase_Helper::getStudy() const { anApp = it.next(); if ( anApp && anApp->desktop() == aDesktop ) - break; + break; } return dynamic_cast(anApp->activeStudy()); @@ -627,7 +627,7 @@ char* GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const if ( IOR != "" ) { _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( IOR ) ); if ( SO ) { - return (char*) TCollection_AsciiString((char*)SO->GetID().c_str()).ToCString(); + return (char*) TCollection_AsciiString((char*)SO->GetID().c_str()).ToCString(); } } } @@ -763,8 +763,8 @@ bool GEOMBase_Helper::checkViewWindow() QListIterator it( aViewWindowsList ); while ( it.hasNext() ) { - if ( myViewWindow == it.next() ) - return true; + if ( myViewWindow == it.next() ) + return true; } } myViewWindow = 0; @@ -787,9 +787,9 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction ) if ( aLocked ) { MESSAGE("GEOMBase_Helper::onAccept - ActiveStudy is locked"); SUIT_MessageBox::warning ( (QWidget*)SUIT_Session::session()->activeApplication()->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("WRN_STUDY_LOCKED"), - QObject::tr("BUT_OK") ); + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_STUDY_LOCKED"), + QObject::tr("BUT_OK") ); return false; } @@ -807,19 +807,19 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction ) SUIT_Session::session()->activeApplication()->putInfo( "" ); ObjectList objects; if ( !execute( objects ) || !getOperation()->IsDone() ) { - wc.suspend(); - abortCommand(); - showError(); + wc.suspend(); + abortCommand(); + showError(); } else { - addSubshapesToStudy(); // add Subshapes if local selection - const int nbObjs = objects.size(); + addSubshapesToStudy(); // add Subshapes if local selection + const int nbObjs = objects.size(); int aNumber = 1; - for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) { - GEOM::GEOM_Object_var obj=*it; - if ( publish ) { - QString aName = getNewObjectName(); - if ( nbObjs > 1 ) { + for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) { + GEOM::GEOM_Object_var obj=*it; + if ( publish ) { + QString aName = getNewObjectName(); + if ( nbObjs > 1 ) { if (aName.isEmpty()) aName = getPrefix(obj); if (nbObjs <= 30) { @@ -829,37 +829,37 @@ bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction ) // Don't check name uniqueness in case of numerous objects aName = aName + "_" + QString::number(aNumber++); } - } else { - // PAL6521: use a prefix, if some dialog box doesn't reimplement getNewObjectName() - if ( aName.isEmpty() ) - aName = GEOMBase::GetDefaultName( getPrefix( obj ) ); - } - addInStudy( obj, aName.toLatin1().constData() ); + } else { + // PAL6521: use a prefix, if some dialog box doesn't reimplement getNewObjectName() + if ( aName.isEmpty() ) + aName = GEOMBase::GetDefaultName( getPrefix( obj ) ); + } + addInStudy( obj, aName.toLatin1().constData() ); // updateView=false - display( obj, false ); + display( obj, false ); #ifdef WITHGENERICOBJ - // obj has been published in study. Its refcount has been incremented. - // It is safe to decrement its refcount - // so that it will be destroyed when the entry in study will be removed - obj->Destroy(); + // obj has been published in study. Its refcount has been incremented. + // It is safe to decrement its refcount + // so that it will be destroyed when the entry in study will be removed + obj->Destroy(); #endif - } - else { + } + else { // asv : fix of PAL6454. If publish==false, then the original shape // was modified, and need to be re-cached in GEOM_Client before redisplay - clearShapeBuffer( obj ); + clearShapeBuffer( obj ); // withChildren=true, updateView=false - redisplay( obj, true, false ); + redisplay( obj, true, false ); } - } - - if ( nbObjs ) { - commitCommand(); - updateObjBrowser(); - SUIT_Session::session()->activeApplication()->putInfo( QObject::tr("GEOM_PRP_DONE") ); - } - else - abortCommand(); + } + + if ( nbObjs ) { + commitCommand(); + updateObjBrowser(); + SUIT_Session::session()->activeApplication()->putInfo( QObject::tr("GEOM_PRP_DONE") ); + } + else + abortCommand(); } } } @@ -888,9 +888,9 @@ void GEOMBase_Helper::showError() msg = QObject::tr( "GEOM_PRP_ABORT" ); SUIT_MessageBox::critical( SUIT_Session::session()->activeApplication()->desktop(), - QObject::tr( "GEOM_ERROR_STATUS" ), - msg, - QObject::tr( "BUT_OK" ) ); + QObject::tr( "GEOM_ERROR_STATUS" ), + msg, + QObject::tr( "BUT_OK" ) ); } //================================================================ diff --git a/src/GEOMBase/GEOMBase_Helper.h b/src/GEOMBase/GEOMBase_Helper.h index d8bc391d4..42a7cc4cb 100755 --- a/src/GEOMBase/GEOMBase_Helper.h +++ b/src/GEOMBase/GEOMBase_Helper.h @@ -87,8 +87,8 @@ protected: const int displayMode = -1, const int color = -1 ); void displayPreview ( const SALOME_Prs* prs, - const bool append = false, - const bool = true ); + const bool append = false, + const bool = true ); void erasePreview ( const bool = true ); void localSelection( const ObjectList&, const int ); diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx index bed9d3411..1bc6adbe6 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.cxx +++ b/src/GEOMBase/GEOMBase_Skeleton.cxx @@ -51,7 +51,7 @@ // true to construct a modal dialog. //================================================================================= GEOMBase_Skeleton::GEOMBase_Skeleton( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : QDialog( parent, fl ), GEOMBase_Helper( dynamic_cast( parent ) ), myGeomGUI( theGeometryGUI ), @@ -137,7 +137,7 @@ void GEOMBase_Skeleton::Init() // purpose : //================================================================================= void GEOMBase_Skeleton::initSpinBox( QSpinBox* spinBox, - int min, int max, int step ) + int min, int max, int step ) { spinBox->setRange( min, max ); spinBox->setSingleStep( step ); @@ -148,8 +148,8 @@ void GEOMBase_Skeleton::initSpinBox( QSpinBox* spinBox, // purpose : //================================================================================= void GEOMBase_Skeleton::initSpinBox( SalomeApp_DoubleSpinBox* spinBox, - double min, double max, - double step, int decimals ) + double min, double max, + double step, int decimals ) { spinBox->setPrecision( decimals ); spinBox->setDecimals( decimals ); // it's necessary to set decimals before the range setting, @@ -164,7 +164,7 @@ void GEOMBase_Skeleton::initSpinBox( SalomeApp_DoubleSpinBox* spinBox, // In this case PublishInStudy isn't called, so we need to update object's attributes manually //================================================================================= void GEOMBase_Skeleton::updateAttributes( GEOM::GEOM_Object_ptr theObj, - const QStringList& theParameters) + const QStringList& theParameters) { SALOMEDS::Study_var aStudy = GeometryGUI::ClientStudyToStudy(getStudy()->studyDS()); SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); @@ -337,9 +337,9 @@ void GEOMBase_Skeleton::ClickOnHelp() platform = "application"; #endif SUIT_MessageBox::warning( 0, QObject::tr( "WRN_WARNING" ), - QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ). - arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ), - QObject::tr( "BUT_OK" ) ); + QObject::tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ). + arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ), + QObject::tr( "BUT_OK" ) ); } } diff --git a/src/GEOMDS/GEOMDS_Commands.cxx b/src/GEOMDS/GEOMDS_Commands.cxx index 315aa6ca5..fa858673d 100644 --- a/src/GEOMDS/GEOMDS_Commands.cxx +++ b/src/GEOMDS/GEOMDS_Commands.cxx @@ -53,7 +53,7 @@ GEOMDS_Commands::GEOMDS_Commands(const TDF_Label& Main) // purpose : //======================================================================= TDF_Label GEOMDS_Commands::Generated(const TopoDS_Shape& S, - const TCollection_ExtendedString& Name) + const TCollection_ExtendedString& Name) { TDF_Label NewLab = myLab.NewChild(); TNaming_Builder B(NewLab); @@ -69,8 +69,8 @@ TDF_Label GEOMDS_Commands::Generated(const TopoDS_Shape& S, // purpose : //======================================================================= TDF_Label GEOMDS_Commands::Generated(const TopoDS_Shape& S1, - const TopoDS_Shape& S2, - const TCollection_ExtendedString& Name) + const TopoDS_Shape& S2, + const TCollection_ExtendedString& Name) { TDF_Label NewLab = myLab.NewChild(); TNaming_Builder B(NewLab); @@ -86,7 +86,7 @@ TDF_Label GEOMDS_Commands::Generated(const TopoDS_Shape& S1, // purpose : //======================================================================= TDF_Label GEOMDS_Commands::AddShape(const TopoDS_Shape& S, - const TCollection_ExtendedString& Name) + const TCollection_ExtendedString& Name) { TDF_Label NewLab = myLab.NewChild(); TNaming_Builder B(NewLab); @@ -101,7 +101,7 @@ TDF_Label GEOMDS_Commands::AddShape(const TopoDS_Shape& S, // purpose : SAME than AddShape() : will be renamed later //======================================================================= TDF_Label GEOMDS_Commands::AddIndependentShape(const TopoDS_Shape& S, - const TCollection_AsciiString& nameIOR) + const TCollection_AsciiString& nameIOR) { TDF_Label NewLab = myLab.NewChild(); TNaming_Builder B(NewLab); @@ -116,8 +116,8 @@ TDF_Label GEOMDS_Commands::AddIndependentShape(const TopoDS_Shape& S, // purpose : //======================================================================= TDF_Label GEOMDS_Commands::AddDependentShape(const TopoDS_Shape& S, - const TCollection_AsciiString& nameIOR, - const TDF_Label& mainLab) + const TCollection_AsciiString& nameIOR, + const TDF_Label& mainLab) { TDF_Label NewLab = myLab.NewChild(); TNaming_Builder B(NewLab); @@ -135,8 +135,8 @@ TDF_Label GEOMDS_Commands::AddDependentShape(const TopoDS_Shape& S, // purpose : //======================================================================= TDF_Label GEOMDS_Commands::AddConstructiveElement(const TopoDS_Shape& S, - const TCollection_ExtendedString& nameIOR, - const GEOMDS_ConstructiveType& aType) + const TCollection_ExtendedString& nameIOR, + const GEOMDS_ConstructiveType& aType) { TDF_Label NewLab = myLab.NewChild(); TNaming_Builder B(NewLab); @@ -155,7 +155,7 @@ TDF_Label GEOMDS_Commands::AddConstructiveElement(const TopoDS_Shape& S, // : Return false if attribute exist before //======================================================================= Standard_Boolean GEOMDS_Commands::AddIORNameAttribute(const TDF_Label& aLabel, - const TCollection_ExtendedString& nameIOR) + const TCollection_ExtendedString& nameIOR) { if( this->HasIOR(aLabel) ) return false ; @@ -184,8 +184,8 @@ Standard_Boolean GEOMDS_Commands::IsConstructiveElement(const TDF_Label& aLabel) // : topology ' returnTopo' and type 'returnType' //======================================================================= Standard_Boolean GEOMDS_Commands::IsConstructiveElement(const TDF_Label& aLabel, - TopoDS_Shape& returnTopo, - GEOMDS_ConstructiveType& returnType) + TopoDS_Shape& returnTopo, + GEOMDS_ConstructiveType& returnType) { Handle(TDataStd_Integer) anAttType ; Handle(TNaming_NamedShape) anAttTopo ; @@ -205,7 +205,7 @@ Standard_Boolean GEOMDS_Commands::IsConstructiveElement(const TDF_Label& aLabel, // purpose : return true and 'returnTopo' if a topology is found on 'aLabel' //======================================================================= Standard_Boolean GEOMDS_Commands::GetShape(const TDF_Label& aLabel, - TopoDS_Shape& returnTopo) + TopoDS_Shape& returnTopo) { Handle(TNaming_NamedShape) anAttTopo ; if( aLabel.FindAttribute(TNaming_NamedShape::GetID(), anAttTopo)) { @@ -237,7 +237,7 @@ Standard_Boolean GEOMDS_Commands::IsDependentShape(const TDF_Label& aLabel) // : a dependent object, otherwise return false. //======================================================================= Standard_Boolean GEOMDS_Commands::GetMainShapeLabel(const TDF_Label& aLabel, - TDF_Label& returnMainLabel) + TDF_Label& returnMainLabel) { Handle(TDF_Reference) anAttRef ; if( aLabel.FindAttribute(TDF_Reference::GetID(), anAttRef)) { @@ -264,7 +264,7 @@ Standard_Boolean GEOMDS_Commands::ClearAllIOR(const TDF_Label& aLabel) if( L.FindAttribute(TDataStd_Name::GetID(), anAttName) ) { notTested = L.ForgetAttribute(TDataStd_Name::GetID()) ; if(notTested) - MESSAGE("in GEOMDS_Commands::ClearAllIOR : IOR CLEARED" ) + MESSAGE("in GEOMDS_Commands::ClearAllIOR : IOR CLEARED" ) ClearAllIOR(L); } } @@ -290,7 +290,7 @@ Standard_Boolean GEOMDS_Commands::HasIOR(const TDF_Label& aLabel) // : and define 'returnNameIOR' //======================================================================= Standard_Boolean GEOMDS_Commands::ReturnNameIOR(const TDF_Label& aLabel, - TCollection_ExtendedString& returnNameIOR) + TCollection_ExtendedString& returnNameIOR) { Handle(TDataStd_Name) anAttName ; if( !aLabel.FindAttribute(TDataStd_Name::GetID(), anAttName) ) diff --git a/src/GEOMFiltersSelection/GEOM_EdgeFilter.cxx b/src/GEOMFiltersSelection/GEOM_EdgeFilter.cxx index c47f8b793..900fae7f3 100644 --- a/src/GEOMFiltersSelection/GEOM_EdgeFilter.cxx +++ b/src/GEOMFiltersSelection/GEOM_EdgeFilter.cxx @@ -55,7 +55,7 @@ bool GEOM_EdgeFilter::isShapeOk( const TopoDS_Shape& theShape ) const { BRepAdaptor_Curve aCurve( TopoDS::Edge( theShape ) ); GeomAbs_CurveType aType = aCurve.GetType(); - + switch ( myKind ) { case StdSelect_AnyEdge: return Standard_True; diff --git a/src/GEOMFiltersSelection/GEOM_FaceFilter.cxx b/src/GEOMFiltersSelection/GEOM_FaceFilter.cxx index 9b126852c..8100a05e9 100644 --- a/src/GEOMFiltersSelection/GEOM_FaceFilter.cxx +++ b/src/GEOMFiltersSelection/GEOM_FaceFilter.cxx @@ -55,7 +55,7 @@ bool GEOM_FaceFilter::isShapeOk( const TopoDS_Shape& theShape ) const { BRepAdaptor_Surface aSurf( TopoDS::Face( theShape ) ); GeomAbs_SurfaceType aType = aSurf.GetType(); - + switch ( myKind ) { case StdSelect_AnyFace: return Standard_True; @@ -64,10 +64,10 @@ bool GEOM_FaceFilter::isShapeOk( const TopoDS_Shape& theShape ) const case StdSelect_Sphere: return ( aType == GeomAbs_Sphere); case StdSelect_Torus: return ( aType == GeomAbs_Torus); case StdSelect_Revol: return ( aType == GeomAbs_Cylinder || - aType == GeomAbs_Cone || - aType == GeomAbs_Torus || - aType == GeomAbs_Sphere || - aType == GeomAbs_SurfaceOfRevolution ); + aType == GeomAbs_Cone || + aType == GeomAbs_Torus || + aType == GeomAbs_Sphere || + aType == GeomAbs_SurfaceOfRevolution ); case StdSelect_Cone: return ( aType == GeomAbs_Cone); } } diff --git a/src/GEOMFiltersSelection/GEOM_TypeFilter.cxx b/src/GEOMFiltersSelection/GEOM_TypeFilter.cxx index a9bbde738..972cf94d4 100644 --- a/src/GEOMFiltersSelection/GEOM_TypeFilter.cxx +++ b/src/GEOMFiltersSelection/GEOM_TypeFilter.cxx @@ -50,9 +50,9 @@ bool GEOM_TypeFilter::isOk( const SUIT_DataOwner* sOwner ) const if ( !CORBA::is_nil( obj ) ) { if (!myIsShapeType) - return obj->GetType() == type(); + return obj->GetType() == type(); else - return obj->GetShapeType() == type(); + return obj->GetShapeType() == type(); } return false; diff --git a/src/GEOMGUI/GEOMGUI_Selection.cxx b/src/GEOMGUI/GEOMGUI_Selection.cxx index a3e9d133b..8986cdee7 100644 --- a/src/GEOMGUI/GEOMGUI_Selection.cxx +++ b/src/GEOMGUI/GEOMGUI_Selection.cxx @@ -150,47 +150,47 @@ QString GEOMGUI_Selection::displayMode( const int index ) const SALOME_Prs* prs = view->CreatePrs( entry( index ).toLatin1().constData() ); if ( prs ) { if ( viewType == OCCViewer_Viewer::Type() ) { // assuming OCC - SOCC_Prs* occPrs = (SOCC_Prs*) prs; - AIS_ListOfInteractive lst; - occPrs->GetObjects( lst ); - if ( lst.Extent() ) { - Handle(AIS_InteractiveObject) io = lst.First(); - if ( !io.IsNull() ) { - int dm = io->DisplayMode(); + SOCC_Prs* occPrs = (SOCC_Prs*) prs; + AIS_ListOfInteractive lst; + occPrs->GetObjects( lst ); + if ( lst.Extent() ) { + Handle(AIS_InteractiveObject) io = lst.First(); + if ( !io.IsNull() ) { + int dm = io->DisplayMode(); if ( dm == AIS_WireFrame ) - return "Wireframe"; - else if ( dm == AIS_Shaded ) - return "Shading"; - else { // return default display mode of AIS_InteractiveContext - OCCViewer_Viewer* occViewer = (OCCViewer_Viewer*) SUIT_Session::session()->activeApplication()->desktop( + return "Wireframe"; + else if ( dm == AIS_Shaded ) + return "Shading"; + else { // return default display mode of AIS_InteractiveContext + OCCViewer_Viewer* occViewer = (OCCViewer_Viewer*) SUIT_Session::session()->activeApplication()->desktop( )->activeWindow()->getViewManager()->getViewModel(); - Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); - dm = ic->DisplayMode(); - if ( dm == AIS_WireFrame ) - return "Wireframe"; - else if ( dm == AIS_Shaded ) - return "Shading"; - } - } - } + Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); + dm = ic->DisplayMode(); + if ( dm == AIS_WireFrame ) + return "Wireframe"; + else if ( dm == AIS_Shaded ) + return "Shading"; + } + } + } } else if ( viewType == SVTK_Viewer::Type() ) { // assuming VTK - SVTK_Prs* vtkPrs = dynamic_cast( prs ); - vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0; - if ( lst ) { - lst->InitTraversal(); - vtkActor* actor = lst->GetNextActor(); - if ( actor ) { - SALOME_Actor* salActor = dynamic_cast( actor ); - if ( salActor ) { - int dm = salActor->getDisplayMode(); - if ( dm == 0 ) - return "Wireframe"; - else if ( dm == 1 ) - return "Shading"; - } // if ( salome actor ) - } // if ( actor ) - } // if ( lst == vtkPrs->GetObjects() ) + SVTK_Prs* vtkPrs = dynamic_cast( prs ); + vtkActorCollection* lst = vtkPrs ? vtkPrs->GetObjects() : 0; + if ( lst ) { + lst->InitTraversal(); + vtkActor* actor = lst->GetNextActor(); + if ( actor ) { + SALOME_Actor* salActor = dynamic_cast( actor ); + if ( salActor ) { + int dm = salActor->getDisplayMode(); + if ( dm == 0 ) + return "Wireframe"; + else if ( dm == 1 ) + return "Shading"; + } // if ( salome actor ) + } // if ( actor ) + } // if ( lst == vtkPrs->GetObjects() ) } // if VTK } } @@ -243,9 +243,9 @@ bool GEOMGUI_Selection::hasChildren( const _PTR(SObject)& obj ) for ( ; it->More() && !ok; it->Next() ) { _PTR(SObject) child = it->Value(); if ( child ) { - _PTR(SObject) refObj; - if ( child->ReferencedObject( refObj ) ) continue; // omit references - if ( child->GetName() != "" ) ok = true; + _PTR(SObject) refObj; + if ( child->ReferencedObject( refObj ) ) continue; // omit references + if ( child->GetName() != "" ) ok = true; } } } @@ -311,7 +311,7 @@ bool GEOMGUI_Selection::isComponent( const int index ) const if ( study && !anEntry.isNull() ) { _PTR(SObject) aSO( study->FindObjectID( anEntry.toStdString() ) ); if ( aSO && aSO->GetFatherComponent() ) - return aSO->GetFatherComponent()->GetIOR() == aSO->GetIOR(); + return aSO->GetFatherComponent()->GetIOR() == aSO->GetIOR(); } } return false; @@ -330,7 +330,7 @@ GEOM::GEOM_Object_ptr GEOMGUI_Selection::getObject( const int index ) const _PTR(SObject) aSO (study->FindObjectID(anEntry.toStdString())); if (aSO) { CORBA::Object_var anObj = GeometryGUI::ClientSObjectToObject(aSO); - return GEOM::GEOM_Object::_narrow(anObj); + return GEOM::GEOM_Object::_narrow(anObj); } } } @@ -345,15 +345,15 @@ QString GEOMGUI_Selection::selectionMode() const if (aGeomGUI) { switch (aGeomGUI->getLocalSelectionMode()) { - case GEOM_POINT : return "VERTEX"; - case GEOM_EDGE : return "EDGE"; - case GEOM_WIRE : return "WIRE"; - case GEOM_FACE : return "FACE"; - case GEOM_SHELL : return "SHELL"; - case GEOM_SOLID : return "SOLID"; - case GEOM_COMPOUND : return "COMPOUND"; - case GEOM_ALLOBJECTS : return "ALL"; - default: return ""; + case GEOM_POINT : return "VERTEX"; + case GEOM_EDGE : return "EDGE"; + case GEOM_WIRE : return "WIRE"; + case GEOM_FACE : return "FACE"; + case GEOM_SHELL : return "SHELL"; + case GEOM_SOLID : return "SOLID"; + case GEOM_COMPOUND : return "COMPOUND"; + case GEOM_ALLOBJECTS : return "ALL"; + default: return ""; } } } diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index 5833f54bf..83a3c083b 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -202,7 +202,7 @@ static string getEntry( GEOM::GEOM_Object_ptr object ) SalomeApp_Study* study = ( SalomeApp_Study* )app->activeStudy(); _PTR(SObject) SO ( study->studyDS()->FindObjectIOR( string(IOR) ) ); if ( SO ) - return SO->GetID(); + return SO->GetID(); } } return ""; @@ -293,8 +293,8 @@ GEOM_Displayer::~GEOM_Displayer() */ //================================================================= void GEOM_Displayer::Display( const Handle(SALOME_InteractiveObject)& theIO, - const bool updateViewer, - SALOME_View* theViewFrame ) + const bool updateViewer, + SALOME_View* theViewFrame ) { SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView(); if ( vf ) @@ -343,7 +343,7 @@ void GEOM_Displayer::Display( GEOM::GEOM_Object_ptr theObj, const bool updateVie void GEOM_Displayer::Erase( const Handle(SALOME_InteractiveObject)& theIO, const bool forced, const bool updateViewer, - SALOME_View* theViewFrame ) + SALOME_View* theViewFrame ) { if ( theIO.IsNull() ) return; @@ -355,7 +355,7 @@ void GEOM_Displayer::Erase( const Handle(SALOME_InteractiveObject)& theIO, if ( prs ) { vf->Erase( prs, forced ); if ( updateViewer ) - vf->Repaint(); + vf->Repaint(); delete prs; // delete presentation because displayer is its owner } } @@ -403,19 +403,19 @@ void GEOM_Displayer::Redisplay( const Handle(SALOME_InteractiveObject)& theIO, SUIT_ViewManager* vman = wnd->getViewManager(); if ( vman ) { - SUIT_ViewModel* vmodel = vman->getViewModel(); - if ( vmodel ) - { - SALOME_View* view = dynamic_cast(vmodel); - if ( view ) - { - if ( view->isVisible( theIO ) || view == GetActiveView() ) - { - Erase( theIO, true, false, view ); - Display( theIO, updateViewer, view ); - } - } - } + SUIT_ViewModel* vmodel = vman->getViewModel(); + if ( vmodel ) + { + SALOME_View* view = dynamic_cast(vmodel); + if ( view ) + { + if ( view->isVisible( theIO ) || view == GetActiveView() ) + { + Erase( theIO, true, false, view ); + Display( theIO, updateViewer, view ); + } + } + } } } } @@ -553,30 +553,30 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs ) AISShape->SetInfiniteState( myShape.Infinite() || myShape.ShapeType() == TopAbs_VERTEX ); // Setup shape properties here ..., e.g. display mode, color, transparency, etc - AISShape->SetDisplayMode( myDisplayMode ); + AISShape->SetDisplayMode( myDisplayMode ); AISShape->SetShadingColor( myShadingColor ); - // Set color and number for iso lines - SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); - QColor col = aResMgr->colorValue( "Geometry", "isos_color", + // Set color and number for iso lines + SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); + QColor col = aResMgr->colorValue( "Geometry", "isos_color", QColor(int(0.5*255), int(0.5*255), int(0.5*255)) ); - Quantity_Color aColor = SalomeApp_Tools::color( col ); - int anUIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_u", 1); - int aVIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_v", 1); + Quantity_Color aColor = SalomeApp_Tools::color( col ); + int anUIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_u", 1); + int aVIsoNumber = aResMgr->integerValue("OCCViewer", "iso_number_v", 1); - Handle(Prs3d_IsoAspect) anAspect = AISShape->Attributes()->UIsoAspect(); - anAspect->SetNumber( anUIsoNumber ); - anAspect->SetColor( aColor ); - AISShape->Attributes()->SetUIsoAspect( anAspect ); + Handle(Prs3d_IsoAspect) anAspect = AISShape->Attributes()->UIsoAspect(); + anAspect->SetNumber( anUIsoNumber ); + anAspect->SetColor( aColor ); + AISShape->Attributes()->SetUIsoAspect( anAspect ); - anAspect = AISShape->Attributes()->VIsoAspect(); - anAspect->SetNumber( aVIsoNumber ); - anAspect->SetColor( aColor ); - AISShape->Attributes()->SetVIsoAspect( anAspect ); + anAspect = AISShape->Attributes()->VIsoAspect(); + anAspect->SetNumber( aVIsoNumber ); + anAspect->SetColor( aColor ); + AISShape->Attributes()->SetVIsoAspect( anAspect ); if ( HasColor() ) { - AISShape->SetColor( (Quantity_NameOfColor)GetColor() ); + AISShape->SetColor( (Quantity_NameOfColor)GetColor() ); if ( myShape.ShapeType() == TopAbs_VERTEX ) { Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect(); @@ -586,55 +586,55 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs ) AISShape->Attributes()->SetPointAspect( anAspect ); } } - else - { - if ( myShape.ShapeType() == TopAbs_VERTEX ) - { - col = aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ); - aColor = SalomeApp_Tools::color( col ); - - Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect(); - anAspect->SetColor( aColor ); - anAspect->SetScale( myScaleOfMarker ); - anAspect->SetTypeOfMarker( myTypeOfMarker ); - AISShape->Attributes()->SetPointAspect( anAspect ); - } - else - { - // Set line aspect - col = aResMgr->colorValue( "Geometry", "wireframe_color", QColor( 255, 255, 0 ) ); - aColor = SalomeApp_Tools::color( col ); - - Handle(Prs3d_LineAspect) anAspect = AISShape->Attributes()->LineAspect(); - anAspect->SetColor( aColor ); - AISShape->Attributes()->SetLineAspect( anAspect ); - - // Set unfree boundaries aspect - anAspect = AISShape->Attributes()->UnFreeBoundaryAspect(); - anAspect->SetColor( aColor ); - AISShape->Attributes()->SetUnFreeBoundaryAspect( anAspect ); - - // Set free boundaries aspect - col = aResMgr->colorValue( "Geometry", "free_bound_color", QColor( 0, 255, 0 ) ); - aColor = SalomeApp_Tools::color( col ); - - anAspect = AISShape->Attributes()->FreeBoundaryAspect(); - anAspect->SetColor( aColor ); - AISShape->Attributes()->SetFreeBoundaryAspect( anAspect ); - - // Set wire aspect - col = aResMgr->colorValue( "Geometry", "line_color", QColor( 255, 0, 0 ) ); - aColor = SalomeApp_Tools::color( col ); - - anAspect = AISShape->Attributes()->WireAspect(); - anAspect->SetColor( aColor ); - AISShape->Attributes()->SetWireAspect( anAspect ); - - // bug [SALOME platform 0019868] - // Set deviation angle. Default one is 12 degrees (Prs3d_Drawer.cxx:18) - AISShape->SetOwnDeviationAngle( 10*PI/180 ); - } - } + else + { + if ( myShape.ShapeType() == TopAbs_VERTEX ) + { + col = aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ); + aColor = SalomeApp_Tools::color( col ); + + Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect(); + anAspect->SetColor( aColor ); + anAspect->SetScale( myScaleOfMarker ); + anAspect->SetTypeOfMarker( myTypeOfMarker ); + AISShape->Attributes()->SetPointAspect( anAspect ); + } + else + { + // Set line aspect + col = aResMgr->colorValue( "Geometry", "wireframe_color", QColor( 255, 255, 0 ) ); + aColor = SalomeApp_Tools::color( col ); + + Handle(Prs3d_LineAspect) anAspect = AISShape->Attributes()->LineAspect(); + anAspect->SetColor( aColor ); + AISShape->Attributes()->SetLineAspect( anAspect ); + + // Set unfree boundaries aspect + anAspect = AISShape->Attributes()->UnFreeBoundaryAspect(); + anAspect->SetColor( aColor ); + AISShape->Attributes()->SetUnFreeBoundaryAspect( anAspect ); + + // Set free boundaries aspect + col = aResMgr->colorValue( "Geometry", "free_bound_color", QColor( 0, 255, 0 ) ); + aColor = SalomeApp_Tools::color( col ); + + anAspect = AISShape->Attributes()->FreeBoundaryAspect(); + anAspect->SetColor( aColor ); + AISShape->Attributes()->SetFreeBoundaryAspect( anAspect ); + + // Set wire aspect + col = aResMgr->colorValue( "Geometry", "line_color", QColor( 255, 0, 0 ) ); + aColor = SalomeApp_Tools::color( col ); + + anAspect = AISShape->Attributes()->WireAspect(); + anAspect->SetColor( aColor ); + AISShape->Attributes()->SetWireAspect( anAspect ); + + // bug [SALOME platform 0019868] + // Set deviation angle. Default one is 12 degrees (Prs3d_Drawer.cxx:18) + AISShape->SetOwnDeviationAngle( 10*PI/180 ); + } + } if ( HasWidth() ) AISShape->SetWidth( GetWidth() ); @@ -656,72 +656,72 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs ) AISShape->SetOwner( anObj ); } - // Get color and other properties from GEOM_Object - SUIT_Session* session = SUIT_Session::session(); - SUIT_Application* app = session->activeApplication(); - if ( app ) - { - SalomeApp_Study* study = dynamic_cast( app->activeStudy() ); - if ( study ) - { - Handle( SALOME_InteractiveObject ) anIO = AISShape->getIO(); - if ( !anIO.IsNull() ) - { - _PTR(SObject) SO ( study->studyDS()->FindObjectID( anIO->getEntry() ) ); - if ( SO ) - { - // get CORBA reference to data object - CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO); - if ( !CORBA::is_nil( object ) ) - { - // downcast to GEOM object - GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( object ); - if ( !aGeomObject->_is_nil() ) - { - SALOMEDS::Color aSColor = aGeomObject->GetColor(); - bool hasColor = aSColor.R >= 0 && aSColor.G >= 0 && aSColor.B >= 0; - if( !hasColor && aGeomObject->GetType() == GEOM_GROUP ) // auto color for group - { - GEOM::GEOM_Gen_var aGeomGen = GeometryGUI::GetGeomGen(); - GEOM::GEOM_IGroupOperations_var anOperations = aGeomGen->GetIGroupOperations( study->id() ); - GEOM::GEOM_Object_var aMainObject = anOperations->GetMainShape( aGeomObject ); - if ( !aMainObject->_is_nil() && aMainObject->GetAutoColor() ) - { - QList aReservedColors; - - SalomeApp_Application* app = dynamic_cast( app ); - CORBA::String_var IOR = app->orb()->object_to_string( aMainObject ); - if ( strcmp(IOR.in(), "") != 0 ) - { - _PTR(Study) aStudy = study->studyDS(); - _PTR(SObject) aMainSObject( aStudy->FindObjectIOR( string(IOR) ) ); - _PTR(ChildIterator) it( aStudy->NewChildIterator( aMainSObject ) ); - for( ; it->More(); it->Next() ) - { - _PTR(SObject) aChildSObject( it->Value() ); - GEOM::GEOM_Object_var aChildObject = - GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aChildSObject)); - if( CORBA::is_nil( aChildObject ) ) - continue; - - if( aChildObject->GetType() != GEOM_GROUP ) - continue; - - SALOMEDS::Color aReservedColor = aChildObject->GetColor(); - aReservedColors.append( aReservedColor ); - } - } - - aSColor = getUniqueColor( aReservedColors ); - hasColor = true; - } - } - - if( hasColor ) - { - Quantity_Color aQuanColor( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB ); - AISShape->SetColor( aQuanColor ); - AISShape->SetShadingColor( aQuanColor ); + // Get color and other properties from GEOM_Object + SUIT_Session* session = SUIT_Session::session(); + SUIT_Application* app = session->activeApplication(); + if ( app ) + { + SalomeApp_Study* study = dynamic_cast( app->activeStudy() ); + if ( study ) + { + Handle( SALOME_InteractiveObject ) anIO = AISShape->getIO(); + if ( !anIO.IsNull() ) + { + _PTR(SObject) SO ( study->studyDS()->FindObjectID( anIO->getEntry() ) ); + if ( SO ) + { + // get CORBA reference to data object + CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO); + if ( !CORBA::is_nil( object ) ) + { + // downcast to GEOM object + GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( object ); + if ( !aGeomObject->_is_nil() ) + { + SALOMEDS::Color aSColor = aGeomObject->GetColor(); + bool hasColor = aSColor.R >= 0 && aSColor.G >= 0 && aSColor.B >= 0; + if( !hasColor && aGeomObject->GetType() == GEOM_GROUP ) // auto color for group + { + GEOM::GEOM_Gen_var aGeomGen = GeometryGUI::GetGeomGen(); + GEOM::GEOM_IGroupOperations_var anOperations = aGeomGen->GetIGroupOperations( study->id() ); + GEOM::GEOM_Object_var aMainObject = anOperations->GetMainShape( aGeomObject ); + if ( !aMainObject->_is_nil() && aMainObject->GetAutoColor() ) + { + QList aReservedColors; + + SalomeApp_Application* app = dynamic_cast( app ); + CORBA::String_var IOR = app->orb()->object_to_string( aMainObject ); + if ( strcmp(IOR.in(), "") != 0 ) + { + _PTR(Study) aStudy = study->studyDS(); + _PTR(SObject) aMainSObject( aStudy->FindObjectIOR( string(IOR) ) ); + _PTR(ChildIterator) it( aStudy->NewChildIterator( aMainSObject ) ); + for( ; it->More(); it->Next() ) + { + _PTR(SObject) aChildSObject( it->Value() ); + GEOM::GEOM_Object_var aChildObject = + GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aChildSObject)); + if( CORBA::is_nil( aChildObject ) ) + continue; + + if( aChildObject->GetType() != GEOM_GROUP ) + continue; + + SALOMEDS::Color aReservedColor = aChildObject->GetColor(); + aReservedColors.append( aReservedColor ); + } + } + + aSColor = getUniqueColor( aReservedColors ); + hasColor = true; + } + } + + if( hasColor ) + { + Quantity_Color aQuanColor( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB ); + AISShape->SetColor( aQuanColor ); + AISShape->SetShadingColor( aQuanColor ); if ( myShape.ShapeType() == TopAbs_VERTEX ) { Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect(); anAspect->SetColor( aQuanColor ); @@ -729,43 +729,43 @@ void GEOM_Displayer::Update( SALOME_OCCPrs* prs ) anAspect->SetTypeOfMarker( myTypeOfMarker ); AISShape->Attributes()->SetPointAspect( anAspect ); } - } - // ... marker type - GEOM::marker_type aType = aGeomObject->GetMarkerType(); - GEOM::marker_size aSize = aGeomObject->GetMarkerSize(); - if ( aType > GEOM::MT_NONE && aType < GEOM::MT_USER && aSize > GEOM::MS_NONE && aSize <= GEOM::MS_70 ) { - Aspect_TypeOfMarker aMType = (Aspect_TypeOfMarker)( (int)aType-1 ); - double aMSize = ((int)aSize+1)*0.5; - Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect(); - anAspect->SetScale( aMSize ); - anAspect->SetTypeOfMarker( aMType ); - Quantity_Color aQuanColor = SalomeApp_Tools::color( aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ) ); - if ( hasColor ) - aQuanColor = Quantity_Color( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB ); - anAspect->SetColor( aQuanColor ); - AISShape->Attributes()->SetPointAspect( anAspect ); - } - else if ( aType == GEOM::MT_USER ) { - int aTextureId = aGeomObject->GetMarkerTexture(); - Quantity_Color aQuanColor = SalomeApp_Tools::color( aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ) ); - if ( hasColor ) aQuanColor = Quantity_Color( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB ); - Standard_Integer aWidth, aHeight; - Handle(Graphic3d_HArray1OfBytes) aTexture = GeometryGUI::getTexture( getStudy(), aTextureId, aWidth, aHeight ); - if ( !aTexture.IsNull() ) { - static int TextureId = 0; - Handle(Prs3d_PointAspect) aTextureAspect = new Prs3d_PointAspect(aQuanColor, - ++TextureId, - aWidth, aHeight, - aTexture ); - AISShape->Attributes()->SetPointAspect( aTextureAspect ); - } - } - } - } - } - } - } - } + } + // ... marker type + GEOM::marker_type aType = aGeomObject->GetMarkerType(); + GEOM::marker_size aSize = aGeomObject->GetMarkerSize(); + if ( aType > GEOM::MT_NONE && aType < GEOM::MT_USER && aSize > GEOM::MS_NONE && aSize <= GEOM::MS_70 ) { + Aspect_TypeOfMarker aMType = (Aspect_TypeOfMarker)( (int)aType-1 ); + double aMSize = ((int)aSize+1)*0.5; + Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect(); + anAspect->SetScale( aMSize ); + anAspect->SetTypeOfMarker( aMType ); + Quantity_Color aQuanColor = SalomeApp_Tools::color( aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ) ); + if ( hasColor ) + aQuanColor = Quantity_Color( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB ); + anAspect->SetColor( aQuanColor ); + AISShape->Attributes()->SetPointAspect( anAspect ); + } + else if ( aType == GEOM::MT_USER ) { + int aTextureId = aGeomObject->GetMarkerTexture(); + Quantity_Color aQuanColor = SalomeApp_Tools::color( aResMgr->colorValue( "Geometry", "point_color", QColor( 255, 255, 0 ) ) ); + if ( hasColor ) aQuanColor = Quantity_Color( aSColor.R, aSColor.G, aSColor.B, Quantity_TOC_RGB ); + Standard_Integer aWidth, aHeight; + Handle(Graphic3d_HArray1OfBytes) aTexture = GeometryGUI::getTexture( getStudy(), aTextureId, aWidth, aHeight ); + if ( !aTexture.IsNull() ) { + static int TextureId = 0; + Handle(Prs3d_PointAspect) aTextureAspect = new Prs3d_PointAspect(aQuanColor, + ++TextureId, + aWidth, aHeight, + aTexture ); + AISShape->Attributes()->SetPointAspect( aTextureAspect ); + } + } + } + } + } + } + } + } // AISShape->SetName(???); ??? necessary to set name ??? occPrs->AddObject( AISShape ); @@ -973,7 +973,7 @@ SALOME_Prs* GEOM_Displayer::BuildPrs( const TopoDS_Shape& theShape ) */ //================================================================= SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry, - SALOME_View* theViewFrame ) + SALOME_View* theViewFrame ) { SALOME_Prs* prs = 0; internalReset(); @@ -989,35 +989,35 @@ SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry, theIO->setEntry( entry.toLatin1().constData() ); if ( !theIO.IsNull() ) { - // set interactive object - setIO( theIO ); - // Find SOBject (because shape should be published previously) - SUIT_Session* session = SUIT_Session::session(); - SUIT_Application* app = session->activeApplication(); - if ( app ) - { - SalomeApp_Study* study = dynamic_cast( app->activeStudy() ); - if ( study ) - { - _PTR(SObject) SO ( study->studyDS()->FindObjectID( theIO->getEntry() ) ); - if ( SO ) - { - // get CORBA reference to data object - CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO); - if ( !CORBA::is_nil( object ) ) - { - // downcast to GEOM object - GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( object ); - if ( !GeomObject->_is_nil() ) - { - // finally set shape - setShape( GEOM_Client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) ); - myType = GeomObject->GetType(); - } - } - } - } - } + // set interactive object + setIO( theIO ); + // Find SOBject (because shape should be published previously) + SUIT_Session* session = SUIT_Session::session(); + SUIT_Application* app = session->activeApplication(); + if ( app ) + { + SalomeApp_Study* study = dynamic_cast( app->activeStudy() ); + if ( study ) + { + _PTR(SObject) SO ( study->studyDS()->FindObjectID( theIO->getEntry() ) ); + if ( SO ) + { + // get CORBA reference to data object + CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO); + if ( !CORBA::is_nil( object ) ) + { + // downcast to GEOM object + GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( object ); + if ( !GeomObject->_is_nil() ) + { + // finally set shape + setShape( GEOM_Client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) ); + myType = GeomObject->GetType(); + } + } + } + } + } } UpdatePrs( prs ); // Update presentation by using of the double dispatch } @@ -1051,8 +1051,8 @@ SALOME_Prs* GEOM_Displayer::buildSubshapePresentation(const TopoDS_Shape& aShape theIO->setEntry(entry.toLatin1().constData()); if (!theIO.IsNull()) { - // set interactive object - setIO(theIO); + // set interactive object + setIO(theIO); // finally set shape setShape(aShape); myType = GEOM_SUBSHAPE; @@ -1127,7 +1127,7 @@ void GEOM_Displayer::GlobalSelection( const int theMode, const bool update ) */ //================================================================= void GEOM_Displayer::GlobalSelection( const TColStd_MapOfInteger& theModes, - const bool update, const QList* theSubShapes ) + const bool update, const QList* theSubShapes ) { SUIT_Session* session = SUIT_Session::session(); SalomeApp_Application* app = dynamic_cast( session->activeApplication() ); @@ -1161,7 +1161,7 @@ void GEOM_Displayer::GlobalSelection( const TColStd_MapOfInteger& theModes, { ic = viewer->getAISContext(); if ( !ic.IsNull() ) - ic->RemoveFilters(); + ic->RemoveFilters(); } if ( theModes.Contains( GEOM_ALLOBJECTS ) ) @@ -1183,7 +1183,7 @@ void GEOM_Displayer::GlobalSelection( const TColStd_MapOfInteger& theModes, TColStd_MapIteratorOfMapOfInteger anIter( theModes ); QList aListOfFilters; for ( ; anIter.More(); anIter.Next() ) - { + { SUIT_SelectionFilter* aFilter; int aMode = anIter.Key(); if ( aMode == GEOM_COMPOUNDFILTER ) @@ -1191,9 +1191,9 @@ void GEOM_Displayer::GlobalSelection( const TColStd_MapOfInteger& theModes, else aFilter = getFilter( aMode ); - if ( aFilter ) - aListOfFilters.append( aFilter ); - } + if ( aFilter ) + aListOfFilters.append( aFilter ); + } aFilter = new GEOM_LogicalFilter( aListOfFilters, GEOM_LogicalFilter::LO_OR ); } @@ -1204,10 +1204,10 @@ void GEOM_Displayer::GlobalSelection( const TColStd_MapOfInteger& theModes, { sm->installFilter( aFilter ); if ( !ic.IsNull() ) - { - Handle(GEOM_OCCFilter) anOCCFilter = new GEOM_OCCFilter( sm ); - ic->AddFilter( anOCCFilter ); - } + { + Handle(GEOM_OCCFilter) anOCCFilter = new GEOM_OCCFilter( sm ); + ic->AddFilter( anOCCFilter ); + } } } @@ -1419,7 +1419,7 @@ SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList& th { aTolerance /= 2; if( aTolerance < 1 ) - break; + break; } //cout << "Iteration N" << anIterations << " (tolerance=" << aTolerance << ")"<< endl; @@ -1440,9 +1440,9 @@ SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList& th //cout << h << " "; if( abs( h - aHue ) < aTolerance ) { - ok = false; - //cout << "break (diff = " << abs( h - aHue ) << ")"; - break; + ok = false; + //cout << "break (diff = " << abs( h - aHue ) << ")"; + break; } } //cout << endl; diff --git a/src/GEOMGUI/GEOM_Displayer.h b/src/GEOMGUI/GEOM_Displayer.h index 8b11fe66f..7ae0eeb2a 100644 --- a/src/GEOMGUI/GEOM_Displayer.h +++ b/src/GEOMGUI/GEOM_Displayer.h @@ -77,12 +77,12 @@ public: /* Display/Erase object methods */ void Display ( const Handle(SALOME_InteractiveObject)& theIO, const bool updateViewer = true, - SALOME_View* theViewFrame = 0 ); + SALOME_View* theViewFrame = 0 ); // This overloaded Display() method can be useful for operations // not using dialog boxes. void Display ( GEOM::GEOM_Object_ptr theObj, - const bool updateViewer = true ); + const bool updateViewer = true ); void Redisplay ( const Handle(SALOME_InteractiveObject)& theIO, const bool updateViewer = true ); @@ -90,7 +90,7 @@ public: void Erase ( const Handle(SALOME_InteractiveObject)& theIO, const bool forced = false, const bool updateViewer = true, - SALOME_View* theViewFrame = 0 ); + SALOME_View* theViewFrame = 0 ); void Erase ( GEOM::GEOM_Object_ptr theObj, const bool forced = false, diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 611022451..003480e83 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -211,25 +211,25 @@ GEOMGUI* GeometryGUI::getLibrary( const QString& libraryName ) QStringList dirList = libs.split( ";", QString::SkipEmptyParts ); // skip empty entries #endif for( int i = dirList.count()-1; i >= 0; i-- ) { - QString dir = dirList[ i ]; - QFileInfo fi( Qtx::addSlash( dirList[ i ] ) + libraryName ); - if( fi.exists() ) { - OSD_SharedLibrary aSharedLibrary( fi.fileName().toLatin1().data() ); - bool res = aSharedLibrary.DlOpen( OSD_RTLD_LAZY ); - if( !res ) { - MESSAGE( "Can't open library : " << aSharedLibrary.DlError() ); - continue; // continue search further - } - OSD_Function osdF = aSharedLibrary.DlSymb( "GetLibGUI" ); - if ( osdF != NULL ) { - LibraryGUI func = (GEOMGUI* (*) (GeometryGUI*))osdF; - GEOMGUI* libGUI = (*func)(this); - if ( libGUI ) { - myGUIMap[ libraryName ] = libGUI; - break; // found and loaded! - } - } - } + QString dir = dirList[ i ]; + QFileInfo fi( Qtx::addSlash( dirList[ i ] ) + libraryName ); + if( fi.exists() ) { + OSD_SharedLibrary aSharedLibrary( fi.fileName().toLatin1().data() ); + bool res = aSharedLibrary.DlOpen( OSD_RTLD_LAZY ); + if( !res ) { + MESSAGE( "Can't open library : " << aSharedLibrary.DlError() ); + continue; // continue search further + } + OSD_Function osdF = aSharedLibrary.DlSymb( "GetLibGUI" ); + if ( osdF != NULL ) { + LibraryGUI func = (GEOMGUI* (*) (GeometryGUI*))osdF; + GEOMGUI* libGUI = (*func)(this); + if ( libGUI ) { + myGUIMap[ libraryName ] = libGUI; + break; // found and loaded! + } + } + } } } } @@ -388,129 +388,129 @@ void GeometryGUI::OnGUIEvent( int id ) id == 9024 ) { // OBJECT BROWSER - OPEN //cout << "id " << id << " received" << endl; #ifndef WNT - library = getLibrary( "libGEOMToolsGUI.so" ); + library = getLibrary( "libGEOMToolsGUI.so" ); #else - library = getLibrary( "GEOMToolsGUI.dll" ); + library = getLibrary( "GEOMToolsGUI.dll" ); #endif } else if( id == 211 || // MENU VIEW - WIREFRAME/SHADING - id == 212 || // MENU VIEW - DISPLAY ALL - id == 213 || // MENU VIEW - DISPLAY ONLY - id == 214 || // MENU VIEW - ERASE ALL - id == 215 || // MENU VIEW - ERASE - id == 216 || // MENU VIEW - DISPLAY - id == 218 || // MENU VIEW - VECTOR MODE - id == 80311 || // POPUP VIEWER - WIREFRAME - id == 80312 || // POPUP VIEWER - SHADING - id == 80313 ) { // POPUP VIEWER - VECTORS + id == 212 || // MENU VIEW - DISPLAY ALL + id == 213 || // MENU VIEW - DISPLAY ONLY + id == 214 || // MENU VIEW - ERASE ALL + id == 215 || // MENU VIEW - ERASE + id == 216 || // MENU VIEW - DISPLAY + id == 218 || // MENU VIEW - VECTOR MODE + id == 80311 || // POPUP VIEWER - WIREFRAME + id == 80312 || // POPUP VIEWER - SHADING + id == 80313 ) { // POPUP VIEWER - VECTORS #ifndef WNT - library = getLibrary( "libDisplayGUI.so" ); + library = getLibrary( "libDisplayGUI.so" ); #else - library = getLibrary( "DisplayGUI.dll" ); + library = getLibrary( "DisplayGUI.dll" ); #endif } else if( id == 4011 || // MENU BASIC - POINT - id == 4012 || // MENU BASIC - LINE - id == 4013 || // MENU BASIC - CIRCLE - id == 4014 || // MENU BASIC - ELLIPSE - id == 4015 || // MENU BASIC - ARC - id == 4016 || // MENU BASIC - VECTOR - id == 4017 || // MENU BASIC - PLANE -// id == 4018 || // MENU BASIC - WPLANE // DEPRECATED - id == 4019 || // MENU BASIC - CURVE - id == 4020 ) { // MENU BASIC - REPAIR + id == 4012 || // MENU BASIC - LINE + id == 4013 || // MENU BASIC - CIRCLE + id == 4014 || // MENU BASIC - ELLIPSE + id == 4015 || // MENU BASIC - ARC + id == 4016 || // MENU BASIC - VECTOR + id == 4017 || // MENU BASIC - PLANE +// id == 4018 || // MENU BASIC - WPLANE // DEPRECATED + id == 4019 || // MENU BASIC - CURVE + id == 4020 ) { // MENU BASIC - REPAIR #ifndef WNT - library = getLibrary( "libBasicGUI.so" ); + library = getLibrary( "libBasicGUI.so" ); #else - library = getLibrary( "BasicGUI.dll" ); + library = getLibrary( "BasicGUI.dll" ); #endif } else if( id == 4021 || // MENU PRIMITIVE - BOX - id == 4022 || // MENU PRIMITIVE - CYLINDER - id == 4023 || // MENU PRIMITIVE - SPHERE - id == 4024 || // MENU PRIMITIVE - TORUS - id == 4025 || // MENU PRIMITIVE - CONE - id == 4026 || // MENU PRIMITIVE - FACE - id == 4027 ) { // MENU PRIMITIVE - DISK + id == 4022 || // MENU PRIMITIVE - CYLINDER + id == 4023 || // MENU PRIMITIVE - SPHERE + id == 4024 || // MENU PRIMITIVE - TORUS + id == 4025 || // MENU PRIMITIVE - CONE + id == 4026 || // MENU PRIMITIVE - FACE + id == 4027 ) { // MENU PRIMITIVE - DISK #ifndef WNT - library = getLibrary( "libPrimitiveGUI.so" ); + library = getLibrary( "libPrimitiveGUI.so" ); #else - library = getLibrary( "PrimitiveGUI.dll" ); + library = getLibrary( "PrimitiveGUI.dll" ); #endif } else if( id == 4031 || // MENU GENERATION - PRISM - id == 4032 || // MENU GENERATION - REVOLUTION - id == 4033 || // MENU GENERATION - FILLING - id == 4034 ) { // MENU GENERATION - PIPE + id == 4032 || // MENU GENERATION - REVOLUTION + id == 4033 || // MENU GENERATION - FILLING + id == 4034 ) { // MENU GENERATION - PIPE #ifndef WNT - library = getLibrary( "libGenerationGUI.so" ); + library = getLibrary( "libGenerationGUI.so" ); #else - library = getLibrary( "GenerationGUI.dll" ); + library = getLibrary( "GenerationGUI.dll" ); #endif } else if( id == 404 || // MENU ENTITY - SKETCHER id == 405 || // MENU ENTITY - 3D SKETCHER - id == 407 ) { // MENU ENTITY - EXPLODE + id == 407 ) { // MENU ENTITY - EXPLODE #ifndef WNT - library = getLibrary( "libEntityGUI.so" ); + library = getLibrary( "libEntityGUI.so" ); #else - library = getLibrary( "EntityGUI.dll" ); + library = getLibrary( "EntityGUI.dll" ); #endif } else if( id == 4081 || // MENU BUILD - EDGE - id == 4082 || // MENU BUILD - WIRE - id == 4083 || // MENU BUILD - FACE - id == 4084 || // MENU BUILD - SHELL - id == 4085 || // MENU BUILD - SOLID - id == 4086 ) { // MENU BUILD - COMPUND + id == 4082 || // MENU BUILD - WIRE + id == 4083 || // MENU BUILD - FACE + id == 4084 || // MENU BUILD - SHELL + id == 4085 || // MENU BUILD - SOLID + id == 4086 ) { // MENU BUILD - COMPUND #ifndef WNT - library = getLibrary( "libBuildGUI.so" ); + library = getLibrary( "libBuildGUI.so" ); #else - library = getLibrary( "BuildGUI.dll" ); + library = getLibrary( "BuildGUI.dll" ); #endif } else if( id == 5011 || // MENU BOOLEAN - FUSE - id == 5012 || // MENU BOOLEAN - COMMON - id == 5013 || // MENU BOOLEAN - CUT - id == 5014 ) { // MENU BOOLEAN - SECTION + id == 5012 || // MENU BOOLEAN - COMMON + id == 5013 || // MENU BOOLEAN - CUT + id == 5014 ) { // MENU BOOLEAN - SECTION #ifndef WNT - library = getLibrary( "libBooleanGUI.so" ); + library = getLibrary( "libBooleanGUI.so" ); #else - library = getLibrary( "BooleanGUI.dll" ); + library = getLibrary( "BooleanGUI.dll" ); #endif } else if( id == 5021 || // MENU TRANSFORMATION - TRANSLATION - id == 5022 || // MENU TRANSFORMATION - ROTATION - id == 5023 || // MENU TRANSFORMATION - LOCATION - id == 5024 || // MENU TRANSFORMATION - MIRROR - id == 5025 || // MENU TRANSFORMATION - SCALE - id == 5026 || // MENU TRANSFORMATION - OFFSET - id == 5027 || // MENU TRANSFORMATION - MULTI-TRANSLATION - id == 5028 || // MENU TRANSFORMATION - MULTI-ROTATION + id == 5022 || // MENU TRANSFORMATION - ROTATION + id == 5023 || // MENU TRANSFORMATION - LOCATION + id == 5024 || // MENU TRANSFORMATION - MIRROR + id == 5025 || // MENU TRANSFORMATION - SCALE + id == 5026 || // MENU TRANSFORMATION - OFFSET + id == 5027 || // MENU TRANSFORMATION - MULTI-TRANSLATION + id == 5028 || // MENU TRANSFORMATION - MULTI-ROTATION id == 5029 ) { // CONTEXT(POPUP) MENU - RELOAD_IMPORTED #ifndef WNT - library = getLibrary( "libTransformationGUI.so" ); + library = getLibrary( "libTransformationGUI.so" ); #else - library = getLibrary( "TransformationGUI.dll" ); + library = getLibrary( "TransformationGUI.dll" ); #endif } else if( id == 503 || // MENU OPERATION - PARTITION - id == 504 || // MENU OPERATION - ARCHIMEDE - id == 505 || // MENU OPERATION - FILLET - id == 506 || // MENU OPERATION - CHAMFER - id == 507 || // MENU OPERATION - CLIPPING RANGE - id == 508 || // MENU OPERATION - GET SHAPES ON SHAPE - id == 509 || // MENU OPERATION - FILLET 2D - id == 510 ) { // MENU OPERATION - FILLET 1D + id == 504 || // MENU OPERATION - ARCHIMEDE + id == 505 || // MENU OPERATION - FILLET + id == 506 || // MENU OPERATION - CHAMFER + id == 507 || // MENU OPERATION - CLIPPING RANGE + id == 508 || // MENU OPERATION - GET SHAPES ON SHAPE + id == 509 || // MENU OPERATION - FILLET 2D + id == 510 ) { // MENU OPERATION - FILLET 1D #ifndef WNT - library = getLibrary( "libOperationGUI.so" ); + library = getLibrary( "libOperationGUI.so" ); #else - library = getLibrary( "OperationGUI.dll" ); + library = getLibrary( "OperationGUI.dll" ); #endif } else if( id == 601 || // MENU REPAIR - SEWING - id == 603 || // MENU REPAIR - SUPPRESS FACES - id == 604 || // MENU REPAIR - SUPPRESS HOLE + id == 603 || // MENU REPAIR - SUPPRESS FACES + id == 604 || // MENU REPAIR - SUPPRESS HOLE id == 605 || // MENU REPAIR - SHAPE PROCESSING id == 606 || // MENU REPAIR - CLOSE CONTOUR id == 607 || // MENU REPAIR - REMOVE INTERNAL WIRES @@ -518,39 +518,39 @@ void GeometryGUI::OnGUIEvent( int id ) id == 609 || // MENU MEASURE - FREE BOUNDARIES id == 610 || // MENU MEASURE - FREE FACES id == 611 || // MENU REPAIR - CHANGE ORIENTATION - id == 602 || // MENU REPAIR - GLUE FACES - id == 612 ) { // MENU REPAIR - REMOVE EXTRA EDGES + id == 602 || // MENU REPAIR - GLUE FACES + id == 612 ) { // MENU REPAIR - REMOVE EXTRA EDGES #ifndef WNT - library = getLibrary( "libRepairGUI.so" ); + library = getLibrary( "libRepairGUI.so" ); #else - library = getLibrary( "RepairGUI.dll" ); + library = getLibrary( "RepairGUI.dll" ); #endif } else if( id == 701 || // MENU MEASURE - PROPERTIES - id == 702 || // MENU MEASURE - CDG - id == 703 || // MENU MEASURE - INERTIA - id == 704 || // MENU MEASURE - NORMALE - id == 7041 || // MENU MEASURE - BOUNDING BOX - id == 7042 || // MENU MEASURE - MIN DISTANCE - id == 7043 || // MENU MEASURE - ANGLE - id == 705 || // MENU MEASURE - TOLERANCE - id == 706 || // MENU MEASURE - WHATIS - id == 707 || // MENU MEASURE - CHECK - id == 7072 || // MENU MEASURE - CHECK COMPOUND OF BLOCKS - id == 708 ) { // MENU MEASURE - POINT COORDINATES + id == 702 || // MENU MEASURE - CDG + id == 703 || // MENU MEASURE - INERTIA + id == 704 || // MENU MEASURE - NORMALE + id == 7041 || // MENU MEASURE - BOUNDING BOX + id == 7042 || // MENU MEASURE - MIN DISTANCE + id == 7043 || // MENU MEASURE - ANGLE + id == 705 || // MENU MEASURE - TOLERANCE + id == 706 || // MENU MEASURE - WHATIS + id == 707 || // MENU MEASURE - CHECK + id == 7072 || // MENU MEASURE - CHECK COMPOUND OF BLOCKS + id == 708 ) { // MENU MEASURE - POINT COORDINATES #ifndef WNT - library = getLibrary( "libMeasureGUI.so" ); + library = getLibrary( "libMeasureGUI.so" ); #else - library = getLibrary( "MeasureGUI.dll" ); + library = getLibrary( "MeasureGUI.dll" ); #endif } else if( id == 800 || // MENU GROUP - CREATE - id == 8001 || // POPUP MENU - CREATE GROUP - id == 801 ) { // MENU GROUP - EDIT + id == 8001 || // POPUP MENU - CREATE GROUP + id == 801 ) { // MENU GROUP - EDIT #ifndef WNT - library = getLibrary( "libGroupGUI.so" ); + library = getLibrary( "libGroupGUI.so" ); #else - library = getLibrary( "GroupGUI.dll" ); + library = getLibrary( "GroupGUI.dll" ); #endif } else if( id == 9999 || // MENU BLOCKS - HEXAHEDRAL SOLID @@ -559,9 +559,9 @@ void GeometryGUI::OnGUIEvent( int id ) id == 99991 || // MENU BLOCKS - PROPAGATE id == 9995 ) { // MENU BLOCKS - EXPLODE ON BLOCKS #ifndef WNT - library = getLibrary( "libBlocksGUI.so" ); + library = getLibrary( "libBlocksGUI.so" ); #else - library = getLibrary( "BlocksGUI.dll" ); + library = getLibrary( "BlocksGUI.dll" ); #endif } @@ -634,13 +634,13 @@ static void UpdateVtkSelection() if ( win->getViewManager()->getTypeView() == VIEW_VTK ) { SVTK_ViewWindow* vw = dynamic_cast( window ); if ( vw ) { - SVTK_RenderWindowInteractor* anInteractor = vw->getRWInteractor(); - anInteractor->SetSelectionProp(); - anInteractor->SetSelectionTolerance(); - SVTK_InteractorStyleSALOME* aStyle = anInteractor->GetInteractorStyleSALOME(); - if (aStyle) { - aStyle->setPreselectionProp(); - } + SVTK_RenderWindowInteractor* anInteractor = vw->getRWInteractor(); + anInteractor->SetSelectionProp(); + anInteractor->SetSelectionTolerance(); + SVTK_InteractorStyleSALOME* aStyle = anInteractor->GetInteractorStyleSALOME(); + if (aStyle) { + aStyle->setPreselectionProp(); + } } } } @@ -707,9 +707,9 @@ bool GeometryGUI::SetSettings() QString IsoU = QAD_CONFIG->getSetting("Geometry:SettingsIsoU"); QString IsoV = QAD_CONFIG->getSetting("Geometry:SettingsIsoV"); if(!IsoU.isEmpty()) - ic->DefaultDrawer()->UIsoAspect()->SetNumber(IsoU.toInt()); + ic->DefaultDrawer()->UIsoAspect()->SetNumber(IsoU.toInt()); if(!IsoV.isEmpty()) - ic->DefaultDrawer()->VIsoAspect()->SetNumber(IsoV.toInt()); + ic->DefaultDrawer()->VIsoAspect()->SetNumber(IsoV.toInt()); } } @@ -1250,7 +1250,7 @@ bool GeometryGUI::activateModule( SUIT_Study* study ) setToolShown( true ); connect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), - this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) ); + this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) ); // Reset actions accelerator keys //action(111)->setAccel(QKeySequence(CTRL + Key_I)); // Import @@ -1322,7 +1322,7 @@ bool GeometryGUI::deactivateModule( SUIT_Study* study ) setToolShown( false ); disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), - this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) ); + this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) ); EmitSignalCloseAllDialogs(); @@ -1402,11 +1402,11 @@ void GeometryGUI::onViewManagerAdded( SUIT_ViewManager* vm ) { qDebug( "connect" ); connect( vm, SIGNAL( keyPress ( SUIT_ViewWindow*, QKeyEvent* ) ), - this, SLOT( OnKeyPress( SUIT_ViewWindow*, QKeyEvent* ) ) ); + this, SLOT( OnKeyPress( SUIT_ViewWindow*, QKeyEvent* ) ) ); connect( vm, SIGNAL( mousePress( SUIT_ViewWindow*, QMouseEvent* ) ), - this, SLOT( OnMousePress( SUIT_ViewWindow*, QMouseEvent* ) ) ); + this, SLOT( OnMousePress( SUIT_ViewWindow*, QMouseEvent* ) ) ); connect( vm, SIGNAL( mouseMove ( SUIT_ViewWindow*, QMouseEvent* ) ), - this, SLOT( OnMouseMove( SUIT_ViewWindow*, QMouseEvent* ) ) ); + this, SLOT( OnMouseMove( SUIT_ViewWindow*, QMouseEvent* ) ) ); LightApp_SelectionMgr* sm = getApp()->selectionMgr(); @@ -1417,7 +1417,7 @@ void GeometryGUI::onViewManagerAdded( SUIT_ViewManager* vm ) QListIterator itOCCSel( myOCCSelectors ); while ( itOCCSel.hasNext() ) if ( GEOMGUI_OCCSelector* sr = itOCCSel.next() ) - sr->setEnabled(true); + sr->setEnabled(true); } else if ( vm->getType() == SVTK_Viewer::Type() ) { @@ -1429,7 +1429,7 @@ void GeometryGUI::onViewManagerAdded( SUIT_ViewManager* vm ) QListIterator itVTKSel( myVTKSelectors ); while ( itVTKSel.hasNext() ) if ( LightApp_VTKSelector* sr = itVTKSel.next() ) - sr->setEnabled(true); + sr->setEnabled(true); } } @@ -1441,22 +1441,22 @@ void GeometryGUI::onViewManagerRemoved( SUIT_ViewManager* vm ) QListIterator itOCCSel( myOCCSelectors ); while ( itOCCSel.hasNext() ) if ( GEOMGUI_OCCSelector* sr = itOCCSel.next() ) - if ( sr->viewer() == viewer ) - { - delete myOCCSelectors.takeAt( myOCCSelectors.indexOf( sr ) ); - break; - } + if ( sr->viewer() == viewer ) + { + delete myOCCSelectors.takeAt( myOCCSelectors.indexOf( sr ) ); + break; + } } if ( vm->getType() == SVTK_Viewer::Type() ) { QListIterator itVTKSel( myVTKSelectors ); while ( itVTKSel.hasNext() ) if ( LightApp_VTKSelector* sr = itVTKSel.next() ) - if ( sr->viewer() == viewer ) - { - delete myVTKSelectors.takeAt( myVTKSelectors.indexOf( sr ) ); - break; - } + if ( sr->viewer() == viewer ) + { + delete myVTKSelectors.takeAt( myVTKSelectors.indexOf( sr ) ); + break; + } } } @@ -1477,16 +1477,16 @@ Handle(Graphic3d_HArray1OfBytes) GeometryGUI::getTexture( SalomeApp_Study* theSt if ( aTexture.IsNull() ) { GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGen()->GetIInsertOperations( theStudy->studyDS()->StudyId() ); if ( !aInsOp->_is_nil() ) { - CORBA::Long aWidth, aHeight; - SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight ); - if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) { - theWidth = aWidth; - theHeight = aHeight; - aTexture = new Graphic3d_HArray1OfBytes( 1, aStream->length() ); - for ( int i = 0; i < aStream->length(); i++ ) - aTexture->SetValue( i+1, (Standard_Byte)aStream[i] ); - aTextureMap[ theId ] = aTexture; - } + CORBA::Long aWidth, aHeight; + SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight ); + if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) { + theWidth = aWidth; + theHeight = aHeight; + aTexture = new Graphic3d_HArray1OfBytes( 1, aStream->length() ); + for ( int i = 0; i < aStream->length(); i++ ) + aTexture->SetValue( i+1, (Standard_Byte)aStream[i] ); + aTextureMap[ theId ] = aTexture; + } } } } @@ -1542,29 +1542,29 @@ void GeometryGUI::createPreferences() setPreferenceProperty( genGroup, "columns", 2 ); int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), genGroup, - LightApp_Preferences::Selector, - "Geometry", "display_mode" ); + LightApp_Preferences::Selector, + "Geometry", "display_mode" ); addPreference( tr( "PREF_SHADING_COLOR" ), genGroup, - LightApp_Preferences::Color, "Geometry", "shading_color" ); + LightApp_Preferences::Color, "Geometry", "shading_color" ); addPreference( tr( "PREF_WIREFRAME_COLOR" ), genGroup, - LightApp_Preferences::Color, "Geometry", "wireframe_color" ); + LightApp_Preferences::Color, "Geometry", "wireframe_color" ); addPreference( tr( "PREF_FREE_BOUND_COLOR" ), genGroup, - LightApp_Preferences::Color, "Geometry", "free_bound_color" ); + LightApp_Preferences::Color, "Geometry", "free_bound_color" ); addPreference( tr( "PREF_LINE_COLOR"), genGroup, - LightApp_Preferences::Color, "Geometry", "line_color" ); + LightApp_Preferences::Color, "Geometry", "line_color" ); addPreference( tr( "PREF_POINT_COLOR"), genGroup, - LightApp_Preferences::Color, "Geometry", "point_color" ); + LightApp_Preferences::Color, "Geometry", "point_color" ); addPreference( tr( "PREF_ISOS_COLOR" ), genGroup, - LightApp_Preferences::Color, "Geometry", "isos_color" ); + LightApp_Preferences::Color, "Geometry", "isos_color" ); int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup, - LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" ); + LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" ); int VertexGroup = addPreference( tr( "PREF_GROUP_VERTEX" ), tabId ); setPreferenceProperty( VertexGroup, "columns", 2 ); @@ -1695,18 +1695,18 @@ void GeometryGUI::storeVisualParameters (int savePoint) QVector views = vman->getViews(); for (int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++) { - if (SVTK_ViewWindow* vtkView = dynamic_cast(views[i])) + if (SVTK_ViewWindow* vtkView = dynamic_cast(views[i])) { - vtkActorCollection* allActors = vtkView->getRenderer()->GetActors(); - allActors->InitTraversal(); - while (vtkActor* actor = allActors->GetNextActor()) + vtkActorCollection* allActors = vtkView->getRenderer()->GetActors(); + allActors->InitTraversal(); + while (vtkActor* actor = allActors->GetNextActor()) { - if (actor->GetVisibility()) // store only visible actors + if (actor->GetVisibility()) // store only visible actors { GEOM_Actor* aGeomActor = 0; if (actor->IsA("GEOM_Actor")) aGeomActor = GEOM_Actor::SafeDownCast(actor); - if (aGeomActor && aGeomActor->hasIO()) + if (aGeomActor && aGeomActor->hasIO()) { Handle(SALOME_InteractiveObject) io = aGeomActor->getIO(); if (io->hasEntry()) @@ -1746,10 +1746,10 @@ void GeometryGUI::storeVisualParameters (int savePoint) param = occParam + "Isos"; ip->setParameter(entry, param, isosStr.toLatin1().data()); } // if (io->hasEntry()) - } // GEOM_Actor && hasIO - } // isVisible - } // while.. actors traversal - } // if (vtkView) + } // GEOM_Actor && hasIO + } // isVisible + } // while.. actors traversal + } // if (vtkView) } // for (views) vtkViewers++; } // if (SVTK view model) @@ -1758,8 +1758,8 @@ void GeometryGUI::storeVisualParameters (int savePoint) QVector views = vman->getViews(); for (int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++) { - SOCC_ViewWindow* occView = dynamic_cast(views[i]); - if (occView) + SOCC_ViewWindow* occView = dynamic_cast(views[i]); + if (occView) { //Handle(AIS_InteractiveContext) ic = // ((OCCViewer_Viewer*)(occView->getViewManager()->getViewModel()))->getAISContext(); @@ -1818,9 +1818,9 @@ void GeometryGUI::storeVisualParameters (int savePoint) ip->setParameter(entry, param, isosStr.toLatin1().data()); } // if (io->hasEntry()) } // if (io) - } // if (GEOM_AISShape) - } // for (AIS_ListOfInteractive) - } // if ( occView ) + } // if (GEOM_AISShape) + } // for (AIS_ListOfInteractive) + } // if ( occView ) } // for ( views ) occViewers++; } // if (SOCC view model) @@ -1893,7 +1893,7 @@ void GeometryGUI::restoreVisualParameters (int savePoint) bool ok; int viewIndex = viewIndexStr.toUInt(&ok); if (!ok) // bad conversion of view index to integer - continue; + continue; // viewers if (viewerTypStr == SVTK_Viewer::Type()) @@ -1940,10 +1940,10 @@ void GeometryGUI::restoreVisualParameters (int savePoint) } } } // if (paramNameStr == "Visibility") - else + else { // the rest properties "work" with GEOM_Actor - if (vActor) + if (vActor) { QString val ((*valuesIt).c_str()); @@ -1966,7 +1966,7 @@ void GeometryGUI::restoreVisualParameters (int savePoint) } } } - } // other parameters than Visibility + } // other parameters than Visibility } else if (viewerTypStr == SOCC_Viewer::Type()) { @@ -1996,7 +1996,7 @@ void GeometryGUI::restoreVisualParameters (int savePoint) if (paramNameStr == "Visibility") { - if (occActor.IsNull() && displayer()) + if (occActor.IsNull() && displayer()) { displayer()->Display(entry, true, occVModel); @@ -2021,10 +2021,10 @@ void GeometryGUI::restoreVisualParameters (int savePoint) } } } // if (paramNameStr == "Visibility") - else + else { // the rest properties "work" with GEOM_AISShape - if (!occActor.IsNull()) + if (!occActor.IsNull()) { QString val ((*valuesIt).c_str()); @@ -2054,7 +2054,7 @@ void GeometryGUI::restoreVisualParameters (int savePoint) } } } - } // other parameters than Visibility + } // other parameters than Visibility } else { diff --git a/src/GEOMGUI/GeometryGUI.h b/src/GEOMGUI/GeometryGUI.h index 2cbd9d1dd..91728932b 100644 --- a/src/GEOMGUI/GeometryGUI.h +++ b/src/GEOMGUI/GeometryGUI.h @@ -108,7 +108,7 @@ public: // virtual void DefinePopup( QString & theContext, QString & theParent, QString & theObject); // virtual bool CustomPopup( QAD_Desktop* parent, QMenu* popup, const QString& theContext, -// const QString& theParent, const QString& theObject ); +// const QString& theParent, const QString& theObject ); // The Working Plane management void SetWorkingPlane( gp_Ax3 wp ) { myWorkingPlane = wp; } @@ -154,12 +154,12 @@ protected: private: GEOMGUI* getLibrary( const QString& libraryName ); void createGeomAction( const int id, const QString& po_id, - const QString& icon_id = QString(""), - const int key = 0, const bool toggle = false ); + const QString& icon_id = QString(""), + const int key = 0, const bool toggle = false ); void createPopupItem( const int, const QString& clients, const QString& types, - const bool isSingle = false, const int isVisible = -1, - const bool isExpandAll = false, const bool isOCC = false, - const int parentId = -1 ); + const bool isSingle = false, const int isVisible = -1, + const bool isExpandAll = false, const bool isOCC = false, + const int parentId = -1 ); public: static GEOM::GEOM_Gen_var myComponentGeom; // GEOM engine!!! diff --git a/src/GEOMGUI/GeometryGUI_Swig.cxx b/src/GEOMGUI/GeometryGUI_Swig.cxx index 844b669e8..473955738 100644 --- a/src/GEOMGUI/GeometryGUI_Swig.cxx +++ b/src/GEOMGUI/GeometryGUI_Swig.cxx @@ -80,7 +80,7 @@ inline OCCViewer_Viewer* GetOCCViewer(SUIT_Application* theApp){ if ( vw ) { OCCViewer_ViewManager* vm = dynamic_cast( vw->getViewManager() ); if ( vm ) - return vm->getOCCViewer(); + return vm->getOCCViewer(); } } @@ -176,39 +176,39 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry, bool isUpdated) "GEOM", const_cast( obj->GetID().c_str())); - GEOM_Displayer(ActiveStudy).Display(anIO, myUpdateViewer); - /*if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(app)) { - SVTK_View* aView = aViewWindow->getView(); - int aMode = aView->GetDisplayMode(); + GEOM_Displayer(ActiveStudy).Display(anIO, myUpdateViewer); + /*if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(app)) { + SVTK_View* aView = aViewWindow->getView(); + int aMode = aView->GetDisplayMode(); - vtkActorCollection* theActors = + vtkActorCollection* theActors = GEOM_AssemblyBuilder::BuildActors(Shape,0,aMode,true); - theActors->InitTraversal(); - while (vtkActor* anActor = theActors->GetNextActor()) { - GEOM_Actor* GActor = GEOM_Actor::SafeDownCast(anActor); - GActor->setName(const_cast(aNameValue.c_str())); - GActor->setIO(anIO); - aView->Display(GActor); - } - aView->Repaint(); - } else if (OCCViewer_Viewer* occViewer = GetOCCViewer(app)) { - Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); - Handle(GEOM_AISShape) aSh = + theActors->InitTraversal(); + while (vtkActor* anActor = theActors->GetNextActor()) { + GEOM_Actor* GActor = GEOM_Actor::SafeDownCast(anActor); + GActor->setName(const_cast(aNameValue.c_str())); + GActor->setIO(anIO); + aView->Display(GActor); + } + aView->Repaint(); + } else if (OCCViewer_Viewer* occViewer = GetOCCViewer(app)) { + Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); + Handle(GEOM_AISShape) aSh = new GEOM_AISShape (Shape,const_cast(aNameValue.c_str())); - aSh->setName(const_cast(aNameValue.c_str())); - aSh->setIO(anIO); - ic->Display(aSh); - ic->AddOrRemoveCurrentObject(aSh,true); - }*/ - // update object browser - SalomeApp_Application* app = NULL; //dynamic_cast(app); - if (app) { - CAM_Module* module = app->module("Geometry"); - SalomeApp_Module* appMod = dynamic_cast(module); - if (appMod) - appMod->updateObjBrowser(true); - } - } + aSh->setName(const_cast(aNameValue.c_str())); + aSh->setIO(anIO); + ic->Display(aSh); + ic->AddOrRemoveCurrentObject(aSh,true); + }*/ + // update object browser + SalomeApp_Application* app = NULL; //dynamic_cast(app); + if (app) { + CAM_Module* module = app->module("Geometry"); + SalomeApp_Module* appMod = dynamic_cast(module); + if (appMod) + appMod->updateObjBrowser(true); + } + } } } }; @@ -219,15 +219,15 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry, bool isUpdated) class TEventUpdateBrowser: public SALOME_Event { public: - TEventUpdateBrowser() {} - virtual void Execute() { + TEventUpdateBrowser() {} + virtual void Execute() { SalomeApp_Application* app = dynamic_cast(SUIT_Session::session()->activeApplication()); if (app) { - CAM_Module* module = app->module("Geometry"); - SalomeApp_Module* appMod = dynamic_cast(module); - if (appMod) appMod->updateObjBrowser(true); - } + CAM_Module* module = app->module("Geometry"); + SalomeApp_Module* appMod = dynamic_cast(module); + if (appMod) appMod->updateObjBrowser(true); + } } }; @@ -242,22 +242,22 @@ void GEOM_Swig::createAndDisplayFitAllGO (const char* Entry) public: TEventFitAll() {} virtual void Execute() { - SUIT_Application* app = SUIT_Session::session()->activeApplication(); - if (!app) return; - - if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(app)) - { - SVTK_View* aView = aViewWindow->getView(); - aView->GetRenderer()->OnFitAll(); - } - else if (OCCViewer_Viewer* occViewer = GetOCCViewer(app)) - { - Handle(V3d_Viewer) aViewer3d = occViewer->getViewer3d(); - aViewer3d->InitActiveViews(); - - if (aViewer3d->MoreActiveViews()) - aViewer3d->ActiveView()->FitAll(); - } + SUIT_Application* app = SUIT_Session::session()->activeApplication(); + if (!app) return; + + if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(app)) + { + SVTK_View* aView = aViewWindow->getView(); + aView->GetRenderer()->OnFitAll(); + } + else if (OCCViewer_Viewer* occViewer = GetOCCViewer(app)) + { + Handle(V3d_Viewer) aViewer3d = occViewer->getViewer3d(); + aViewer3d->InitActiveViews(); + + if (aViewer3d->MoreActiveViews()) + aViewer3d->ActiveView()->FitAll(); + } } }; @@ -272,12 +272,12 @@ void GEOM_Swig::UpdateViewer() public: TEventUpdateViewer() {} virtual void Execute() { - SUIT_Application* app = SUIT_Session::session()->activeApplication(); - if (!app) return; - SalomeApp_Study* ActiveStudy = dynamic_cast(app->activeStudy()); - if (!ActiveStudy) return; - - GEOM_Displayer(ActiveStudy).UpdateViewer(); + SUIT_Application* app = SUIT_Session::session()->activeApplication(); + if (!app) return; + SalomeApp_Study* ActiveStudy = dynamic_cast(app->activeStudy()); + if (!ActiveStudy) return; + + GEOM_Displayer(ActiveStudy).UpdateViewer(); } }; @@ -380,15 +380,15 @@ void GEOM_Swig::setDisplayMode(const char* theEntry, int theMode, bool isUpdated new SALOME_InteractiveObject(myEntry.c_str(), "GEOM", ""); if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(anApp)) { - SVTK_View* aView = aViewWindow->getView(); - aView->SetDisplayMode(anIO, myMode); - if (myUpdateViewer) - aView->Repaint(); + SVTK_View* aView = aViewWindow->getView(); + aView->SetDisplayMode(anIO, myMode); + if (myUpdateViewer) + aView->Repaint(); } else if (OCCViewer_Viewer* occViewer = GetOCCViewer(anApp)) { - SOCC_Viewer* soccViewer = dynamic_cast(occViewer); - if (soccViewer) - soccViewer->switchRepresentation(anIO, myMode, myUpdateViewer); + SOCC_Viewer* soccViewer = dynamic_cast(occViewer); + if (soccViewer) + soccViewer->switchRepresentation(anIO, myMode, myUpdateViewer); } } }; @@ -414,33 +414,33 @@ void GEOM_Swig::setVectorsMode(const char* theEntry, bool isOn, bool isUpdated) new SALOME_InteractiveObject(myEntry.c_str(), "GEOM", ""); if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(anApp)) { - SVTK_View* aView = aViewWindow->getView(); - SVTK_Viewer* stvkViewer = dynamic_cast(aViewWindow->getViewManager()->getViewModel()); - SVTK_Prs* vtkPrs = dynamic_cast( stvkViewer->CreatePrs( myEntry.c_str() ) ); - vtkActorCollection* anActors = vtkPrs->GetObjects(); - anActors->InitTraversal(); - while (vtkActor* anAct = anActors->GetNextActor()) { - GEOM_Actor* aGeomActor = GEOM_Actor::SafeDownCast(anAct); - aGeomActor->SetVectorMode(!aGeomActor->GetVectorMode()); - } - if (myUpdateViewer) - aView->Repaint(); + SVTK_View* aView = aViewWindow->getView(); + SVTK_Viewer* stvkViewer = dynamic_cast(aViewWindow->getViewManager()->getViewModel()); + SVTK_Prs* vtkPrs = dynamic_cast( stvkViewer->CreatePrs( myEntry.c_str() ) ); + vtkActorCollection* anActors = vtkPrs->GetObjects(); + anActors->InitTraversal(); + while (vtkActor* anAct = anActors->GetNextActor()) { + GEOM_Actor* aGeomActor = GEOM_Actor::SafeDownCast(anAct); + aGeomActor->SetVectorMode(!aGeomActor->GetVectorMode()); + } + if (myUpdateViewer) + aView->Repaint(); } else if (OCCViewer_Viewer* occViewer = GetOCCViewer(anApp)) { - Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); - SOCC_Viewer* soccViewer = dynamic_cast(occViewer); - if (soccViewer) { - SOCC_Prs* occPrs = dynamic_cast( soccViewer->CreatePrs( myEntry.c_str() ) ); - if ( occPrs && !occPrs->IsNull() ) { - AIS_ListOfInteractive shapes; occPrs->GetObjects( shapes ); - AIS_ListIteratorOfListOfInteractive interIter( shapes ); - for ( ; interIter.More(); interIter.Next() ) { - Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( interIter.Value() ); - aSh->SetDisplayVectors(myOn); - ic->RecomputePrsOnly(interIter.Value()); - } - } - } + Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); + SOCC_Viewer* soccViewer = dynamic_cast(occViewer); + if (soccViewer) { + SOCC_Prs* occPrs = dynamic_cast( soccViewer->CreatePrs( myEntry.c_str() ) ); + if ( occPrs && !occPrs->IsNull() ) { + AIS_ListOfInteractive shapes; occPrs->GetObjects( shapes ); + AIS_ListIteratorOfListOfInteractive interIter( shapes ); + for ( ; interIter.More(); interIter.Next() ) { + Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( interIter.Value() ); + aSh->SetDisplayVectors(myOn); + ic->RecomputePrsOnly(interIter.Value()); + } + } + } } } }; @@ -468,31 +468,31 @@ void GEOM_Swig::setColor(const char* theEntry, int red, int green, int blue, boo new SALOME_InteractiveObject(myEntry.c_str(), "GEOM", ""); if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(anApp)){ - SVTK_View* aView = aViewWindow->getView(); + SVTK_View* aView = aViewWindow->getView(); QColor aColor (myRed, myGreen, myBlue); aView->SetColor(anIO, aColor); - if (myUpdateViewer) - aView->Repaint(); + if (myUpdateViewer) + aView->Repaint(); } else if (OCCViewer_Viewer* occViewer = GetOCCViewer(anApp)) { - Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); - AIS_ListOfInteractive List; - ic->DisplayedObjects(List); - AIS_ListIteratorOfListOfInteractive ite (List); - for (; ite.More(); ite.Next()) { - Handle(SALOME_InteractiveObject) anObj = - Handle(SALOME_InteractiveObject)::DownCast(ite.Value()->GetOwner()); - if (!anObj.IsNull() && anObj->hasEntry() && anObj->isSame(anIO)) { - Quantity_Color CSFColor = + Handle(AIS_InteractiveContext) ic = occViewer->getAISContext(); + AIS_ListOfInteractive List; + ic->DisplayedObjects(List); + AIS_ListIteratorOfListOfInteractive ite (List); + for (; ite.More(); ite.Next()) { + Handle(SALOME_InteractiveObject) anObj = + Handle(SALOME_InteractiveObject)::DownCast(ite.Value()->GetOwner()); + if (!anObj.IsNull() && anObj->hasEntry() && anObj->isSame(anIO)) { + Quantity_Color CSFColor = Quantity_Color(myRed/255., myGreen/255., myBlue/255., Quantity_TOC_RGB); - ite.Value()->SetColor(CSFColor); - if (ite.Value()->IsKind(STANDARD_TYPE(GEOM_AISShape))) - Handle(GEOM_AISShape)::DownCast(ite.Value())->SetShadingColor(CSFColor); - ic->Redisplay(ite.Value(), true, true); - if (myUpdateViewer) - occViewer->update(); - break; - } - } + ite.Value()->SetColor(CSFColor); + if (ite.Value()->IsKind(STANDARD_TYPE(GEOM_AISShape))) + Handle(GEOM_AISShape)::DownCast(ite.Value())->SetShadingColor(CSFColor); + ic->Redisplay(ite.Value(), true, true); + if (myUpdateViewer) + occViewer->update(); + break; + } + } } } }; @@ -517,14 +517,14 @@ void GEOM_Swig::setTransparency(const char* theEntry, float transp, bool isUpdat new SALOME_InteractiveObject(myEntry.c_str(), "GEOM", ""); if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(anApp)) { - SVTK_View* aView = aViewWindow->getView(); - aView->SetTransparency(anIO, myParam); - if (myUpdateViewer) - aView->Repaint(); + SVTK_View* aView = aViewWindow->getView(); + aView->SetTransparency(anIO, myParam); + if (myUpdateViewer) + aView->Repaint(); } else if (OCCViewer_Viewer* occViewer = GetOCCViewer(anApp)) { - SOCC_Viewer* soccViewer = dynamic_cast(occViewer); - if (soccViewer) - soccViewer->setTransparency(anIO, myParam, myUpdateViewer); + SOCC_Viewer* soccViewer = dynamic_cast(occViewer); + if (soccViewer) + soccViewer->setTransparency(anIO, myParam, myUpdateViewer); } } }; @@ -570,44 +570,44 @@ void GEOM_Swig::eraseGO (const char* Entry, bool allWindows) GEOM_Displayer(ActiveStudy).Erase(aIO, true); /* if (myFromAllWindows) { - QPtrList aWindows = app->desktop()->windows(); - SUIT_ViewWindow* aWin = 0; - for (aWin = aWindows.first(); aWin; aWin = aWindows.next()) { - EraseObject(aWin, aIO); - } + QPtrList aWindows = app->desktop()->windows(); + SUIT_ViewWindow* aWin = 0; + for (aWin = aWindows.first(); aWin; aWin = aWindows.next()) { + EraseObject(aWin, aIO); + } } else { - SUIT_ViewWindow* aWin = app->desktop()->activeWindow(); - if (aWin) - EraseObject(aWin, aIO); - }*/ + SUIT_ViewWindow* aWin = app->desktop()->activeWindow(); + if (aWin) + EraseObject(aWin, aIO); + }*/ } /* private: void EraseObject(SUIT_ViewWindow* theWin, Handle (SALOME_InteractiveObject) theIO) { if (theWin->getViewManager()->getType() == OCCViewer_Viewer::Type()){ - OCCViewer_ViewWindow* vw = dynamic_cast( theWin ); - if ( vw ) { - OCCViewer_ViewManager* vm = dynamic_cast( vw->getViewManager() ); - if ( vm ) { - SOCC_Viewer* aViewer = dynamic_cast(vm->getOCCViewer()); - if (aViewer) { - SALOME_Prs* aPrs = aViewer->CreatePrs(myEntry.c_str()); - if (aPrs) { - SALOME_OCCPrs* aOccPrs = dynamic_cast(aPrs); - if (aOccPrs) { - aViewer->Erase(aOccPrs); - aViewer->Repaint(); - } - } - } - } - } + OCCViewer_ViewWindow* vw = dynamic_cast( theWin ); + if ( vw ) { + OCCViewer_ViewManager* vm = dynamic_cast( vw->getViewManager() ); + if ( vm ) { + SOCC_Viewer* aViewer = dynamic_cast(vm->getOCCViewer()); + if (aViewer) { + SALOME_Prs* aPrs = aViewer->CreatePrs(myEntry.c_str()); + if (aPrs) { + SALOME_OCCPrs* aOccPrs = dynamic_cast(aPrs); + if (aOccPrs) { + aViewer->Erase(aOccPrs); + aViewer->Repaint(); + } + } + } + } + } } else if (theWin->getViewManager()->getType() == SVTK_Viewer::Type()){ - SVTK_ViewWindow* aViewWindow = dynamic_cast( theWin ); - if (aViewWindow) { - aViewWindow->Erase(theIO); - } + SVTK_ViewWindow* aViewWindow = dynamic_cast( theWin ); + if (aViewWindow) { + aViewWindow->Erase(theIO); + } } }*/ @@ -634,44 +634,44 @@ void GEOM_Swig::setDeflection(const char* theEntry, float theDeflect) new SALOME_InteractiveObject(myEntry.c_str(), "GEOM", ""); if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(anApp)) { - vtkActorCollection* aActors = aViewWindow->getRenderer()->GetActors(); - aActors->InitTraversal(); - while (vtkActor* aAct = aActors->GetNextActor()) { - if (GEOM_Actor* aGeomActor = dynamic_cast(aAct)) { - if (aGeomActor->hasIO()) { - Handle(SALOME_InteractiveObject) aNextIO = aGeomActor->getIO(); - if (aNextIO->isSame(anIO)) { - aGeomActor->setDeflection(myParam); - aViewWindow->Repaint(); - return; - } - } - } - } - // aView->SetTransparency(anIO, myParam); - //aView->Repaint(); + vtkActorCollection* aActors = aViewWindow->getRenderer()->GetActors(); + aActors->InitTraversal(); + while (vtkActor* aAct = aActors->GetNextActor()) { + if (GEOM_Actor* aGeomActor = dynamic_cast(aAct)) { + if (aGeomActor->hasIO()) { + Handle(SALOME_InteractiveObject) aNextIO = aGeomActor->getIO(); + if (aNextIO->isSame(anIO)) { + aGeomActor->setDeflection(myParam); + aViewWindow->Repaint(); + return; + } + } + } + } + // aView->SetTransparency(anIO, myParam); + //aView->Repaint(); } else if (OCCViewer_Viewer* occViewer = GetOCCViewer(anApp)) { - Handle(AIS_InteractiveContext) aContext = occViewer->getAISContext(); - AIS_ListOfInteractive aAISList; - aContext->DisplayedObjects(aAISList); - AIS_ListIteratorOfListOfInteractive it(aAISList); - for (; it.More(); it.Next()) { - Handle(SALOME_InteractiveObject) aObj = - Handle(SALOME_InteractiveObject)::DownCast(it.Value()->GetOwner()); - if ((!aObj.IsNull()) && aObj->hasEntry() && aObj->isSame(anIO)) { - Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(it.Value()); - if (!aShape.IsNull()) { - TopoDS_Shape aSh = aShape->Shape(); - if (!aSh.IsNull()) - BRepTools::Clean(aSh); - - aShape->SetOwnDeviationCoefficient( myParam ); - aShape->SetOwnHLRDeviationAngle( 1.57 ); - aContext->Redisplay(aShape); - return; - } - } - } + Handle(AIS_InteractiveContext) aContext = occViewer->getAISContext(); + AIS_ListOfInteractive aAISList; + aContext->DisplayedObjects(aAISList); + AIS_ListIteratorOfListOfInteractive it(aAISList); + for (; it.More(); it.Next()) { + Handle(SALOME_InteractiveObject) aObj = + Handle(SALOME_InteractiveObject)::DownCast(it.Value()->GetOwner()); + if ((!aObj.IsNull()) && aObj->hasEntry() && aObj->isSame(anIO)) { + Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(it.Value()); + if (!aShape.IsNull()) { + TopoDS_Shape aSh = aShape->Shape(); + if (!aSh.IsNull()) + BRepTools::Clean(aSh); + + aShape->SetOwnDeviationCoefficient( myParam ); + aShape->SetOwnHLRDeviationAngle( 1.57 ); + aContext->Redisplay(aShape); + return; + } + } + } } } }; diff --git a/src/GEOMImpl/GEOMImpl_3DSketcherDriver.cxx b/src/GEOMImpl/GEOMImpl_3DSketcherDriver.cxx index ccf53fdfb..8108995ce 100755 --- a/src/GEOMImpl/GEOMImpl_3DSketcherDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_3DSketcherDriver.cxx @@ -119,10 +119,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_3DSketcherDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_3DSketcherDriver", - sizeof(GEOMImpl_3DSketcherDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_3DSketcherDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_ArcDriver.cxx b/src/GEOMImpl/GEOMImpl_ArcDriver.cxx index ad099022f..2af822f42 100644 --- a/src/GEOMImpl/GEOMImpl_ArcDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ArcDriver.cxx @@ -129,24 +129,24 @@ Standard_Integer GEOMImpl_ArcDriver::Execute(TFunction_Logbook& log) const GC_MakeArcOfCircle arc (aGeomCirc->Circ(), aP2, aP3, Standard_True); aShape = BRepBuilderAPI_MakeEdge(arc).Edge(); } else if ( aType == ELLIPSE_ARC_CENTER_TWO_PNT ) { // ELLIPSE_ARC_CENTER_TWO_PNT - if ( aP1.Distance(aP2) <= aP1.Distance(aP3) ) { - // Standard_ConstructionError::Raise("Arc creation aborted: the distance from Center Point to Point 1 needs to be bigger than the distance from Center Point to Point 2"); - cout << "aP1.Distance(aP2) <= aP1.Distance(aP3)" << endl; - gp_Pnt aTmpP = aP2; - aP2 = aP3; - aP3 = aTmpP; - } + if ( aP1.Distance(aP2) <= aP1.Distance(aP3) ) { + // Standard_ConstructionError::Raise("Arc creation aborted: the distance from Center Point to Point 1 needs to be bigger than the distance from Center Point to Point 2"); + cout << "aP1.Distance(aP2) <= aP1.Distance(aP3)" << endl; + gp_Pnt aTmpP = aP2; + aP2 = aP3; + aP3 = aTmpP; + } - GC_MakeEllipse ellipse (aP2, aP3, aP1); - Handle(Geom_Ellipse) aGeomEllipse = ellipse.Value(); + GC_MakeEllipse ellipse (aP2, aP3, aP1); + Handle(Geom_Ellipse) aGeomEllipse = ellipse.Value(); gp_Vec aV1 (aP1, aP2); gp_Vec aV2 (aP1, aP3); - double alpha = fabs(aV1.Angle(aV2)); - - GC_MakeArcOfEllipse arc (aGeomEllipse->Elips(), aP2, aP3, Standard_True); - aShape = BRepBuilderAPI_MakeEdge(arc).Edge(); + double alpha = fabs(aV1.Angle(aV2)); + + GC_MakeArcOfEllipse arc (aGeomEllipse->Elips(), aP2, aP3, Standard_True); + aShape = BRepBuilderAPI_MakeEdge(arc).Edge(); } } } @@ -179,10 +179,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_ArcDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ArcDriver", - sizeof(GEOMImpl_ArcDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_ArcDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx b/src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx index 9997cf2a7..1c91fb7d4 100644 --- a/src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx @@ -159,10 +159,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_ArchimedeDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ArchimedeDriver", - sizeof(GEOMImpl_ArchimedeDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_ArchimedeDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx index ae4fa899c..8b6cfe659 100644 --- a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx @@ -470,10 +470,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_BooleanDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_BooleanDriver", - sizeof(GEOMImpl_BooleanDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_BooleanDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_BoxDriver.cxx b/src/GEOMImpl/GEOMImpl_BoxDriver.cxx index 48be1001d..3995fac7c 100644 --- a/src/GEOMImpl/GEOMImpl_BoxDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_BoxDriver.cxx @@ -89,8 +89,8 @@ Standard_Integer GEOMImpl_BoxDriver::Execute(TFunction_Logbook& log) const gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(aShape2)); if (P1.X() == P2.X() || P1.Y() == P2.Y() || P1.Z() == P2.Z()) { - StdFail_NotDone::Raise("Box can not be created, the points belong to the same plane"); - return 0; + StdFail_NotDone::Raise("Box can not be created, the points belong to the same plane"); + return 0; } BRepPrimAPI_MakeBox MB (P1,P2); @@ -132,10 +132,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_BoxDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_BoxDriver", - sizeof(GEOMImpl_BoxDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_BoxDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_CircleDriver.cxx b/src/GEOMImpl/GEOMImpl_CircleDriver.cxx index 662345381..83d845d70 100644 --- a/src/GEOMImpl/GEOMImpl_CircleDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_CircleDriver.cxx @@ -218,10 +218,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_CircleDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CircleDriver", - sizeof(GEOMImpl_CircleDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_CircleDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_ConeDriver.cxx b/src/GEOMImpl/GEOMImpl_ConeDriver.cxx index a84948554..78ee6d8c6 100644 --- a/src/GEOMImpl/GEOMImpl_ConeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ConeDriver.cxx @@ -160,10 +160,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_ConeDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ConeDriver", - sizeof(GEOMImpl_ConeDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_ConeDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_CopyDriver.cxx b/src/GEOMImpl/GEOMImpl_CopyDriver.cxx index 008d28289..648dc92ce 100644 --- a/src/GEOMImpl/GEOMImpl_CopyDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_CopyDriver.cxx @@ -109,10 +109,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_CopyDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CopyDriver", - sizeof(GEOMImpl_CopyDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_CopyDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_CylinderDriver.cxx b/src/GEOMImpl/GEOMImpl_CylinderDriver.cxx index 3cf373e4e..79987ac91 100644 --- a/src/GEOMImpl/GEOMImpl_CylinderDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_CylinderDriver.cxx @@ -143,10 +143,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_CylinderDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CylinderDriver", - sizeof(GEOMImpl_CylinderDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_CylinderDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_DiskDriver.cxx b/src/GEOMImpl/GEOMImpl_DiskDriver.cxx index 5804a77ac..91fe53f58 100755 --- a/src/GEOMImpl/GEOMImpl_DiskDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_DiskDriver.cxx @@ -95,11 +95,11 @@ Standard_Integer GEOMImpl_DiskDriver::Execute(TFunction_Logbook& log) const gp_Vec aV (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); gp_Ax2 anAxes (aP, -aV); gp_Circ aCirc (anAxes, aCI.GetRadius()); - TopoDS_Shape aCircle = BRepBuilderAPI_MakeEdge(aCirc).Edge(); - BRepBuilderAPI_MakeWire MW; - MW.Add(TopoDS::Edge(aCircle)); - BRepBuilderAPI_MakeFace MF (MW, Standard_False); - aShape = MF.Shape(); + TopoDS_Shape aCircle = BRepBuilderAPI_MakeEdge(aCirc).Edge(); + BRepBuilderAPI_MakeWire MW; + MW.Add(TopoDS::Edge(aCircle)); + BRepBuilderAPI_MakeFace MF (MW, Standard_False); + aShape = MF.Shape(); } } } @@ -179,10 +179,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_DiskDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_DiskDriver", - sizeof(GEOMImpl_DiskDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_DiskDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_EllipseDriver.cxx b/src/GEOMImpl/GEOMImpl_EllipseDriver.cxx index 4d5ec58d1..541ba1882 100644 --- a/src/GEOMImpl/GEOMImpl_EllipseDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_EllipseDriver.cxx @@ -119,17 +119,17 @@ Standard_Integer GEOMImpl_EllipseDriver::Execute(TFunction_Logbook& log) const TopoDS_Vertex V1, V2; TopExp::Vertices(anE, V1, V2, Standard_True); if (!V1.IsNull() && !V2.IsNull()) { - gp_Vec aVM (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + gp_Vec aVM (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); if (aVM.Magnitude() < gp::Resolution()) { Standard_ConstructionError::Raise ("Ellipse creation aborted: major axis vector of zero length is given"); } - if (aV.IsParallel(aVM, Precision::Angular())) { - Standard_ConstructionError::Raise - ("Ellipse creation aborted: normal and major axis vectors are parallel"); - } - // Axes defined with main axis vector - anAxes = gp_Ax2 (aP, aV, aVM); + if (aV.IsParallel(aVM, Precision::Angular())) { + Standard_ConstructionError::Raise + ("Ellipse creation aborted: normal and major axis vectors are parallel"); + } + // Axes defined with main axis vector + anAxes = gp_Ax2 (aP, aV, aVM); } } @@ -167,10 +167,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_EllipseDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_EllipseDriver", - sizeof(GEOMImpl_EllipseDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_EllipseDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_ExportDriver.cxx b/src/GEOMImpl/GEOMImpl_ExportDriver.cxx index 44efd6e1e..afe14f0da 100644 --- a/src/GEOMImpl/GEOMImpl_ExportDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ExportDriver.cxx @@ -143,10 +143,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_ExportDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ExportDriver", - sizeof(GEOMImpl_ExportDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_ExportDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_FaceDriver.cxx b/src/GEOMImpl/GEOMImpl_FaceDriver.cxx index 197b52ee0..164058a27 100755 --- a/src/GEOMImpl/GEOMImpl_FaceDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_FaceDriver.cxx @@ -143,10 +143,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_FaceDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FaceDriver", - sizeof(GEOMImpl_FaceDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_FaceDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_Fillet1dDriver.cxx b/src/GEOMImpl/GEOMImpl_Fillet1dDriver.cxx index b2e0badae..a8cc55c02 100644 --- a/src/GEOMImpl/GEOMImpl_Fillet1dDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_Fillet1dDriver.cxx @@ -169,7 +169,7 @@ Standard_Integer GEOMImpl_Fillet1dDriver::Execute(TFunction_Logbook& log) const for (int ind = 1; ind <= aLen; ind++) { TopoDS_Shape aShapeVertex; if (GEOMImpl_ILocalOperations::GetSubShape - (aWire, aCI.GetVertex(ind), aShapeVertex)) + (aWire, aCI.GetVertex(ind), aShapeVertex)) aVertexList.Append( aShapeVertex ); } } @@ -285,10 +285,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_Fillet1dDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_Fillet1dDriver", - sizeof(GEOMImpl_Fillet1dDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_Fillet1dDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_Fillet2dDriver.cxx b/src/GEOMImpl/GEOMImpl_Fillet2dDriver.cxx index f7f2050ae..97d1a40e8 100755 --- a/src/GEOMImpl/GEOMImpl_Fillet2dDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_Fillet2dDriver.cxx @@ -89,7 +89,7 @@ Standard_Integer GEOMImpl_Fillet2dDriver::Execute(TFunction_Logbook& log) const for (; ind <= aLen; ind++) { TopoDS_Shape aShapeVertex; if (GEOMImpl_ILocalOperations::GetSubShape - (aFaceShape, aCI.GetVertex(ind), aShapeVertex)) { + (aFaceShape, aCI.GetVertex(ind), aShapeVertex)) { fillet2d.AddFillet(TopoDS::Vertex(aShapeVertex), rad); } } @@ -126,10 +126,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_Fillet2dDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_Fillet2dDriver", - sizeof(GEOMImpl_Fillet2dDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_Fillet2dDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_FilletDriver.cxx b/src/GEOMImpl/GEOMImpl_FilletDriver.cxx index af8f67064..e54c401e2 100644 --- a/src/GEOMImpl/GEOMImpl_FilletDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_FilletDriver.cxx @@ -94,7 +94,7 @@ Standard_Integer GEOMImpl_FilletDriver::Execute(TFunction_Logbook& log) const TopoDS_Shape aShapeEdge; if (GEOMImpl_ILocalOperations::GetSubShape (aShapeBase, aCI.GetEdge(ind), aShapeEdge)) { - fill.Add(TopoDS::Edge(aShapeEdge)); + fill.Add(TopoDS::Edge(aShapeEdge)); } } } else if (aType == FILLET_SHAPE_FACES || aType == FILLET_SHAPE_FACES_2R) { @@ -117,9 +117,9 @@ Standard_Integer GEOMImpl_FilletDriver::Execute(TFunction_Logbook& log) const fill.SetRadius(aCI.GetR(), i, 1); else if (aType == FILLET_SHAPE_FACES_2R || aType == FILLET_SHAPE_EDGES_2R) for (int i = 1; i <= fill.NbContours(); i++) - { - fill.SetRadius(aCI.GetR1(), aCI.GetR2(), i, 1); - } + { + fill.SetRadius(aCI.GetR1(), aCI.GetR2(), i, 1); + } fill.Build(); if (!fill.IsDone()) { @@ -169,10 +169,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_FilletDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FilletDriver", - sizeof(GEOMImpl_FilletDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_FilletDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_FillingDriver.cxx b/src/GEOMImpl/GEOMImpl_FillingDriver.cxx index 5be038b34..31927147b 100644 --- a/src/GEOMImpl/GEOMImpl_FillingDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_FillingDriver.cxx @@ -239,10 +239,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_FillingDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FillingDriver", - sizeof(GEOMImpl_FillingDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_FillingDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx index cd6235466..ceb2f5c02 100644 --- a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx @@ -265,9 +265,9 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueFaces (const TopoDS_Shape& theShape, //purpose : //======================================================================= TopoDS_Shape GEOMImpl_GlueDriver::GlueFacesByList (const TopoDS_Shape& theShape, - const Standard_Real theTolerance, + const Standard_Real theTolerance, const Standard_Boolean doKeepNonSolids, - const TopTools_MapOfShape& aFaces) + const TopTools_MapOfShape& aFaces) { TopoDS_Shape aRes; @@ -346,15 +346,15 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const for( ; i <= SF->Length(); i++) { Handle(Standard_Transient) anItem = SF->Value(i); if(anItem.IsNull()) - continue; + continue; Handle(GEOM_Function) aRefSh = Handle(GEOM_Function)::DownCast(anItem); if(aRefSh.IsNull()) - continue; + continue; TopoDS_Shape aFace = aRefSh->GetValue(); if(aFace.IsNull()) - continue; + continue; if(!aFaces.Contains(aFace)) - aFaces.Add(aFace); + aFaces.Add(aFace); } aShape = GlueFacesByList(aShapeBase, tol3d, aKeepNonSolids, aFaces); } @@ -389,10 +389,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_GlueDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_GlueDriver", - sizeof(GEOMImpl_GlueDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_GlueDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_GlueDriver.hxx b/src/GEOMImpl/GEOMImpl_GlueDriver.hxx index 1121c2f6d..30bc238e4 100644 --- a/src/GEOMImpl/GEOMImpl_GlueDriver.hxx +++ b/src/GEOMImpl/GEOMImpl_GlueDriver.hxx @@ -161,9 +161,9 @@ Standard_EXPORT TopoDS_Shape GlueFacesWithWarnings (const TopoDS_Shape& theShape TCollection_AsciiString& theWarning) const; Standard_EXPORT static TopoDS_Shape GlueFacesByList (const TopoDS_Shape& theShape, - const Standard_Real theTolerance, + const Standard_Real theTolerance, const Standard_Boolean doKeepNonSolids, - const TopTools_MapOfShape& aFaces); + const TopTools_MapOfShape& aFaces); // Type management diff --git a/src/GEOMImpl/GEOMImpl_HealingDriver.cxx b/src/GEOMImpl/GEOMImpl_HealingDriver.cxx index 9516c6137..e0c272651 100644 --- a/src/GEOMImpl/GEOMImpl_HealingDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_HealingDriver.cxx @@ -422,10 +422,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_HealingDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_HealingDriver", - sizeof(GEOMImpl_HealingDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_HealingDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx index 8b6857797..c0a8d0fb8 100644 --- a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx @@ -255,7 +255,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFaceHW (double theH, double */ //============================================================================= Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFaceObjHW (Handle(GEOM_Object) theObj, - double theH, double theW) + double theH, double theW) { SetErrorCode(KO); @@ -370,8 +370,8 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskPntVecR */ //============================================================================= Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskThreePnt (Handle(GEOM_Object) thePnt1, - Handle(GEOM_Object) thePnt2, - Handle(GEOM_Object) thePnt3) + Handle(GEOM_Object) thePnt2, + Handle(GEOM_Object) thePnt3) { SetErrorCode(KO); @@ -979,8 +979,8 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH (Handle(GEOM_Objec */ //============================================================================= Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH2Ways (Handle(GEOM_Object) theBase, - Handle(GEOM_Object) theVec, - double theH) + Handle(GEOM_Object) theVec, + double theH) { SetErrorCode(KO); @@ -1521,10 +1521,10 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling */ //============================================================================= Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThruSections( - const Handle(TColStd_HSequenceOfTransient)& theSeqSections, - bool theModeSolid, - double thePreci, - bool theRuled) + const Handle(TColStd_HSequenceOfTransient)& theSeqSections, + bool theModeSolid, + double thePreci, + bool theRuled) { Handle(GEOM_Object) anObj; SetErrorCode(KO); @@ -1606,7 +1606,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThruSections( if(!aSectObj.IsNull()) { pyDump<< aSectObj; if(i < nbObj) - pyDump<<", "; + pyDump<<", "; } } @@ -1625,11 +1625,11 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThruSections( */ //============================================================================= Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithDifferentSections( - const Handle(TColStd_HSequenceOfTransient)& theBases, - const Handle(TColStd_HSequenceOfTransient)& theLocations, - const Handle(GEOM_Object)& thePath, - bool theWithContact, - bool theWithCorrections) + const Handle(TColStd_HSequenceOfTransient)& theBases, + const Handle(TColStd_HSequenceOfTransient)& theLocations, + const Handle(GEOM_Object)& thePath, + bool theWithContact, + bool theWithCorrections) { Handle(GEOM_Object) anObj; SetErrorCode(KO); @@ -1680,14 +1680,14 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithDifferentSections( { Handle(Standard_Transient) anItemLoc = theLocations->Value(i); if(anItemLoc.IsNull()) - continue; + continue; Handle(GEOM_Object) aLoc = Handle(GEOM_Object)::DownCast(anItemLoc); if(aLoc.IsNull()) - continue; + continue; Handle(GEOM_Function) aRefLoc = aLoc->GetLastFunction(); if(aRefLoc.IsNull()) - continue; + continue; aSeqLocs->Append(aRefLoc); } aSeqBases->Append(aRefBase); @@ -1732,7 +1732,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithDifferentSections( if(!anObj.IsNull()) { pyDump<< anObj; if(i < nbBases) - pyDump<<", "; + pyDump<<", "; } } @@ -1749,7 +1749,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithDifferentSections( if(!anObj.IsNull()) { pyDump<< anObj; if(i < nbLocs) - pyDump<<", "; + pyDump<<", "; } } @@ -1768,12 +1768,12 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithDifferentSections( */ //============================================================================= Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithShellSections( - const Handle(TColStd_HSequenceOfTransient)& theBases, - const Handle(TColStd_HSequenceOfTransient)& theSubBases, - const Handle(TColStd_HSequenceOfTransient)& theLocations, - const Handle(GEOM_Object)& thePath, - bool theWithContact, - bool theWithCorrections) + const Handle(TColStd_HSequenceOfTransient)& theBases, + const Handle(TColStd_HSequenceOfTransient)& theSubBases, + const Handle(TColStd_HSequenceOfTransient)& theLocations, + const Handle(GEOM_Object)& thePath, + bool theWithContact, + bool theWithCorrections) { Handle(GEOM_Object) anObj; SetErrorCode(KO); @@ -1828,26 +1828,26 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithShellSections( if( nbSubBases >= nbBases ) { Handle(Standard_Transient) aSubItem = theSubBases->Value(i); if(aSubItem.IsNull()) - continue; + continue; Handle(GEOM_Object) aSubBase = Handle(GEOM_Object)::DownCast(aSubItem); if(aSubBase.IsNull()) - continue; + continue; Handle(GEOM_Function) aRefSubBase = aSubBase->GetLastFunction(); if(aRefSubBase.IsNull()) - continue; + continue; aSeqSubBases->Append(aRefSubBase); } if(nbLocs) { Handle(Standard_Transient) anItemLoc = theLocations->Value(i); if(anItemLoc.IsNull()) - continue; + continue; Handle(GEOM_Object) aLoc = Handle(GEOM_Object)::DownCast(anItemLoc); if(aLoc.IsNull()) - continue; + continue; Handle(GEOM_Function) aRefLoc = aLoc->GetLastFunction(); if(aRefLoc.IsNull()) - continue; + continue; aSeqLocs->Append(aRefLoc); } @@ -1894,7 +1894,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithShellSections( if(!anObj.IsNull()) { pyDump<< anObj; if(i < nbBases) - pyDump<<", "; + pyDump<<", "; } } @@ -1911,7 +1911,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithShellSections( if(!anObj.IsNull()) { pyDump<< anObj; if(i < nbBases) - pyDump<<", "; + pyDump<<", "; } } @@ -1928,7 +1928,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithShellSections( if(!anObj.IsNull()) { pyDump<< anObj; if(i < nbLocs) - pyDump<<", "; + pyDump<<", "; } } @@ -1946,8 +1946,8 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeWithShellSections( */ //============================================================================= Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeShellsWithoutPath( - const Handle(TColStd_HSequenceOfTransient)& theBases, - const Handle(TColStd_HSequenceOfTransient)& theLocations) + const Handle(TColStd_HSequenceOfTransient)& theBases, + const Handle(TColStd_HSequenceOfTransient)& theLocations) { Handle(GEOM_Object) anObj; SetErrorCode(KO); @@ -1994,13 +1994,13 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeShellsWithoutPath( if(nbLocs) { Handle(Standard_Transient) anItemLoc = theLocations->Value(i); if(anItemLoc.IsNull()) - continue; + continue; Handle(GEOM_Object) aLoc = Handle(GEOM_Object)::DownCast(anItemLoc); if(aLoc.IsNull()) - continue; + continue; Handle(GEOM_Function) aRefLoc = aLoc->GetLastFunction(); if(aRefLoc.IsNull()) - continue; + continue; aSeqLocs->Append(aRefLoc); } @@ -2043,7 +2043,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeShellsWithoutPath( if(!anObj.IsNull()) { pyDump<< anObj; if(i < nbBases) - pyDump<<", "; + pyDump<<", "; } } @@ -2060,7 +2060,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeShellsWithoutPath( if(!anObj.IsNull()) { pyDump<< anObj; if(i < nbLocs) - pyDump<<", "; + pyDump<<", "; } } @@ -2078,8 +2078,8 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeShellsWithoutPath( */ //============================================================================= Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipeBiNormalAlongVector (Handle(GEOM_Object) theBase, - Handle(GEOM_Object) thePath, - Handle(GEOM_Object) theVec) + Handle(GEOM_Object) thePath, + Handle(GEOM_Object) theVec) { SetErrorCode(KO); diff --git a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx index 151ea1218..7214d4807 100644 --- a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx @@ -36,16 +36,16 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations { Standard_EXPORT Handle(GEOM_Object) MakeBoxDXDYDZ (double theDX, double theDY, double theDZ); Standard_EXPORT Handle(GEOM_Object) MakeBoxTwoPnt (Handle(GEOM_Object) thePnt1, - Handle(GEOM_Object) thePnt2); + Handle(GEOM_Object) thePnt2); Standard_EXPORT Handle(GEOM_Object) MakeFaceHW (double theH, double theW, int theOrientation); Standard_EXPORT Handle(GEOM_Object) MakeFaceObjHW (Handle(GEOM_Object) theObj, - double theH, double theW); + double theH, double theW); Standard_EXPORT Handle(GEOM_Object) MakeDiskThreePnt (Handle(GEOM_Object) thePnt1, - Handle(GEOM_Object) thePnt2, - Handle(GEOM_Object) thePnt3); + Handle(GEOM_Object) thePnt2, + Handle(GEOM_Object) thePnt3); Standard_EXPORT Handle(GEOM_Object) MakeDiskPntVecR (Handle(GEOM_Object) thePnt1, - Handle(GEOM_Object) theVec, - double theR); + Handle(GEOM_Object) theVec, + double theR); Standard_EXPORT Handle(GEOM_Object) MakeDiskR (double theR, int theOrientation); Standard_EXPORT Handle(GEOM_Object) MakeCylinderRH (double theR, double theH); Standard_EXPORT Handle(GEOM_Object) MakeCylinderPntVecRH (Handle(GEOM_Object) thePnt, @@ -94,8 +94,8 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations { double theAngle); Standard_EXPORT Handle(GEOM_Object) MakeRevolutionAxisAngle2Ways (Handle(GEOM_Object) theBase, - Handle(GEOM_Object) theAxis, - double theAngle); + Handle(GEOM_Object) theAxis, + double theAngle); Standard_EXPORT Handle(GEOM_Object) MakeFilling (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg, @@ -109,27 +109,27 @@ class GEOMImpl_I3DPrimOperations : public GEOM_IOperations { bool theRuled); Standard_EXPORT Handle(GEOM_Object) MakePipeWithDifferentSections( - const Handle(TColStd_HSequenceOfTransient)& theBases, - const Handle(TColStd_HSequenceOfTransient)& theLocations, - const Handle(GEOM_Object)& thePath, - bool theWithContact, - bool theWithCorrections); + const Handle(TColStd_HSequenceOfTransient)& theBases, + const Handle(TColStd_HSequenceOfTransient)& theLocations, + const Handle(GEOM_Object)& thePath, + bool theWithContact, + bool theWithCorrections); Standard_EXPORT Handle(GEOM_Object) MakePipeWithShellSections( - const Handle(TColStd_HSequenceOfTransient)& theBases, - const Handle(TColStd_HSequenceOfTransient)& theSubBases, - const Handle(TColStd_HSequenceOfTransient)& theLocations, - const Handle(GEOM_Object)& thePath, - bool theWithContact, - bool theWithCorrections); + const Handle(TColStd_HSequenceOfTransient)& theBases, + const Handle(TColStd_HSequenceOfTransient)& theSubBases, + const Handle(TColStd_HSequenceOfTransient)& theLocations, + const Handle(GEOM_Object)& thePath, + bool theWithContact, + bool theWithCorrections); Standard_EXPORT Handle(GEOM_Object) MakePipeShellsWithoutPath( - const Handle(TColStd_HSequenceOfTransient)& theBases, - const Handle(TColStd_HSequenceOfTransient)& theLocations); + const Handle(TColStd_HSequenceOfTransient)& theBases, + const Handle(TColStd_HSequenceOfTransient)& theLocations); Standard_EXPORT Handle(GEOM_Object) MakePipeBiNormalAlongVector (Handle(GEOM_Object) theBase, - Handle(GEOM_Object) thePath, - Handle(GEOM_Object) theVec); + Handle(GEOM_Object) thePath, + Handle(GEOM_Object) theVec); }; diff --git a/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx b/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx index bae1dd0c6..33744cce5 100644 --- a/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx @@ -149,7 +149,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition const Standard_Integer theLimit, const Standard_Boolean theRemoveWebs, const Handle(TColStd_HArray1OfInteger)& theMaterials, - const Standard_Integer theKeepNonlimitShapes, + const Standard_Integer theKeepNonlimitShapes, const Standard_Boolean thePerformSelfIntersections) { SetErrorCode(KO); diff --git a/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx b/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx index 7e99fa82f..486f04e17 100644 --- a/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx @@ -47,8 +47,8 @@ class GEOMImpl_IBooleanOperations : public GEOM_IOperations { const Standard_Integer theLimit, const Standard_Boolean theRemoveWebs, const Handle(TColStd_HArray1OfInteger)& theMaterials, - const Standard_Integer theKeepNonlimitShapes, - const Standard_Boolean thePerformSelfIntersections); + const Standard_Integer theKeepNonlimitShapes, + const Standard_Boolean thePerformSelfIntersections); Standard_EXPORT Handle(GEOM_Object) MakeHalfPartition (Handle(GEOM_Object) theShape, Handle(GEOM_Object) thePlane); diff --git a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx index 654a12a31..364c16c23 100644 --- a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx @@ -335,7 +335,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCirclePntVecR Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeEllipse (Handle(GEOM_Object) thePnt, Handle(GEOM_Object) theVec, double theRMajor, double theRMinor, - Handle(GEOM_Object) theVecMaj) + Handle(GEOM_Object) theVecMaj) { SetErrorCode(KO); @@ -397,12 +397,12 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeEllipse //Make a Python command if (!theVecMaj.IsNull()) { GEOM::TPythonDump(aFunction) << anEll << " = geompy.MakeEllipse(" - << thePnt << ", " << theVec << ", " << theRMajor << ", " << theRMinor - << ", " << theVecMaj << ")"; + << thePnt << ", " << theVec << ", " << theRMajor << ", " << theRMinor + << ", " << theVecMaj << ")"; } else { GEOM::TPythonDump(aFunction) << anEll << " = geompy.MakeEllipse(" - << thePnt << ", " << theVec << ", " << theRMajor << ", " << theRMinor << ")"; + << thePnt << ", " << theVec << ", " << theRMajor << ", " << theRMinor << ")"; } SetErrorCode(OK); @@ -536,8 +536,8 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcCenter (Handle(GEOM_Objec */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcOfEllipse (Handle(GEOM_Object) thePnt1, - Handle(GEOM_Object) thePnt2, - Handle(GEOM_Object) thePnt3) + Handle(GEOM_Object) thePnt2, + Handle(GEOM_Object) thePnt3) { SetErrorCode(KO); @@ -734,7 +734,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCommand, - list theWorkingPlane) + list theWorkingPlane) { SetErrorCode(KO); diff --git a/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx b/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx index 14a29f561..6bf6fa5cc 100644 --- a/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx @@ -52,7 +52,7 @@ class GEOMImpl_ICurvesOperations : public GEOM_IOperations { Standard_EXPORT Handle(GEOM_Object) MakeEllipse (Handle(GEOM_Object) thePnt, Handle(GEOM_Object) theVec, double theRMajor, double theRMinor, - Handle(GEOM_Object) theVecMaj); + Handle(GEOM_Object) theVecMaj); Standard_EXPORT Handle(GEOM_Object) MakeArc (Handle(GEOM_Object) thePnt1, Handle(GEOM_Object) thePnt2, @@ -64,8 +64,8 @@ class GEOMImpl_ICurvesOperations : public GEOM_IOperations { bool theSense); Standard_EXPORT Handle(GEOM_Object) MakeArcOfEllipse (Handle(GEOM_Object) thePnt1, - Handle(GEOM_Object) thePnt2, - Handle(GEOM_Object) thePnt3); + Handle(GEOM_Object) thePnt2, + Handle(GEOM_Object) thePnt3); Standard_EXPORT Handle(GEOM_Object) MakeSplineBezier (list thePoints); Standard_EXPORT Handle(GEOM_Object) MakeSplineInterpolation (list thePoints, diff --git a/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx b/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx index d08923381..f22b9c038 100644 --- a/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx @@ -202,7 +202,7 @@ void GEOMImpl_IHealingOperations::GetShapeProcessParameters (std::list& theParams, - std::list& theValues ) + std::list& theParams, + std::list& theValues ) { ShHealOper_ShapeProcess aHealer; int nbParamValueErrors( 0 ); @@ -236,11 +236,11 @@ bool GEOMImpl_IHealingOperations::GetOperatorParameters( const std::string theOp TCollection_AsciiString aParam( (Standard_CString)(*it).c_str() ); TCollection_AsciiString aValue; if ( aHealer.GetParameter( aParam, aValue ) ) { - theParams.push_back( aParam.ToCString() ); - theValues.push_back( aValue.ToCString() ); + theParams.push_back( aParam.ToCString() ); + theValues.push_back( aValue.ToCString() ); } else - nbParamValueErrors++; + nbParamValueErrors++; } } else @@ -358,7 +358,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::SuppressFaces } catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail->GetMessageString()); return NULL; } @@ -429,7 +429,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::CloseContour } catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail->GetMessageString()); return NULL; } @@ -566,7 +566,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::FillHoles (Handle(GEOM_Object) } catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail->GetMessageString()); return NULL; } @@ -634,7 +634,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::Sew (Handle(GEOM_Object) theObj } catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail->GetMessageString()); return NULL; } @@ -697,7 +697,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::DivideEdge (Handle(GEOM_Object) } catch (Standard_Failure) { - Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); SetErrorCode(aFail->GetMessageString()); return NULL; } @@ -716,8 +716,8 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::DivideEdge (Handle(GEOM_Object) */ //============================================================================= bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(GEOM_Object) theObject, - Handle(TColStd_HSequenceOfTransient)& theClosed, - Handle(TColStd_HSequenceOfTransient)& theOpen ) + Handle(TColStd_HSequenceOfTransient)& theClosed, + Handle(TColStd_HSequenceOfTransient)& theOpen ) { // set error code, check parameters SetErrorCode(KO); diff --git a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx index 80f4a2962..a15a5f284 100644 --- a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx @@ -135,8 +135,8 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::MakeCopy(Handle(GEOM_Object) the //============================================================================= void GEOMImpl_IInsertOperations::Export (const Handle(GEOM_Object) theOriginal, - const TCollection_AsciiString& theFileName, - const TCollection_AsciiString& theFormatName) + const TCollection_AsciiString& theFileName, + const TCollection_AsciiString& theFormatName) { SetErrorCode(KO); @@ -195,7 +195,7 @@ void GEOMImpl_IInsertOperations::Export //============================================================================= Handle(GEOM_Object) GEOMImpl_IInsertOperations::Import (const TCollection_AsciiString& theFileName, - const TCollection_AsciiString& theFormatName) + const TCollection_AsciiString& theFormatName) { SetErrorCode(KO); @@ -272,7 +272,7 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::Import //============================================================================= Standard_Boolean GEOMImpl_IInsertOperations::ImportTranslators (Handle(TColStd_HSequenceOfAsciiString)& theFormats, - Handle(TColStd_HSequenceOfAsciiString)& thePatterns) + Handle(TColStd_HSequenceOfAsciiString)& thePatterns) { if (theFormats.IsNull()) theFormats = new TColStd_HSequenceOfAsciiString; @@ -305,13 +305,13 @@ Standard_Boolean GEOMImpl_IInsertOperations::ImportTranslators int aLenFormats = theFormats->Length(); bool isFound = false; for(int aInd=1;aInd<=aLenFormats;aInd++){ - if( theFormats->Value(aInd) == aToken){ - isFound = true; - break; - } + if( theFormats->Value(aInd) == aToken){ + isFound = true; + break; + } } if(!isFound) - theFormats->Append(aToken); + theFormats->Append(aToken); } } @@ -329,7 +329,7 @@ Standard_Boolean GEOMImpl_IInsertOperations::ImportTranslators if (myResMgr->Find(aKey.ToCString())) aPattern = myResMgr->Value(aKey.ToCString()); else if(myResMgrUser->Find(aKey.ToCString())) - aPattern = myResMgrUser->Value(aKey.ToCString()); + aPattern = myResMgrUser->Value(aKey.ToCString()); else { aPattern = theFormats->Value(j); aPattern += " Files ( *.* )"; @@ -348,7 +348,7 @@ Standard_Boolean GEOMImpl_IInsertOperations::ImportTranslators //============================================================================= Standard_Boolean GEOMImpl_IInsertOperations::ExportTranslators (Handle(TColStd_HSequenceOfAsciiString)& theFormats, - Handle(TColStd_HSequenceOfAsciiString)& thePatterns) + Handle(TColStd_HSequenceOfAsciiString)& thePatterns) { if (theFormats.IsNull()) theFormats = new TColStd_HSequenceOfAsciiString; @@ -381,13 +381,13 @@ Standard_Boolean GEOMImpl_IInsertOperations::ExportTranslators int aLenFormats = theFormats->Length(); bool isFound = false; for(int aInd=1;aInd<=aLenFormats;aInd++){ - if( theFormats->Value(aInd) == aToken){ - isFound = true; - break; - } + if( theFormats->Value(aInd) == aToken){ + isFound = true; + break; + } } if(!isFound) - theFormats->Append(aToken); + theFormats->Append(aToken); } } @@ -405,7 +405,7 @@ Standard_Boolean GEOMImpl_IInsertOperations::ExportTranslators if (myResMgr->Find(aKey.ToCString())) aPattern = myResMgr->Value(aKey.ToCString()); else if (myResMgrUser->Find(aKey.ToCString())) - aPattern = myResMgrUser->Value(aKey.ToCString()); + aPattern = myResMgrUser->Value(aKey.ToCString()); else { aPattern = theFormats->Value(j); aPattern += " Files ( *.* )"; @@ -542,7 +542,7 @@ Standard_Boolean GEOMImpl_IInsertOperations::InitResMgr() } return ( myResMgr->Find("Import") || myResMgr->Find("Export") || - myResMgrUser->Find("Import") || myResMgrUser->Find("Export")); + myResMgrUser->Find("Import") || myResMgrUser->Find("Export")); } int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTextureFile) @@ -583,7 +583,7 @@ int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTe for (int i = 0; i < lenline/8; i++) { unsigned char byte = 0; for (int j = 0; j < 8; j++) - byte = (byte << 1) + ( i*8+j < line.size() && line[i*8+j] != '0' ? 1 : 0 ); + byte = (byte << 1) + ( i*8+j < line.size() && line[i*8+j] != '0' ? 1 : 0 ); bytedata.push_back(byte); } for (int i = lenline/8; i < lenbytes; i++) @@ -605,7 +605,7 @@ int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTe } int GEOMImpl_IInsertOperations::AddTexture(int theWidth, int theHeight, - const Handle(TDataStd_HArray1OfByte)& theTexture) + const Handle(TDataStd_HArray1OfByte)& theTexture) { SetErrorCode(KO); int aTextureId = GetEngine()->addTexture(GetDocID(), theWidth, theHeight, theTexture); @@ -614,7 +614,7 @@ int GEOMImpl_IInsertOperations::AddTexture(int theWidth, int theHeight, } Handle(TDataStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theTextureId, - int& theWidth, int& theHeight) + int& theWidth, int& theHeight) { SetErrorCode(KO); diff --git a/src/GEOMImpl/GEOMImpl_IInsertOperations.hxx b/src/GEOMImpl/GEOMImpl_IInsertOperations.hxx index 51d2ed350..529795f7c 100644 --- a/src/GEOMImpl/GEOMImpl_IInsertOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IInsertOperations.hxx @@ -62,10 +62,10 @@ class GEOMImpl_IInsertOperations : public GEOM_IOperations { Standard_EXPORT int LoadTexture(const TCollection_AsciiString& theTextureFile); Standard_EXPORT int AddTexture(int theWidth, int theHeight, - const Handle(TDataStd_HArray1OfByte)& theTexture); + const Handle(TDataStd_HArray1OfByte)& theTexture); Standard_EXPORT Handle(TDataStd_HArray1OfByte) GetTexture(int theTextureId, - int& theWidth, int& theHeight); + int& theWidth, int& theHeight); Standard_EXPORT std::list GetAllTextures(); diff --git a/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx b/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx index 61a737697..7236bb052 100644 --- a/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx @@ -882,7 +882,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges //Check if the function is set correctly if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID()) - { MESSAGE ( "Chamfer Driver is NULL!!!" ); return NULL; } + { MESSAGE ( "Chamfer Driver is NULL!!!" ); return NULL; } GEOMImpl_IChamfer aCI (aFunction); @@ -954,7 +954,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgesAD //Check if the function is set correctly if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID()) - { MESSAGE("Chamfer Driver is NULL!!!"); return NULL;} + { MESSAGE("Chamfer Driver is NULL!!!"); return NULL;} GEOMImpl_IChamfer aCI (aFunction); diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index 61237649d..da56dd070 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -997,9 +997,9 @@ void GEOMImpl_IMeasureOperations::GetBasicProperties (Handle(GEOM_Object) theSha theVolume = 0.0; if (aShape.ShapeType() < TopAbs_SHELL) { for (TopExp_Explorer Exp (aShape, TopAbs_SOLID); Exp.More(); Exp.Next()) { - GProp_GProps VProps; - BRepGProp::VolumeProperties(Exp.Current(), VProps); - theVolume += VProps.Mass(); + GProp_GProps VProps; + BRepGProp::VolumeProperties(Exp.Current(), VProps); + theVolume += VProps.Mass(); } } } @@ -1160,25 +1160,25 @@ void GEOMImpl_IMeasureOperations::GetTolerance TopoDS_Face Face = TopoDS::Face(ExF.Current()); T = BRep_Tool::Tolerance(Face); if (T > FaceMax) - FaceMax = T; + FaceMax = T; if (T < FaceMin) - FaceMin = T; + FaceMin = T; } for (TopExp_Explorer ExE (aShape, TopAbs_EDGE); ExE.More(); ExE.Next()) { TopoDS_Edge Edge = TopoDS::Edge(ExE.Current()); T = BRep_Tool::Tolerance(Edge); if (T > EdgeMax) - EdgeMax = T; + EdgeMax = T; if (T < EdgeMin) - EdgeMin = T; + EdgeMin = T; } for (TopExp_Explorer ExV (aShape, TopAbs_VERTEX); ExV.More(); ExV.Next()) { TopoDS_Vertex Vertex = TopoDS::Vertex(ExV.Current()); T = BRep_Tool::Tolerance(Vertex); if (T > VertMax) - VertMax = T; + VertMax = T; if (T < VertMin) - VertMin = T; + VertMin = T; } } catch (Standard_Failure) { @@ -1689,12 +1689,12 @@ Standard_Real GEOMImpl_IMeasureOperations::GetMinDistance gp_Pnt PMin1, PMin2, P1, P2; for (int i = 1; i <= dst.NbSolution(); i++) { - P1 = dst.PointOnShape1(i); - P2 = dst.PointOnShape2(i); + P1 = dst.PointOnShape1(i); + P2 = dst.PointOnShape2(i); - Standard_Real Dist = P1.Distance(P2); - if (MinDist > Dist) { - MinDist = Dist; + Standard_Real Dist = P1.Distance(P2); + if (MinDist > Dist) { + MinDist = Dist; PMin1 = P1; PMin2 = P2; } @@ -1798,7 +1798,7 @@ Standard_Real GEOMImpl_IMeasureOperations::GetAngle (Handle(GEOM_Object) theLine Handle(Geom_Curve) C2 = BRep_Tool::Curve(E2,fp,lp); if ( C1.IsNull() || C2.IsNull() || - !C1->IsKind(STANDARD_TYPE(Geom_Line)) || + !C1->IsKind(STANDARD_TYPE(Geom_Line)) || !C2->IsKind(STANDARD_TYPE(Geom_Line))) { SetErrorCode("The edges must be linear"); @@ -2462,14 +2462,14 @@ void GEOMImpl_IMeasureOperations::GetProblemSub (const BRepCheck_Analyzer& const Handle(BRepCheck_Result)& res = theAna.Result(sub); for (res->InitContextIterator(); - res->MoreShapeInContext(); - res->NextShapeInContext()) { + res->MoreShapeInContext(); + res->NextShapeInContext()) { if (res->ContextualShape().IsSame(theShape) && !Contains(theMap(sub), theShape)) { - theMap(sub).Append(theShape); - itl.Initialize(res->StatusOnShape()); + theMap(sub).Append(theShape); + itl.Initialize(res->StatusOnShape()); - if (itl.Value() != BRepCheck_NoError) { - Standard_Integer ii = 0; + if (itl.Value() != BRepCheck_NoError) { + Standard_Integer ii = 0; for (ii = 1; ii <= sl->Length(); ii++) if (sl->Value(ii).IsSame(sub)) break; @@ -2488,8 +2488,8 @@ void GEOMImpl_IMeasureOperations::GetProblemSub (const BRepCheck_Analyzer& NbProblems->SetValue((Standard_Integer)stat, NbProblems->Value((Standard_Integer)stat) + 1); } - } - break; + } + break; } } } diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index 0eff72be4..ecfdffee7 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -720,7 +720,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetGlueFaces Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueFacesByList (Handle(GEOM_Object) theShape, const Standard_Real theTolerance, - std::list theFaces, + std::list theFaces, const Standard_Boolean doKeepNonSolids) { SetErrorCode(KO); @@ -841,7 +841,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode TopExp_Explorer exp (aShape, TopAbs_ShapeEnum(theShapeType)); for (; exp.More(); exp.Next()) if (mapShape.Add(exp.Current())) - listShape.Append(exp.Current()); + listShape.Append(exp.Current()); } if (listShape.IsEmpty()) { @@ -942,7 +942,7 @@ Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::SubShapeAllIDs TopExp_Explorer exp (aShape, TopAbs_ShapeEnum(theShapeType)); for (; exp.More(); exp.Next()) if (mapShape.Add(exp.Current())) - listShape.Append(exp.Current()); + listShape.Append(exp.Current()); } if (listShape.IsEmpty()) { @@ -1058,13 +1058,13 @@ Standard_Integer GEOMImpl_IShapesOperations::GetTopologyIndex (Handle(GEOM_Objec TopTools_ListIteratorOfListOfShape itC; for (itC.Initialize(CL); itC.More(); itC.Next()) { for (it.Initialize(itC.Value()); it.More(); it.Next()) { - if (it.Value().ShapeType() == TopAbs_COMPOUND) { - if (it.Value().IsSame(aSubShape)) - return index; - else - index++; - CL.Append(it.Value()); - } + if (it.Value().ShapeType() == TopAbs_COMPOUND) { + if (it.Value().IsSame(aSubShape)) + return index; + else + index++; + CL.Append(it.Value()); + } } } } else { @@ -1072,9 +1072,9 @@ Standard_Integer GEOMImpl_IShapesOperations::GetTopologyIndex (Handle(GEOM_Objec TopTools_MapOfShape M; for (; anExp.More(); anExp.Next()) { if (M.Add(anExp.Current())) { - if (anExp.Current().IsSame(aSubShape)) - return index; - index++; + if (anExp.Current().IsSame(aSubShape)) + return index; + index++; } } } @@ -1116,17 +1116,17 @@ TCollection_AsciiString GEOMImpl_IShapesOperations::GetShapeTypeString (Handle(G { BRepAdaptor_Surface surf (TopoDS::Face(aShape)); if (surf.GetType() == GeomAbs_Plane) - aTypeName = "Plane"; + aTypeName = "Plane"; else if (surf.GetType() == GeomAbs_Cylinder) - aTypeName = "Cylindrical Face"; + aTypeName = "Cylindrical Face"; else if (surf.GetType() == GeomAbs_Sphere) - aTypeName = "Spherical Face"; + aTypeName = "Spherical Face"; else if (surf.GetType() == GeomAbs_Torus) - aTypeName = "Toroidal Face"; + aTypeName = "Toroidal Face"; else if (surf.GetType() == GeomAbs_Cone) - aTypeName = "Conical Face"; + aTypeName = "Conical Face"; else - aTypeName = "GEOM::FACE"; + aTypeName = "GEOM::FACE"; } break; case TopAbs_WIRE: @@ -1136,15 +1136,15 @@ TCollection_AsciiString GEOMImpl_IShapesOperations::GetShapeTypeString (Handle(G { BRepAdaptor_Curve curv (TopoDS::Edge(aShape)); if (curv.GetType() == GeomAbs_Line) { - if ((Abs(curv.FirstParameter()) >= 1E6) || + if ((Abs(curv.FirstParameter()) >= 1E6) || (Abs(curv.LastParameter()) >= 1E6)) aTypeName = "Line"; - else - aTypeName = "Edge"; + else + aTypeName = "Edge"; } else if (curv.GetType() == GeomAbs_Circle) { - if (curv.IsClosed()) + if (curv.IsClosed()) aTypeName = "Circle"; - else + else aTypeName = "Arc"; } else { aTypeName = "Edge"; @@ -1200,7 +1200,7 @@ Standard_Integer GEOMImpl_IShapesOperations::NumberOfSubShapes TopExp_Explorer exp (aShape, TopAbs_ShapeEnum(theShapeType)); for (; exp.More(); exp.Next()) if (mapShape.Add(exp.Current())) - nbShapes++; + nbShapes++; } */ @@ -1537,9 +1537,9 @@ Handle(Geom_Surface) GEOMImpl_IShapesOperations::makeCylinder(const TopoDS_Shape //======================================================================= Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::getShapesOnBoxIDs(const Handle(GEOM_Object)& theBox, - const Handle(GEOM_Object)& theShape, - const Standard_Integer theShapeType, - GEOMAlgo_State theState) + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState) { Handle(TColStd_HSequenceOfInteger) aSeqOfIDs; @@ -1618,9 +1618,9 @@ Handle(TColStd_HSequenceOfInteger) //======================================================================= Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnBoxIDs(const Handle(GEOM_Object)& theBox, - const Handle(GEOM_Object)& theShape, - const Standard_Integer theShapeType, - GEOMAlgo_State theState) + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState) { // Find subshapes ids Handle(TColStd_HSequenceOfInteger) aSeqOfIDs = @@ -1656,9 +1656,9 @@ Handle(TColStd_HSequenceOfInteger) //======================================================================= Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnBox(const Handle(GEOM_Object)& theBox, - const Handle(GEOM_Object)& theShape, - const Standard_Integer theShapeType, - GEOMAlgo_State theState) + const Handle(GEOM_Object)& theShape, + const Standard_Integer theShapeType, + GEOMAlgo_State theState) { // Find subshapes ids Handle(TColStd_HSequenceOfInteger) aSeqOfIDs = @@ -2116,7 +2116,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlan (const Handle(GEOM_Object)& theShape, const Standard_Integer theShapeType, const Handle(GEOM_Object)& theAx1, - const Handle(GEOM_Object)& thePnt, + const Handle(GEOM_Object)& thePnt, const GEOMAlgo_State theState) { SetErrorCode(KO); @@ -2338,7 +2338,7 @@ Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnPlaneW (const Handle(GEOM_Object)& theShape, const Standard_Integer theShapeType, const Handle(GEOM_Object)& theAx1, - const Handle(GEOM_Object)& thePnt, + const Handle(GEOM_Object)& thePnt, const GEOMAlgo_State theState) { SetErrorCode(KO); @@ -3240,7 +3240,7 @@ void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL) Length.SetValue( Index, GPr.Mass() ); } MidXYZ.SetValue(Index, - GPoint.X()*999 + GPoint.Y()*99 + GPoint.Z()*0.9); + GPoint.X()*999 + GPoint.Y()*99 + GPoint.Z()*0.9); //cout << Index << " L: " << Length(Index) << "CG: " << MidXYZ(Index) << endl; } @@ -3259,12 +3259,12 @@ void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL) if ( dMidXYZ >= tol ) { // cout << "MidXYZ: " << MidXYZ(OrderInd(Index))<< " > " <= tol ) { // cout << "Length: " << Length(OrderInd(Index))<< " > " < theShapes); Standard_EXPORT Handle(GEOM_Object) MakeGlueFaces (Handle(GEOM_Object) theShape, - const Standard_Real theTolerance, + const Standard_Real theTolerance, const Standard_Boolean doKeepNonSolids); Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetGlueFaces (Handle(GEOM_Object) theShape, - const Standard_Real theTolerance); + const Standard_Real theTolerance); Standard_EXPORT Handle(GEOM_Object) MakeGlueFacesByList (Handle(GEOM_Object) theShape, - const Standard_Real theTolerance, - std::list theFaces, + const Standard_Real theTolerance, + std::list theFaces, const Standard_Boolean doKeepNonSolids); Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MakeExplode (Handle(GEOM_Object) theShape, diff --git a/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx index 5150f0a1c..541ed569c 100644 --- a/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx @@ -462,13 +462,13 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorDistance //Make a Python command if (theCopy) { GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeTranslationVectorDistance(" - << theObject << ", " << theVector << ", " << theDistance << ")"; + << theObject << ", " << theVector << ", " << theDistance << ")"; SetErrorCode(OK); return aCopy; } GEOM::TPythonDump(aFunction) << "geompy.TranslateVectorDistance(" - << theObject << ", " << theVector << ", " << theDistance << ", " << theCopy << ")"; + << theObject << ", " << theVector << ", " << theDistance << ", " << theCopy << ")"; SetErrorCode(OK); return theObject; } @@ -535,12 +535,12 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate1D */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate2D (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theVector, - double theStep1, - Standard_Integer theNbTimes1, - Handle(GEOM_Object) theVector2, - double theStep2, - Standard_Integer theNbTimes2) + Handle(GEOM_Object) theVector, + double theStep1, + Standard_Integer theNbTimes1, + Handle(GEOM_Object) theVector2, + double theStep2, + Standard_Integer theNbTimes2) { SetErrorCode(KO); @@ -1343,7 +1343,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShapeCopy //============================================================================= Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionAlongPath (Handle(GEOM_Object) theObject, Handle(GEOM_Object) thePath, - double theDistance, bool theCopy, bool theReverse) + double theDistance, bool theCopy, bool theReverse) { SetErrorCode(KO); @@ -1393,7 +1393,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionAlongPath //Make a Python command if (theCopy) { GEOM::TPythonDump(aFunction) << aCopy << " = geompy.PositionAlongPath(" - << theObject << ", " << thePath << ", " << theDistance << ", " << theCopy << ", " << theReverse << ")"; + << theObject << ", " << thePath << ", " << theDistance << ", " << theCopy << ", " << theReverse << ")"; SetErrorCode(OK); return aCopy; } @@ -1575,11 +1575,11 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate1D (Handle(GEOM_Object) */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theAxis, - double theAngle, - Standard_Integer theNbTimes1, - double theStep, - Standard_Integer theNbTimes2) + Handle(GEOM_Object) theAxis, + double theAngle, + Standard_Integer theNbTimes1, + double theStep, + Standard_Integer theNbTimes2) { SetErrorCode(KO); @@ -1637,9 +1637,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object) */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePoints (Handle(GEOM_Object) theObject, - Handle(GEOM_Object) theCentPoint, - Handle(GEOM_Object) thePoint1, - Handle(GEOM_Object) thePoint2) + Handle(GEOM_Object) theCentPoint, + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2) { SetErrorCode(KO); @@ -1686,7 +1686,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePoints (Handle(GEO //Make a Python command GEOM::TPythonDump(aFunction) << "geompy.TrsfOp.RotateThreePoints(" << theObject - << ", " << theCentPoint << ", "< Precision::Confusion()) { - radius = 1.0 / radius1; + radius = 1.0 / radius1; if (Abs(radius2) > Precision::Confusion()) { radius = (radius + 1.0 / radius2) / 2.0; } @@ -229,10 +229,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_MeasureDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_MeasureDriver", - sizeof(GEOMImpl_MeasureDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_MeasureDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_MirrorDriver.cxx b/src/GEOMImpl/GEOMImpl_MirrorDriver.cxx index 69a8c599d..91a16adc7 100644 --- a/src/GEOMImpl/GEOMImpl_MirrorDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_MirrorDriver.cxx @@ -174,10 +174,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_MirrorDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_MirrorDriver", - sizeof(GEOMImpl_MirrorDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_MirrorDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx b/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx index ff68f7e8d..665c7045e 100644 --- a/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx @@ -123,10 +123,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_OffsetDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_OffsetDriver", - sizeof(GEOMImpl_OffsetDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_OffsetDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx index 7f54d9abf..e880922da 100644 --- a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx @@ -356,10 +356,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_PartitionDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PartitionDriver", - sizeof(GEOMImpl_PartitionDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_PartitionDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_PipeDriver.hxx b/src/GEOMImpl/GEOMImpl_PipeDriver.hxx index 041027786..0eebe631c 100644 --- a/src/GEOMImpl/GEOMImpl_PipeDriver.hxx +++ b/src/GEOMImpl/GEOMImpl_PipeDriver.hxx @@ -157,7 +157,7 @@ public: { return STANDARD_TYPE(GEOMImpl_PipeDriver) ; } Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PipeDriver) == AType || - TFunction_Driver::IsKind(AType)); } + TFunction_Driver::IsKind(AType)); } }; diff --git a/src/GEOMImpl/GEOMImpl_PlaneDriver.cxx b/src/GEOMImpl/GEOMImpl_PlaneDriver.cxx index 9000b30ac..64a02c8bc 100644 --- a/src/GEOMImpl/GEOMImpl_PlaneDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PlaneDriver.cxx @@ -214,7 +214,7 @@ Standard_Integer GEOMImpl_PlaneDriver::Execute(TFunction_Logbook& log) const } else { TopoDS_Shape aRefShape = aRef->GetValue(); if (aRefShape.ShapeType() != TopAbs_FACE) - return 0; + return 0; anAx3 = GEOMImpl_IMeasureOperations::GetPosition(aRefShape); } @@ -256,10 +256,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_PlaneDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PlaneDriver", - sizeof(GEOMImpl_PlaneDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_PlaneDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_PointDriver.cxx b/src/GEOMImpl/GEOMImpl_PointDriver.cxx index f1d64125d..bf8adfc02 100644 --- a/src/GEOMImpl/GEOMImpl_PointDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PointDriver.cxx @@ -189,16 +189,16 @@ Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const BRepExtrema_DistShapeShape dst (aRefShape1, aRefShape2); if (dst.IsDone()) { - gp_Pnt P1, P2; - for (int i = 1; i <= dst.NbSolution(); i++) { - P1 = dst.PointOnShape1(i); - P2 = dst.PointOnShape2(i); - Standard_Real Dist = P1.Distance(P2); - if ( Dist <= Precision::Confusion() ) - aPnt = P1; - else - Standard_TypeMismatch::Raise ("Lines not have an Intersection Point"); - } + gp_Pnt P1, P2; + for (int i = 1; i <= dst.NbSolution(); i++) { + P1 = dst.PointOnShape1(i); + P2 = dst.PointOnShape2(i); + Standard_Real Dist = P1.Distance(P2); + if ( Dist <= Precision::Confusion() ) + aPnt = P1; + else + Standard_TypeMismatch::Raise ("Lines not have an Intersection Point"); + } } } else { @@ -233,10 +233,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_PointDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PointDriver", - sizeof(GEOMImpl_PointDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_PointDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx b/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx index f18427df9..c0a4d55cc 100644 --- a/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx @@ -132,10 +132,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_PolylineDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PolylineDriver", - sizeof(GEOMImpl_PolylineDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_PolylineDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_PositionDriver.cxx b/src/GEOMImpl/GEOMImpl_PositionDriver.cxx index bf4f8388d..670e11c01 100644 --- a/src/GEOMImpl/GEOMImpl_PositionDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PositionDriver.cxx @@ -109,7 +109,7 @@ Standard_Integer GEOMImpl_PositionDriver::Execute(TFunction_Logbook& log) const TopoDS_Shape aShapeEndLCS = aRefEndLCS->GetValue(); if (aShapeBase.IsNull() || aShapeStartLCS.IsNull() || - aShapeEndLCS.IsNull() || aShapeEndLCS.ShapeType() != TopAbs_FACE) + aShapeEndLCS.IsNull() || aShapeEndLCS.ShapeType() != TopAbs_FACE) return 0; gp_Trsf aTrsf; @@ -236,10 +236,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_PositionDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PositionDriver", - sizeof(GEOMImpl_PositionDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_PositionDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_PrismDriver.cxx b/src/GEOMImpl/GEOMImpl_PrismDriver.cxx index 0cd63b150..61a0fcc49 100644 --- a/src/GEOMImpl/GEOMImpl_PrismDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PrismDriver.cxx @@ -93,13 +93,13 @@ Standard_Integer GEOMImpl_PrismDriver::Execute(TFunction_Logbook& log) const } if (aV.Magnitude() > Precision::Confusion()) { aV.Normalize(); - if (aType == PRISM_BASE_VEC_H_2WAYS) { - gp_Trsf aTrsf; - aTrsf.SetTranslation( (-aV) * aCI.GetH() ); - BRepBuilderAPI_Transform aTransformation(aShapeBase, aTrsf, Standard_False); - aShapeBase = aTransformation.Shape(); - aCI.SetH( aCI.GetH()*2 ); - } + if (aType == PRISM_BASE_VEC_H_2WAYS) { + gp_Trsf aTrsf; + aTrsf.SetTranslation( (-aV) * aCI.GetH() ); + BRepBuilderAPI_Transform aTransformation(aShapeBase, aTrsf, Standard_False); + aShapeBase = aTransformation.Shape(); + aCI.SetH( aCI.GetH()*2 ); + } aShape = BRepPrimAPI_MakePrism(aShapeBase, aV * aCI.GetH(), Standard_False).Shape(); } } @@ -118,14 +118,14 @@ Standard_Integer GEOMImpl_PrismDriver::Execute(TFunction_Logbook& log) const if (!V1.IsNull() && !V2.IsNull()) { gp_Vec aV (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); if (aV.Magnitude() > gp::Resolution()) { - if (aType == PRISM_BASE_TWO_PNT_2WAYS) - { - gp_Trsf aTrsf; - aTrsf.SetTranslation(-aV); - BRepBuilderAPI_Transform aTransformation(aShapeBase, aTrsf, Standard_False); - aShapeBase = aTransformation.Shape(); - aV = aV * 2; - } + if (aType == PRISM_BASE_TWO_PNT_2WAYS) + { + gp_Trsf aTrsf; + aTrsf.SetTranslation(-aV); + BRepBuilderAPI_Transform aTransformation(aShapeBase, aTrsf, Standard_False); + aShapeBase = aTransformation.Shape(); + aV = aV * 2; + } aShape = BRepPrimAPI_MakePrism(aShapeBase, aV, Standard_False).Shape(); } } @@ -136,13 +136,13 @@ Standard_Integer GEOMImpl_PrismDriver::Execute(TFunction_Logbook& log) const gp_Vec aV (aCI.GetDX(), aCI.GetDY(), aCI.GetDZ()); if (aV.Magnitude() > gp::Resolution()) { if (aType == PRISM_BASE_DXDYDZ_2WAYS) - { - gp_Trsf aTrsf; - aTrsf.SetTranslation(-aV); - BRepBuilderAPI_Transform aTransformation(aShapeBase, aTrsf, Standard_False); - aShapeBase = aTransformation.Shape(); - aV = aV * 2; - } + { + gp_Trsf aTrsf; + aTrsf.SetTranslation(-aV); + BRepBuilderAPI_Transform aTransformation(aShapeBase, aTrsf, Standard_False); + aShapeBase = aTransformation.Shape(); + aV = aV * 2; + } aShape = BRepPrimAPI_MakePrism(aShapeBase, aV, Standard_False).Shape(); } } @@ -175,10 +175,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_PrismDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PrismDriver", - sizeof(GEOMImpl_PrismDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_PrismDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx b/src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx index f4e8026b1..ae22ee507 100644 --- a/src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx @@ -105,18 +105,18 @@ Standard_Integer GEOMImpl_RevolutionDriver::Execute(TFunction_Logbook& log) cons gp_Lin aL(BRep_Tool::Pnt(V1), gp_Dir(aV)); Standard_Real d = aL.Distance(BRep_Tool::Pnt(TopoDS::Vertex(aShapeBase))); if (d < Precision::Confusion()) { - Standard_ConstructionError::Raise("Vertex to be rotated is too close to Revolution Axis"); + Standard_ConstructionError::Raise("Vertex to be rotated is too close to Revolution Axis"); } } double anAngle = aCI.GetAngle(); gp_Ax1 anAxis (BRep_Tool::Pnt(V1), aV); if (aType == REVOLUTION_BASE_AXIS_ANGLE_2WAYS) { - gp_Trsf aTrsf; - aTrsf.SetRotation(anAxis, ( -anAngle )); - BRepBuilderAPI_Transform aTransformation(aShapeBase, aTrsf, Standard_False); - aShapeBase = aTransformation.Shape(); - anAngle = anAngle * 2; + gp_Trsf aTrsf; + aTrsf.SetRotation(anAxis, ( -anAngle )); + BRepBuilderAPI_Transform aTransformation(aShapeBase, aTrsf, Standard_False); + aShapeBase = aTransformation.Shape(); + anAngle = anAngle * 2; } BRepPrimAPI_MakeRevol MR (aShapeBase, anAxis, anAngle, Standard_False); if (!MR.IsDone()) MR.Build(); @@ -153,10 +153,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_RevolutionDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_RevolutionDriver", - sizeof(GEOMImpl_RevolutionDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_RevolutionDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_RotateDriver.cxx b/src/GEOMImpl/GEOMImpl_RotateDriver.cxx index cff3a9b51..c610d78a3 100644 --- a/src/GEOMImpl/GEOMImpl_RotateDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_RotateDriver.cxx @@ -309,10 +309,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_RotateDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_RotateDriver", - sizeof(GEOMImpl_RotateDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_RotateDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx b/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx index 0c4dea8f4..0f56de372 100644 --- a/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx @@ -213,10 +213,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_ScaleDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ScaleDriver", - sizeof(GEOMImpl_ScaleDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_ScaleDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index 8ae11d5f0..b7bfd4447 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -500,10 +500,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_ShapeDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ShapeDriver", - sizeof(GEOMImpl_ShapeDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_ShapeDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_SketcherDriver.cxx b/src/GEOMImpl/GEOMImpl_SketcherDriver.cxx index cf2407d3f..46de123a8 100644 --- a/src/GEOMImpl/GEOMImpl_SketcherDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_SketcherDriver.cxx @@ -153,10 +153,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_SketcherDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SketcherDriver", - sizeof(GEOMImpl_SketcherDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_SketcherDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_SphereDriver.cxx b/src/GEOMImpl/GEOMImpl_SphereDriver.cxx index 335f8c7c5..24457363e 100644 --- a/src/GEOMImpl/GEOMImpl_SphereDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_SphereDriver.cxx @@ -119,10 +119,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_SphereDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SphereDriver", - sizeof(GEOMImpl_SphereDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_SphereDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_SplineDriver.cxx b/src/GEOMImpl/GEOMImpl_SplineDriver.cxx index 4e91baf37..74eb9dd98 100644 --- a/src/GEOMImpl/GEOMImpl_SplineDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_SplineDriver.cxx @@ -96,7 +96,7 @@ Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const isSeveral = Standard_True; } } - CurvePoints.SetValue(ind, aP); + CurvePoints.SetValue(ind, aP); aPrevP = aP; } } @@ -111,7 +111,7 @@ Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const //aShape = BRepBuilderAPI_MakeEdge(GBC).Edge(); Handle(TColgp_HArray1OfPnt) aHCurvePoints = new TColgp_HArray1OfPnt(1, aLen); for (ind = 1; ind <= aLen; ind++) { - aHCurvePoints->SetValue(ind, CurvePoints.Value(ind)); + aHCurvePoints->SetValue(ind, CurvePoints.Value(ind)); } int isClosed = aCI.GetIsClosed(); GeomAPI_Interpolate GBC (aHCurvePoints, isClosed, gp::Resolution()); @@ -152,10 +152,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_SplineDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SplineDriver", - sizeof(GEOMImpl_SplineDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_SplineDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_ThruSectionsDriver.cxx b/src/GEOMImpl/GEOMImpl_ThruSectionsDriver.cxx index 2f99b2580..9c79a2831 100644 --- a/src/GEOMImpl/GEOMImpl_ThruSectionsDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ThruSectionsDriver.cxx @@ -171,10 +171,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_ThruSectionsDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ThruSectionsDriver", - sizeof(GEOMImpl_ThruSectionsDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_ThruSectionsDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_TorusDriver.cxx b/src/GEOMImpl/GEOMImpl_TorusDriver.cxx index 7ccffe4bd..ccb85df9a 100644 --- a/src/GEOMImpl/GEOMImpl_TorusDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_TorusDriver.cxx @@ -137,10 +137,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_TorusDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_TorusDriver", - sizeof(GEOMImpl_TorusDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_TorusDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx b/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx index 57689ec57..3d93ca34f 100644 --- a/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx @@ -285,10 +285,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_TranslateDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_TranslateDriver", - sizeof(GEOMImpl_TranslateDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_TranslateDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMImpl/GEOMImpl_VectorDriver.cxx b/src/GEOMImpl/GEOMImpl_VectorDriver.cxx index e925d0e8b..e94acfbe5 100644 --- a/src/GEOMImpl/GEOMImpl_VectorDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_VectorDriver.cxx @@ -157,10 +157,10 @@ Standard_EXPORT Handle_Standard_Type& GEOMImpl_VectorDriver_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_VectorDriver", - sizeof(GEOMImpl_VectorDriver), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOMImpl_VectorDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 8aa0fd14b..3cc39b2f3 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -68,13 +68,13 @@ static QString lastUsedFilter; // the selected file type code through argument. //======================================================================= static QString getFileName( QWidget* parent, - const QString& initial, - const FilterMap& filterMap, + const QString& initial, + const FilterMap& filterMap, const QStringList& filters, - const QString& caption, - bool open, - QString& format, - bool showCurrentDirInitially = false ) + const QString& caption, + bool open, + QString& format, + bool showCurrentDirInitially = false ) { //QStringList filters; QString aBrepFilter; @@ -121,11 +121,11 @@ static QString getFileName( QWidget* parent, // the selected file type code through argument. //======================================================================= static QStringList getFileNames( QWidget* parent, - const QString& initial, - const FilterMap& filterMap, - const QString& caption, - QString& format, - bool showCurrentDirInitially = false) + const QString& initial, + const FilterMap& filterMap, + const QString& caption, + QString& format, + bool showCurrentDirInitially = false) { QString aBrepFilter; QStringList allFilters; @@ -220,11 +220,11 @@ static bool inUse( _PTR(Study) study, const QString& component, const QMapGetFatherComponent(); - QString type = aComponent->ComponentDataType().c_str(); - if ( type == "SMESH" ) - return true; + _PTR(SObject) firstSO( aReferences[i] ); + _PTR(SComponent) aComponent = firstSO->GetFatherComponent(); + QString type = aComponent->ComponentDataType().c_str(); + if ( type == "SMESH" ) + return true; } } } @@ -247,11 +247,11 @@ static bool inUse( _PTR(Study) study, const QString& component, const QMap::Iterator git; for ( git = gobjects.begin(); git != gobjects.end() && ( !depends || !deleted ); ++git ) { - depends = depends || list[i]->_is_equivalent( *git ); - deleted = deleted || git.key() == child->GetID().c_str() ;//geomObj->_is_equivalent( *git ); + depends = depends || list[i]->_is_equivalent( *git ); + deleted = deleted || git.key() == child->GetID().c_str() ;//geomObj->_is_equivalent( *git ); } if ( depends && !deleted ) - return true; + return true; } } return false; @@ -289,138 +289,138 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent) { case 31: // COPY { - OnEditCopy(); - break; + OnEditCopy(); + break; } case 33: // DELETE { - OnEditDelete(); - break; + OnEditDelete(); + break; } case 111: // IMPORT BREP case 112: // IMPORT IGES case 113: // IMPORT STEP { - Import(); - break; + Import(); + break; } case 121: // EXPORT BREP case 122: // EXPORT IGES case 123: // EXPORT STEP { - Export(); - break; + Export(); + break; } case 2171: // POPUP VIEWER - SELECT ONLY - VERTEX { - OnSelectOnly( GEOM_POINT ); - break; + OnSelectOnly( GEOM_POINT ); + break; } case 2172: // POPUP VIEWER - SELECT ONLY - EDGE { - OnSelectOnly( GEOM_EDGE ); - break; + OnSelectOnly( GEOM_EDGE ); + break; } case 2173: // POPUP VIEWER - SELECT ONLY - WIRE { - OnSelectOnly( GEOM_WIRE ); - break; + OnSelectOnly( GEOM_WIRE ); + break; } case 2174: // POPUP VIEWER - SELECT ONLY - FACE { - OnSelectOnly( GEOM_FACE ); - break; + OnSelectOnly( GEOM_FACE ); + break; } case 2175: // POPUP VIEWER - SELECT ONLY - SHELL { - OnSelectOnly( GEOM_SHELL ); - break; + OnSelectOnly( GEOM_SHELL ); + break; } case 2176: // POPUP VIEWER - SELECT ONLY - SOLID { - OnSelectOnly( GEOM_SOLID ); - break; + OnSelectOnly( GEOM_SOLID ); + break; } case 2177: // POPUP VIEWER - SELECT ONLY - COMPOUND { - OnSelectOnly( GEOM_COMPOUND ); - break; + OnSelectOnly( GEOM_COMPOUND ); + break; } case 2178: // POPUP VIEWER - SELECT ONLY - SELECT ALL { - OnSelectOnly( GEOM_ALLOBJECTS ); - break; + OnSelectOnly( GEOM_ALLOBJECTS ); + break; } case 411: // SETTINGS - ADD IN STUDY { - // SAN -- TO BE REMOVED !!! - break; + // SAN -- TO BE REMOVED !!! + break; } case 412: // SETTINGS - SHADING COLOR { - OnSettingsColor(); - break; + OnSettingsColor(); + break; } case 804: // ADD IN STUDY - POPUP VIEWER { - // SAN -- TO BE REMOVED !!!! - break; + // SAN -- TO BE REMOVED !!!! + break; } case 901: // RENAME { - OnRename(); - break; + OnRename(); + break; } case 5103: // CHECK GEOMETRY { - OnCheckGeometry(); - break; + OnCheckGeometry(); + break; } case 8032: // COLOR - POPUP VIEWER { - OnColor(); - break; + OnColor(); + break; } case 8033: // TRANSPARENCY - POPUP VIEWER { - OnTransparency(); - break; + OnTransparency(); + break; } case 8034: // ISOS - POPUP VIEWER { - OnNbIsos(); - break; + OnNbIsos(); + break; } case 8035: // AUTO COLOR - POPUP VIEWER { - OnAutoColor(); - break; + OnAutoColor(); + break; } case 8036: // DISABLE AUTO COLOR - POPUP VIEWER { - OnDisableAutoColor(); - break; + OnDisableAutoColor(); + break; } case 8037: // SHOW CHILDREN - POPUP VIEWER case 8038: // HIDE CHILDREN - POPUP VIEWER { - OnShowHideChildren( theCommandID == 8037 ); - break; + OnShowHideChildren( theCommandID == 8037 ); + break; } case 8039: // POINT MARKER { - OnPointMarker(); - break; + OnPointMarker(); + break; } case 9024 : // OPEN - OBJBROSER POPUP { - OnOpen(); - break; + OnOpen(); + break; } default: { - SUIT_Session::session()->activeApplication()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); - break; + SUIT_Session::session()->activeApplication()->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); + break; } } return true; @@ -454,8 +454,8 @@ void GEOMToolsGUI::OnEditDelete() // check if study is locked if ( _PTR(AttributeStudyProperties)( aStudy->GetProperties() )->IsLocked() ) { SUIT_MessageBox::warning( app->desktop(), - tr("WRN_WARNING"), - tr("WRN_STUDY_LOCKED") ); + tr("WRN_WARNING"), + tr("WRN_STUDY_LOCKED") ); return; // study is locked } @@ -478,8 +478,8 @@ void GEOMToolsGUI::OnEditDelete() QString parentComp = getParentComponent( obj ); if ( parentComp != geomComp ) { SUIT_MessageBox::warning( app->desktop(), - QObject::tr("ERR_ERROR"), - QObject::tr("NON_GEOM_OBJECTS_SELECTED").arg( getGeometryGUI()->moduleName() ) ); + QObject::tr("ERR_ERROR"), + QObject::tr("NON_GEOM_OBJECTS_SELECTED").arg( getGeometryGUI()->moduleName() ) ); return; // not GEOM object selected } @@ -487,7 +487,7 @@ void GEOMToolsGUI::OnEditDelete() // if GEOM component is selected, so skip other checks if ( isComponentSelected ) continue; /////////////////////////////////////////////////////// - + // check if object is reference _PTR(SObject) refobj; if ( obj && obj->ReferencedObject( refobj ) ) { @@ -509,10 +509,10 @@ void GEOMToolsGUI::OnEditDelete() for ( it->InitEx( true ); it->More(); it->Next() ) { _PTR(SObject) child( it->Value() ); if ( child && child->ReferencedObject( refobj ) ) - continue; // skip references + continue; // skip references aName = child->GetName().c_str(); if ( !aName.isEmpty() ) - allDeleted.insert( child->GetID().c_str(), aName ); + allDeleted.insert( child->GetID().c_str(), aName ); } } @@ -559,8 +559,8 @@ void GEOMToolsGUI::OnEditDelete() // GEOM component is not selected: check if selected objects are in use if ( inUse( aStudy, geomComp, allDeleted ) ) { SUIT_MessageBox::warning( app->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("DEP_OBJECT") ); + QObject::tr("WRN_WARNING"), + QObject::tr("DEP_OBJECT") ); return; // object(s) in use } // ... and then delete all objects @@ -636,8 +636,8 @@ bool GEOMToolsGUI::Import() bool aLocked = (_PTR(AttributeStudyProperties)(aStudy->GetProperties()))->IsLocked(); if ( aLocked ) { SUIT_MessageBox::warning( app->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("WRN_STUDY_LOCKED") ); + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_STUDY_LOCKED") ); return false; } @@ -645,8 +645,8 @@ bool GEOMToolsGUI::Import() GEOM::GEOM_Gen_var eng = GeometryGUI::GetGeomGen(); if ( CORBA::is_nil( eng ) ) { SUIT_MessageBox::critical( app->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr( "GEOM Engine is not started" ) ); + QObject::tr("WRN_WARNING"), + QObject::tr( "GEOM Engine is not started" ) ); return false; } @@ -665,7 +665,7 @@ bool GEOMToolsGUI::Import() // select files to be imported QString fileType; QStringList fileNames = getFileNames( app->desktop(), "", aMap, - tr( "GEOM_MEN_IMPORT" ), fileType, true ); + tr( "GEOM_MEN_IMPORT" ), fileType, true ); // set Wait cursor SUIT_OverrideCursor wc; @@ -695,13 +695,13 @@ bool GEOMToolsGUI::Import() QString ext = QFileInfo( fileName ).suffix().toUpper(); QRegExp re( "\\*\\.(\\w+)" ); for ( FilterMap::const_iterator it = aMap.begin(); - it != aMap.end() && aCurrentType.isEmpty(); ++it ) { - int pos = 0; - while ( re.indexIn( it.key(), pos ) >= 0 ) { - QString f = re.cap(1).trimmed().toUpper(); - if ( ext == f ) { aCurrentType = it.value(); break; } - pos = re.pos() + re.cap(1).length() + 2; - } + it != aMap.end() && aCurrentType.isEmpty(); ++it ) { + int pos = 0; + while ( re.indexIn( it.key(), pos ) >= 0 ) { + QString f = re.cap(1).trimmed().toUpper(); + if ( ext == f ) { aCurrentType = it.value(); break; } + pos = re.pos() + re.cap(1).length() + 2; + } } } else { @@ -723,78 +723,78 @@ bool GEOMToolsGUI::Import() // skl 29.05.2009 if ( aCurrentType == "IGES" ) { - GEOM::GEOM_Object_var anObj = aInsOp->Import( fileN, "IGES_UNIT" ); - bool needConvert = false; - TCollection_AsciiString aUnitName = aInsOp->GetErrorCode(); - if ( aUnitName.SubString( 1, 4 ) == "UNIT" ) - needConvert = aUnitName.SubString( 6, aUnitName.Length() ) != "M"; - - if ( needConvert ) { - if ( igesAnswer == SUIT_MessageBox::NoToAll ) { - // converting for all files is already approved - fileT = "IGES_SCALE"; - } - else if ( igesAnswer != SUIT_MessageBox::YesToAll ) { - SUIT_MessageBox::StandardButtons btns = SUIT_MessageBox::Yes | SUIT_MessageBox::No; - if ( i < fileNames.count()-1 ) btns = btns | SUIT_MessageBox::YesToAll | SUIT_MessageBox::NoToAll; - igesAnswer = SUIT_MessageBox::question( app->desktop(), - "Question",//tr("WRN_WARNING"), - tr("GEOM_SCALE_DIMENSIONS"), - btns | SUIT_MessageBox::Cancel, - SUIT_MessageBox::No ); - switch ( igesAnswer ) { - case SUIT_MessageBox::Cancel: - return false; // cancel (break) import operation - case SUIT_MessageBox::Yes: - case SUIT_MessageBox::YesToAll: - break; // scaling is confirmed - case SUIT_MessageBox::No: - case SUIT_MessageBox::NoAll: - fileT = "IGES_SCALE"; - default: - break; // scaling is rejected - } // switch ( igesAnswer ) - } // if ( igeAnswer != NoToAll ) - } // if ( needConvert ) + GEOM::GEOM_Object_var anObj = aInsOp->Import( fileN, "IGES_UNIT" ); + bool needConvert = false; + TCollection_AsciiString aUnitName = aInsOp->GetErrorCode(); + if ( aUnitName.SubString( 1, 4 ) == "UNIT" ) + needConvert = aUnitName.SubString( 6, aUnitName.Length() ) != "M"; + + if ( needConvert ) { + if ( igesAnswer == SUIT_MessageBox::NoToAll ) { + // converting for all files is already approved + fileT = "IGES_SCALE"; + } + else if ( igesAnswer != SUIT_MessageBox::YesToAll ) { + SUIT_MessageBox::StandardButtons btns = SUIT_MessageBox::Yes | SUIT_MessageBox::No; + if ( i < fileNames.count()-1 ) btns = btns | SUIT_MessageBox::YesToAll | SUIT_MessageBox::NoToAll; + igesAnswer = SUIT_MessageBox::question( app->desktop(), + "Question",//tr("WRN_WARNING"), + tr("GEOM_SCALE_DIMENSIONS"), + btns | SUIT_MessageBox::Cancel, + SUIT_MessageBox::No ); + switch ( igesAnswer ) { + case SUIT_MessageBox::Cancel: + return false; // cancel (break) import operation + case SUIT_MessageBox::Yes: + case SUIT_MessageBox::YesToAll: + break; // scaling is confirmed + case SUIT_MessageBox::No: + case SUIT_MessageBox::NoAll: + fileT = "IGES_SCALE"; + default: + break; // scaling is rejected + } // switch ( igesAnswer ) + } // if ( igeAnswer != NoToAll ) + } // if ( needConvert ) } // if ( aCurrentType == "IGES" ) else if ( aCurrentType == "ACIS" ) { - if ( acisAnswer != SUIT_MessageBox::YesToAll && acisAnswer != SUIT_MessageBox::NoToAll ) { - SUIT_MessageBox::StandardButtons btns = SUIT_MessageBox::Yes | SUIT_MessageBox::No; - if ( i < fileNames.count()-1 ) btns = btns | SUIT_MessageBox::YesToAll | SUIT_MessageBox::NoToAll; - acisAnswer = SUIT_MessageBox::question( app->desktop(), - "Question",//tr("WRN_WARNING"), - tr("GEOM_PUBLISH_NAMED_SHAPES"), - btns | SUIT_MessageBox::Cancel, - SUIT_MessageBox::No ); - if ( acisAnswer == SUIT_MessageBox::Cancel ) - return false; // cancel (break) import operation - } // if ( acisAnswer != YesToAll && acisAnswer != NoToAll ) + if ( acisAnswer != SUIT_MessageBox::YesToAll && acisAnswer != SUIT_MessageBox::NoToAll ) { + SUIT_MessageBox::StandardButtons btns = SUIT_MessageBox::Yes | SUIT_MessageBox::No; + if ( i < fileNames.count()-1 ) btns = btns | SUIT_MessageBox::YesToAll | SUIT_MessageBox::NoToAll; + acisAnswer = SUIT_MessageBox::question( app->desktop(), + "Question",//tr("WRN_WARNING"), + tr("GEOM_PUBLISH_NAMED_SHAPES"), + btns | SUIT_MessageBox::Cancel, + SUIT_MessageBox::No ); + if ( acisAnswer == SUIT_MessageBox::Cancel ) + return false; // cancel (break) import operation + } // if ( acisAnswer != YesToAll && acisAnswer != NoToAll ) } // else if ( aCurrentType == "ACIS" ) GEOM::GEOM_Object_var anObj = aInsOp->Import( fileN, fileT ); if ( !anObj->_is_nil() && aInsOp->IsDone() ) { - QString aPublishObjName = - GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, /*withExten=*/true ) ); - - SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy ); - GeometryGUI::GetGeomGen()->PublishInStudy( aDSStudy, - SALOMEDS::SObject::_nil(), - anObj, - aPublishObjName.toLatin1().constData() ); - - objsForDisplay.append( anObj ); - - if ( aCurrentType == "ACIS" ) { - if ( acisAnswer == SUIT_MessageBox::Yes || acisAnswer == SUIT_MessageBox::YesToAll ) - GeometryGUI::GetGeomGen()->PublishNamedShapesInStudy( aDSStudy, anObj ); - } - - anOp->commit(); + QString aPublishObjName = + GEOMBase::GetDefaultName( SUIT_Tools::file( fileName, /*withExten=*/true ) ); + + SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy ); + GeometryGUI::GetGeomGen()->PublishInStudy( aDSStudy, + SALOMEDS::SObject::_nil(), + anObj, + aPublishObjName.toLatin1().constData() ); + + objsForDisplay.append( anObj ); + + if ( aCurrentType == "ACIS" ) { + if ( acisAnswer == SUIT_MessageBox::Yes || acisAnswer == SUIT_MessageBox::YesToAll ) + GeometryGUI::GetGeomGen()->PublishNamedShapesInStudy( aDSStudy, anObj ); + } + + anOp->commit(); } else { - anOp->abort(); - errors.append( QString( "%1 : %2" ).arg( fileName ).arg( aInsOp->GetErrorCode() ) ); + anOp->abort(); + errors.append( QString( "%1 : %2" ).arg( fileName ).arg( aInsOp->GetErrorCode() ) ); } } catch( const SALOME::SALOME_Exception& S_ex ) { @@ -812,8 +812,8 @@ bool GEOMToolsGUI::Import() if ( errors.count() > 0 ) { SUIT_MessageBox::critical( app->desktop(), - QObject::tr( "GEOM_ERROR" ), - QObject::tr( "GEOM_IMPORT_ERRORS" ) + "\n" + errors.join( "\n" ) ); + QObject::tr( "GEOM_ERROR" ), + QObject::tr( "GEOM_IMPORT_ERRORS" ) + "\n" + errors.join( "\n" ) ); } app->updateActions(); //SRN: To update a Save button in the toolbar @@ -841,8 +841,8 @@ bool GEOMToolsGUI::Export() GEOM::GEOM_Gen_var eng = GeometryGUI::GetGeomGen(); if ( CORBA::is_nil( eng ) ) { SUIT_MessageBox::critical( app->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr( "GEOM Engine is not started" ) ); + QObject::tr("WRN_WARNING"), + QObject::tr( "GEOM Engine is not started" ) ); return false; } @@ -880,7 +880,7 @@ bool GEOMToolsGUI::Export() QString fileType; QString file = getFileName(app->desktop(), QString( IObject->getName() ), aMap, filters, - tr("GEOM_MEN_EXPORT"), false, fileType, true); + tr("GEOM_MEN_EXPORT"), false, fileType, true); // User has pressed "Cancel" --> stop the operation if ( file.isEmpty() || fileType.isEmpty() ) @@ -898,16 +898,16 @@ bool GEOMToolsGUI::Export() aInsOp->Export( anObj, file.toStdString().c_str(), fileType.toLatin1().constData() ); if ( aInsOp->IsDone() ) - anOp->commit(); + anOp->commit(); else - { - anOp->abort(); - wc.suspend(); - SUIT_MessageBox::critical( app->desktop(), - QObject::tr( "GEOM_ERROR" ), - QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ) ); - return false; - } + { + anOp->abort(); + wc.suspend(); + SUIT_MessageBox::critical( app->desktop(), + QObject::tr( "GEOM_ERROR" ), + QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ) ); + return false; + } } catch (const SALOME::SALOME_Exception& S_ex) { //QtCatchCorbaException(S_ex); @@ -919,8 +919,8 @@ bool GEOMToolsGUI::Export() if ( !appropriateObj ) SUIT_MessageBox::warning( app->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("GEOM_WRN_NO_APPROPRIATE_SELECTION") ); + QObject::tr("WRN_WARNING"), + QObject::tr("GEOM_WRN_NO_APPROPRIATE_SELECTION") ); return true; } @@ -954,8 +954,8 @@ void GEOMToolsGUI::removeObjectWithChildren(_PTR(SObject) obj, // Erase graphical object QListIterator it( views ); while ( it.hasNext() ) - if ( SALOME_View* view = it.next() ) - disp->Erase(geomObj, true, view); + if ( SALOME_View* view = it.next() ) + disp->Erase(geomObj, true, view); // Remove object from Engine // We can't directly remove object from engine. All we can do is to unpublish the object diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.h b/src/GEOMToolsGUI/GEOMToolsGUI.h index 0f48e9dd1..8b0f1a4e9 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI.h @@ -76,9 +76,9 @@ private: // Recursive deletion of object with children void removeObjectWithChildren( _PTR(SObject), - _PTR(Study), - QList, - GEOM_Displayer* ); + _PTR(Study), + QList, + GEOM_Displayer* ); }; #endif // GEOMTOOLSGUI_H diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index f9b7e9544..11e51738f 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -110,25 +110,25 @@ void GEOMToolsGUI::OnRename() if ( aSelMgr && appStudy ) { aSelMgr->selectedObjects( selected ); if ( !selected.IsEmpty() ) { - _PTR(Study) aStudy = appStudy->studyDS(); - - bool aLocked = (_PTR(AttributeStudyProperties)(aStudy->GetProperties()))->IsLocked(); - if ( aLocked ) { - SUIT_MessageBox::warning ( app->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("WRN_STUDY_LOCKED") ); - return; - } + _PTR(Study) aStudy = appStudy->studyDS(); + + bool aLocked = (_PTR(AttributeStudyProperties)(aStudy->GetProperties()))->IsLocked(); + if ( aLocked ) { + SUIT_MessageBox::warning ( app->desktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_STUDY_LOCKED") ); + return; + } bool isAny = false; // is there any appropriate object selected - for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { - Handle(SALOME_InteractiveObject) IObject = It.Value(); + for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { + Handle(SALOME_InteractiveObject) IObject = It.Value(); - _PTR(SObject) obj ( aStudy->FindObjectID(IObject->getEntry()) ); - _PTR(GenericAttribute) anAttr; - if ( obj ) { - if ( obj->FindAttribute(anAttr, "AttributeName") ) { - _PTR(AttributeName) aName (anAttr); + _PTR(SObject) obj ( aStudy->FindObjectID(IObject->getEntry()) ); + _PTR(GenericAttribute) anAttr; + if ( obj ) { + if ( obj->FindAttribute(anAttr, "AttributeName") ) { + _PTR(AttributeName) aName (anAttr); GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(obj)); @@ -142,15 +142,15 @@ void GEOMToolsGUI::OnRename() (dynamic_cast(app->activeModule()))->updateObjBrowser( false ); } } // if ( anObj ) - } // if ( name attribute ) - } // if ( obj ) - } // iterator + } // if ( name attribute ) + } // if ( obj ) + } // iterator if (!isAny) { - SUIT_MessageBox::warning( app->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("GEOM_WRN_NO_APPROPRIATE_SELECTION") ); - return; + SUIT_MessageBox::warning( app->desktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("GEOM_WRN_NO_APPROPRIATE_SELECTION") ); + return; } } } @@ -226,11 +226,11 @@ void GEOMToolsGUI::OnAutoColor() { SVTK_ViewWindow* vtkVW = dynamic_cast( window ); if ( !vtkVW ) - return; + return; SVTK_View* aView = vtkVW->getView(); SUIT_OverrideCursor(); for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) - aView->SetColor( It.Value(), c ); + aView->SetColor( It.Value(), c ); } else if ( isOCC ) { @@ -239,16 +239,16 @@ void GEOMToolsGUI::OnAutoColor() SOCC_Prs* anOCCPrs = dynamic_cast( aPrs ); if( !anOCCPrs ) - continue; + continue; AIS_ListOfInteractive aList; anOCCPrs->GetObjects( aList ); if( !aList.Extent() ) - continue; + continue; Handle(AIS_InteractiveObject) io = aList.First(); if( io.IsNull() ) - continue; + continue; Quantity_Color aQuanColor( c.red() / 255., c.green() / 255., c.blue() / 255., Quantity_TOC_RGB ); @@ -260,19 +260,19 @@ void GEOMToolsGUI::OnAutoColor() Aspect_TypeOfMarker aCurTypeOfMarker; aCurPointAspect->Aspect()->Values( aCurColor, aCurTypeOfMarker, aCurScale ); if ( aCurTypeOfMarker != Aspect_TOM_USERDEFINED ) { - aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aCurTypeOfMarker, aQuanColor, aCurScale) ); + aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aCurTypeOfMarker, aQuanColor, aCurScale) ); } else { - Standard_Integer aWidth, aHeight; - aCurPointAspect->GetTextureSize( aWidth, aHeight ); - Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture(); - aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aQuanColor, 1, aWidth, aHeight, aTexture ) ); + Standard_Integer aWidth, aHeight; + aCurPointAspect->GetTextureSize( aWidth, aHeight ); + Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture(); + aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aQuanColor, 1, aWidth, aHeight, aTexture ) ); } ic->SetLocalAttributes( io, aCurDrawer ); io->SetColor( aQuanColor ); if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) ) - Handle(GEOM_AISShape)::DownCast( io )->SetShadingColor( aQuanColor ); + Handle(GEOM_AISShape)::DownCast( io )->SetShadingColor( aQuanColor ); io->Redisplay( Standard_True ); } @@ -319,79 +319,79 @@ void GEOMToolsGUI::OnColor() if ( aSelMgr ) { aSelMgr->selectedObjects( selected ); if ( !selected.IsEmpty() ) { - SUIT_ViewWindow* window = app->desktop()->activeWindow(); - bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() ); - bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() ); - if ( isVTK ) { - SVTK_ViewWindow* vtkVW = dynamic_cast( window ); - if ( !vtkVW ) - return; - SVTK_View* aView = vtkVW->getView(); - QColor initcolor = aView->GetColor( selected.First() ); - QColor c = QColorDialog::getColor( initcolor, app->desktop() ); - if ( c.isValid() ) { - SUIT_OverrideCursor(); - for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { - aView->SetColor( It.Value(), c ); - } - } - } // if ( isVTK ) - else if ( isOCC ) { - Handle(AIS_InteractiveObject) io = GEOMBase::GetAIS( selected.First() ); - if ( !io.IsNull() ) { - Quantity_Color aColor; - io->Color( aColor ); - QColor initcolor( (int)( aColor.Red() * 255.0 ), (int)( aColor.Green() * 255.0 ), (int)( aColor.Blue() * 255.0 ) ); - QColor c = QColorDialog::getColor( initcolor, app->desktop() ); - if ( c.isValid() ) { - SUIT_OverrideCursor(); - aColor = Quantity_Color( c.red() / 255., c.green() / 255., c.blue() / 255., Quantity_TOC_RGB ); - for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { - io = GEOMBase::GetAIS( It.Value(), true ); - if ( !io.IsNull() ) { - // Set color for a point - OCCViewer_Viewer* vm = dynamic_cast( window->getViewManager()->getViewModel() ); - Handle (AIS_InteractiveContext) ic = vm->getAISContext(); - Handle(AIS_Drawer) aCurDrawer = io->Attributes(); - Handle(Prs3d_PointAspect) aCurPointAspect = aCurDrawer->PointAspect(); - Quantity_Color aCurColor; - Standard_Real aCurScale; - Aspect_TypeOfMarker aCurTypeOfMarker; - aCurPointAspect->Aspect()->Values( aCurColor, aCurTypeOfMarker, aCurScale ); - if ( aCurTypeOfMarker != Aspect_TOM_USERDEFINED ) { - aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aCurTypeOfMarker, aColor, aCurScale) ); - } - else { - Standard_Integer aWidth, aHeight; - aCurPointAspect->GetTextureSize( aWidth, aHeight ); - Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture(); - aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aColor, 1, aWidth, aHeight, aTexture ) ); - } - ic->SetLocalAttributes(io, aCurDrawer); - - io->SetColor( aColor ); - if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) ) - Handle(GEOM_AISShape)::DownCast( io )->SetShadingColor( aColor ); - - io->Redisplay( Standard_True ); - - // store color to GEOM_Object - _PTR(Study) aStudy = appStudy->studyDS(); - _PTR(SObject) aSObject( aStudy->FindObjectID( It.Value()->getEntry() ) ); - GEOM::GEOM_Object_var anObject = - GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObject)); - - SALOMEDS::Color aSColor; - aSColor.R = (double)c.red() / 255.0; - aSColor.G = (double)c.green() / 255.0; - aSColor.B = (double)c.blue() / 255.0; - anObject->SetColor( aSColor ); - anObject->SetAutoColor( false ); - } - } - } // if c.isValid() - } // first IO is not null - } // if ( isOCC ) + SUIT_ViewWindow* window = app->desktop()->activeWindow(); + bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() ); + bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() ); + if ( isVTK ) { + SVTK_ViewWindow* vtkVW = dynamic_cast( window ); + if ( !vtkVW ) + return; + SVTK_View* aView = vtkVW->getView(); + QColor initcolor = aView->GetColor( selected.First() ); + QColor c = QColorDialog::getColor( initcolor, app->desktop() ); + if ( c.isValid() ) { + SUIT_OverrideCursor(); + for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { + aView->SetColor( It.Value(), c ); + } + } + } // if ( isVTK ) + else if ( isOCC ) { + Handle(AIS_InteractiveObject) io = GEOMBase::GetAIS( selected.First() ); + if ( !io.IsNull() ) { + Quantity_Color aColor; + io->Color( aColor ); + QColor initcolor( (int)( aColor.Red() * 255.0 ), (int)( aColor.Green() * 255.0 ), (int)( aColor.Blue() * 255.0 ) ); + QColor c = QColorDialog::getColor( initcolor, app->desktop() ); + if ( c.isValid() ) { + SUIT_OverrideCursor(); + aColor = Quantity_Color( c.red() / 255., c.green() / 255., c.blue() / 255., Quantity_TOC_RGB ); + for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { + io = GEOMBase::GetAIS( It.Value(), true ); + if ( !io.IsNull() ) { + // Set color for a point + OCCViewer_Viewer* vm = dynamic_cast( window->getViewManager()->getViewModel() ); + Handle (AIS_InteractiveContext) ic = vm->getAISContext(); + Handle(AIS_Drawer) aCurDrawer = io->Attributes(); + Handle(Prs3d_PointAspect) aCurPointAspect = aCurDrawer->PointAspect(); + Quantity_Color aCurColor; + Standard_Real aCurScale; + Aspect_TypeOfMarker aCurTypeOfMarker; + aCurPointAspect->Aspect()->Values( aCurColor, aCurTypeOfMarker, aCurScale ); + if ( aCurTypeOfMarker != Aspect_TOM_USERDEFINED ) { + aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aCurTypeOfMarker, aColor, aCurScale) ); + } + else { + Standard_Integer aWidth, aHeight; + aCurPointAspect->GetTextureSize( aWidth, aHeight ); + Handle(Graphic3d_HArray1OfBytes) aTexture = aCurPointAspect->GetTexture(); + aCurDrawer->SetPointAspect( new Prs3d_PointAspect( aColor, 1, aWidth, aHeight, aTexture ) ); + } + ic->SetLocalAttributes(io, aCurDrawer); + + io->SetColor( aColor ); + if ( io->IsKind( STANDARD_TYPE(GEOM_AISShape) ) ) + Handle(GEOM_AISShape)::DownCast( io )->SetShadingColor( aColor ); + + io->Redisplay( Standard_True ); + + // store color to GEOM_Object + _PTR(Study) aStudy = appStudy->studyDS(); + _PTR(SObject) aSObject( aStudy->FindObjectID( It.Value()->getEntry() ) ); + GEOM::GEOM_Object_var anObject = + GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(aSObject)); + + SALOMEDS::Color aSColor; + aSColor.R = (double)c.red() / 255.0; + aSColor.G = (double)c.green() / 255.0; + aSColor.B = (double)c.blue() / 255.0; + anObject->SetColor( aSColor ); + anObject->SetAutoColor( false ); + } + } + } // if c.isValid() + } // first IO is not null + } // if ( isOCC ) } // if ( selection not empty ) } } @@ -426,26 +426,26 @@ void GEOMToolsGUI::OnNbIsos() int VIso = CurDrawer->VIsoAspect()->Number(); GEOMToolsGUI_NbIsosDlg * NbIsosDlg = - new GEOMToolsGUI_NbIsosDlg( SUIT_Session::session()->activeApplication()->desktop() ); + new GEOMToolsGUI_NbIsosDlg( SUIT_Session::session()->activeApplication()->desktop() ); NbIsosDlg->setU( UIso ); NbIsosDlg->setV( VIso ); if ( NbIsosDlg->exec() ) { - SUIT_OverrideCursor(); - for(; ic->MoreCurrent(); ic->NextCurrent()) { - CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current()); - Handle(AIS_Drawer) CurDrawer = CurObject->Attributes(); - - int nbUIso = NbIsosDlg->getU(); - int nbVIso = NbIsosDlg->getV(); - - CurDrawer->SetUIsoAspect( new Prs3d_IsoAspect(Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 0.5 , nbUIso) ); - CurDrawer->SetVIsoAspect( new Prs3d_IsoAspect(Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 0.5 , nbVIso) ); - - ic->SetLocalAttributes(CurObject, CurDrawer); - ic->Redisplay(CurObject); - } + SUIT_OverrideCursor(); + for(; ic->MoreCurrent(); ic->NextCurrent()) { + CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current()); + Handle(AIS_Drawer) CurDrawer = CurObject->Attributes(); + + int nbUIso = NbIsosDlg->getU(); + int nbVIso = NbIsosDlg->getV(); + + CurDrawer->SetUIsoAspect( new Prs3d_IsoAspect(Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 0.5 , nbUIso) ); + CurDrawer->SetVIsoAspect( new Prs3d_IsoAspect(Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 0.5 , nbVIso) ); + + ic->SetLocalAttributes(CurObject, CurDrawer); + ic->Redisplay(CurObject); + } } } } @@ -477,10 +477,10 @@ void GEOMToolsGUI::OnNbIsos() SALOME_Prs* aPrs = view->CreatePrs( anIObject->getEntry() ); SVTK_Prs* vtkPrs = dynamic_cast( aPrs ); if ( vtkPrs ) { - vtkActorCollection* anActors = vtkPrs->GetObjects(); - anActors->InitTraversal(); - vtkActor* anAct = anActors->GetNextActor(); - aCollection->AddItem(anAct); + vtkActorCollection* anActors = vtkPrs->GetObjects(); + anActors->InitTraversal(); + vtkActor* anAct = anActors->GetNextActor(); + aCollection->AddItem(anAct); } } @@ -508,14 +508,14 @@ void GEOMToolsGUI::OnNbIsos() SUIT_OverrideCursor(); while( anAct!=NULL ) { - if(GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)){ - // There are no casting to needed actor. - UIso = NbIsosDlg->getU(); - VIso = NbIsosDlg->getV(); - int aIsos[2]={UIso,VIso}; - anActor->SetNbIsos(aIsos); - } - anAct = aCollection->GetNextActor(); + if(GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(anAct)){ + // There are no casting to needed actor. + UIso = NbIsosDlg->getU(); + VIso = NbIsosDlg->getV(); + int aIsos[2]={UIso,VIso}; + anActor->SetNbIsos(aIsos); + } + anAct = aCollection->GetNextActor(); } } } // end vtkviewer @@ -540,74 +540,74 @@ void GEOMToolsGUI::OnOpen() _PTR(GenericAttribute) anAttr; bool useSubItems = false; while (anIter->More() && !useSubItems) { - _PTR(SObject) subobj ( anIter->Value() ); - if (subobj->FindAttribute(anAttr, "AttributePersistentRef")) { - useSubItems = true; - obj = subobj; - } - else - anIter->Next(); + _PTR(SObject) subobj ( anIter->Value() ); + if (subobj->FindAttribute(anAttr, "AttributePersistentRef")) { + useSubItems = true; + obj = subobj; + } + else + anIter->Next(); } obj->FindAttribute(anAttr, "AttributePersistentRef"); while(useSubItems?anIter->More():!anAttr->_is_nil()) { - if(!obj->FindAttribute(anAttr, "AttributeIOR") && - obj->FindAttribute(anAttr, "AttributePersistentRef")) { - _PTR(SComponent) FComp ( obj->GetFatherComponent() ); - if (FComp) { - if (FComp->FindAttribute(anAttr, "AttributeName")) { - _PTR(AttributeName) aName ( anAttr ); - QString compName = QAD_Application::getDesktop()->getComponentName(aName->Value().c_str()); - // parent->loadComponentData(parent->getComponentName(aName->Value())); - Engines::Component_var comp ; - if ( compName.compare("SUPERV") == 0 ) { - comp = QAD_Application::getDesktop()->getEngine( "SuperVisionContainer", compName) ; - } - else { - comp = QAD_Application::getDesktop()->getEngine( "FactoryServer", compName); - if ( comp->_is_nil() ) - comp = QAD_Application::getDesktop()->getEngine( "FactoryServerPy", compName); - } - - if (!CORBA::is_nil(comp)) { - SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp); - if (!CORBA::is_nil(driver)) { - SALOMEDS::StudyBuilder_var B = dynamic_cast(aStudy.get())->GetStudy()->NewBuilder(); - if (!CORBA::is_nil(B)) { - B->LoadWith(FComp,driver); - } else { - return; - } - } - else { - MESSAGE("loadComponentData(): Driver is null"); - return; - } - } - else { - MESSAGE("loadComponentData(): Engine is null"); - return; - } - // // load - // Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer","GEOM"); - // if (!CORBA::is_nil(comp)) { - // SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp); - // SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - // SALOMEDS::SComponent_var SC = aStudy->FindComponent("GEOM"); - // if (!CORBA::is_nil(SC)) - // aStudyBuilder->LoadWith(SC,driver); - } - } - else { - MESSAGE("Component is null"); - } - } - if(useSubItems) { - anIter->Next(); - obj.reset( anIter->Value() ); - } - else - anAttr = NULL; + if(!obj->FindAttribute(anAttr, "AttributeIOR") && + obj->FindAttribute(anAttr, "AttributePersistentRef")) { + _PTR(SComponent) FComp ( obj->GetFatherComponent() ); + if (FComp) { + if (FComp->FindAttribute(anAttr, "AttributeName")) { + _PTR(AttributeName) aName ( anAttr ); + QString compName = QAD_Application::getDesktop()->getComponentName(aName->Value().c_str()); + // parent->loadComponentData(parent->getComponentName(aName->Value())); + Engines::Component_var comp ; + if ( compName.compare("SUPERV") == 0 ) { + comp = QAD_Application::getDesktop()->getEngine( "SuperVisionContainer", compName) ; + } + else { + comp = QAD_Application::getDesktop()->getEngine( "FactoryServer", compName); + if ( comp->_is_nil() ) + comp = QAD_Application::getDesktop()->getEngine( "FactoryServerPy", compName); + } + + if (!CORBA::is_nil(comp)) { + SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp); + if (!CORBA::is_nil(driver)) { + SALOMEDS::StudyBuilder_var B = dynamic_cast(aStudy.get())->GetStudy()->NewBuilder(); + if (!CORBA::is_nil(B)) { + B->LoadWith(FComp,driver); + } else { + return; + } + } + else { + MESSAGE("loadComponentData(): Driver is null"); + return; + } + } + else { + MESSAGE("loadComponentData(): Engine is null"); + return; + } + // // load + // Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer","GEOM"); + // if (!CORBA::is_nil(comp)) { + // SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp); + // SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + // SALOMEDS::SComponent_var SC = aStudy->FindComponent("GEOM"); + // if (!CORBA::is_nil(SC)) + // aStudyBuilder->LoadWith(SC,driver); + } + } + else { + MESSAGE("Component is null"); + } + } + if(useSubItems) { + anIter->Next(); + obj.reset( anIter->Value() ); + } + else + anAttr = NULL; } } } @@ -636,27 +636,27 @@ void GEOMToolsGUI::OnShowHideChildren( bool show ) if ( aSelMgr && appStudy ) { aSelMgr->selectedObjects( selected ); if ( !selected.IsEmpty() ) { - _PTR(Study) aStudy = appStudy->studyDS(); - _PTR(StudyBuilder) B = aStudy->NewBuilder(); - - bool aLocked = ( _PTR(AttributeStudyProperties)( aStudy->GetProperties() ) )->IsLocked(); - if ( aLocked ) { - SUIT_MessageBox::warning( app->desktop(), - QObject::tr( "WRN_WARNING" ), - QObject::tr( "WRN_STUDY_LOCKED" ) ); - return; - } - - for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { - Handle(SALOME_InteractiveObject) IObject = It.Value(); - - _PTR(SObject) obj ( aStudy->FindObjectID( IObject->getEntry() ) ); - _PTR(GenericAttribute) anAttr; - if ( obj ) { - _PTR(AttributeExpandable) aExp = B->FindOrCreateAttribute( obj, "AttributeExpandable" ); - aExp->SetExpandable( show ); - } // if ( obj ) - } // iterator + _PTR(Study) aStudy = appStudy->studyDS(); + _PTR(StudyBuilder) B = aStudy->NewBuilder(); + + bool aLocked = ( _PTR(AttributeStudyProperties)( aStudy->GetProperties() ) )->IsLocked(); + if ( aLocked ) { + SUIT_MessageBox::warning( app->desktop(), + QObject::tr( "WRN_WARNING" ), + QObject::tr( "WRN_STUDY_LOCKED" ) ); + return; + } + + for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { + Handle(SALOME_InteractiveObject) IObject = It.Value(); + + _PTR(SObject) obj ( aStudy->FindObjectID( IObject->getEntry() ) ); + _PTR(GenericAttribute) anAttr; + if ( obj ) { + _PTR(AttributeExpandable) aExp = B->FindOrCreateAttribute( obj, "AttributeExpandable" ); + aExp->SetExpandable( show ); + } // if ( obj ) + } // iterator } } app->updateObjectBrowser( false ); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx index 9a350496f..d2d0dc11f 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx @@ -75,8 +75,8 @@ static QStringList objectsToNames( const QMap& objects ) \param parent parent widget */ GEOMToolsGUI_DeleteDlg::GEOMToolsGUI_DeleteDlg( QWidget* parent, - const QMap& objects, - bool deleteAll ) + const QMap& objects, + bool deleteAll ) : QDialog( parent ) { setModal( true ); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx index cb5b81754..af3a7ba79 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx @@ -211,20 +211,20 @@ void GEOMToolsGUI_MarkerDlg::accept() SALOME_ListIO selected; selMgr->selectedObjects( selected ); if ( !selected.IsEmpty() ) { - _PTR(Study) study = getStudy()->studyDS(); - for ( SALOME_ListIteratorOfListIO it( selected ); it.More(); it.Next() ) { - _PTR(SObject) aSObject( study->FindObjectID( it.Value()->getEntry() ) ); - GEOM::GEOM_Object_var anObject = - GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( aSObject ) ); - if ( !anObject->_is_nil() ) { - if ( myWGStack->currentIndex() == 0 ) - anObject->SetMarkerStd( getMarkerType(), getStandardMarkerScale() ); - else if ( getCustomMarkerID() > 0 ) - anObject->SetMarkerTexture( getCustomMarkerID() ); - } - } - GEOM_Displayer displayer( getStudy() ); - displayer.Redisplay( selected, true ); + _PTR(Study) study = getStudy()->studyDS(); + for ( SALOME_ListIteratorOfListIO it( selected ); it.More(); it.Next() ) { + _PTR(SObject) aSObject( study->FindObjectID( it.Value()->getEntry() ) ); + GEOM::GEOM_Object_var anObject = + GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( aSObject ) ); + if ( !anObject->_is_nil() ) { + if ( myWGStack->currentIndex() == 0 ) + anObject->SetMarkerStd( getMarkerType(), getStandardMarkerScale() ); + else if ( getCustomMarkerID() > 0 ) + anObject->SetMarkerTexture( getCustomMarkerID() ); + } + } + GEOM_Displayer displayer( getStudy() ); + displayer.Redisplay( selected, true ); } } } @@ -277,35 +277,35 @@ void GEOMToolsGUI_MarkerDlg::init() SALOME_ListIO selected; selMgr->selectedObjects( selected ); if ( !selected.IsEmpty() ) { - _PTR(Study) study = getStudy()->studyDS(); - for ( SALOME_ListIteratorOfListIO it( selected ); it.More(); it.Next() ) { - _PTR(SObject) aSObject( study->FindObjectID( it.Value()->getEntry() ) ); - GEOM::GEOM_Object_var anObject = - GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( aSObject ) ); - if ( !anObject->_is_nil() ) { - GEOM::marker_type mtype = anObject->GetMarkerType(); - if ( aType == -1 ) - aType = mtype; - else if ( aType != mtype ) { - aType = (GEOM::marker_type)-1; - break; - } - if ( mtype > GEOM::MT_NONE && mtype < GEOM::MT_USER ) { - GEOM::marker_size msize = anObject->GetMarkerSize(); - if ( aSize == -1 ) - aSize = msize; - else if ( aSize != msize ) - break; - } - else if ( mtype == GEOM::MT_USER ) { - int mtexture = anObject->GetMarkerTexture(); - if ( aTexture == 0 ) - aTexture = mtexture; - else if ( aTexture != mtexture ) - break; - } - } - } + _PTR(Study) study = getStudy()->studyDS(); + for ( SALOME_ListIteratorOfListIO it( selected ); it.More(); it.Next() ) { + _PTR(SObject) aSObject( study->FindObjectID( it.Value()->getEntry() ) ); + GEOM::GEOM_Object_var anObject = + GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( aSObject ) ); + if ( !anObject->_is_nil() ) { + GEOM::marker_type mtype = anObject->GetMarkerType(); + if ( aType == -1 ) + aType = mtype; + else if ( aType != mtype ) { + aType = (GEOM::marker_type)-1; + break; + } + if ( mtype > GEOM::MT_NONE && mtype < GEOM::MT_USER ) { + GEOM::marker_size msize = anObject->GetMarkerSize(); + if ( aSize == -1 ) + aSize = msize; + else if ( aSize != msize ) + break; + } + else if ( mtype == GEOM::MT_USER ) { + int mtexture = anObject->GetMarkerTexture(); + if ( aTexture == 0 ) + aTexture = mtexture; + else if ( aTexture != mtexture ) + break; + } + } + } } } } @@ -315,7 +315,7 @@ void GEOMToolsGUI_MarkerDlg::init() setCustomMarker( aTexture ); else setStandardMarker((GEOM::marker_type)(resMgr->integerValue("Geometry", "type_of_marker", (int)Aspect_TOM_PLUS) + 1), - (GEOM::marker_size)(resMgr->integerValue("Geometry", "marker_scale", 1))); + (GEOM::marker_size)(resMgr->integerValue("Geometry", "marker_scale", 1))); } void GEOMToolsGUI_MarkerDlg::addTexture( int id, bool select ) const @@ -329,18 +329,18 @@ void GEOMToolsGUI_MarkerDlg::addTexture( int id, bool select ) const image.setColor( 1, qRgba( 0, 0, 0, 255 ) ); int bytesperline = tWidth/8; for ( int j = texture->Lower(); j <= texture->Upper(); j++ ) { - uchar val = (uchar)texture->Value( j ); - for ( int k = 0; k < 8; k++ ) { - int row = ( j - texture->Lower() ) / bytesperline; - int col = ( ( j - texture->Lower() ) % bytesperline ) * 8 + k; - image.setPixel( row, col, ( val & (1<<(8-k-1)) ) ? 1 : 0 ); - } + uchar val = (uchar)texture->Value( j ); + for ( int k = 0; k < 8; k++ ) { + int row = ( j - texture->Lower() ) / bytesperline; + int col = ( ( j - texture->Lower() ) % bytesperline ) * 8 + k; + image.setPixel( row, col, ( val & (1<<(8-k-1)) ) ? 1 : 0 ); + } } QPixmap pixmap = QPixmap::fromImage( image ); if ( !pixmap.isNull() ) { - myCustomTypeCombo->addItem( pixmap, QString::number( id ) ); - myCustomTypeCombo->setId( myCustomTypeCombo->count()-1, id ); - if ( select ) myCustomTypeCombo->setCurrentId( id ); + myCustomTypeCombo->addItem( pixmap, QString::number( id ) ); + myCustomTypeCombo->setId( myCustomTypeCombo->count()-1, id ); + if ( select ) myCustomTypeCombo->setCurrentId( id ); } } } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx index b8bc790ba..e121ce402 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx @@ -174,16 +174,16 @@ void GEOMToolsGUI_NbIsosDlg::ClickOnHelp() app->onHelpContextModule(aGeomGUI ? app->moduleName(aGeomGUI->moduleName()) : QString(""), myHelpFileName); } else { - QString platform; + QString platform; #ifdef WIN32 - platform = "winapplication"; + platform = "winapplication"; #else - platform = "application"; + platform = "application"; #endif SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"), - QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), - QObject::tr("BUT_OK")); + QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). + arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), + QObject::tr("BUT_OK")); } } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index c3f06d704..08c943795 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -202,16 +202,16 @@ void GEOMToolsGUI_TransparencyDlg::ClickOnHelp() app->onHelpContextModule(aGeomGUI ? app->moduleName(aGeomGUI->moduleName()) : QString(""), myHelpFileName); } else { - QString platform; + QString platform; #ifdef WIN32 - platform = "winapplication"; + platform = "winapplication"; #else - platform = "application"; + platform = "application"; #endif SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"), - QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), - QObject::tr("BUT_OK")); + QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). + arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), + QObject::tr("BUT_OK")); } } @@ -247,7 +247,7 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency() Handle(SALOME_InteractiveObject) FirstIOS = selected.First(); if ( FirstIOS.IsNull() ) return; - + SUIT_ViewWindow* window = app->desktop()->activeWindow(); bool isOCC = ( window && window->getViewManager()->getType() == OCCViewer_Viewer::Type() ); bool isVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() ); @@ -257,7 +257,7 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency() if ( !vtkVW ) return; SVTK_View* aView = vtkVW->getView(); - if ( myFirstInit ) { + if ( myFirstInit ) { myFirstInit = false; int transp = int (100 - ((aView->GetTransparency(FirstIOS))*100.0) + 0.5); mySlider->setValue(transp); @@ -271,7 +271,7 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency() } aView->Repaint(); } // if ( isVTK ) - + else if ( isOCC ) { GEOMBase* gb = new GEOMBase(); Standard_Boolean found; @@ -280,7 +280,7 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency() myFirstInit = false; aisShape = gb->ConvertIOinGEOMAISShape( FirstIOS, found ); if( !found ) - return; + return; int transp = int( 100 - ( aisShape->Transparency() * 100.0 ) + 0.5); mySlider->setValue(transp); ValueHasChanged(); @@ -295,8 +295,8 @@ void GEOMToolsGUI_TransparencyDlg::SetTransparency() for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { aisShape = gb->ConvertIOinGEOMAISShape( It.Value(), found ); if ( found ) { - ic->SetTransparency( aisShape, newValue, false ); - ic->Redisplay( aisShape, Standard_False, Standard_True ); + ic->SetTransparency( aisShape, newValue, false ); + ic->Redisplay( aisShape, Standard_False, Standard_True ); } } // for... ic->UpdateCurrentViewer(); diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index fa200559a..d658806b5 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -45,7 +45,7 @@ // TRUE to construct a modal dialog. //================================================================================= GenerationGUI_FillingDlg::GenerationGUI_FillingDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_FILLING" ) ) ); @@ -146,7 +146,7 @@ void GenerationGUI_FillingDlg::Init() connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_FILLING" ) ); resize(100,100); @@ -275,7 +275,7 @@ void GenerationGUI_FillingDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); globalSelection( GEOM_COMPOUND ); displayPreview(); } @@ -357,7 +357,7 @@ bool GenerationGUI_FillingDlg::execute( ObjectList& objects ) { GEOM::GEOM_I3DPrimOperations_var anOper = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation()); GEOM::GEOM_Object_var anObj = anOper->MakeFilling( myCompound, myMinDeg, myMaxDeg, - myTol2D, myTol3D, myNbIter, myIsApprox ); + myTol2D, myTol3D, myNbIter, myIsApprox ); if ( !anObj->_is_nil() ) { if ( !IsPreview() ) diff --git a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx index c6248a1e8..fc12dfb7c 100644 --- a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx @@ -218,7 +218,7 @@ bool GenerationGUI_PipeDlg::ClickOnApply() initName(); if ( getConstructorId() != 1 ) - ConstructorsClicked( getConstructorId() ); + ConstructorsClicked( getConstructorId() ); // activate selection and connect selection manager GroupPoints->PushButton1->click(); return true; @@ -261,8 +261,8 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument() S.ShapeType() == TopAbs_SHAPE) return; if ( getConstructorId() == 1 && - (S.ShapeType() == TopAbs_SHELL || - S.ShapeType() == TopAbs_VERTEX)) + (S.ShapeType() == TopAbs_SHELL || + S.ShapeType() == TopAbs_VERTEX)) return; myBase = aSelectedObject; @@ -274,7 +274,7 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument() GroupPoints->PushButton3->click(); } else if (myEditCurrentArgument == GroupPoints->LineEdit2 || - myEditCurrentArgument == GroupPoints->LineEdit3) { + myEditCurrentArgument == GroupPoints->LineEdit3) { myEditCurrentArgument == GroupPoints->LineEdit2 ? myOkPath = false : myOkVec = false; bool myOk = false; QString aName = GEOMBase::GetName(aSelectedObject); @@ -286,58 +286,58 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument() } else { - if (aSelectedObject != myBase) { - TColStd_IndexedMapOfInteger aMap; - aSelMgr->GetIndexes(aSelList.First(), aMap); - if (aMap.Extent() == 1) { - int anIndex = aMap(1); - aName.append(":edge_" + QString::number(anIndex)); - - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); - - if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = - getGeomEngine()->GetIShapesOperations(getStudyId()); - aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); - myOk = true; - } - else { // get Object from study - aSelectedObject = aFindedObject; - myOk = true; - } - } - else { - myOk = true; - if (S.ShapeType() != TopAbs_EDGE) { - aSelectedObject = GEOM::GEOM_Object::_nil(); - aName = ""; - myOk = false; - } - } - if (myEditCurrentArgument == GroupPoints->LineEdit2) { - myPath = aSelectedObject; - myOkPath = myOk; - } - else if (myEditCurrentArgument == GroupPoints->LineEdit3) { - myVec = aSelectedObject; - myOkVec = myOk; - } - } - myEditCurrentArgument->setText(aName); - - if (myOkPath) { - if (!myOkBase) - GroupPoints->PushButton1->click(); - else if (!myOkVec) - GroupPoints->PushButton3->click(); - } - else if (myOkVec) { - if (!myOkBase) - GroupPoints->PushButton1->click(); - else if (!myOkPath) - GroupPoints->PushButton2->click(); - } + if (aSelectedObject != myBase) { + TColStd_IndexedMapOfInteger aMap; + aSelMgr->GetIndexes(aSelList.First(), aMap); + if (aMap.Extent() == 1) { + int anIndex = aMap(1); + aName.append(":edge_" + QString::number(anIndex)); + + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); + + if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study + GEOM::GEOM_IShapesOperations_var aShapesOp = + getGeomEngine()->GetIShapesOperations(getStudyId()); + aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); + myOk = true; + } + else { // get Object from study + aSelectedObject = aFindedObject; + myOk = true; + } + } + else { + myOk = true; + if (S.ShapeType() != TopAbs_EDGE) { + aSelectedObject = GEOM::GEOM_Object::_nil(); + aName = ""; + myOk = false; + } + } + if (myEditCurrentArgument == GroupPoints->LineEdit2) { + myPath = aSelectedObject; + myOkPath = myOk; + } + else if (myEditCurrentArgument == GroupPoints->LineEdit3) { + myVec = aSelectedObject; + myOkVec = myOk; + } + } + myEditCurrentArgument->setText(aName); + + if (myOkPath) { + if (!myOkBase) + GroupPoints->PushButton1->click(); + else if (!myOkVec) + GroupPoints->PushButton3->click(); + } + else if (myOkVec) { + if (!myOkBase) + GroupPoints->PushButton1->click(); + else if (!myOkPath) + GroupPoints->PushButton2->click(); + } } } @@ -429,7 +429,7 @@ void GenerationGUI_PipeDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked(getConstructorId()); } diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx index b540d1979..de01faa9e 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx @@ -576,7 +576,7 @@ void GenerationGUI_PrismDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index 0004ec356..b5f35c767 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -345,7 +345,7 @@ void GenerationGUI_RevolDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); displayPreview(); } diff --git a/src/GroupGUI/GroupGUI.cxx b/src/GroupGUI/GroupGUI.cxx index 89d84ebf2..fd59b68b5 100644 --- a/src/GroupGUI/GroupGUI.cxx +++ b/src/GroupGUI/GroupGUI.cxx @@ -74,8 +74,8 @@ bool GroupGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) if ( aStudy->GetProperties()->IsLocked() ) { SUIT_MessageBox::warning( parent, - tr( "WRN_WARNING" ), - tr( "WRN_STUDY_LOCKED" ) ); + tr( "WRN_WARNING" ), + tr( "WRN_STUDY_LOCKED" ) ); return false; } @@ -94,14 +94,14 @@ bool GroupGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) aSelMgr->selectedObjects( aList ); if ( aList.Extent() == 1 ) { - Standard_Boolean aResult = Standard_False; - GEOM::GEOM_Object_var anObj = - GEOMBase::ConvertIOinGEOMObject( aList.First(), aResult ); - - if ( aResult && !CORBA::is_nil( anObj ) && anObj->GetType() == GEOM_GROUP ) { - aDlg = new GroupGUI_GroupDlg( GroupGUI_GroupDlg::EditGroup, getGeometryGUI(), parent ); - break; - } + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( aList.First(), aResult ); + + if ( aResult && !CORBA::is_nil( anObj ) && anObj->GetType() == GEOM_GROUP ) { + aDlg = new GroupGUI_GroupDlg( GroupGUI_GroupDlg::EditGroup, getGeometryGUI(), parent ); + break; + } } SUIT_MessageBox::warning( parent, tr( "WRN_WARNING" ), tr( "NO_GROUP" ) ); break; diff --git a/src/IGESExport/IGESExport.cxx b/src/IGESExport/IGESExport.cxx index 72e6cb2fa..bd6557b20 100644 --- a/src/IGESExport/IGESExport.cxx +++ b/src/IGESExport/IGESExport.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: IGESExport.cxx -// Created: Wed May 19 14:49:45 2004 -// Author: Pavel TELKOV -// +// File: IGESExport.cxx +// Created: Wed May 19 14:49:45 2004 +// Author: Pavel TELKOV +// // #include "utilities.h" @@ -81,7 +81,7 @@ IGESEXPORT_EXPORT // initialize writer IGESControl_Controller::Init(); //IGESControl_Writer ICW (Interface_Static::CVal("write.iges.unit"), - // Interface_Static::IVal("write.iges.brep.mode")); + // Interface_Static::IVal("write.iges.brep.mode")); IGESControl_Writer ICW ("M", aBrepMode); // "write.iges.unit" ->> VSR 15.09.09: export explicitly in meters Interface_Static::SetCVal("xstep.cascade.unit","M"); diff --git a/src/IGESImport/IGESImport.cxx b/src/IGESImport/IGESImport.cxx index ec51293b0..08a72d7d8 100644 --- a/src/IGESImport/IGESImport.cxx +++ b/src/IGESImport/IGESImport.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: IGESImport.cxx -// Created: Wed May 19 14:36:35 2004 -// Author: Pavel TELKOV -// +// File: IGESImport.cxx +// Created: Wed May 19 14:36:35 2004 +// Author: Pavel TELKOV +// // #include "utilities.h" @@ -71,7 +71,7 @@ IGESIMPORT_EXPORT TopoDS_Shape Import (const TCollection_AsciiString& theFileName, const TCollection_AsciiString& theFormatName, TCollection_AsciiString& theError, - const TDF_Label&) + const TDF_Label&) { // Set "C" numeric locale to save numbers correctly Kernel_Utils::Localizer loc; @@ -84,39 +84,39 @@ IGESIMPORT_EXPORT if (status == IFSelect_RetDone) { - if( theFormatName == "IGES_UNIT" ) { - Handle(IGESData_IGESModel) aModel = - Handle(IGESData_IGESModel)::DownCast(aReader.Model()); - gp_Pnt P(1.0,0.0,0.0); - if(!aModel.IsNull()) { - Handle(TCollection_HAsciiString) aUnitName = - aModel->GlobalSection().UnitName(); - //cout<<"aUnitName = "<ToCString()<String()=="CM" ) { - P = gp_Pnt(0.01,0.0,0.0); - } - } - BRep_Builder B; - TopoDS_Vertex V; - B.MakeVertex(V,P,1.e-7); - aResShape = V; - return aResShape; - } - if( theFormatName == "IGES_SCALE" ) { - //cout<<"need re-scale a model"<GlobalSection(); - aGS.SetUnitFlag(6); - aModel->SetGlobalSection(aGS); - } - } + if( theFormatName == "IGES_UNIT" ) { + Handle(IGESData_IGESModel) aModel = + Handle(IGESData_IGESModel)::DownCast(aReader.Model()); + gp_Pnt P(1.0,0.0,0.0); + if(!aModel.IsNull()) { + Handle(TCollection_HAsciiString) aUnitName = + aModel->GlobalSection().UnitName(); + //cout<<"aUnitName = "<ToCString()<String()=="CM" ) { + P = gp_Pnt(0.01,0.0,0.0); + } + } + BRep_Builder B; + TopoDS_Vertex V; + B.MakeVertex(V,P,1.e-7); + aResShape = V; + return aResShape; + } + if( theFormatName == "IGES_SCALE" ) { + //cout<<"need re-scale a model"<GlobalSection(); + aGS.SetUnitFlag(6); + aModel->SetGlobalSection(aGS); + } + } MESSAGE("ImportIGES : all Geometry Transfer"); //OCC 5.1.2 porting @@ -146,7 +146,7 @@ IGESIMPORT_EXPORT // break; // } theError = "Wrong format of the imported file. Can't import file."; - aResShape.Nullify(); + aResShape.Nullify(); } } catch(Standard_Failure) { diff --git a/src/MeasureGUI/MeasureGUI_BndBoxDlg.h b/src/MeasureGUI/MeasureGUI_BndBoxDlg.h index 9d12e3de6..6d818a2bd 100644 --- a/src/MeasureGUI/MeasureGUI_BndBoxDlg.h +++ b/src/MeasureGUI/MeasureGUI_BndBoxDlg.h @@ -50,8 +50,8 @@ protected: private: void Init(); bool getParameters( double&, double&, - double&, double&, - double&, double& ); + double&, double&, + double&, double& ); private: MeasureGUI_1Sel6LineEdit* myGrp; diff --git a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx index d09bf58ee..ee5cd7703 100644 --- a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx @@ -116,7 +116,7 @@ void MeasureGUI_CenterMassDlg::Init() connect( myGrp->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_POINT") ); globalSelection(); @@ -218,7 +218,7 @@ void MeasureGUI_CenterMassDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL(currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); globalSelection(); displayPreview(); diff --git a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h index 4de051f6e..a96be34ab 100644 --- a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h +++ b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h @@ -65,7 +65,7 @@ private: void Init(); void enterEvent( QEvent* ); bool getBCErrors( bool&, - GEOM::GEOM_IBlocksOperations::BCErrors& ); + GEOM::GEOM_IBlocksOperations::BCErrors& ); void activateSelection(); private: diff --git a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx index 92e7e616c..b890cc0c9 100644 --- a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx @@ -98,7 +98,7 @@ void MeasureGUI_CheckShapeDlg::Init() MeasureGUI_Skeleton::Init(); connect( myGrp->CheckBox1, SIGNAL( toggled( bool) ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); } //================================================================================= diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.h b/src/MeasureGUI/MeasureGUI_DistanceDlg.h index 08f00cdbc..a6be23614 100644 --- a/src/MeasureGUI/MeasureGUI_DistanceDlg.h +++ b/src/MeasureGUI/MeasureGUI_DistanceDlg.h @@ -56,8 +56,8 @@ protected: private: void Init(); bool getParameters( double&, - gp_Pnt&, - gp_Pnt& ); + gp_Pnt&, + gp_Pnt& ); private: QLineEdit* myEditCurrentArgument; QLineEdit* mySelEdit2; diff --git a/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx b/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx index 228de1c52..b6c602862 100644 --- a/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx @@ -173,10 +173,10 @@ bool MeasureGUI_InertiaDlg::getParameters( gp_Mat& I, try { double x, y, z; anOper->GetInertia( myObj, - I( 1, 1 ), I( 1, 2 ), I( 1, 3 ), - I( 2, 1 ), I( 2, 2 ), I( 2, 3 ), - I( 3, 1 ), I( 3, 2 ), I( 3, 3 ), - x, y, z ); + I( 1, 1 ), I( 1, 2 ), I( 1, 3 ), + I( 2, 1 ), I( 2, 2 ), I( 2, 3 ), + I( 3, 1 ), I( 3, 2 ), I( 3, 3 ), + x, y, z ); theIXYZ.SetCoord( x, y, z ); } diff --git a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx index 1b740627b..43d0c8637 100644 --- a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx @@ -159,8 +159,8 @@ bool MeasureGUI_MaxToleranceDlg::getParameters( double& theMinFaceToler, GEOM::GEOM_IMeasureOperations_var anOper = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() ); try { anOper->GetTolerance( myObj, - theMinFaceToler, theMaxFaceToler, theMinEdgeToler, - theMaxEdgeToler, theMinVertexToler, theMaxVertexToler ); + theMinFaceToler, theMaxFaceToler, theMinEdgeToler, + theMaxEdgeToler, theMinVertexToler, theMaxVertexToler ); } catch( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); diff --git a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h index 65ed53617..87b946aa3 100644 --- a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h +++ b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h @@ -49,7 +49,7 @@ protected: private: void Init(); bool getParameters( double&, double&, double&, - double&, double&, double& ); + double&, double&, double& ); private: MeasureGUI_1Sel6LineEdit* myGrp; diff --git a/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx b/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx index e5afac75b..681931526 100644 --- a/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_NormaleDlg.cxx @@ -314,7 +314,7 @@ void MeasureGUI_NormaleDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); displayPreview(); } diff --git a/src/MeasureGUI/MeasureGUI_PropertiesDlg.h b/src/MeasureGUI/MeasureGUI_PropertiesDlg.h index 20eaac748..d84c63ba6 100644 --- a/src/MeasureGUI/MeasureGUI_PropertiesDlg.h +++ b/src/MeasureGUI/MeasureGUI_PropertiesDlg.h @@ -52,8 +52,8 @@ protected: private: void Init(); bool getParameters( double&, - double&, - double& ); + double&, + double& ); private: MeasureGUI_1Sel3LineEdit* myGrp; diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.cxx b/src/MeasureGUI/MeasureGUI_Skeleton.cxx index 96cb3b82a..c32aa169e 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.cxx +++ b/src/MeasureGUI/MeasureGUI_Skeleton.cxx @@ -49,7 +49,7 @@ // TRUE to construct a modal dialog. //================================================================================= MeasureGUI_Skeleton::MeasureGUI_Skeleton( GeometryGUI* GUI, QWidget* parent, - bool modal, Qt::WindowFlags f ) + bool modal, Qt::WindowFlags f ) : QDialog( parent, f ), GEOMBase_Helper( dynamic_cast( parent ) ), myGeomGUI( GUI ) @@ -96,33 +96,33 @@ void MeasureGUI_Skeleton::Init() /* signals and slots connections */ connect( buttonClose(), SIGNAL( clicked() ), - this, SLOT( ClickOnCancel() ) ); + this, SLOT( ClickOnCancel() ) ); connect( buttonHelp(), SIGNAL( clicked() ), - this, SLOT( ClickOnHelp() ) ); + this, SLOT( ClickOnHelp() ) ); if ( myGeomGUI ) { connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), - this, SLOT ( DeactivateActiveDialog() ) ); + this, SLOT ( DeactivateActiveDialog() ) ); connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), - this, SLOT ( ClickOnCancel() ) ); + this, SLOT ( ClickOnCancel() ) ); } if ( mySelEdit ) { connect( mySelEdit, SIGNAL( returnPressed() ), - this, SLOT( LineEditReturnPressed() ) ); + this, SLOT( LineEditReturnPressed() ) ); } if ( mySelBtn ) { connect( mySelBtn, SIGNAL( clicked() ), - this, SLOT ( SetEditCurrentArgument() ) ); + this, SLOT ( SetEditCurrentArgument() ) ); } LightApp_SelectionMgr* aSel = ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(); if ( aSel ) { connect( aSel, SIGNAL( currentSelectionChanged() ), - this, SLOT ( SelectionIntoArgument() ) ) ; + this, SLOT ( SelectionIntoArgument() ) ) ; } /* displays Dialog */ @@ -160,8 +160,8 @@ void MeasureGUI_Skeleton::ClickOnHelp() platform = "application"; #endif SUIT_MessageBox::warning( this, tr( "WRN_WARNING" ), - tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ). - arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ) ); + tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ). + arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ) ); } } @@ -222,7 +222,7 @@ void MeasureGUI_Skeleton::ActivateThisDialog() LightApp_SelectionMgr* aSel = ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(); if ( aSel ) connect( aSel, SIGNAL( currentSelectionChanged() ), - this, SLOT ( SelectionIntoArgument() ) ) ; + this, SLOT ( SelectionIntoArgument() ) ) ; redisplayPreview(); activateSelection(); diff --git a/src/MeasureGUI/MeasureGUI_Widgets.cxx b/src/MeasureGUI/MeasureGUI_Widgets.cxx index bac7f4a28..e6c314388 100644 --- a/src/MeasureGUI/MeasureGUI_Widgets.cxx +++ b/src/MeasureGUI/MeasureGUI_Widgets.cxx @@ -42,7 +42,7 @@ MeasureGUI_1Sel12LineEdit::~MeasureGUI_1Sel12LineEdit() ////////////////////////////////////////// MeasureGUI_1Sel1TextView1Check::MeasureGUI_1Sel1TextView1Check( QWidget* parent, - Qt::WindowFlags f ) + Qt::WindowFlags f ) : QWidget( parent, f ) { setupUi( this ); @@ -57,7 +57,7 @@ MeasureGUI_1Sel1TextView1Check::~MeasureGUI_1Sel1TextView1Check() ////////////////////////////////////////// MeasureGUI_1Sel1TextView2ListBox::MeasureGUI_1Sel1TextView2ListBox( QWidget* parent, - Qt::WindowFlags f ) + Qt::WindowFlags f ) : QWidget( parent, f ) { setupUi( this ); diff --git a/src/NMTAlgo/NMTAlgo_Algo.cxx b/src/NMTAlgo/NMTAlgo_Algo.cxx index 3beffd3db..50b59e90b 100644 --- a/src/NMTAlgo/NMTAlgo_Algo.cxx +++ b/src/NMTAlgo/NMTAlgo_Algo.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTAlgo_Algo.cxx -// Created: Tue Jan 27 14:58:21 2004 -// Author: Peter KURNEV -// +// File: NMTAlgo_Algo.cxx +// Created: Tue Jan 27 14:58:21 2004 +// Author: Peter KURNEV +// // #include #include diff --git a/src/NMTAlgo/NMTAlgo_Builder.cxx b/src/NMTAlgo/NMTAlgo_Builder.cxx index b5a1fceb9..07128bb63 100644 --- a/src/NMTAlgo/NMTAlgo_Builder.cxx +++ b/src/NMTAlgo/NMTAlgo_Builder.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTAlgo_Inter3d.cxx -// Created: Tue Jan 27 15:14:13 2004 -// Author: Peter KURNEV -// +// File: NMTAlgo_Inter3d.cxx +// Created: Tue Jan 27 15:14:13 2004 +// Author: Peter KURNEV +// // #include @@ -185,15 +185,15 @@ // aItF2.Initialize(aLF2); for (; aItF2.More(); aItF2.Next()) { - const TopoDS_Face& aF2y=TopoDS::Face(aItF2.Value()); - bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx); - if (bIsSDF) { - NMTTools_CoupleOfShape aCS; - // - aCS.SetShape1(aF1x); - aCS.SetShape2(aF2y); - aLCS.Append(aCS); - } + const TopoDS_Face& aF2y=TopoDS::Face(aItF2.Value()); + bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx); + if (bIsSDF) { + NMTTools_CoupleOfShape aCS; + // + aCS.SetShape1(aF1x); + aCS.SetShape2(aF2y); + aLCS.Append(aCS); + } } } }//for (i=1; i<=aNbFF; ++i) @@ -266,8 +266,8 @@ const TopoDS_Shape& aE=aME(j); // if (myImagesEdges.HasImage(aE)) { - aMFP.Add(i); - break; + aMFP.Add(i); + break; } } }// for (i=1; i<=aNb; ++i) @@ -302,8 +302,8 @@ const TopoDS_Edge& aE=TopoDS::Edge(anExp.Current()); // if (!myImagesEdges.HasImage(aE)) { - aWES.AddStartElement(aE); - continue; + aWES.AddStartElement(aE); + continue; } // bIsDegenerated=BRep_Tool::Degenerated(aE); @@ -312,36 +312,36 @@ const TopTools_ListOfShape& aLIE=myImagesEdges.Image(aE); aIt.Initialize(aLIE); for (; aIt.More(); aIt.Next()) { - aSp=TopoDS::Edge(aIt.Value()); - // - if (bIsDegenerated) { - aSp.Orientation(aE.Orientation()); - aWES.AddStartElement(aSp); - continue; - } - // - if (bIsClosed){ - if (!aMFence.Contains(aSp)){ - aMFence.Add(aSp); - // - if (!BRep_Tool::IsClosed(aSp, aF)){ - BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF); - } - // - aSp.Orientation(TopAbs_FORWARD); - aWES.AddStartElement(aSp); - // - aSp.Orientation(TopAbs_REVERSED); - aWES.AddStartElement(aSp); - continue; - } - } - // - bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx); - if (bToReverse) { - aSp.Reverse(); - } - aWES.AddStartElement(aSp); + aSp=TopoDS::Edge(aIt.Value()); + // + if (bIsDegenerated) { + aSp.Orientation(aE.Orientation()); + aWES.AddStartElement(aSp); + continue; + } + // + if (bIsClosed){ + if (!aMFence.Contains(aSp)){ + aMFence.Add(aSp); + // + if (!BRep_Tool::IsClosed(aSp, aF)){ + BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF); + } + // + aSp.Orientation(TopAbs_FORWARD); + aWES.AddStartElement(aSp); + // + aSp.Orientation(TopAbs_REVERSED); + aWES.AddStartElement(aSp); + continue; + } + } + // + bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx); + if (bToReverse) { + aSp.Reverse(); + } + aWES.AddStartElement(aSp); } } // @@ -350,14 +350,14 @@ const TopTools_ListOfShape& aLE=myIn2DParts.FindFromKey(aF); aIt.Initialize(aLE); for (; aIt.More(); aIt.Next()) { - aSp=TopoDS::Edge(aIt.Value()); - // - aSp.Orientation(TopAbs_FORWARD); - aWES.AddStartElement(aSp); - // - aSp.Orientation(TopAbs_REVERSED); - aWES.AddStartElement(aSp); - } + aSp=TopoDS::Edge(aIt.Value()); + // + aSp.Orientation(TopAbs_FORWARD); + aWES.AddStartElement(aSp); + // + aSp.Orientation(TopAbs_REVERSED); + aWES.AddStartElement(aSp); + } } // // 2.1.3. Add Section Parts @@ -365,13 +365,13 @@ const TopTools_ListOfShape& aLE=mySectionParts.FindFromKey(aF); aIt.Initialize(aLE); for (; aIt.More(); aIt.Next()) { - aSp=TopoDS::Edge(aIt.Value()); - // - aSp.Orientation(TopAbs_FORWARD); - aWES.AddStartElement(aSp); - // - aSp.Orientation(TopAbs_REVERSED); - aWES.AddStartElement(aSp); + aSp=TopoDS::Edge(aIt.Value()); + // + aSp.Orientation(TopAbs_FORWARD); + aWES.AddStartElement(aSp); + // + aSp.Orientation(TopAbs_REVERSED); + aWES.AddStartElement(aSp); } } // @@ -391,7 +391,7 @@ for (; aIt.More(); aIt.Next()) { TopoDS_Shape& aFR=aIt.Value(); if (anOriF==TopAbs_REVERSED) { - aFR.Orientation(TopAbs_REVERSED); + aFR.Orientation(TopAbs_REVERSED); } aLFR.Append(aFR); } @@ -452,7 +452,7 @@ BOPTools_SequenceOfCurves& aSC=aFF.Curves(); aNbCurves=aSC.Length(); if (!aNbCurves) { - continue; + continue; } // const BOPTools_Curve& aBC=aSC(1); @@ -460,8 +460,8 @@ // aItPBSc.Initialize(aLPB); for (; aItPBSc.More(); aItPBSc.Next()) { - const BOPTools_PaveBlock& aPBSc=aItPBSc.Value(); - aLPBSc.Append(aPBSc); + const BOPTools_PaveBlock& aPBSc=aItPBSc.Value(); + aLPBSc.Append(aPBSc); } }// for (j=1; j<=aNbFF; ++j) // @@ -475,8 +475,8 @@ nSpIn=aPBR.Edge(); const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn); if (!aMFence.Contains(aSpIn)){ - aMFence.Add(aSpIn); - aLSpIn.Append(aSpIn); + aMFence.Add(aSpIn); + aLSpIn.Append(aSpIn); } } myIn2DParts.Add(aF, aLSpIn); @@ -489,8 +489,8 @@ nSpSc=aPBSc.Edge(); const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc); if (!aMFence.Contains(aSpSc)){ - aMFence.Add(aSpSc); - aLSpSc.Append(aSpSc); + aMFence.Add(aSpSc); + aLSpSc.Append(aSpSc); } } mySectionParts.Add(aF, aLSpSc); @@ -538,7 +538,7 @@ nSp=aPBR1.Edge(); const TopoDS_Shape& aSp1=aDS.Shape(nSp); if (aSp1.IsSame(aE)) { - continue; + continue; } } //modified by NIZNHY-PKV Fri Jan 21 17:01:14 2005 t @@ -591,14 +591,14 @@ // nV1=aPBR.Pave1().Index(); if (aDS.IsNewShape(nV1)) { - const TopoDS_Shape& aV1=aDS.Shape(nV1); - myQueryShapes.Add(aV1); + const TopoDS_Shape& aV1=aDS.Shape(nV1); + myQueryShapes.Add(aV1); } // nV2=aPBR.Pave2().Index(); if (aDS.IsNewShape(nV2)) { - const TopoDS_Shape& aV2=aDS.Shape(nV2); - myQueryShapes.Add(aV2); + const TopoDS_Shape& aV2=aDS.Shape(nV2); + myQueryShapes.Add(aV2); } } } @@ -636,7 +636,7 @@ // purpose: //======================================================================= Standard_Boolean NMTAlgo_Builder::IsSameDomainF(const TopoDS_Face& aF1, - const TopoDS_Face& aF2)const + const TopoDS_Face& aF2)const { Standard_Boolean bFlag=Standard_False; TopTools_ListIteratorOfListOfShape aItF1, aItF2; @@ -657,11 +657,11 @@ for (; aItF2.More(); aItF2.Next()) { const TopoDS_Shape& aF2y=aItF2.Value(); if (!mySDFaces.Contains(aF2y)){ - continue; + continue; } const TopoDS_Shape& aFSD2y=mySDFaces.FindFromKey(aF2y); if (aFSD1x.IsSame(aFSD2y)) { - return !bFlag; + return !bFlag; } } } diff --git a/src/NMTAlgo/NMTAlgo_Loop3d.cxx b/src/NMTAlgo/NMTAlgo_Loop3d.cxx index 5517e95c7..fd7ebe256 100644 --- a/src/NMTAlgo/NMTAlgo_Loop3d.cxx +++ b/src/NMTAlgo/NMTAlgo_Loop3d.cxx @@ -97,7 +97,7 @@ static for (; itF.More(); itF.Next()) { const TopoDS_Shape& FF = itF.Value(); if (AvoidFacesMap.Contains( FF ) || - ! AddedFacesMap.Add( FF ) ) + ! AddedFacesMap.Add( FF ) ) continue; // make a new shell @@ -129,14 +129,14 @@ static TopExp_Explorer EdgeExp(F, TopAbs_EDGE); for (; EdgeExp.More(); EdgeExp.Next()){ const TopoDS_Edge& E = TopoDS::Edge( EdgeExp.Current()); - if (! CheckedEdgesMap.Add( E )) - continue; - - // candidate faces list + if (! CheckedEdgesMap.Add( E )) + continue; + + // candidate faces list const TopTools_ListOfShape& FL = myEFMap.ChangeFromKey(E); if (FL.IsEmpty()) continue; - // select one of neighbors + // select one of neighbors TopoDS_Face SelF; if (FL.Extent() == 2) { if (! F.IsSame( FL.First() )) @@ -146,7 +146,7 @@ static } else { // check if a face already added to Shell shares E - TopTools_ListIteratorOfListOfShape it (FL); + TopTools_ListIteratorOfListOfShape it (FL); Standard_Boolean found = Standard_False; for (; !found && it.More(); it.Next()) if (F != it.Value()) @@ -184,8 +184,8 @@ static } } if (!SelF.IsNull() && - AddedFacesMap.Add( SelF ) && - !AvoidFacesMap.Contains( SelF )) + AddedFacesMap.Add( SelF ) && + !AvoidFacesMap.Contains( SelF )) Builder.Add( Shell, SelF); } // loop on edges of F @@ -209,7 +209,7 @@ static //purpose : //======================================================================= gp_Vec NMTAlgo_Loop3d::Normal(const TopoDS_Edge& E, - const TopoDS_Face& F) + const TopoDS_Face& F) { gp_Vec Norm, V1, V2; Standard_Real First, Last; @@ -235,11 +235,11 @@ static // check if faces are oriented well for sewing //======================================================================= Standard_Boolean NMTAlgo_Loop3d::IsInside(const TopoDS_Edge& E, - const TopoDS_Face& F1, - const TopoDS_Face& F2, - const Standard_Boolean CountDot, - Standard_Real& Dot, - Standard_Boolean& GoodOri) + const TopoDS_Face& F1, + const TopoDS_Face& F2, + const Standard_Boolean CountDot, + Standard_Real& Dot, + Standard_Boolean& GoodOri) { Standard_Real f, l; gp_Pnt P; @@ -303,7 +303,7 @@ static //warning : E must be properly oriented in F. //======================================================================= gp_Vec NextNormal(const TopoDS_Edge& E, - const TopoDS_Face& F) + const TopoDS_Face& F) { Standard_Real First, Last; @@ -339,7 +339,7 @@ gp_Vec NextNormal(const TopoDS_Edge& E, //purpose : find E in F //======================================================================= TopoDS_Edge FindEinF(const TopoDS_Edge& E, - const TopoDS_Face& F) + const TopoDS_Face& F) { TopExp_Explorer expl (F, TopAbs_EDGE); for (; expl.More(); expl.Next()) diff --git a/src/NMTAlgo/NMTAlgo_Splitter.cxx b/src/NMTAlgo/NMTAlgo_Splitter.cxx index 56a5de310..fdb6500ea 100644 --- a/src/NMTAlgo/NMTAlgo_Splitter.cxx +++ b/src/NMTAlgo/NMTAlgo_Splitter.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTAlgo_Splitter.cxx -// Created: Thu Jan 29 17:13:03 2004 -// Author: Peter KURNEV -// +// File: NMTAlgo_Splitter.cxx +// Created: Thu Jan 29 17:13:03 2004 +// Author: Peter KURNEV +// // #include @@ -419,8 +419,8 @@ static // aIt.Initialize(aLSp); for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSp=aIt.Value(); - myQueryShapes.Add(aSp); + const TopoDS_Shape& aSp=aIt.Value(); + myQueryShapes.Add(aSp); } } } @@ -433,8 +433,8 @@ static const TopTools_ListOfShape& aLSc=mySectionParts.FindFromKey(aF); aIt.Initialize(aLSc); for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aSc=aIt.Value(); - myQueryShapes.Add(aSc); + const TopoDS_Shape& aSc=aIt.Value(); + myQueryShapes.Add(aSc); } } } @@ -521,57 +521,57 @@ static aOriFS= aFS.Orientation(); // if (!myImagesFaces.HasImage(aFS)) { - myQueryShapes.Add(aFS); - //modified by NIZNHY-PKV Mon Jan 24 09:50:42 2005 f - if (!myModifiedFaces.IsBound(aFS)) { - TopTools_ListOfShape aLS; - // - aLS.Append(aFS); - myModifiedFaces.Bind(aFS, aLS); - } - //modified by NIZNHY-PKV Mon Jan 24 09:50:44 2005 t - continue; + myQueryShapes.Add(aFS); + //modified by NIZNHY-PKV Mon Jan 24 09:50:42 2005 f + if (!myModifiedFaces.IsBound(aFS)) { + TopTools_ListOfShape aLS; + // + aLS.Append(aFS); + myModifiedFaces.Bind(aFS, aLS); + } + //modified by NIZNHY-PKV Mon Jan 24 09:50:44 2005 t + continue; } // const TopTools_ListOfShape& aLFI=myImagesFaces.Image(aFS); aItFI.Initialize(aLFI); for (; aItFI.More(); aItFI.Next()) { - const TopoDS_Face& aFI=TopoDS::Face(aItFI.Value()); - aFIx=aFI; - aFIx.Orientation(aOriFS); - // - if (mySDFaces.Contains(aFIx)) { - const TopoDS_Face& aFSDI=TopoDS::Face(mySDFaces.FindFromKey(aFIx)); - TopoDS_Face aFSDIx=aFSDI; - // - iSense=NMTAlgo_Tools::Sense(aFIx, aFSDIx); - // - if (iSense < 0) { - aFSDIx.Reverse(); - } - myQueryShapes.Add(aFSDIx); - //modified by NIZNHY-PKV Mon Jan 24 09:56:06 2005f - aFIy=aFSDIx; - //modified by NIZNHY-PKV Mon Jan 24 09:56:09 2005t - } - else { - myQueryShapes.Add(aFIx); - //modified by NIZNHY-PKV Mon Jan 24 09:56:06 2005f - aFIy=aFIx; - //modified by NIZNHY-PKV Mon Jan 24 09:56:09 2005t - } - //modified by NIZNHY-PKV Mon Jan 24 09:53:38 2005f - if (!myModifiedFaces.IsBound(aFS)) { - TopTools_ListOfShape aLS; - // - aLS.Append(aFIy); - myModifiedFaces.Bind(aFS, aLS); - } - else { - TopTools_ListOfShape& aLS=myModifiedFaces.ChangeFind(aFS); - aLS.Append(aFIy); - } - //modified by NIZNHY-PKV Mon Jan 24 09:53:43 2005t + const TopoDS_Face& aFI=TopoDS::Face(aItFI.Value()); + aFIx=aFI; + aFIx.Orientation(aOriFS); + // + if (mySDFaces.Contains(aFIx)) { + const TopoDS_Face& aFSDI=TopoDS::Face(mySDFaces.FindFromKey(aFIx)); + TopoDS_Face aFSDIx=aFSDI; + // + iSense=NMTAlgo_Tools::Sense(aFIx, aFSDIx); + // + if (iSense < 0) { + aFSDIx.Reverse(); + } + myQueryShapes.Add(aFSDIx); + //modified by NIZNHY-PKV Mon Jan 24 09:56:06 2005f + aFIy=aFSDIx; + //modified by NIZNHY-PKV Mon Jan 24 09:56:09 2005t + } + else { + myQueryShapes.Add(aFIx); + //modified by NIZNHY-PKV Mon Jan 24 09:56:06 2005f + aFIy=aFIx; + //modified by NIZNHY-PKV Mon Jan 24 09:56:09 2005t + } + //modified by NIZNHY-PKV Mon Jan 24 09:53:38 2005f + if (!myModifiedFaces.IsBound(aFS)) { + TopTools_ListOfShape aLS; + // + aLS.Append(aFIy); + myModifiedFaces.Bind(aFS, aLS); + } + else { + TopTools_ListOfShape& aLS=myModifiedFaces.ChangeFind(aFS); + aLS.Append(aFIy); + } + //modified by NIZNHY-PKV Mon Jan 24 09:53:43 2005t } }//for (; aExp.More(); aExp.Next()) { // diff --git a/src/NMTAlgo/NMTAlgo_Splitter1.cxx b/src/NMTAlgo/NMTAlgo_Splitter1.cxx index 911e7a8f9..0277e0c1c 100644 --- a/src/NMTAlgo/NMTAlgo_Splitter1.cxx +++ b/src/NMTAlgo/NMTAlgo_Splitter1.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTAlgo_Splitter1.cxx -// Created: Wed Feb 11 14:26:27 2004 -// Author: Peter KURNEV -// +// File: NMTAlgo_Splitter1.cxx +// Created: Wed Feb 11 14:26:27 2004 +// Author: Peter KURNEV +// // #include #include @@ -109,7 +109,7 @@ //purpose : //======================================================================= void NMTAlgo_Splitter1::SetMaterial(const TopoDS_Shape& aS, - const Standard_Integer iMt) + const Standard_Integer iMt) { TopExp_Explorer aExp; // @@ -133,7 +133,7 @@ //purpose : //======================================================================= void NMTAlgo_Splitter1::AddTool(const TopoDS_Shape& aS) - + { SetMaterial(aS, 0); NMTAlgo_Splitter::AddTool(aS); @@ -238,7 +238,7 @@ const TopoDS_Shape& aS=aIt.Value(); if (aS.ShapeType()==TopAbs_SOLID){ if (myMapSWMOut.IsBound(aS)) { - continue; + continue; } } myBuilder.Add(aR, aS); @@ -292,14 +292,14 @@ for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aIF=aIt.Value(); if (aMFS.Contains(aIF)) { - const TopTools_ListOfShape& aLS=aMFS.FindFromKey(aIF); - aItLS.Initialize(aLS); - for ( ;aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aSd=aItLS.Value(); - if (!aMSd.Contains(aSd)) { - aMSd.Add(aSd); - } - } + const TopTools_ListOfShape& aLS=aMFS.FindFromKey(aIF); + aItLS.Initialize(aLS); + for ( ;aItLS.More(); aItLS.Next()) { + const TopoDS_Shape& aSd=aItLS.Value(); + if (!aMSd.Contains(aSd)) { + aMSd.Add(aSd); + } + } } } // @@ -316,7 +316,7 @@ //aMSd.Add(aSd); bFound=NMTAlgo_Tools::FindImageSolid(aFC, aMSo, aSd); if (!aSd.IsNull()) { - aMSd.Add(aSd); + aMSd.Add(aSd); } //modified by NIZNHY-PKV Thu Dec 23 15:09:02 2004 t } @@ -334,13 +334,13 @@ const TopoDS_Shape& aSdx=aMSdx(j); // if (aMFS.Contains(aSdx)) { - TopTools_ListOfShape& aLS=aMFS.ChangeFromKey(aSdx); - aLS.Append(aSd); + TopTools_ListOfShape& aLS=aMFS.ChangeFromKey(aSdx); + aLS.Append(aSd); } else { - TopTools_ListOfShape aLS; - aLS.Append(aSd); - aMFS.Add(aSdx, aLS); + TopTools_ListOfShape aLS; + aLS.Append(aSd); + aMFS.Add(aSdx, aLS); } } } @@ -358,16 +358,16 @@ const TopoDS_Shape& aSd=aItLS.Value(); // if (!myMapSWM.IsBound(aSd)){ - continue; + continue; } // nMt=myMapSWM.Find(aSd); if (!j) { - nMtMax=nMt; - continue; + nMtMax=nMt; + continue; } if (nMt>nMtMax) { - nMtMax=nMt; + nMtMax=nMt; } } myMapSWMOut.Bind(aSdx, nMtMax); diff --git a/src/NMTAlgo/NMTAlgo_Splitter_1.cxx b/src/NMTAlgo/NMTAlgo_Splitter_1.cxx index b2135883f..d1f77b888 100644 --- a/src/NMTAlgo/NMTAlgo_Splitter_1.cxx +++ b/src/NMTAlgo/NMTAlgo_Splitter_1.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTAlgo_Splitter_1.cxx -// Created: Mon Feb 2 14:58:54 2004 -// Author: Peter KURNEV -// +// File: NMTAlgo_Splitter_1.cxx +// Created: Mon Feb 2 14:58:54 2004 +// Author: Peter KURNEV +// // #include @@ -74,16 +74,16 @@ // static void RefineShells(const TopoDS_Shape& , - TopTools_ListOfShape&); + TopTools_ListOfShape&); static void RefineSolids(const TopoDS_Shape& , - TopTools_ListOfShape&); + TopTools_ListOfShape&); static void GetPlanes (const TopoDS_Edge& anEx, - const TopTools_IndexedDataMapOfShapeListOfShape& anEFMapx, - const TopoDS_Face& aF1, - TopAbs_State& aStPF1); + const TopTools_IndexedDataMapOfShapeListOfShape& anEFMapx, + const TopoDS_Face& aF1, + TopAbs_State& aStPF1); //======================================================================= //function : ShellsAndSolids @@ -153,7 +153,7 @@ static //purpose : split S into compound of shells //======================================================================= void NMTAlgo_Splitter::MakeShells(const TopoDS_Shape& aS, - TopTools_ListOfShape& aLNS) + TopTools_ListOfShape& aLNS) { NMTAlgo_Loop3d aShellMaker; // @@ -192,7 +192,7 @@ void NMTAlgo_Splitter::MakeShells(const TopoDS_Shape& aS, //purpose : make solids out of Shells //======================================================================= void NMTAlgo_Splitter::MakeSolids(const TopoDS_Shape& theSolid, - TopTools_ListOfShape& theShellList) + TopTools_ListOfShape& theShellList) { // for a solid wrapping other shells or solids without intersection, // it is necessary to find shells making holes in it @@ -277,8 +277,8 @@ void NMTAlgo_Splitter::MakeSolids(const TopoDS_Shape& theSolid, // makes return already added faces //======================================================================= TopoDS_Shape NMTAlgo_Splitter::FindFacesInside(const TopoDS_Shape& theShape, - const Standard_Boolean CheckClosed, - const Standard_Boolean All) + const Standard_Boolean CheckClosed, + const Standard_Boolean All) { TopExp_Explorer expl; TopAbs_State aState; @@ -363,13 +363,13 @@ void NMTAlgo_Splitter::MakeSolids(const TopoDS_Shape& theSolid, // add to DMSEFP edges that are new expl.Init(aF1, TopAbs_EDGE); for (; expl.More(); expl.Next()) { - TopoDS_Shape aE1 = expl.Current(); - if ( MSE.Contains(aE1)) {// section edge - if (!DMSEFP.IsBound(aE1)) { - DMSEFP.Bind(aE1, EmptyL); - } - DMSEFP(aE1).Append(aF1); - } + TopoDS_Shape aE1 = expl.Current(); + if ( MSE.Contains(aE1)) {// section edge + if (!DMSEFP.IsBound(aE1)) { + DMSEFP.Bind(aE1, EmptyL); + } + DMSEFP(aE1).Append(aF1); + } } } }//for (;itl.More(); itl.Next()) @@ -405,21 +405,21 @@ void NMTAlgo_Splitter::MakeSolids(const TopoDS_Shape& theSolid, // remove aFace1 form DMSEFP and MFP LSF.Remove( itl ); // == itl.Next(); if (!MFP.Remove(aFace1)) { - continue; // was not is MFP (i.e already checked) + continue; // was not is MFP (i.e already checked) } // // check if aFace1 was already added to 2 shells if (!All && - myAddedFacesMap.Contains(aFace1) && - myAddedFacesMap.Contains(aFace1.Reversed())) { - skipAlreadyAdded = Standard_True; + myAddedFacesMap.Contains(aFace1) && + myAddedFacesMap.Contains(aFace1.Reversed())) { + skipAlreadyAdded = Standard_True; } // //xf if (aMFCSF.Contains(aFace1)) { - // the face aFace1 can not be inside CSF - // if CSF contains the aFace1 - continue; + // the face aFace1 can not be inside CSF + // if CSF contains the aFace1 + continue; } //xt // @@ -435,37 +435,37 @@ void NMTAlgo_Splitter::MakeSolids(const TopoDS_Shape& theSolid, const TopTools_ListOfShape& FL = DMEF.FindFromKey(E); //faces of CSF sharing E // const TopoDS_Shape& origF1 = myImagesFaces.IsImage(FL.First()) ? - myImagesFaces.Root(FL.First()) : FL.First(); + myImagesFaces.Root(FL.First()) : FL.First(); // const TopoDS_Shape& origF2 = myImagesFaces.IsImage(FL.Last()) ? - myImagesFaces.Root(FL.Last()) : FL.Last(); + myImagesFaces.Root(FL.Last()) : FL.Last(); // sameDom1 = anOrigFace.IsSame( origF1 ); sameDom2 = anOrigFace.IsSame( origF2 ); // if (!(sameDom1 || sameDom2) && HasSameDomainF( TopoDS::Face(anOrigFace) )) { - sameDom1 = IsSameDomainF( TopoDS::Face(anOrigFace), TopoDS::Face(origF1)); + sameDom1 = IsSameDomainF( TopoDS::Face(anOrigFace), TopoDS::Face(origF1)); if (origF1 == origF2) { sameDom2 = sameDom1; - } + } } if (sameDom1 && sameDom2){ - continue; + continue; } // if (sameDom1 || sameDom2) { - inside = NMTAlgo_Loop3d::IsInside (E, - TopoDS::Face(FL.First()), - TopoDS::Face(FL.Last()), - 1, dot, GoodOri); - if (inside || (dot + Precision::Angular() >= 1.0)) { - continue; // E is convex between origF1 and origF2 or they are tangent - } + inside = NMTAlgo_Loop3d::IsInside (E, + TopoDS::Face(FL.First()), + TopoDS::Face(FL.Last()), + 1, dot, GoodOri); + if (inside || (dot + Precision::Angular() >= 1.0)) { + continue; // E is convex between origF1 and origF2 or they are tangent + } } // GetPlanes(E, DMEF, aFace1, aState); if (aState==TopAbs_IN) { - KeepFaces.Append(aFace1); + KeepFaces.Append(aFace1); } } //while (itl.More()) { } //for (; Mapit.More() ; Mapit.Next() ) @@ -570,7 +570,7 @@ void NMTAlgo_Splitter::MakeSolids(const TopoDS_Shape& theSolid, if (isSolid && myClosedShapes.Contains(anOrigShape)) { // to make a special care at solid reconstruction myWrappingSolid.Add ( theShape ); - } + } // keep faces of an internal shape anOrigShape KeptFaces.Append( aSplitFaceL ); } @@ -602,7 +602,7 @@ void NMTAlgo_Splitter::MakeSolids(const TopoDS_Shape& theSolid, MFP.Add( F ); // remove bad face from DMEF for (expl.Init( F, TopAbs_EDGE); expl.More(); expl.Next()) { - const TopoDS_Shape& E = expl.Current(); + const TopoDS_Shape& E = expl.Current(); TopTools_ListOfShape& FL = DMEF.ChangeFromKey( E ); for (itl.Initialize( FL ); itl.More(); itl.Next() ) { if ( F.IsSame( itl.Value() )) { @@ -632,8 +632,8 @@ void NMTAlgo_Splitter::MakeSolids(const TopoDS_Shape& theSolid, TopoDS_Shape & aIntFace = itl.Value(); // if (!All && - myAddedFacesMap.Contains(aIntFace) && - myAddedFacesMap.Contains(aIntFace.Reversed())) { + myAddedFacesMap.Contains(aIntFace) && + myAddedFacesMap.Contains(aIntFace.Reversed())) { continue; } // @@ -659,7 +659,7 @@ void NMTAlgo_Splitter::MakeSolids(const TopoDS_Shape& theSolid, for (; itl.More(); itl.Next() ) { TopoDS_Shape & aIntFace = itl.Value(); if (! MFP.Contains(aIntFace )){ - myBuilder.Add(aCIF, aIntFace); + myBuilder.Add(aCIF, aIntFace); } } myMapSIFC.Bind(theShape, aCIF); @@ -673,7 +673,7 @@ void NMTAlgo_Splitter::MakeSolids(const TopoDS_Shape& theSolid, // If S1.IsNull(), check infinite point against S2. //======================================================================= Standard_Boolean NMTAlgo_Splitter::IsInside (const TopoDS_Shape& theS1, - const TopoDS_Shape& theS2) + const TopoDS_Shape& theS2) { BRepClass3d_SolidClassifier aClassifier( theS2 ); // @@ -713,7 +713,7 @@ TopoDS_Shape NMTAlgo_Splitter::GetOriginalShape(const TopoDS_Shape& theShape) co //purpose : //======================================================================= void RefineShells(const TopoDS_Shape& aS, - TopTools_ListOfShape& aLNS) + TopTools_ListOfShape& aLNS) { Standard_Boolean bFound; Standard_Integer iS, jS, aNbSOrs, aNbSIms, aNbFOrs, aNbFIms, kFOrs, aNb; @@ -741,7 +741,7 @@ void RefineShells(const TopoDS_Shape& aS, for (jS=1; jS<=aNbSIms; ++jS) { const TopoDS_Shape& aSIm=aMSIms(jS); if (aMImOr.Contains(aSIm)) { - continue; + continue; } // aMFIms.Clear(); @@ -749,18 +749,18 @@ void RefineShells(const TopoDS_Shape& aS, aNbFIms=aMFIms.Extent(); // if (aNbFIms==aNbFOrs) { - bFound=Standard_True; - for (kFOrs=1; kFOrs<=aNbFOrs; ++kFOrs) { - const TopoDS_Shape& aFOr=aMFOrs(kFOrs); - if (!aMFIms.Contains(aFOr)) { - bFound=Standard_False; - break; //next aSIm - } - } - if (bFound){ - aMImOr.Add(aSIm, aSOr); - break; //next aSOr - } + bFound=Standard_True; + for (kFOrs=1; kFOrs<=aNbFOrs; ++kFOrs) { + const TopoDS_Shape& aFOr=aMFOrs(kFOrs); + if (!aMFIms.Contains(aFOr)) { + bFound=Standard_False; + break; //next aSIm + } + } + if (bFound){ + aMImOr.Add(aSIm, aSOr); + break; //next aSOr + } } //if (aNbFIms==aNbFOrs) } } @@ -787,7 +787,7 @@ void RefineShells(const TopoDS_Shape& aS, //purpose : //======================================================================= void RefineSolids(const TopoDS_Shape& aSolidOr, - TopTools_ListOfShape& aLNS) + TopTools_ListOfShape& aLNS) { Standard_Integer aNb, iS, aNbSOrs, aNbSIms; TopoDS_Shape aSolidIm; @@ -823,10 +823,10 @@ void RefineSolids(const TopoDS_Shape& aSolidOr, //purpose : //======================================================================= void GetPlanes (const TopoDS_Edge& anEx, - const TopTools_IndexedDataMapOfShapeListOfShape& anEFMapx, - const TopoDS_Face& aF1, - TopAbs_State& aStPF1) - + const TopTools_IndexedDataMapOfShapeListOfShape& anEFMapx, + const TopoDS_Face& aF1, + TopAbs_State& aStPF1) + { Standard_Boolean bIsAdjExists; Standard_Real aT, aT1, aT2; @@ -914,18 +914,18 @@ void GetPlanes (const TopoDS_Edge& anEx, //modified by NIZNHY-PKV Fri Feb 25 17:00:03 2005t XX /* - A + A // TopoDS_Shape aFace2; if ( !isSectionE ) { while (itl.More()) { aFace2 = itl.Value(); - // - TopoDS_Shape anOrigFace2 = aFace2; - if (myImagesFaces.IsImage(aFace2)) { - anOrigFace2 = myImagesFaces.Root(aFace2); - } - // + // + TopoDS_Shape anOrigFace2 = aFace2; + if (myImagesFaces.IsImage(aFace2)) { + anOrigFace2 = myImagesFaces.Root(aFace2); + } + // if (!MFP.Contains( aFace2 )) { LSF.Remove( itl ); continue; @@ -933,7 +933,7 @@ void GetPlanes (const TopoDS_Edge& anEx, //if (anOrigFace.IsSame( myImagesFaces.Root( aFace2 ))) if (anOrigFace.IsSame(anOrigFace2)) { break; - } + } itl.Next(); } if (itl.More()) { // aFace2 found, remove it from maps @@ -942,7 +942,7 @@ void GetPlanes (const TopoDS_Edge& anEx, } else{ aFace2.Nullify(); - } + } itl.Initialize( LSF ); } */ diff --git a/src/NMTAlgo/NMTAlgo_Splitter_2.cxx b/src/NMTAlgo/NMTAlgo_Splitter_2.cxx index 3262ee8ba..f9aa64398 100644 --- a/src/NMTAlgo/NMTAlgo_Splitter_2.cxx +++ b/src/NMTAlgo/NMTAlgo_Splitter_2.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTAlgo_Splitter_2.cxx -// Created: Mon Feb 9 15:07:51 2004 -// Author: Igor FEOKTISTOV -// +// File: NMTAlgo_Splitter_2.cxx +// Created: Mon Feb 9 15:07:51 2004 +// Author: Igor FEOKTISTOV +// // #include @@ -179,7 +179,7 @@ for (; expResF.More(); expResF.Next()) { const TopoDS_Shape& aFR=expResF.Current(); if (!MIF.Contains(aFR)) { - break; + break; } } // @@ -190,10 +190,10 @@ else { // add faces of a removed shape to RFM for (expResF.ReInit(); expResF.More(); expResF.Next()) { - const TopoDS_Shape& aF = expResF.Current(); - if (!RFM.Remove(aF)) { - RFM.Add(aF); - } + const TopoDS_Shape& aF = expResF.Current(); + if (!RFM.Remove(aF)) { + RFM.Add(aF); + } } } }// for (; it.More(); it.Next()) @@ -236,24 +236,24 @@ // itF.Initialize (RFM); for ( ; itF.More(); itF.Next()) { - const TopoDS_Shape& aF=itF.Key(); + const TopoDS_Shape& aF=itF.Key(); TopExp::MapShapesAndAncestors(aF, TopAbs_EDGE, TopAbs_FACE, MEF); } // add only faces forming a closed shell for (itF.Reset() ; itF.More(); itF.Next()) { - const TopoDS_Shape& aF=itF.Key(); + const TopoDS_Shape& aF=itF.Key(); TopExp_Explorer expE (aF, TopAbs_EDGE); for (; expE.More(); expE.Next()) { if (MEF.FindFromKey(expE.Current()).Extent() == 1) { break; - } - } + } + } if (!expE.More()) { myBuilder.Add( Shell, aF); - } - else { - //int a=0; - } + } + else { + //int a=0; + } } if (S.ShapeType() == TopAbs_SOLID) { @@ -269,7 +269,7 @@ else { it.Initialize(aSIm); for (; it.More(); it.Next()) { - myBuilder.Add (C, it.Value()); + myBuilder.Add (C, it.Value()); } } } @@ -358,13 +358,13 @@ const TopTools_ListOfShape& NMTAlgo_Splitter::Generated(const TopoDS_Shape& S) anExp.Init(myShape, TopAbs_EDGE); for(; anExp.More(); anExp.Next()) { - aMap.Add(anExp.Current()); + aMap.Add(anExp.Current()); } for (; it.More(); it.Next()) { - if(aMap.Contains(it.Value())) { - myGenerated.Append(it.Value()); - } + if(aMap.Contains(it.Value())) { + myGenerated.Append(it.Value()); + } } } @@ -379,8 +379,8 @@ const TopTools_ListOfShape& NMTAlgo_Splitter::Generated(const TopoDS_Shape& S) const TopoDS_Shape& aS = aDS.Shape(i); if(S.IsSame(aS)) { - anIndex = i; - break; + anIndex = i; + break; } } @@ -401,32 +401,32 @@ const TopTools_ListOfShape& NMTAlgo_Splitter::Generated(const TopoDS_Shape& S) if(ind1 == anIndex || ind2 == anIndex) { - Standard_Integer aNSI = aES.NewShape(); - if(aDS.GetShapeType(aNSI) == TopAbs_VERTEX) { - myGenerated.Append(aDS.Shape(aNSI)); - bCheckVert = Standard_True; - } + Standard_Integer aNSI = aES.NewShape(); + if(aDS.GetShapeType(aNSI) == TopAbs_VERTEX) { + myGenerated.Append(aDS.Shape(aNSI)); + bCheckVert = Standard_True; + } } } - + if(bCheckVert) { aMap.Clear(); anExp.Init(myShape, TopAbs_VERTEX); for(; anExp.More(); anExp.Next()) { - aMap.Add(anExp.Current()); + aMap.Add(anExp.Current()); } it.Initialize(myGenerated); for (; it.More(); it.Next()) { - if(it.Value().ShapeType() != TopAbs_VERTEX) continue; - - if(!aMap.Contains(it.Value())) { - myGenerated.Remove(it); - } + if(it.Value().ShapeType() != TopAbs_VERTEX) continue; + + if(!aMap.Contains(it.Value())) { + myGenerated.Remove(it); + } } } @@ -447,8 +447,8 @@ const TopTools_ListOfShape& NMTAlgo_Splitter::Generated(const TopoDS_Shape& S) const TopoDS_Shape& aS = aDS.Shape(i); if(S.IsSame(aS)) { - anIndex = i; - break; + anIndex = i; + break; } } @@ -467,14 +467,14 @@ const TopTools_ListOfShape& NMTAlgo_Splitter::Generated(const TopoDS_Shape& S) if(ind1 == anIndex || ind2 == anIndex) { - Standard_Integer aNSI = aEE.NewShape(); - if(aDS.GetShapeType(aNSI) == TopAbs_VERTEX) { - myGenerated.Append(aDS.Shape(aNSI)); - bCheckVert = Standard_True; - } + Standard_Integer aNSI = aEE.NewShape(); + if(aDS.GetShapeType(aNSI) == TopAbs_VERTEX) { + myGenerated.Append(aDS.Shape(aNSI)); + bCheckVert = Standard_True; + } } - + } const BOPTools_CArray1OfESInterference& aESs = anIP->ESInterferences(); @@ -488,14 +488,14 @@ const TopTools_ListOfShape& NMTAlgo_Splitter::Generated(const TopoDS_Shape& S) if(ind1 == anIndex || ind2 == anIndex) { - Standard_Integer aNSI = aES.NewShape(); - if(aDS.GetShapeType(aNSI) == TopAbs_VERTEX) { - myGenerated.Append(aDS.Shape(aNSI)); - bCheckVert = Standard_True; - } + Standard_Integer aNSI = aES.NewShape(); + if(aDS.GetShapeType(aNSI) == TopAbs_VERTEX) { + myGenerated.Append(aDS.Shape(aNSI)); + bCheckVert = Standard_True; + } } - + } if(bCheckVert) { @@ -503,15 +503,15 @@ const TopTools_ListOfShape& NMTAlgo_Splitter::Generated(const TopoDS_Shape& S) anExp.Init(myShape, TopAbs_VERTEX); for(; anExp.More(); anExp.Next()) { - aMap.Add(anExp.Current()); + aMap.Add(anExp.Current()); } it.Initialize(myGenerated); for (; it.More(); it.Next()) { - if(!aMap.Contains(it.Value())) { - myGenerated.Remove(it); - } + if(!aMap.Contains(it.Value())) { + myGenerated.Remove(it); + } } } return myGenerated; @@ -524,7 +524,7 @@ const TopTools_ListOfShape& NMTAlgo_Splitter::Generated(const TopoDS_Shape& S) //purpose : //======================================================================= void NMTAlgo_Splitter::FindImage(const TopoDS_Shape& aS, - TopTools_ListOfShape& aLIms) + TopTools_ListOfShape& aLIms) { TopAbs_ShapeEnum aType; // @@ -546,27 +546,27 @@ void NMTAlgo_Splitter::FindImage(const TopoDS_Shape& aS, // aIt.Initialize(aIFC); for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aIF=aIt.Value(); - if (aMFS.Contains(aIF)) { - const TopTools_ListOfShape& aLS=aMFS.FindFromKey(aIF); - // - aItLS.Initialize(aLS); - for (; aItLS.More(); aItLS.Next()) { - const TopoDS_Shape& aSx=aItLS.Value(); - aMSd.Add(aSx); - } - } + const TopoDS_Shape& aIF=aIt.Value(); + if (aMFS.Contains(aIF)) { + const TopTools_ListOfShape& aLS=aMFS.FindFromKey(aIF); + // + aItLS.Initialize(aLS); + for (; aItLS.More(); aItLS.Next()) { + const TopoDS_Shape& aSx=aItLS.Value(); + aMSd.Add(aSx); + } + } } // aNbSd=aMSd.Extent(); if (aNbSd) { - for (i=1; i<=aNbSd; ++i) { - const TopoDS_Shape& aSx=aMSd(i); - if (!aSx.IsSame(aS)) { - aLIms.Append(aSx); - } - } - return; + for (i=1; i<=aNbSd; ++i) { + const TopoDS_Shape& aSx=aMSd(i); + if (!aSx.IsSame(aS)) { + aLIms.Append(aSx); + } + } + return; } } // @@ -583,7 +583,7 @@ void NMTAlgo_Splitter::FindImage(const TopoDS_Shape& aS, bHasImage=NMTAlgo_Tools::FindImageSolid(aFC, aMSo, aSd); if (bHasImage) { if (!aSd.IsSame(aS)) { - aLIms.Append(aSd); + aLIms.Append(aSd); } } } //if (aType==TopAbs_SOLID) { @@ -596,18 +596,18 @@ void NMTAlgo_Splitter::FindImage(const TopoDS_Shape& aS, if (myModifiedFaces.IsBound(aS)) { anExp.Init(myShape, aType); for(; anExp.More(); anExp.Next()) { - aMap.Add(anExp.Current()); + aMap.Add(anExp.Current()); } // const TopTools_ListOfShape& aLS=myModifiedFaces.Find(aS); aIt.Initialize(aLS); for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aFx=aIt.Value(); - if (!aFx.IsSame(aS)) { - if (aMap.Contains(aFx)) { - aLIms.Append(aFx); - } - } + const TopoDS_Shape& aFx=aIt.Value(); + if (!aFx.IsSame(aS)) { + if (aMap.Contains(aFx)) { + aLIms.Append(aFx); + } + } } } } // else if (aType==TopAbs_FACE) @@ -620,18 +620,18 @@ void NMTAlgo_Splitter::FindImage(const TopoDS_Shape& aS, if (myImagesEdges.HasImage(aS)) { anExp.Init(myShape, aType); for(; anExp.More(); anExp.Next()) { - aMap.Add(anExp.Current()); + aMap.Add(anExp.Current()); } // const TopTools_ListOfShape& aLE=myImagesEdges.Image(aS); aIt.Initialize(aLE); for (; aIt.More(); aIt.Next()) { - const TopoDS_Shape& aEx=aIt.Value(); - if (!aEx.IsSame(aS)) { - if(aMap.Contains(aEx)) { - aLIms.Append(aEx); - } - } + const TopoDS_Shape& aEx=aIt.Value(); + if (!aEx.IsSame(aS)) { + if(aMap.Contains(aEx)) { + aLIms.Append(aEx); + } + } } } }// else if (aType==TopAbs_EDGE) @@ -650,8 +650,8 @@ void NMTAlgo_Splitter::FindImage(const TopoDS_Shape& aS, for(i=1; i<=aNbS; ++i) { const TopoDS_Shape& aSx = aDS.Shape(i); if(aS.IsSame(aSx)) { - anIndex = i; - break; + anIndex = i; + break; } } // @@ -670,8 +670,8 @@ void NMTAlgo_Splitter::FindImage(const TopoDS_Shape& aS, for(; anExp.More(); anExp.Next()) { const TopoDS_Shape& aVx=anExp.Current(); if(aSDV.IsSame(aVx)) { - aLIms.Append(aSDV); - break; + aLIms.Append(aSDV); + break; } } }// else if (aType==TopAbs_VERTEX) diff --git a/src/NMTAlgo/NMTAlgo_Tools.cxx b/src/NMTAlgo/NMTAlgo_Tools.cxx index 35ea5e2f5..d221bc3f4 100644 --- a/src/NMTAlgo/NMTAlgo_Tools.cxx +++ b/src/NMTAlgo/NMTAlgo_Tools.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTAlgo_Tools.cxx -// Created: Fri Jan 30 16:30:45 2004 -// Author: Peter KURNEV -// +// File: NMTAlgo_Tools.cxx +// Created: Fri Jan 30 16:30:45 2004 +// Author: Peter KURNEV +// // #include @@ -65,7 +65,7 @@ // purpose: //======================================================================= Standard_Integer NMTAlgo_Tools::Sense (const TopoDS_Face& aF1, - const TopoDS_Face& aF2) + const TopoDS_Face& aF2) { Standard_Integer iSense=0; gp_Dir aDNF1, aDNF2; @@ -77,7 +77,7 @@ aE1=TopoDS::Edge(anExp.Current()); if (!BRep_Tool::Degenerated(aE1)) { if (!BRep_Tool::IsClosed(aE1, aF1)) { - break; + break; } } } @@ -87,10 +87,10 @@ aE2=TopoDS::Edge(anExp.Current()); if (!BRep_Tool::Degenerated(aE2)) { if (!BRep_Tool::IsClosed(aE2, aF2)) { - if (aE2.IsSame(aE1)) { - iSense=1; - break; - } + if (aE2.IsSame(aE1)) { + iSense=1; + break; + } } } } @@ -112,7 +112,7 @@ // purpose: //======================================================================= void NMTAlgo_Tools::OrientFacesOnShell (const TopoDS_Face& aF1, - TopoDS_Shell& aSh) + TopoDS_Shell& aSh) { Standard_Integer aNbFSh, iSenseFlag; gp_Dir aDNF1, aDNF2; @@ -142,14 +142,14 @@ // iSenseFlag=BOPTools_Tools3D::SenseFlag(aDNF1, aDNF2); if (iSenseFlag==1) { - return; + return; } // anExp.Init(aSh, TopAbs_FACE); for (; anExp.More(); anExp.Next()) { - const TopoDS_Shape& aFx=anExp.Current(); - TopoDS_Shape *pFx=(TopoDS_Shape *)&aFx; - pFx->Reverse(); + const TopoDS_Shape& aFx=anExp.Current(); + TopoDS_Shape *pFx=(TopoDS_Shape *)&aFx; + pFx->Reverse(); } } } @@ -159,7 +159,7 @@ // purpose: //======================================================================= void NMTAlgo_Tools::OrientFacesOnShell (const TopoDS_Shell& aShell, - TopoDS_Shell& aShellNew) + TopoDS_Shell& aShellNew) { Standard_Boolean bIsProcessed1, bIsProcessed2; Standard_Integer i, aNbE, aNbF, j; @@ -185,11 +185,11 @@ TopTools_ListIteratorOfListOfShape anIt(aLF); for (; anIt.More(); anIt.Next()) { - const TopoDS_Shape& aF=anIt.Value(); - if (!aFM.Contains(aF)) { - aFM.Add(aF); - aLFTmp.Append(aF); - } + const TopoDS_Shape& aF=anIt.Value(); + if (!aFM.Contains(aF)) { + aFM.Add(aF); + aLFTmp.Append(aF); + } } aLF.Clear(); aLF=aLFTmp; @@ -216,14 +216,14 @@ bIsProcessed2=aProcessedFaces.Contains(aF2); if (bIsProcessed1 && bIsProcessed2) { - continue; + continue; } if (!bIsProcessed1 && !bIsProcessed2) { - aProcessedFaces.Add(aF1); - aBB.Add(aShellNew, aF1); + aProcessedFaces.Add(aF1); + aBB.Add(aShellNew, aF1); - bIsProcessed1=!bIsProcessed1; + bIsProcessed1=!bIsProcessed1; } // @@ -231,14 +231,14 @@ aF1x=aF1; if (bIsProcessed1) { - j=aProcessedFaces.FindIndex(aF1); - aF1x=TopoDS::Face(aProcessedFaces.FindKey(j)); + j=aProcessedFaces.FindIndex(aF1); + aF1x=TopoDS::Face(aProcessedFaces.FindKey(j)); } aF2x=aF2; if (bIsProcessed2) { - j=aProcessedFaces.FindIndex(aF2); - aF2x=TopoDS::Face(aProcessedFaces.FindKey(j)); + j=aProcessedFaces.FindIndex(aF2); + aF2x=TopoDS::Face(aProcessedFaces.FindKey(j)); } // @@ -246,26 +246,26 @@ anOrE2=NMTAlgo_Tools::Orientation(aE, aF2x); if (bIsProcessed1 && !bIsProcessed2) { - - if (anOrE1==anOrE2) { - if (!BRep_Tool::IsClosed(aE, aF1) && - !BRep_Tool::IsClosed(aE, aF2)) { - aF2.Reverse(); - } - } - aProcessedFaces.Add(aF2); - aBB.Add(aShellNew, aF2); + + if (anOrE1==anOrE2) { + if (!BRep_Tool::IsClosed(aE, aF1) && + !BRep_Tool::IsClosed(aE, aF2)) { + aF2.Reverse(); + } + } + aProcessedFaces.Add(aF2); + aBB.Add(aShellNew, aF2); } else if (!bIsProcessed1 && bIsProcessed2) { - if (anOrE1==anOrE2) { - if (!BRep_Tool::IsClosed(aE, aF1) && - !BRep_Tool::IsClosed(aE, aF2)) { - aF1.Reverse(); - } - } - aProcessedFaces.Add(aF1); - aBB.Add(aShellNew, aF1); + if (anOrE1==anOrE2) { + if (!BRep_Tool::IsClosed(aE, aF1) && + !BRep_Tool::IsClosed(aE, aF2)) { + aF1.Reverse(); + } + } + aProcessedFaces.Add(aF1); + aBB.Add(aShellNew, aF1); } } } @@ -283,11 +283,11 @@ if (aNbF!=2) { TopTools_ListIteratorOfListOfShape anIt(aLF); for(; anIt.More(); anIt.Next()) { - const TopoDS_Face& aF=TopoDS::Face(anIt.Value()); - if (!aProcessedFaces.Contains(aF)) { - aProcessedFaces.Add(aF); - aBB.Add(aShellNew, aF); - } + const TopoDS_Face& aF=TopoDS::Face(anIt.Value()); + if (!aProcessedFaces.Contains(aF)) { + aProcessedFaces.Add(aF); + aBB.Add(aShellNew, aF); + } } } } @@ -297,7 +297,7 @@ //purpose : //======================================================================= TopAbs_Orientation NMTAlgo_Tools::Orientation(const TopoDS_Edge& anE, - const TopoDS_Face& aF) + const TopoDS_Face& aF) { TopAbs_Orientation anOr=TopAbs_INTERNAL; @@ -318,7 +318,7 @@ // If S1.IsNull(), check infinite point against S2. //======================================================================= Standard_Boolean NMTAlgo_Tools::IsInside (const TopoDS_Shape& theS1, - const TopoDS_Shape& theS2) + const TopoDS_Shape& theS2) { BRepClass3d_SolidClassifier aClassifier( theS2 ); // @@ -340,7 +340,7 @@ //purpose : //======================================================================= void NMTAlgo_Tools::MakeShells (const TopoDS_Shape& aFC, - TopTools_ListOfShape& aLNS) + TopTools_ListOfShape& aLNS) { NMTAlgo_Loop3d aShellMaker; TopTools_MapOfOrientedShape aMTmp; @@ -353,7 +353,7 @@ //purpose : //======================================================================= void NMTAlgo_Tools::MakeSolids(const TopoDS_Shape& aFC, - TopTools_ListOfShape& theShellList) + TopTools_ListOfShape& theShellList) { NMTAlgo_Tools::MakeShells(aFC, theShellList); NMTAlgo_Tools::MakeSolids(theShellList); @@ -425,7 +425,7 @@ //purpose : //======================================================================= void NMTAlgo_Tools::BreakWebs(const TopoDS_Shape& aCS, - TopoDS_Shape& aCSR) + TopoDS_Shape& aCSR) { Standard_Integer i, aNbF, aNbS; TopTools_IndexedDataMapOfShapeListOfShape aMFS; @@ -474,8 +474,8 @@ //purpose : //======================================================================= Standard_Boolean NMTAlgo_Tools::FindImageSolid(const TopoDS_Shape& aFC, - const TopTools_IndexedMapOfShape& aMSo, - TopoDS_Shape& aSox) + const TopTools_IndexedMapOfShape& aMSo, + TopoDS_Shape& aSox) { Standard_Boolean bFound=Standard_False; Standard_Integer i, j, aNbSo, aNbF, aNbFSo; @@ -506,8 +506,8 @@ for (j=1; j<=aNbFSo; ++j) { const TopoDS_Shape& aFSo=aMFSo(j); if (!aMFC.Contains(aFSo)) { - bFound=Standard_False; - break; + bFound=Standard_False; + break; } } if (bFound) { diff --git a/src/NMTDS/NMTDS_BoxBndTree.cxx b/src/NMTDS/NMTDS_BoxBndTree.cxx index 88c4e31eb..3f680116a 100644 --- a/src/NMTDS/NMTDS_BoxBndTree.cxx +++ b/src/NMTDS/NMTDS_BoxBndTree.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_BoxBndTree.cxx -// Created: Tue Oct 17 13:04:11 2006 -// Author: Peter KURNEV -// +// File: NMTDS_BoxBndTree.cxx +// Created: Tue Oct 17 13:04:11 2006 +// Author: Peter KURNEV +// // #include //======================================================================= diff --git a/src/NMTDS/NMTDS_BoxBndTree.hxx b/src/NMTDS/NMTDS_BoxBndTree.hxx index 5ff1fe74e..816476894 100755 --- a/src/NMTDS/NMTDS_BoxBndTree.hxx +++ b/src/NMTDS/NMTDS_BoxBndTree.hxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_BoxBndTree.hxx -// Created: Tue Oct 17 12:50:31 2006 -// Author: Peter KURNEV -// +// File: NMTDS_BoxBndTree.hxx +// Created: Tue Oct 17 12:50:31 2006 +// Author: Peter KURNEV +// // #ifndef NMTDS_BoxBndTree_HeaderFile #define NMTDS_BoxBndTree_HeaderFile diff --git a/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx b/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx index 0bfd4cdf3..061f4bae1 100644 --- a/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx +++ b/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger.hxx @@ -67,7 +67,7 @@ NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger(const Standard_Integer& K,const // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_0.cxx b/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_0.cxx index 8c8b273b7..afa83c79d 100644 --- a/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_0.cxx +++ b/src/NMTDS/NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& NMTDS_DataMapNodeOfDataMapOfIntegerMapOfIn static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger", - sizeof(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTDS_DataMapNodeOfDataMapOfIntegerMapOfInteger), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTDS/NMTDS_IndexRange.cxx b/src/NMTDS/NMTDS_IndexRange.cxx index 55c488ae4..f7c7c6d4a 100644 --- a/src/NMTDS/NMTDS_IndexRange.cxx +++ b/src/NMTDS/NMTDS_IndexRange.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_IndexRange.cxx -// Created: Fri Nov 28 10:34:59 2003 -// Author: Peter KURNEV -// +// File: NMTDS_IndexRange.cxx +// Created: Fri Nov 28 10:34:59 2003 +// Author: Peter KURNEV +// // #include //======================================================================= diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx index 189c2495d..a4ed07f9d 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx +++ b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx @@ -70,7 +70,7 @@ NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(co // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx index 14ba8e595..4b06197a7 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx +++ b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOf static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger", - sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx index 4b10b9e87..e92a031a4 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx +++ b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape.hxx @@ -70,7 +70,7 @@ NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape(const Standard_Integer& K // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx index 15a8485f4..bba95ce52 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx +++ b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOf static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape", - sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerShape), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx index 04ee903da..67ff43f39 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx +++ b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox.hxx @@ -74,7 +74,7 @@ NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox(const TopoDS_Shape& K1,const // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx index a63d890cf..50fcbc364 100644 --- a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx +++ b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOf static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox", - sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfShapeBox), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTDS/NMTDS_InterfPool.cxx b/src/NMTDS/NMTDS_InterfPool.cxx index d601d5cd8..17d7ca85e 100644 --- a/src/NMTDS/NMTDS_InterfPool.cxx +++ b/src/NMTDS/NMTDS_InterfPool.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_.InterfPoolcxx -// Created: Wed Feb 21 10:35:35 2007 -// Author: Peter KURNEV -// +// File: NMTDS_.InterfPoolcxx +// Created: Wed Feb 21 10:35:35 2007 +// Author: Peter KURNEV +// // #include #include @@ -53,7 +53,7 @@ static //purpose : //======================================================================= Standard_Boolean NMTDS_InterfPool::Add (const NMTDS_PassKeyBoolean& aPKB, - const NMTDS_InterfType aType) + const NMTDS_InterfType aType) { Standard_Boolean bRet; Standard_Integer iType; @@ -71,8 +71,8 @@ static //purpose : //======================================================================= Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1, - const Standard_Integer aInd2, - const NMTDS_InterfType aType) + const Standard_Integer aInd2, + const NMTDS_InterfType aType) { NMTDS_PassKeyBoolean aPKB; // @@ -84,9 +84,9 @@ static //purpose : //======================================================================= Standard_Boolean NMTDS_InterfPool::Add (const Standard_Integer aInd1, - const Standard_Integer aInd2, - const Standard_Boolean bFlag, - const NMTDS_InterfType aType) + const Standard_Integer aInd2, + const Standard_Boolean bFlag, + const NMTDS_InterfType aType) { NMTDS_PassKeyBoolean aPKB; // @@ -116,7 +116,7 @@ static //purpose : //======================================================================= Standard_Boolean NMTDS_InterfPool::Contains(const Standard_Integer aInd1, - const Standard_Integer aInd2)const + const Standard_Integer aInd2)const { NMTDS_PassKeyBoolean aPKB; // @@ -166,7 +166,7 @@ static const NMTDS_PassKeyBoolean& aPKB=aIt.Key(); aPKB.Ids(n1, n2); if(n1==aInd || n2==aInd) { - pL->Append(aPKB); + pL->Append(aPKB); } } } @@ -201,7 +201,7 @@ static //purpose : //======================================================================= const NMTDS_ListOfPassKeyBoolean& NMTDS_InterfPool::Get(const Standard_Integer aInd, - const NMTDS_InterfType aType)const + const NMTDS_InterfType aType)const { Standard_Integer n1, n2; NMTDS_ListOfPassKeyBoolean *pL, aLPKB; diff --git a/src/NMTDS/NMTDS_Iterator.cxx b/src/NMTDS/NMTDS_Iterator.cxx index a4069a595..030002de3 100755 --- a/src/NMTDS/NMTDS_Iterator.cxx +++ b/src/NMTDS/NMTDS_Iterator.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_Iterator.cxx -// Created: Sun May 07 15:04:41 2006 -// Author: Peter KURNEV +// File: NMTDS_Iterator.cxx +// Created: Sun May 07 15:04:41 2006 +// Author: Peter KURNEV // #include // @@ -117,7 +117,7 @@ // purpose: //======================================================================= void NMTDS_Iterator::Initialize(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) + const TopAbs_ShapeEnum aType2) { Standard_Integer iX; // @@ -152,8 +152,8 @@ // purpose: //======================================================================= void NMTDS_Iterator::Current(Standard_Integer& aIndex1, - Standard_Integer& aIndex2, - Standard_Boolean& aWithSubShape) const + Standard_Integer& aIndex2, + Standard_Boolean& aWithSubShape) const { const NMTDS_PassKeyBoolean& aPKB=myIterator.Value(); aPKB.Ids(aIndex1, aIndex2); @@ -250,7 +250,7 @@ const TopoDS_Shape& aSi=myDS->Shape(i); aTi=aSi.ShapeType(); if (!NMTDS_Tools::HasBRep(aTi)){ - continue; + continue; } const Bnd_Box& aBoxEx=aMSB.FindFromKey(aSi); aSelector.Clear(); @@ -259,7 +259,7 @@ aNbSD=aBBTree.Select(aSelector); // if (!aNbSD){ - continue; + continue; } // const TColStd_ListOfInteger& aLI=aSelector.Indices(); @@ -269,56 +269,56 @@ // aIt.Initialize(aLI); for (; aIt.More(); aIt.Next()) { - jB=aIt.Value(); // box index in MII - j=aMII.Find(jB); // DS index - if (j>=i1 && j<=i2) { - continue;// same range - } - // - aPKXB.SetIds(i, j); - // - if (aMPKXB.Add(aPKXB)) { - bFlag=Standard_False;// Bounding boxes are intersected - const Bnd_Box& aBoxi=myDS->GetBoundingBox(i); - const Bnd_Box& aBoxj=myDS->GetBoundingBox(j); - if (aBoxi.IsOut(aBoxj)) { - bFlag=!bFlag; //Bounding boxes of Sub-shapes are intersected - } - const TopoDS_Shape& aSj=myDS->Shape(j); - aTj=aSj.ShapeType(); - iX=NMTDS_Tools::TypeToInteger(aTi, aTj); - //bFlag=(iStatus==2); - aPKXB.SetFlag(bFlag); - myLists[iX].Append(aPKXB); - // - // VSD prepare - if (iX==5) { //VV - aLV.Append(j); - } - }// if (aMPKXB.Add(aPKXB)) { + jB=aIt.Value(); // box index in MII + j=aMII.Find(jB); // DS index + if (j>=i1 && j<=i2) { + continue;// same range + } + // + aPKXB.SetIds(i, j); + // + if (aMPKXB.Add(aPKXB)) { + bFlag=Standard_False;// Bounding boxes are intersected + const Bnd_Box& aBoxi=myDS->GetBoundingBox(i); + const Bnd_Box& aBoxj=myDS->GetBoundingBox(j); + if (aBoxi.IsOut(aBoxj)) { + bFlag=!bFlag; //Bounding boxes of Sub-shapes are intersected + } + const TopoDS_Shape& aSj=myDS->Shape(j); + aTj=aSj.ShapeType(); + iX=NMTDS_Tools::TypeToInteger(aTi, aTj); + //bFlag=(iStatus==2); + aPKXB.SetFlag(bFlag); + myLists[iX].Append(aPKXB); + // + // VSD prepare + if (iX==5) { //VV + aLV.Append(j); + } + }// if (aMPKXB.Add(aPKXB)) { }// for (; aIt.More(); aIt.Next()) { // // VSD treatment aNbLV=aLV.Extent(); if (aNbLV) { - TColStd_ListOfInteger aLV1; - // - const TopoDS_Vertex& aVi=TopoDS::Vertex(aSi); - aIt.Initialize(aLV); - for (; aIt.More(); aIt.Next()) { - j=aIt.Value(); - const TopoDS_Shape& aSj=myDS->Shape(j); - const TopoDS_Vertex& aVj=TopoDS::Vertex(aSj); - iFlag=NMTDS_Tools::ComputeVV(aVi, aVj); - if (!iFlag) { - aLV1.Append(j); - } - else { - aPKXB.SetIds(i, j); - aMPKXB.Remove(aPKXB); - } - } - aMVSD.Bind(i, aLV1); + TColStd_ListOfInteger aLV1; + // + const TopoDS_Vertex& aVi=TopoDS::Vertex(aSi); + aIt.Initialize(aLV); + for (; aIt.More(); aIt.Next()) { + j=aIt.Value(); + const TopoDS_Shape& aSj=myDS->Shape(j); + const TopoDS_Vertex& aVj=TopoDS::Vertex(aSj); + iFlag=NMTDS_Tools::ComputeVV(aVi, aVj); + if (!iFlag) { + aLV1.Append(j); + } + else { + aPKXB.SetIds(i, j); + aMPKXB.Remove(aPKXB); + } + } + aMVSD.Bind(i, aLV1); } }//for (i=i1; i<=i2; ++i) { }//for (iR=1; iR @@ -103,22 +103,22 @@ aTi=aSi.ShapeType(); if (NMTDS_Tools::HasBRep(aTi)) { if (aTi!=TopAbs_VERTEX) { - TColStd_IndexedMapOfInteger aMA; - // - myDS->GetAllSuccessors(i, aMA); - // - aNbA=aMA.Extent(); - for (j=1; j<=aNbA; ++j) { - iX=aMA(j); - aPKXB.Clear(); - aPKXB.SetIds(i, iX); - aMPA.Add(aPKXB); - } + TColStd_IndexedMapOfInteger aMA; + // + myDS->GetAllSuccessors(i, aMA); + // + aNbA=aMA.Extent(); + for (j=1; j<=aNbA; ++j) { + iX=aMA(j); + aPKXB.Clear(); + aPKXB.SetIds(i, iX); + aMPA.Add(aPKXB); + } } else { - aPKXB.Clear(); - aPKXB.SetIds(i, i); - aMPA.Add(aPKXB); + aPKXB.Clear(); + aPKXB.SetIds(i, i); + aMPA.Add(aPKXB); } // Bnd_Box aBoxEx; @@ -170,27 +170,27 @@ // aPKXB.SetIds(i, j); if (aMPA.Contains(aPKXB)) { - continue; + continue; } // if (aMPKXB.Add(aPKXB)) { - bFlag=Standard_False;// Bounding boxes are intersected - const Bnd_Box& aBoxi=myDS->GetBoundingBox(i); - const Bnd_Box& aBoxj=myDS->GetBoundingBox(j); - if (aBoxi.IsOut(aBoxj)) { - bFlag=!bFlag; //Bounding boxes of Sub-shapes are intersected - } - const TopoDS_Shape& aSj=myDS->Shape(j); - aTj=aSj.ShapeType(); - iX=NMTDS_Tools::TypeToInteger(aTi, aTj); - //bFlag=(iStatus==2); - aPKXB.SetFlag(bFlag); - myLists[iX].Append(aPKXB); - // - // VSD prepare - if (iX==5) { //VV - aLV.Append(j); - } + bFlag=Standard_False;// Bounding boxes are intersected + const Bnd_Box& aBoxi=myDS->GetBoundingBox(i); + const Bnd_Box& aBoxj=myDS->GetBoundingBox(j); + if (aBoxi.IsOut(aBoxj)) { + bFlag=!bFlag; //Bounding boxes of Sub-shapes are intersected + } + const TopoDS_Shape& aSj=myDS->Shape(j); + aTj=aSj.ShapeType(); + iX=NMTDS_Tools::TypeToInteger(aTi, aTj); + //bFlag=(iStatus==2); + aPKXB.SetFlag(bFlag); + myLists[iX].Append(aPKXB); + // + // VSD prepare + if (iX==5) { //VV + aLV.Append(j); + } }// if (aMPKXB.Add(aPKXB)) { }// for (; aIt.More(); aIt.Next()) { // @@ -202,18 +202,18 @@ const TopoDS_Vertex& aVi=TopoDS::Vertex(aSi); aIt.Initialize(aLV); for (; aIt.More(); aIt.Next()) { - j=aIt.Value(); - const TopoDS_Shape& aSj=myDS->Shape(j); - const TopoDS_Vertex& aVj=TopoDS::Vertex(aSj); - iFlag=NMTDS_Tools::ComputeVV(aVi, aVj); - if (!iFlag) { - aLV1.Append(j); - } - else { - aPKXB.SetIds(i, j); - aMPKXB.Remove(aPKXB); - } - } + j=aIt.Value(); + const TopoDS_Shape& aSj=myDS->Shape(j); + const TopoDS_Vertex& aVj=TopoDS::Vertex(aSj); + iFlag=NMTDS_Tools::ComputeVV(aVi, aVj); + if (!iFlag) { + aLV1.Append(j); + } + else { + aPKXB.SetIds(i, j); + aMPKXB.Remove(aPKXB); + } + } aMVSD.Bind(i, aLV1); } }//for (i=1; i<=aNbS; ++i) { diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx index 24a28af7e..5d48a957e 100644 --- a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx +++ b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -61,7 +61,7 @@ NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors(const BooleanOper // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx index 875b786e4..d304f2d6f 100644 --- a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx +++ b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& NMTDS_ListNodeOfListOfIndexedDataMapOfShap static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors", - sizeof(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPassKey.hxx b/src/NMTDS/NMTDS_ListNodeOfListOfPassKey.hxx index c67b7845d..26ec50838 100644 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPassKey.hxx +++ b/src/NMTDS/NMTDS_ListNodeOfListOfPassKey.hxx @@ -61,7 +61,7 @@ NMTDS_ListNodeOfListOfPassKey(const NMTDS_PassKey& I,const TCollection_MapNodePt // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean.hxx b/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean.hxx index c2f743118..e539f5b30 100644 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean.hxx +++ b/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean.hxx @@ -61,7 +61,7 @@ NMTDS_ListNodeOfListOfPassKeyBoolean(const NMTDS_PassKeyBoolean& I,const TCollec // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx b/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx index 7145c1532..e8ccccf19 100644 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx +++ b/src/NMTDS/NMTDS_ListNodeOfListOfPassKeyBoolean_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& NMTDS_ListNodeOfListOfPassKeyBoolean_Type_ static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTDS_ListNodeOfListOfPassKeyBoolean", - sizeof(NMTDS_ListNodeOfListOfPassKeyBoolean), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTDS_ListNodeOfListOfPassKeyBoolean), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfPassKey_0.cxx b/src/NMTDS/NMTDS_ListNodeOfListOfPassKey_0.cxx index dcca753f7..7d5798302 100644 --- a/src/NMTDS/NMTDS_ListNodeOfListOfPassKey_0.cxx +++ b/src/NMTDS/NMTDS_ListNodeOfListOfPassKey_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& NMTDS_ListNodeOfListOfPassKey_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTDS_ListNodeOfListOfPassKey", - sizeof(NMTDS_ListNodeOfListOfPassKey), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTDS_ListNodeOfListOfPassKey), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTDS/NMTDS_PassKey.cxx b/src/NMTDS/NMTDS_PassKey.cxx index 91e1da956..17dee40f9 100755 --- a/src/NMTDS/NMTDS_PassKey.cxx +++ b/src/NMTDS/NMTDS_PassKey.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_Algo.cxx -// Created: Sat Dec 04 12:39:47 2004 -// Author: Peter KURNEV -// +// File: NMTDS_Algo.cxx +// Created: Sat Dec 04 12:39:47 2004 +// Author: Peter KURNEV +// // #include @@ -37,7 +37,7 @@ static Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv); + const Standard_Integer aDiv); //======================================================================= //function : @@ -90,7 +90,7 @@ static //purpose : //======================================================================= void NMTDS_PassKey::SetIds(const Standard_Integer aId1) - + { Clear(); myNbIds=1; @@ -102,7 +102,7 @@ static //purpose : //======================================================================= void NMTDS_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2) + const Standard_Integer aId2) { TColStd_ListOfInteger aLI; // @@ -115,8 +115,8 @@ static //purpose : //======================================================================= void NMTDS_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2, - const Standard_Integer aId3) + const Standard_Integer aId2, + const Standard_Integer aId3) { TColStd_ListOfInteger aLI; // @@ -130,9 +130,9 @@ static //purpose : //======================================================================= void NMTDS_PassKey::SetIds(const Standard_Integer aId1, - const Standard_Integer aId2, - const Standard_Integer aId3, - const Standard_Integer aId4) + const Standard_Integer aId2, + const Standard_Integer aId3, + const Standard_Integer aId4) { TColStd_ListOfInteger aLI; // @@ -189,7 +189,7 @@ static //purpose : //======================================================================= void NMTDS_PassKey::Ids(Standard_Integer& aId1, - Standard_Integer& aId2) const + Standard_Integer& aId2) const { aId1=0; aId2=0; @@ -241,7 +241,7 @@ static // purpose : //======================================================================= Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv) + const Standard_Integer aDiv) { Standard_Integer aMax, aTresh, aIdRet; // diff --git a/src/NMTDS/NMTDS_PassKeyBoolean.cxx b/src/NMTDS/NMTDS_PassKeyBoolean.cxx index d2636052c..07fc133f4 100755 --- a/src/NMTDS/NMTDS_PassKeyBoolean.cxx +++ b/src/NMTDS/NMTDS_PassKeyBoolean.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_PassKeyBoolean.cxx -// Created: Mon May 15 14:31:05 2006 -// Author: Peter KURNEV -// +// File: NMTDS_PassKeyBoolean.cxx +// Created: Mon May 15 14:31:05 2006 +// Author: Peter KURNEV +// // #include diff --git a/src/NMTDS/NMTDS_PassKeyMapHasher.cxx b/src/NMTDS/NMTDS_PassKeyMapHasher.cxx index 2afd292d0..72fa8cf1c 100755 --- a/src/NMTDS/NMTDS_PassKeyMapHasher.cxx +++ b/src/NMTDS/NMTDS_PassKeyMapHasher.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_PassKeyMapHasher.cxx -// Created: -// Author: Peter KURNEV -// +// File: NMTDS_PassKeyMapHasher.cxx +// Created: +// Author: Peter KURNEV +// // #include @@ -31,7 +31,7 @@ //purpose : //======================================================================= Standard_Integer NMTDS_PassKeyMapHasher::HashCode(const NMTDS_PassKey& aPK, - const Standard_Integer Upper) + const Standard_Integer Upper) { return aPK.HashCode(Upper); } @@ -40,7 +40,7 @@ //purpose : //======================================================================= Standard_Boolean NMTDS_PassKeyMapHasher::IsEqual(const NMTDS_PassKey& aPK1, - const NMTDS_PassKey& aPK2) + const NMTDS_PassKey& aPK2) { return aPK1.IsEqual(aPK2); } diff --git a/src/NMTDS/NMTDS_PassKeyShape.cxx b/src/NMTDS/NMTDS_PassKeyShape.cxx index 804acd5c5..8785575e8 100644 --- a/src/NMTDS/NMTDS_PassKeyShape.cxx +++ b/src/NMTDS/NMTDS_PassKeyShape.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_PassKeyShape.cxx -// Created: -// Author: Peter KURNEV -// +// File: NMTDS_PassKeyShape.cxx +// Created: +// Author: Peter KURNEV +// // #include @@ -32,7 +32,7 @@ static Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv); + const Standard_Integer aDiv); //======================================================================= //function : //purpose : @@ -86,7 +86,7 @@ static //purpose : //======================================================================= void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1) - + { Standard_Integer aHC; // @@ -101,7 +101,7 @@ static //purpose : //======================================================================= void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2) + const TopoDS_Shape& aS2) { TopTools_ListOfShape aLS; // @@ -114,8 +114,8 @@ static //purpose : //======================================================================= void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2, - const TopoDS_Shape& aS3) + const TopoDS_Shape& aS2, + const TopoDS_Shape& aS3) { TopTools_ListOfShape aLS; // @@ -129,9 +129,9 @@ static //purpose : //======================================================================= void NMTDS_PassKeyShape::SetShapes(const TopoDS_Shape& aS1, - const TopoDS_Shape& aS2, - const TopoDS_Shape& aS3, - const TopoDS_Shape& aS4) + const TopoDS_Shape& aS2, + const TopoDS_Shape& aS3, + const TopoDS_Shape& aS4) { TopTools_ListOfShape aLS; // @@ -214,7 +214,7 @@ static // purpose : //======================================================================= Standard_Integer NormalizedId(const Standard_Integer aId, - const Standard_Integer aDiv) + const Standard_Integer aDiv) { Standard_Integer aMax, aTresh, aIdRet; // diff --git a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx b/src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx index b8fa38230..845b08333 100644 --- a/src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx +++ b/src/NMTDS/NMTDS_PassKeyShapeMapHasher.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_PassKeyMapHasher.cxx -// Created: -// Author: Peter KURNEV -// +// File: NMTDS_PassKeyMapHasher.cxx +// Created: +// Author: Peter KURNEV +// // #include @@ -31,7 +31,7 @@ //purpose : //======================================================================= Standard_Integer NMTDS_PassKeyShapeMapHasher::HashCode(const NMTDS_PassKeyShape& aPK, - const Standard_Integer Upper) + const Standard_Integer Upper) { return aPK.HashCode(Upper); } @@ -40,7 +40,7 @@ //purpose : //======================================================================= Standard_Boolean NMTDS_PassKeyShapeMapHasher::IsEqual(const NMTDS_PassKeyShape& aPK1, - const NMTDS_PassKeyShape& aPK2) + const NMTDS_PassKeyShape& aPK2) { return aPK1.IsEqual(aPK2); } diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.cxx b/src/NMTDS/NMTDS_ShapesDataStructure.cxx index c10daf236..99659f45e 100644 --- a/src/NMTDS/NMTDS_ShapesDataStructure.cxx +++ b/src/NMTDS/NMTDS_ShapesDataStructure.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_ShapesDataStructure.cxx -// Created: Mon Dec 1 10:21:04 2003 -// Author: Peter KURNEV -// +// File: NMTDS_ShapesDataStructure.cxx +// Created: Mon Dec 1 10:21:04 2003 +// Author: Peter KURNEV +// // #include #include @@ -41,12 +41,12 @@ static void ComputeBoxExS(const Standard_Integer aIx, - const NMTDS_ShapesDataStructure* pDS, - Bnd_Box& aBoxEx); + const NMTDS_ShapesDataStructure* pDS, + Bnd_Box& aBoxEx); static void GetAllSuccessorsS(const Standard_Integer nS, - const NMTDS_ShapesDataStructure* myDS, - TColStd_IndexedMapOfInteger& aMA); + const NMTDS_ShapesDataStructure* myDS, + TColStd_IndexedMapOfInteger& aMA); //=========================================================================== //function : NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure @@ -110,8 +110,8 @@ static for(j=1; j<=aNbSc; ++j) { aIndex=aAS1.GetSuccessor(j); if(aMFence.Add(aIndex)) { - BooleanOperations_AncestorsSeqAndSuccessorsSeq& aAS2=aMSA.ChangeFromIndex(aIndex); - aAS2.SetNewAncestor(iX); + BooleanOperations_AncestorsSeqAndSuccessorsSeq& aAS2=aMSA.ChangeFromIndex(aIndex); + aAS2.SetNewAncestor(iX); } } } @@ -335,7 +335,7 @@ static //purpose : //=========================================================================== Standard_Integer NMTDS_ShapesDataStructure::ShapeIndex(const TopoDS_Shape& aS, - const Standard_Integer aRank)const + const Standard_Integer aRank)const { Standard_Boolean bFound; Standard_Integer aIndex=0; @@ -377,7 +377,7 @@ static //purpose : //======================================================================= void NMTDS_ShapesDataStructure::ComputeBoxEx (const Standard_Integer aIx, - Bnd_Box& aBoxEx)const + Bnd_Box& aBoxEx)const { ComputeBoxExS(aIx, this, aBoxEx); } @@ -386,7 +386,7 @@ static //purpose : //======================================================================= void NMTDS_ShapesDataStructure::GetAllSuccessors(const Standard_Integer nS, - TColStd_IndexedMapOfInteger& aMA)const + TColStd_IndexedMapOfInteger& aMA)const { GetAllSuccessorsS(nS, this, aMA); } @@ -395,8 +395,8 @@ static //purpose : //======================================================================= void GetAllSuccessorsS(const Standard_Integer nS, - const NMTDS_ShapesDataStructure* myDS, - TColStd_IndexedMapOfInteger& aMA) + const NMTDS_ShapesDataStructure* myDS, + TColStd_IndexedMapOfInteger& aMA) { TopAbs_ShapeEnum aT; Standard_Integer i, nSx, aNbSuccessors, *pSuccessors; @@ -424,8 +424,8 @@ void GetAllSuccessorsS(const Standard_Integer nS, // purpose: //======================================================================= void ComputeBoxExS(const Standard_Integer aIx, - const NMTDS_ShapesDataStructure* pDS, - Bnd_Box& aBoxEx) + const NMTDS_ShapesDataStructure* pDS, + Bnd_Box& aBoxEx) { Standard_Integer i, aNbS, iS; // diff --git a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey.hxx b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey.hxx index 196074ff4..252f5b819 100644 --- a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey.hxx +++ b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey.hxx @@ -62,7 +62,7 @@ NMTDS_StdMapNodeOfMapOfPassKey(const NMTDS_PassKey& K,const TCollection_MapNodeP // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx index 61cba228b..f3f6ce73a 100644 --- a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx +++ b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean.hxx @@ -62,7 +62,7 @@ NMTDS_StdMapNodeOfMapOfPassKeyBoolean(const NMTDS_PassKeyBoolean& K,const TColle // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx index 154519c8e..3d6f064d4 100644 --- a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx +++ b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKeyBoolean_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& NMTDS_StdMapNodeOfMapOfPassKeyBoolean_Type static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTDS_StdMapNodeOfMapOfPassKeyBoolean", - sizeof(NMTDS_StdMapNodeOfMapOfPassKeyBoolean), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTDS_StdMapNodeOfMapOfPassKeyBoolean), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey_0.cxx b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey_0.cxx index 27fa652b3..cf567663d 100644 --- a/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey_0.cxx +++ b/src/NMTDS/NMTDS_StdMapNodeOfMapOfPassKey_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& NMTDS_StdMapNodeOfMapOfPassKey_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTDS_StdMapNodeOfMapOfPassKey", - sizeof(NMTDS_StdMapNodeOfMapOfPassKey), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTDS_StdMapNodeOfMapOfPassKey), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTDS/NMTDS_Tools.cxx b/src/NMTDS/NMTDS_Tools.cxx index b49af9da3..d9111e7ab 100644 --- a/src/NMTDS/NMTDS_Tools.cxx +++ b/src/NMTDS/NMTDS_Tools.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTDS_Tools.cxx -// Created: Tue Feb 20 14:57:28 2007 -// Author: Peter KURNEV -// +// File: NMTDS_Tools.cxx +// Created: Tue Feb 20 14:57:28 2007 +// Author: Peter KURNEV +// // #include #include @@ -35,15 +35,15 @@ #include void CopySource(const TopoDS_Shape& aS, - TopTools_IndexedDataMapOfShapeShape& aMapSS, - TopoDS_Shape& aSC); + TopTools_IndexedDataMapOfShapeShape& aMapSS, + TopoDS_Shape& aSC); //======================================================================= //function : CopyShape //purpose : //======================================================================= void NMTDS_Tools::CopyShape(const TopoDS_Shape& aS, - TopoDS_Shape& aSC) + TopoDS_Shape& aSC) { TopTools_IndexedDataMapOfShapeShape aMapSS; // @@ -54,8 +54,8 @@ void CopySource(const TopoDS_Shape& aS, //purpose : //======================================================================= void NMTDS_Tools::CopyShape(const TopoDS_Shape& aS, - TopoDS_Shape& aSC, - TopTools_IndexedDataMapOfShapeShape& aMapSS) + TopoDS_Shape& aSC, + TopTools_IndexedDataMapOfShapeShape& aMapSS) { CopySource(aS, aMapSS, aSC); } @@ -64,8 +64,8 @@ void CopySource(const TopoDS_Shape& aS, //purpose : //======================================================================= void CopySource(const TopoDS_Shape& aS, - TopTools_IndexedDataMapOfShapeShape& aMapSS, - TopoDS_Shape& aSC) + TopTools_IndexedDataMapOfShapeShape& aMapSS, + TopoDS_Shape& aSC) { Standard_Boolean bFree; TopAbs_ShapeEnum aT; @@ -104,7 +104,7 @@ void CopySource(const TopoDS_Shape& aS, // purpose: //======================================================================= Standard_Integer NMTDS_Tools::ComputeVV(const TopoDS_Vertex& aV1, - const TopoDS_Vertex& aV2) + const TopoDS_Vertex& aV2) { Standard_Real aTolV1, aTolV2, aTolSum, aTolSum2, aD2; gp_Pnt aP1, aP2; @@ -136,7 +136,7 @@ void CopySource(const TopoDS_Shape& aS, //purpose : //======================================================================= Standard_Integer NMTDS_Tools::TypeToInteger(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) + const TopAbs_ShapeEnum aType2) { Standard_Integer iRet, iT1, iT2, iX; // diff --git a/src/NMTTools/NMTTools_CheckerSI.cxx b/src/NMTTools/NMTTools_CheckerSI.cxx index fd7cd2c2b..489717ede 100644 --- a/src/NMTTools/NMTTools_CheckerSI.cxx +++ b/src/NMTTools/NMTTools_CheckerSI.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_CheckerSI.cxx -// Created: Mon Feb 19 11:32:08 2007 -// Author: Peter KURNEV +// File: NMTTools_CheckerSI.cxx +// Created: Mon Feb 19 11:32:08 2007 +// Author: Peter KURNEV // #include diff --git a/src/NMTTools/NMTTools_CheckerSI_1.cxx b/src/NMTTools/NMTTools_CheckerSI_1.cxx index a0c9f978b..9d882cb4f 100755 --- a/src/NMTTools/NMTTools_CheckerSI_1.cxx +++ b/src/NMTTools/NMTTools_CheckerSI_1.cxx @@ -19,9 +19,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_CheckerSI.cxx -// Created: Mon Feb 19 11:32:08 2007 -// Author: Peter KURNEV +// File: NMTTools_CheckerSI.cxx +// Created: Mon Feb 19 11:32:08 2007 +// Author: Peter KURNEV // #include #include @@ -48,16 +48,16 @@ static Standard_Boolean IsValid(const TopoDS_Edge& aE, - const TopoDS_Vertex& aV, - const Standard_Real aTV1, - const Standard_Real aTV2); + const TopoDS_Vertex& aV, + const Standard_Real aTV1, + const Standard_Real aTV2); //======================================================================= // function: PreparePaveBlocks // purpose: //======================================================================= void NMTTools_CheckerSI::PreparePaveBlocks(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) + const TopAbs_ShapeEnum aType2) { NMTTools_PaveFiller::PreparePaveBlocks(aType1, aType2); } @@ -105,8 +105,8 @@ static if (nV1==nV2) { bIsValid=IsValid(aE, aV1, aT1, aT2); if (!bIsValid) { - //printf(" pb SR: nV nE: %d nV1:( %d %15.10lf ) nV2:( %d %15.10lf )\n", nE, nV1, aT1, nV2, aT2); - myStopStatus=1; + //printf(" pb SR: nV nE: %d nV1:( %d %15.10lf ) nV2:( %d %15.10lf )\n", nE, nV1, aT1, nV2, aT2); + myStopStatus=1; } } // @@ -132,9 +132,9 @@ static //purpose : //======================================================================= Standard_Boolean IsValid(const TopoDS_Edge& aE, - const TopoDS_Vertex& aV, - const Standard_Real aTV1, - const Standard_Real aTV2) + const TopoDS_Vertex& aV, + const Standard_Real aTV1, + const Standard_Real aTV2) { Standard_Boolean bRet; Standard_Integer i, aNbP, aNbP1; diff --git a/src/NMTTools/NMTTools_CommonBlock.cxx b/src/NMTTools/NMTTools_CommonBlock.cxx index 94ff2e98c..668a5d623 100644 --- a/src/NMTTools/NMTTools_CommonBlock.cxx +++ b/src/NMTTools/NMTTools_CommonBlock.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_CommonBlock.cxx -// Created: Tue Dec 9 12:23:29 2003 -// Author: Peter KURNEV -// +// File: NMTTools_CommonBlock.cxx +// Created: Tue Dec 9 12:23:29 2003 +// Author: Peter KURNEV +// // #include diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.cxx b/src/NMTTools/NMTTools_CommonBlockAPI.cxx index 817f328cb..c11edda4c 100644 --- a/src/NMTTools/NMTTools_CommonBlockAPI.cxx +++ b/src/NMTTools/NMTTools_CommonBlockAPI.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_CommonBlockAPI.cxx -// Created: Mon Dec 15 11:38:04 2003 -// Author: Peter KURNEV -// +// File: NMTTools_CommonBlockAPI.cxx +// Created: Mon Dec 15 11:38:04 2003 +// Author: Peter KURNEV +// // #include @@ -75,8 +75,8 @@ const BOPTools_PaveBlock& aPB=anItPB.Value(); anECurrent=aPB.OriginalEdge(); if (anECurrent==anE) { - pmyListOfPaveBlock->Append(aPB); - break; + pmyListOfPaveBlock->Append(aPB); + break; } } } @@ -126,7 +126,7 @@ for (; anItPB.More(); anItPB.Next()) { const BOPTools_PaveBlock& aPBx=anItPB.Value(); if (aPBx.IsEqual(aPB)) { - return aCB; + return aCB; } } } diff --git a/src/NMTTools/NMTTools_CoupleOfShape.cxx b/src/NMTTools/NMTTools_CoupleOfShape.cxx index 5736b977c..bc5d4dd16 100644 --- a/src/NMTTools/NMTTools_CoupleOfShape.cxx +++ b/src/NMTTools/NMTTools_CoupleOfShape.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_CoupleOfShape.cxx -// Created: Wed Jan 28 15:06:11 2004 -// Author: Peter KURNEV -// +// File: NMTTools_CoupleOfShape.cxx +// Created: Wed Jan 28 15:06:11 2004 +// Author: Peter KURNEV +// // #include diff --git a/src/NMTTools/NMTTools_DEProcessor.cxx b/src/NMTTools/NMTTools_DEProcessor.cxx index 538c998b4..f2239c30d 100644 --- a/src/NMTTools/NMTTools_DEProcessor.cxx +++ b/src/NMTTools/NMTTools_DEProcessor.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_DEProcessor.cxx -// Created: Wed Sep 12 12:10:52 2001 -// Author: Peter KURNEV -// +// File: NMTTools_DEProcessor.cxx +// Created: Wed Sep 12 12:10:52 2001 +// Author: Peter KURNEV +// // #include @@ -152,29 +152,29 @@ const TopoDS_Edge& aE=TopoDS::Edge(aS); if (BRep_Tool::Degenerated(aE)) { - iRankE=myDS->Rank(i); - aV=TopExp::FirstVertex(aE); - nVx=myDS->ShapeIndex(aV, iRankE); - // - nV=nVx; - ip=myFiller->FindSDVertex(nV); - if (ip) { - nV=ip; - } - // - TColStd_ListOfInteger aLFn; - const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE); - TopTools_ListIteratorOfListOfShape anIt(aLF); - for (; anIt.More(); anIt.Next()) { - const TopoDS_Shape& aF=anIt.Value(); - nF=myDS->ShapeIndex(aF, iRankE); - aLFn.Append(nF); - } - BOPTools_DEInfo aDEInfo; - aDEInfo.SetVertex(nV); - aDEInfo.SetFaces(aLFn); + iRankE=myDS->Rank(i); + aV=TopExp::FirstVertex(aE); + nVx=myDS->ShapeIndex(aV, iRankE); + // + nV=nVx; + ip=myFiller->FindSDVertex(nV); + if (ip) { + nV=ip; + } + // + TColStd_ListOfInteger aLFn; + const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE); + TopTools_ListIteratorOfListOfShape anIt(aLF); + for (; anIt.More(); anIt.Next()) { + const TopoDS_Shape& aF=anIt.Value(); + nF=myDS->ShapeIndex(aF, iRankE); + aLFn.Append(nF); + } + BOPTools_DEInfo aDEInfo; + aDEInfo.SetVertex(nV); + aDEInfo.SetFaces(aLFn); - myDEMap.Add (i, aDEInfo); + myDEMap.Add (i, aDEInfo); } } } @@ -207,7 +207,7 @@ // aNbLPB=aLPB.Extent(); if (!aNbLPB) { - continue; + continue; } // FillPaveSet (nED, nVD, nFD, aLPB); @@ -226,9 +226,9 @@ // purpose: //======================================================================= void NMTTools_DEProcessor::FindPaveBlocks(const Standard_Integer , - const Standard_Integer nVD, - const Standard_Integer nFD, - BOPTools_ListOfPaveBlock& aLPBOut) + const Standard_Integer nVD, + const Standard_Integer nFD, + BOPTools_ListOfPaveBlock& aLPBOut) { BOPTools_ListIteratorOfListOfPaveBlock anIt; Standard_Integer i, aNb, nF2, nV; @@ -253,15 +253,15 @@ const BOPTools_Pave& aPave1=aPBSp.Pave1(); nV=aPave1.Index(); if (nV==nVD) { - aLPBOut.Append(aPBSp); - continue; + aLPBOut.Append(aPBSp); + continue; } // const BOPTools_Pave& aPave2=aPBSp.Pave2(); nV=aPave2.Index(); if (nV==nVD) { - aLPBOut.Append(aPBSp); - continue; + aLPBOut.Append(aPBSp); + continue; } } // @@ -276,21 +276,21 @@ // anIt.Initialize(aLPBSe); for (; anIt.More(); anIt.Next()) { - const BOPTools_PaveBlock& aPBSe=anIt.Value(); - // - const BOPTools_Pave& aPv1=aPBSe.Pave1(); - nV=aPv1.Index(); - if (nV==nVD) { - aLPBOut.Append(aPBSe); - continue; - } - // - const BOPTools_Pave& aPv2=aPBSe.Pave2(); - nV=aPv2.Index(); - if (nV==nVD) { - aLPBOut.Append(aPBSe); - continue; - } + const BOPTools_PaveBlock& aPBSe=anIt.Value(); + // + const BOPTools_Pave& aPv1=aPBSe.Pave1(); + nV=aPv1.Index(); + if (nV==nVD) { + aLPBOut.Append(aPBSe); + continue; + } + // + const BOPTools_Pave& aPv2=aPBSe.Pave2(); + nV=aPv2.Index(); + if (nV==nVD) { + aLPBOut.Append(aPBSe); + continue; + } } } } @@ -300,9 +300,9 @@ // purpose: //======================================================================= void NMTTools_DEProcessor::FillPaveSet (const Standard_Integer nED, - const Standard_Integer nVD, - const Standard_Integer nFD, - const BOPTools_ListOfPaveBlock& aLPB) + const Standard_Integer nVD, + const Standard_Integer nFD, + const BOPTools_ListOfPaveBlock& aLPB) { Standard_Boolean bIsDone, bXDir, bRejectFlag; Standard_Integer nE, aNbPoints, j; @@ -367,55 +367,55 @@ if(bIsDone) { aNbPoints=aGInter.NbPoints(); if (aNbPoints) { - for (j=1; j<=aNbPoints; ++j) { - aP2D=aGInter.Point(j).Value(); - Handle(Geom2d_Line) aCLDE; - // - //modified by NIZNHY-PKV Thu Mar 20 17:37:32 2008f - Handle(Geom2d_TrimmedCurve) aCLDET1= - Handle(Geom2d_TrimmedCurve)::DownCast(aC2DDE1); - if (aCLDET1.IsNull()) { - aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1); - } - else { - Handle(Geom2d_Curve) aBasisCurve=aCLDET1->BasisCurve(); - aCLDE=Handle(Geom2d_Line)::DownCast(aBasisCurve); - } - //aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1); - //modified by NIZNHY-PKV Thu Mar 20 17:37:37 2008t - - if (aCLDE.IsNull()) { - continue; - } + for (j=1; j<=aNbPoints; ++j) { + aP2D=aGInter.Point(j).Value(); + Handle(Geom2d_Line) aCLDE; + // + //modified by NIZNHY-PKV Thu Mar 20 17:37:32 2008f + Handle(Geom2d_TrimmedCurve) aCLDET1= + Handle(Geom2d_TrimmedCurve)::DownCast(aC2DDE1); + if (aCLDET1.IsNull()) { + aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1); + } + else { + Handle(Geom2d_Curve) aBasisCurve=aCLDET1->BasisCurve(); + aCLDE=Handle(Geom2d_Line)::DownCast(aBasisCurve); + } + //aCLDE=Handle(Geom2d_Line)::DownCast(aC2DDE1); + //modified by NIZNHY-PKV Thu Mar 20 17:37:37 2008t + + if (aCLDE.IsNull()) { + continue; + } - aLDE=aCLDE->Lin2d(); - aX=ElCLib::Parameter(aLDE, aP2D); - // - if (fabs (aX-aTD1) < aDT || fabs (aX-aTD2) < aDT) { - continue; - } - if (aX < aTD1 || aX > aTD2) { - continue; - } - // - bRejectFlag=Standard_False; - const BOPTools_ListOfPave& aListOfPave=aPaveSet.Set(); - BOPTools_ListIteratorOfListOfPave aPaveIt(aListOfPave); - for (; aPaveIt.More(); aPaveIt.Next()) { - const BOPTools_Pave& aPavex=aPaveIt.Value(); - aXx=aPavex.Param(); - if (fabs (aX-aXx) < aDT) { - bRejectFlag=Standard_True; - break; - } - } - if (bRejectFlag) { - continue; - } - // - BOPTools_Pave aPave(nVD, aX, BooleanOperations_UnknownInterference); - aPaveSet.Append(aPave); - } + aLDE=aCLDE->Lin2d(); + aX=ElCLib::Parameter(aLDE, aP2D); + // + if (fabs (aX-aTD1) < aDT || fabs (aX-aTD2) < aDT) { + continue; + } + if (aX < aTD1 || aX > aTD2) { + continue; + } + // + bRejectFlag=Standard_False; + const BOPTools_ListOfPave& aListOfPave=aPaveSet.Set(); + BOPTools_ListIteratorOfListOfPave aPaveIt(aListOfPave); + for (; aPaveIt.More(); aPaveIt.Next()) { + const BOPTools_Pave& aPavex=aPaveIt.Value(); + aXx=aPavex.Param(); + if (fabs (aX-aXx) < aDT) { + bRejectFlag=Standard_True; + break; + } + } + if (bRejectFlag) { + continue; + } + // + BOPTools_Pave aPave(nVD, aX, BooleanOperations_UnknownInterference); + aPaveSet.Append(aPave); + } } } } @@ -448,7 +448,7 @@ // purpose: //======================================================================= void NMTTools_DEProcessor::MakeSplitEdges (const Standard_Integer nED, - const Standard_Integer nFD) + const Standard_Integer nFD) { const BOPTools_SplitShapesPool& aSplitShapesPool=myFiller->SplitShapesPool(); const BOPTools_ListOfPaveBlock& aSplitEdges=aSplitShapesPool(myDS->RefEdge(nED)); @@ -503,12 +503,12 @@ // purpose: //======================================================================= void NMTTools_DEProcessor::MakeSplitEdge (const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const TopoDS_Vertex& aV1, - const Standard_Real aP1, - const TopoDS_Vertex& aV2, - const Standard_Real aP2, - TopoDS_Edge& aNewEdge) + const TopoDS_Face& aF, + const TopoDS_Vertex& aV1, + const Standard_Real aP1, + const TopoDS_Vertex& aV2, + const Standard_Real aP2, + TopoDS_Edge& aNewEdge) { Standard_Real aTol=1.e-7; diff --git a/src/NMTTools/NMTTools_DSFiller.cxx b/src/NMTTools/NMTTools_DSFiller.cxx index 861a72c82..c9994c27f 100644 --- a/src/NMTTools/NMTTools_DSFiller.cxx +++ b/src/NMTTools/NMTTools_DSFiller.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_DSFiller.cxx -// Created: Fri Dec 5 14:06:34 2003 -// Author: Peter KURNEV -// +// File: NMTTools_DSFiller.cxx +// Created: Fri Dec 5 14:06:34 2003 +// Author: Peter KURNEV +// // #include #include diff --git a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx index bd3a90005..d38fc46e4 100644 --- a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx +++ b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock.hxx @@ -67,7 +67,7 @@ NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock(const Standard_Integer& K, // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx index 3b091cdfc..c3ba37c8a 100644 --- a/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx +++ b/src/NMTTools/NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_DataMapNodeOfDataMapOfIntegerList static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock", - sizeof(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTTools_DataMapNodeOfDataMapOfIntegerListOfPaveBlock), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx index 3774d3411..6f6cc6a58 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx @@ -70,7 +70,7 @@ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger(const Standard_ // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx index 7989209e2..4e1c0b286 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMa static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger", - sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx index 9b24aa885..e4cb16eea 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx @@ -74,7 +74,7 @@ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape(const TopoDS // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx index 628f0b740..04f9425b7 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMa static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape", - sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx index b89241660..e95f7cf64 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx @@ -74,7 +74,7 @@ NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock(const TopoDS_Shape& // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx index 311306e41..7eb436382 100644 --- a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMa static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock", - sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cxx b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cxx index 8cf489a9b..2a5e9f5e9 100644 --- a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cxx +++ b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_IteratorOfCoupleOfShape.cxx -// Created: Thu Dec 4 17:00:03 2003 -// Author: Peter KURNEV -// +// File: NMTTools_IteratorOfCoupleOfShape.cxx +// Created: Thu Dec 4 17:00:03 2003 +// Author: Peter KURNEV +// // #include #include @@ -57,7 +57,7 @@ // purpose: //======================================================================= void NMTTools_IteratorOfCoupleOfShape::Initialize(const TopAbs_ShapeEnum Type1, - const TopAbs_ShapeEnum Type2) + const TopAbs_ShapeEnum Type2) { if(myPDS==NULL) { Standard_NoSuchObject::Raise("NMTTools_IteratorOfCoupleOfShape::Initialize: myPDS==NULL"); @@ -112,8 +112,8 @@ // purpose: //======================================================================= void NMTTools_IteratorOfCoupleOfShape::Current(Standard_Integer& aIndex1, - Standard_Integer& aIndex2, - Standard_Boolean& aWithSubShape) const + Standard_Integer& aIndex2, + Standard_Boolean& aWithSubShape) const { aIndex1=myIndex1; aIndex2=myIndex2; diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx index ce0b0608e..b7b004c72 100644 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx @@ -61,7 +61,7 @@ NMTTools_ListNodeOfListOfCommonBlock(const NMTTools_CommonBlock& I,const TCollec // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx index 793bcf9ed..89b2d6c30 100644 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_ListNodeOfListOfCommonBlock_Type_ static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTTools_ListNodeOfListOfCommonBlock", - sizeof(NMTTools_ListNodeOfListOfCommonBlock), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTTools_ListNodeOfListOfCommonBlock), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx index 6b54795d2..752f4a8ac 100644 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx @@ -61,7 +61,7 @@ NMTTools_ListNodeOfListOfCoupleOfShape(const NMTTools_CoupleOfShape& I,const TCo // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx index 912f0a39c..39e19ca54 100644 --- a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx @@ -48,10 +48,10 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_ListNodeOfListOfCoupleOfShape_Typ static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTTools_ListNodeOfListOfCoupleOfShape", - sizeof(NMTTools_ListNodeOfListOfCoupleOfShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTTools_ListNodeOfListOfCoupleOfShape), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTTools/NMTTools_PCurveMaker.cxx b/src/NMTTools/NMTTools_PCurveMaker.cxx index 91a8bc14c..27248731a 100644 --- a/src/NMTTools/NMTTools_PCurveMaker.cxx +++ b/src/NMTTools/NMTTools_PCurveMaker.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PCurveMaker.cxx -// Created: -// Author: Peter KURNEV -// +// File: NMTTools_PCurveMaker.cxx +// Created: +// Author: Peter KURNEV +// // #include diff --git a/src/NMTTools/NMTTools_PaveFiller.cxx b/src/NMTTools/NMTTools_PaveFiller.cxx index 10228099e..9142b1a7b 100644 --- a/src/NMTTools/NMTTools_PaveFiller.cxx +++ b/src/NMTTools/NMTTools_PaveFiller.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PaveFiller.cxx -// Created: Fri Dec 5 14:58:54 2003 -// Author: Peter KURNEV -// +// File: NMTTools_PaveFiller.cxx +// Created: Fri Dec 5 14:58:54 2003 +// Author: Peter KURNEV +// // #include // diff --git a/src/NMTTools/NMTTools_PaveFiller_0.cxx b/src/NMTTools/NMTTools_PaveFiller_0.cxx index 7a787ebac..1cb55c788 100644 --- a/src/NMTTools/NMTTools_PaveFiller_0.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_0.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PaveFiller_0.cxx -// Created: Mon Dec 8 11:45:51 2003 -// Author: Peter KURNEV -// +// File: NMTTools_PaveFiller_0.cxx +// Created: Mon Dec 8 11:45:51 2003 +// Author: Peter KURNEV +// // #include @@ -38,7 +38,7 @@ // purpose: //======================================================================= Standard_Boolean NMTTools_PaveFiller::IsSuccessorsComputed(const Standard_Integer aN1, - const Standard_Integer aN2)const + const Standard_Integer aN2)const { Standard_Boolean bComputed; Standard_Integer i, nSuc, n1, n2, ntmp, aNbS; @@ -96,7 +96,7 @@ //purpose : //======================================================================= void NMTTools_PaveFiller::SortTypes(Standard_Integer& theWhat, - Standard_Integer& theWith)const + Standard_Integer& theWith)const { Standard_Integer aWhat, aWith; Standard_Boolean aReverseFlag; diff --git a/src/NMTTools/NMTTools_PaveFiller_1.cxx b/src/NMTTools/NMTTools_PaveFiller_1.cxx index 8685855c0..11e89037d 100644 --- a/src/NMTTools/NMTTools_PaveFiller_1.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_1.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PaveFiller_1.cxx -// Created: Mon Dec 8 11:47:55 2003 -// Author: Peter KURNEV -// +// File: NMTTools_PaveFiller_1.cxx +// Created: Mon Dec 8 11:47:55 2003 +// Author: Peter KURNEV +// // #include @@ -123,15 +123,15 @@ for (i=0; aItX.More(); aItX.Next(), ++i) { aItY.Initialize(aLIX); for (j=0; aItY.More(); aItY.Next(), ++j) { - if (j>i) { - n1=aItX.Value(); - n2=aItY.Value(); - myIP->Add(n1, n2, Standard_True, NMTDS_TI_VV); - // - BOPTools_VVInterference aVV(n1, n2); - aVV.SetNewShape(nVnew); - aVVs.Append(aVV); - } + if (j>i) { + n1=aItX.Value(); + n2=aItY.Value(); + myIP->Add(n1, n2, Standard_True, NMTDS_TI_VV); + // + BOPTools_VVInterference aVV(n1, n2); + aVV.SetNewShape(nVnew); + aVVs.Append(aVV); + } } } }//for (; aIt1.More(); aIt1.Next()) { diff --git a/src/NMTTools/NMTTools_PaveFiller_2.cxx b/src/NMTTools/NMTTools_PaveFiller_2.cxx index e400245ca..2430025f4 100644 --- a/src/NMTTools/NMTTools_PaveFiller_2.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_2.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PaveFiller_2.cxx -// Created: Mon Dec 8 12:02:56 2003 -// Author: Peter KURNEV -// +// File: NMTTools_PaveFiller_2.cxx +// Created: Mon Dec 8 12:02:56 2003 +// Author: Peter KURNEV +// // #include @@ -61,7 +61,7 @@ static Standard_Boolean Contains(const TopoDS_Edge& aE, - const TopoDS_Vertex& aV); + const TopoDS_Vertex& aV); // Contribution of Samtech www.samcef.com END //======================================================================= @@ -98,18 +98,18 @@ static aWhat=n1; // Vertex aWith=n2; // Edge if (myDS->GetShapeType(n1)==TopAbs_EDGE) { - aWhat=n2; - aWith=n1; + aWhat=n2; + aWith=n1; } // if(bJustAdd) { - //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexEdge, anIndexIn); - continue; + //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexEdge, anIndexIn); + continue; } // Edge aE2=TopoDS::Edge(myDS->Shape(aWith)); if (BRep_Tool::Degenerated(aE2)){ - continue; + continue; } // Vertex nV1=aWhat; @@ -117,62 +117,62 @@ static // iSDV=FindSDVertex(aWhat); if (iSDV) { - nV1=iSDV; - aV1=TopoDS::Vertex(myDS->Shape(nV1)); - // Modified to find same domain vertex Thu Sep 14 14:35:18 2006 - // Contribution of Samtech www.samcef.com BEGIN - Standard_Integer nVE, iSDVE, iRet; - // - BooleanOperations_OnceExplorer aExp(*myDS); - iRet=0; - aExp.Init(aWith, TopAbs_VERTEX); - for (; aExp.More(); aExp.Next()) { - nVE=aExp.Current(); - iSDVE=FindSDVertex(nVE); - if (iSDVE==iSDV) { - iRet=1; - break; - } - } - if (iRet) { - continue; - } + nV1=iSDV; + aV1=TopoDS::Vertex(myDS->Shape(nV1)); + // Modified to find same domain vertex Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + Standard_Integer nVE, iSDVE, iRet; + // + BooleanOperations_OnceExplorer aExp(*myDS); + iRet=0; + aExp.Init(aWith, TopAbs_VERTEX); + for (; aExp.More(); aExp.Next()) { + nVE=aExp.Current(); + iSDVE=FindSDVertex(nVE); + if (iSDVE==iSDV) { + iRet=1; + break; + } + } + if (iRet) { + continue; + } } else { - if (Contains(aE2, aV1)) { - continue; - } - // Contribution of Samtech www.samcef.com END + if (Contains(aE2, aV1)) { + continue; + } + // Contribution of Samtech www.samcef.com END } // aFlag=myContext.ComputeVE (aV1, aE2, aT); // if (!aFlag) { - // Add Interference to the Pool - BOPTools_VEInterference anInterf (aWhat, aWith, aT); - anIndexIn=aVEs.Append(anInterf); - // - // Add Pave to the Edge's myPavePool - aCouple.SetCouple(nV1, aWith); - if (!aSnareMap.Contains(aCouple)){ - aSnareMap.Add(aCouple); - // - BOPTools_Pave aPave(nV1, aT, BooleanOperations_VertexEdge); - aPave.SetInterference(anIndexIn); - BOPTools_PaveSet& aPaveSet= myPavePool(myDS->RefEdge(aWith)); - aPaveSet.Append(aPave); - } - // - // State for the Vertex in DS; - myDS->SetState (aWhat, BooleanOperations_ON); - // Insert Vertex in Interference Object - BOPTools_VEInterference& aVE=aVEs(anIndexIn); - aVE.SetNewShape(aWhat); - // qqf - { - myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_VE); - } - // qqt + // Add Interference to the Pool + BOPTools_VEInterference anInterf (aWhat, aWith, aT); + anIndexIn=aVEs.Append(anInterf); + // + // Add Pave to the Edge's myPavePool + aCouple.SetCouple(nV1, aWith); + if (!aSnareMap.Contains(aCouple)){ + aSnareMap.Add(aCouple); + // + BOPTools_Pave aPave(nV1, aT, BooleanOperations_VertexEdge); + aPave.SetInterference(anIndexIn); + BOPTools_PaveSet& aPaveSet= myPavePool(myDS->RefEdge(aWith)); + aPaveSet.Append(aPave); + } + // + // State for the Vertex in DS; + myDS->SetState (aWhat, BooleanOperations_ON); + // Insert Vertex in Interference Object + BOPTools_VEInterference& aVE=aVEs(anIndexIn); + aVE.SetNewShape(aWhat); + // qqf + { + myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_VE); + } + // qqt } //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexEdge, anIndexIn); } @@ -197,7 +197,7 @@ static aE=TopoDS::Edge(myDS->Shape(i)); // if (BRep_Tool::Degenerated(aE)){ - continue; + continue; } // BOPTools_PaveSet& aPaveSet=myPavePool(myDS->RefEdge(i)); @@ -205,21 +205,21 @@ static // A <- aNBSuc=myDS->NumberOfSuccessors(i); for (ii=1; ii <=aNBSuc; ii++) { - nV=myDS->GetSuccessor(i, ii); - anOr=myDS->GetOrientation(i, ii); - aV=TopoDS::Vertex(myDS->Shape(nV)); - aV.Orientation(anOr); - aT=BRep_Tool::Parameter(aV, aE); - // - ip=FindSDVertex(nV); - if (ip) { - aV=TopoDS::Vertex(myDS->Shape(ip)); - aV.Orientation(anOr);// XX ? if the edge is closed it'll be amazing result - nV=ip; - } - // - BOPTools_Pave aPave(nV, aT); - aPaveSet.Append (aPave); + nV=myDS->GetSuccessor(i, ii); + anOr=myDS->GetOrientation(i, ii); + aV=TopoDS::Vertex(myDS->Shape(nV)); + aV.Orientation(anOr); + aT=BRep_Tool::Parameter(aV, aE); + // + ip=FindSDVertex(nV); + if (ip) { + aV=TopoDS::Vertex(myDS->Shape(ip)); + aV.Orientation(anOr);// XX ? if the edge is closed it'll be amazing result + nV=ip; + } + // + BOPTools_Pave aPave(nV, aT); + aPaveSet.Append (aPave); } } } @@ -232,7 +232,7 @@ static //purpose : //======================================================================= Standard_Boolean Contains(const TopoDS_Edge& aE, - const TopoDS_Vertex& aV) + const TopoDS_Vertex& aV) { Standard_Boolean bRet; TopoDS_Iterator aIt; diff --git a/src/NMTTools/NMTTools_PaveFiller_3.cxx b/src/NMTTools/NMTTools_PaveFiller_3.cxx index 039cbbc1b..6a46980eb 100644 --- a/src/NMTTools/NMTTools_PaveFiller_3.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_3.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PaveFiller_3.cxx -// Created: Mon Dec 8 16:06:56 2003 -// Author: Peter KURNEV -// +// File: NMTTools_PaveFiller_3.cxx +// Created: Mon Dec 8 16:06:56 2003 +// Author: Peter KURNEV +// // #include @@ -45,7 +45,7 @@ // Contribution of Samtech www.samcef.com BEGIN static Standard_Boolean Contains(const TopoDS_Face& aF, - const TopoDS_Vertex& aV); + const TopoDS_Vertex& aV); // Contribution of Samtech www.samcef.com END //======================================================================= // function: PerformVF @@ -80,49 +80,49 @@ static aWhat=n1; // Vertex aWith=n2; // Face if (myDS->GetShapeType(n1)==TopAbs_FACE) { - aWhat=n2; - aWith=n1; + aWhat=n2; + aWith=n1; } // iSDV=FindSDVertex(aWhat); - // + // if(aJustAdd) { - //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn); - continue; + //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn); + continue; } // aV1=TopoDS::Vertex(myDS->Shape(aWhat)); if (iSDV) { - aV1=TopoDS::Vertex(myDS->Shape(iSDV)); + aV1=TopoDS::Vertex(myDS->Shape(iSDV)); } - // + // aF2=TopoDS::Face(myDS->Shape(aWith)); // // Modified Thu Sep 14 14:35:18 2006 // Contribution of Samtech www.samcef.com BEGIN if (Contains(aF2, aV1)) { - continue; + continue; } // Contribution of Samtech www.samcef.com END // aFlag=myContext.ComputeVS (aV1, aF2, aU, aV); // if (!aFlag) { - // - // Add Interference to the Pool - BOPTools_VSInterference anInterf (aWhat, aWith, aU, aV); - anIndexIn=aVSs.Append(anInterf); - // - // SetState for Vertex in DS; - myDS->SetState (aWhat, BooleanOperations_ON); - // Insert Vertex in Interference Object - BOPTools_VSInterference& aVS=aVSs(anIndexIn); - aVS.SetNewShape(aWhat); - // qqf - { - myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_VF); - } - // qqt + // + // Add Interference to the Pool + BOPTools_VSInterference anInterf (aWhat, aWith, aU, aV); + anIndexIn=aVSs.Append(anInterf); + // + // SetState for Vertex in DS; + myDS->SetState (aWhat, BooleanOperations_ON); + // Insert Vertex in Interference Object + BOPTools_VSInterference& aVS=aVSs(anIndexIn); + aVS.SetNewShape(aWhat); + // qqf + { + myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_VF); + } + // qqt } //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn); } @@ -136,7 +136,7 @@ static //purpose : //======================================================================= Standard_Boolean Contains(const TopoDS_Face& aF, - const TopoDS_Vertex& aV) + const TopoDS_Vertex& aV) { Standard_Boolean bRet; TopExp_Explorer aExp; diff --git a/src/NMTTools/NMTTools_PaveFiller_4.cxx b/src/NMTTools/NMTTools_PaveFiller_4.cxx index 0beae6670..08f40f9e2 100644 --- a/src/NMTTools/NMTTools_PaveFiller_4.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_4.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PaveFiller_4.cxx -// Created: Mon Dec 8 17:08:58 2003 -// Author: Peter KURNEV -// +// File: NMTTools_PaveFiller_4.cxx +// Created: Mon Dec 8 17:08:58 2003 +// Author: Peter KURNEV +// // #include // @@ -110,33 +110,33 @@ static void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI, - TopTools_DataMapOfShapeListOfShape& myImages, - TopTools_DataMapOfShapeShape& myOrigins); + TopTools_DataMapOfShapeListOfShape& myImages, + TopTools_DataMapOfShapeShape& myOrigins); static void MakeNewVertex(const TopTools_ListOfShape& aLV, - TopoDS_Vertex& aNewVertex); + TopoDS_Vertex& aNewVertex); static void VertexParameters(const IntTools_CommonPrt& aCPart, - Standard_Real& aT1, - Standard_Real& aT2); + Standard_Real& aT1, + Standard_Real& aT2); static Standard_Boolean IsOnPave(const Standard_Real& aT1, - const IntTools_Range& aRange, - const Standard_Real& aTolerance); + const IntTools_Range& aRange, + const Standard_Real& aTolerance); static void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB); static void ProcessBlock(const BOPTools_PaveBlock& aPB, - const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, - BOPTools_IMapOfPaveBlock& aProcessedBlocks, - BOPTools_IMapOfPaveBlock& aChain); + const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, + BOPTools_IMapOfPaveBlock& aProcessedBlocks, + BOPTools_IMapOfPaveBlock& aChain); static void FindChains(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, - NMTTools_ListOfCommonBlock& aLCB); + NMTTools_ListOfCommonBlock& aLCB); //======================================================================= // function: PerformEE @@ -216,191 +216,191 @@ static const Bnd_Box& aBB1=aShrunkRange1.BndBox(); // for (anIt2.Initialize(aLPB2); anIt2.More(); anIt2.Next()) { - BOPTools_PaveBlock& aPB2=anIt2.Value(); - const IntTools_ShrunkRange& aShrunkRange2=aPB2.ShrunkRange(); + BOPTools_PaveBlock& aPB2=anIt2.Value(); + const IntTools_ShrunkRange& aShrunkRange2=aPB2.ShrunkRange(); - const IntTools_Range& aSR2=aShrunkRange2.ShrunkRange(); - const Bnd_Box& aBB2=aShrunkRange2.BndBox(); - // - if (aBB1.IsOut (aBB2)) { - continue; - } - // - // EE - IntTools_EdgeEdge aEE; - aEE.SetEdge1 (aE1); - aEE.SetEdge2 (aE2); - aEE.SetTolerance1 (aTolE1); - aEE.SetTolerance2 (aTolE2); - aEE.SetDiscretize (aDiscretize); - aEE.SetDeflection (aDeflection); - // - IntTools_Range anewSR1 = aSR1; - IntTools_Range anewSR2 = aSR2; - // - BOPTools_Tools::CorrectRange (aE1, aE2, aSR1, anewSR1); - BOPTools_Tools::CorrectRange (aE2, aE1, aSR2, anewSR2); - // - aEE.SetRange1(anewSR1); - aEE.SetRange2(anewSR2); - - aEE.Perform(); - // - anIndexIn=0; - // - if (aEE.IsDone()) { - // reverse order if it is necessary - aEWhat=aE1; - aEWith=aE2; - aWhat=nE1; - aWith=nE2; - if (aEE.Order()) { - aTmp=aWhat; - aWhat=aWith; - aWith=aTmp; - aEWhat=aE2; - aEWith=aE1; - } - // - const IntTools_SequenceOfCommonPrts& aCPrts=aEE.CommonParts(); - aNbCPrts=aCPrts.Length(); - for (i=1; i<=aNbCPrts; i++) { - const IntTools_CommonPrt& aCPart=aCPrts(i); - const IntTools_SequenceOfRanges& aRanges2=aCPart.Ranges2(); - // - anIndexIn=0; - // - TopAbs_ShapeEnum aType=aCPart.Type(); - switch (aType) { - case TopAbs_VERTEX: { - Standard_Real aT1, aT2, aTol=Precision::PConfusion(); - Standard_Boolean bIsOnPave1, bIsOnPave2; - IntTools_Range aR1, aR2; - // - VertexParameters(aCPart, aT1, aT2); - // - //decide to keep the pave or not - aR1 = (aEE.Order()) ? anewSR2 : anewSR1; - aR2 = (aEE.Order()) ? anewSR1 : anewSR2; - // - bIsOnPave1=IsOnPave(aT1, aR1, aTol); - bIsOnPave2=IsOnPave(aT2, aR2, aTol); - // - if(bIsOnPave1 || bIsOnPave2) { - continue; - } - // - BOPTools_Tools::MakeNewVertex(aEWhat, aT1, aEWith, aT2, aNewVertex); - // - { - Standard_Integer nV11, nV12, nV21, nV22, nVS[2], k, j, iFound; - Standard_Real aTolVx, aTolVnew, aD2, aDT2; - TColStd_MapOfInteger aMV; - gp_Pnt aPnew, aPx; - // - iFound=0; - j=-1; - nV11=aPB1.Pave1().Index(); - nV12=aPB1.Pave2().Index(); - nV21=aPB2.Pave1().Index(); - nV22=aPB2.Pave2().Index(); - aMV.Add(nV11); - aMV.Add(nV12); - // - if (aMV.Contains(nV21)) { - ++j; - nVS[j]=nV21; - } - if (aMV.Contains(nV22)) { - ++j; - nVS[j]=nV22; - } - // - aTolVnew=BRep_Tool::Tolerance(aNewVertex); - aPnew=BRep_Tool::Pnt(aNewVertex); - // - for (k=0; k<=j; ++k) { - const TopoDS_Vertex& aVx=TopoDS::Vertex(myDS->Shape(nVS[k])); - aTolVx=BRep_Tool::Tolerance(aVx); - aPx=BRep_Tool::Pnt(aVx); - aD2=aPnew.SquareDistance(aPx); - // - aDT2=100.*(aTolVnew+aTolVx)*(aTolVnew+aTolVx); - // - if (aD2Add(aWhat, aWith, Standard_True, NMTDS_TI_EE); - } - // qqt - // - // Collect - aMapVI.Add(aNewVertex, anIndexIn); - } - break; - - case TopAbs_EDGE: { - Standard_Integer aNbComPrt2; - Standard_Boolean aCoinsideFlag; - // - aNbComPrt2=aRanges2.Length(); - aCoinsideFlag=IsBlocksCoinside(aPB1, aPB2); - // - if (aNbComPrt2>1 || !aCoinsideFlag) { - //myIntrPool->AddInterference (aWhat, aWith, BooleanOperations_EdgeEdge, anIndexIn); - break; - } - // - // Fill aMapCB - if (aMapCB.Contains(aPB1)) { - BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.ChangeFromKey(aPB1); - aMapPB.Add(aPB1); - aMapPB.Add(aPB2); - } - else { - BOPTools_IMapOfPaveBlock aMapPB; - aMapPB.Add(aPB1); - aMapPB.Add(aPB2); - aMapCB.Add(aPB1, aMapPB); - } - // - if (aMapCB.Contains(aPB2)) { - BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.ChangeFromKey(aPB2); - aMapPB.Add(aPB1); - aMapPB.Add(aPB2); - } - else { - BOPTools_IMapOfPaveBlock aMapPB; - aMapPB.Add(aPB1); - aMapPB.Add(aPB2); - aMapCB.Add(aPB2, aMapPB); - } - // qqf - { - myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_EE); - } - // qqt - } - break; - default: - break; - } // switch (aType) - } // for (i=1; i<=aNbCPrts; i++) - }// if (aEE.IsDone()) + const IntTools_Range& aSR2=aShrunkRange2.ShrunkRange(); + const Bnd_Box& aBB2=aShrunkRange2.BndBox(); + // + if (aBB1.IsOut (aBB2)) { + continue; + } + // + // EE + IntTools_EdgeEdge aEE; + aEE.SetEdge1 (aE1); + aEE.SetEdge2 (aE2); + aEE.SetTolerance1 (aTolE1); + aEE.SetTolerance2 (aTolE2); + aEE.SetDiscretize (aDiscretize); + aEE.SetDeflection (aDeflection); + // + IntTools_Range anewSR1 = aSR1; + IntTools_Range anewSR2 = aSR2; + // + BOPTools_Tools::CorrectRange (aE1, aE2, aSR1, anewSR1); + BOPTools_Tools::CorrectRange (aE2, aE1, aSR2, anewSR2); + // + aEE.SetRange1(anewSR1); + aEE.SetRange2(anewSR2); + + aEE.Perform(); + // + anIndexIn=0; + // + if (aEE.IsDone()) { + // reverse order if it is necessary + aEWhat=aE1; + aEWith=aE2; + aWhat=nE1; + aWith=nE2; + if (aEE.Order()) { + aTmp=aWhat; + aWhat=aWith; + aWith=aTmp; + aEWhat=aE2; + aEWith=aE1; + } + // + const IntTools_SequenceOfCommonPrts& aCPrts=aEE.CommonParts(); + aNbCPrts=aCPrts.Length(); + for (i=1; i<=aNbCPrts; i++) { + const IntTools_CommonPrt& aCPart=aCPrts(i); + const IntTools_SequenceOfRanges& aRanges2=aCPart.Ranges2(); + // + anIndexIn=0; + // + TopAbs_ShapeEnum aType=aCPart.Type(); + switch (aType) { + case TopAbs_VERTEX: { + Standard_Real aT1, aT2, aTol=Precision::PConfusion(); + Standard_Boolean bIsOnPave1, bIsOnPave2; + IntTools_Range aR1, aR2; + // + VertexParameters(aCPart, aT1, aT2); + // + //decide to keep the pave or not + aR1 = (aEE.Order()) ? anewSR2 : anewSR1; + aR2 = (aEE.Order()) ? anewSR1 : anewSR2; + // + bIsOnPave1=IsOnPave(aT1, aR1, aTol); + bIsOnPave2=IsOnPave(aT2, aR2, aTol); + // + if(bIsOnPave1 || bIsOnPave2) { + continue; + } + // + BOPTools_Tools::MakeNewVertex(aEWhat, aT1, aEWith, aT2, aNewVertex); + // + { + Standard_Integer nV11, nV12, nV21, nV22, nVS[2], k, j, iFound; + Standard_Real aTolVx, aTolVnew, aD2, aDT2; + TColStd_MapOfInteger aMV; + gp_Pnt aPnew, aPx; + // + iFound=0; + j=-1; + nV11=aPB1.Pave1().Index(); + nV12=aPB1.Pave2().Index(); + nV21=aPB2.Pave1().Index(); + nV22=aPB2.Pave2().Index(); + aMV.Add(nV11); + aMV.Add(nV12); + // + if (aMV.Contains(nV21)) { + ++j; + nVS[j]=nV21; + } + if (aMV.Contains(nV22)) { + ++j; + nVS[j]=nV22; + } + // + aTolVnew=BRep_Tool::Tolerance(aNewVertex); + aPnew=BRep_Tool::Pnt(aNewVertex); + // + for (k=0; k<=j; ++k) { + const TopoDS_Vertex& aVx=TopoDS::Vertex(myDS->Shape(nVS[k])); + aTolVx=BRep_Tool::Tolerance(aVx); + aPx=BRep_Tool::Pnt(aVx); + aD2=aPnew.SquareDistance(aPx); + // + aDT2=100.*(aTolVnew+aTolVx)*(aTolVnew+aTolVx); + // + if (aD2Add(aWhat, aWith, Standard_True, NMTDS_TI_EE); + } + // qqt + // + // Collect + aMapVI.Add(aNewVertex, anIndexIn); + } + break; + + case TopAbs_EDGE: { + Standard_Integer aNbComPrt2; + Standard_Boolean aCoinsideFlag; + // + aNbComPrt2=aRanges2.Length(); + aCoinsideFlag=IsBlocksCoinside(aPB1, aPB2); + // + if (aNbComPrt2>1 || !aCoinsideFlag) { + //myIntrPool->AddInterference (aWhat, aWith, BooleanOperations_EdgeEdge, anIndexIn); + break; + } + // + // Fill aMapCB + if (aMapCB.Contains(aPB1)) { + BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.ChangeFromKey(aPB1); + aMapPB.Add(aPB1); + aMapPB.Add(aPB2); + } + else { + BOPTools_IMapOfPaveBlock aMapPB; + aMapPB.Add(aPB1); + aMapPB.Add(aPB2); + aMapCB.Add(aPB1, aMapPB); + } + // + if (aMapCB.Contains(aPB2)) { + BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.ChangeFromKey(aPB2); + aMapPB.Add(aPB1); + aMapPB.Add(aPB2); + } + else { + BOPTools_IMapOfPaveBlock aMapPB; + aMapPB.Add(aPB1); + aMapPB.Add(aPB2); + aMapCB.Add(aPB2, aMapPB); + } + // qqf + { + myIP->Add(aWhat, aWith, Standard_True, NMTDS_TI_EE); + } + // qqt + } + break; + default: + break; + } // switch (aType) + } // for (i=1; i<=aNbCPrts; i++) + }// if (aEE.IsDone()) } // for (; anIt2.More(); anIt2.Next()) } // for (; anIt1.More(); anIt1.Next()) }// for (; myDSIt.More(); myDSIt.Next()) @@ -458,9 +458,9 @@ static // aItLP.Initialize(aLP); for (; aItLP.More(); aItLP.Next()) { - const BOPTools_Pave& aPave=aItLP.Value(); - nV=aPave.Index(); - aMI.Add(nV); + const BOPTools_Pave& aPave=aItLP.Value(); + nV=aPave.Index(); + aMI.Add(nV); } }//for (; anItLPB.More(); anItLPB.Next()) { // @@ -474,33 +474,33 @@ static // aItMI.Initialize(aMI); for (; aItMI.More(); aItMI.Next()) { - nV=aItMI.Key(); - bFound=Standard_False; - aItLP.Initialize(aLP); - for (; aItLP.More(); aItLP.Next()) { - const BOPTools_Pave& aPave=aItLP.Value(); - nVp=aPave.Index(); - if (nVp==nV) { - bFound=!bFound; - break; - } - } - // - if (!bFound) { - // Append Pave of nV to rhe edge nE - const TopoDS_Edge& aE=*(TopoDS_Edge*)(&myDS->Shape(nE)); - const TopoDS_Vertex& aV= *(TopoDS_Vertex*)(&myDS->Shape(nV)); - iFlag=myContext.ComputeVE (aV, aE, aT); - if (!iFlag) { - BOPTools_Pave aPave; - // - aPave.SetInterference(-1); - aPave.SetType (BooleanOperations_EdgeEdge); - aPave.SetIndex(nV); - aPave.SetParam(aT); - aPaveSet.Append(aPave); - } - } + nV=aItMI.Key(); + bFound=Standard_False; + aItLP.Initialize(aLP); + for (; aItLP.More(); aItLP.Next()) { + const BOPTools_Pave& aPave=aItLP.Value(); + nVp=aPave.Index(); + if (nVp==nV) { + bFound=!bFound; + break; + } + } + // + if (!bFound) { + // Append Pave of nV to rhe edge nE + const TopoDS_Edge& aE=*(TopoDS_Edge*)(&myDS->Shape(nE)); + const TopoDS_Vertex& aV= *(TopoDS_Vertex*)(&myDS->Shape(nV)); + iFlag=myContext.ComputeVE (aV, aE, aT); + if (!iFlag) { + BOPTools_Pave aPave; + // + aPave.SetInterference(-1); + aPave.SetType (BooleanOperations_EdgeEdge); + aPave.SetIndex(nV); + aPave.SetParam(aT); + aPaveSet.Append(aPave); + } + } }//for (; aItMI.More(); aItMI.Next()) { }//for (; anItLPB.More(); anItLPB.Next()) { } @@ -577,19 +577,19 @@ static aEE.SetNewShape(nVnew); // for (j=0; j<2; ++j) { - if (aMFence.Add(nE[j])) { - aE=TopoDS::Edge(myDS->Shape(nE[j])); - iFlag=myContext.ComputeVE (aVnew, aE, aT); - if (!iFlag) { - aPave.SetInterference(-1); - aPave.SetType (BooleanOperations_EdgeEdge); - aPave.SetIndex(nVnew); - aPave.SetParam(aT); - // - BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE[j])); - aPaveSet.Append(aPave); - } - }// if (aMFence.Add(nE[j])) { + if (aMFence.Add(nE[j])) { + aE=TopoDS::Edge(myDS->Shape(nE[j])); + iFlag=myContext.ComputeVE (aVnew, aE, aT); + if (!iFlag) { + aPave.SetInterference(-1); + aPave.SetType (BooleanOperations_EdgeEdge); + aPave.SetIndex(nVnew); + aPave.SetParam(aT); + // + BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE[j])); + aPaveSet.Append(aPave); + } + }// if (aMFence.Add(nE[j])) { }// for (j=0; j<2; ++j) { }//for (; aIt.More(); aIt.Next()) { }// for (; aItIm.More(); aItIm.Next()) @@ -602,8 +602,8 @@ static //purpose : //======================================================================= void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI, - TopTools_DataMapOfShapeListOfShape& myImages, - TopTools_DataMapOfShapeShape& myOrigins) + TopTools_DataMapOfShapeListOfShape& myImages, + TopTools_DataMapOfShapeShape& myOrigins) { Standard_Integer j, i, aNbV, aNbVSD; Standard_Real aTol; @@ -664,49 +664,49 @@ void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMap aNbIP=aMIP.Extent(); aIt1.Initialize(aMIP); for(; aIt1.More(); aIt1.Next()) { - aIP=aIt1.Key(); - if (aMIPC.Contains(aIP)) { - continue; - } - // - const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); - const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP); - // - aSelector.Clear(); - aSelector.SetBox(aBoxVP); - // - aNbVSD=aBBTree.Select(aSelector); - if (!aNbVSD) { - continue; // it must not be - } - // - const TColStd_ListOfInteger& aLI=aSelector.Indices(); - aIt.Initialize(aLI); - for (; aIt.More(); aIt.Next()) { - aIP1=aIt.Value(); - if (aMIP.Contains(aIP1)) { - continue; - } - aMIP1.Add(aIP1); - } //for (; aIt.More(); aIt.Next()) { + aIP=aIt1.Key(); + if (aMIPC.Contains(aIP)) { + continue; + } + // + const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); + const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP); + // + aSelector.Clear(); + aSelector.SetBox(aBoxVP); + // + aNbVSD=aBBTree.Select(aSelector); + if (!aNbVSD) { + continue; // it must not be + } + // + const TColStd_ListOfInteger& aLI=aSelector.Indices(); + aIt.Initialize(aLI); + for (; aIt.More(); aIt.Next()) { + aIP1=aIt.Value(); + if (aMIP.Contains(aIP1)) { + continue; + } + aMIP1.Add(aIP1); + } //for (; aIt.More(); aIt.Next()) { }//for(; aIt1.More(); aIt1.Next()) { // aNbIP1=aMIP1.Extent(); if (!aNbIP1) { - break; // from while(1) + break; // from while(1) } // 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) @@ -721,7 +721,7 @@ void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMap aIP=aIt1.Key(); const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); if (!j) { - aVF=aVP; + aVF=aVP; } aLVSD.Append(aVP); aMVProcessed.Add(aVP); @@ -769,7 +769,7 @@ void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMap for (; aItS.More(); aItS.Next()) { const TopoDS_Shape& aVSD=aItS.Value(); if (!myOrigins.IsBound(aVSD)) { - myOrigins.Bind(aVSD, aV); + myOrigins.Bind(aVSD, aV); } } } @@ -780,7 +780,7 @@ void TreatNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aMap //purpose : //======================================================================= void MakeNewVertex(const TopTools_ListOfShape& aLV, - TopoDS_Vertex& aNewVertex) + TopoDS_Vertex& aNewVertex) { Standard_Integer aNbV; Standard_Real aTolV, aD, aDmax; @@ -826,11 +826,11 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, // purpose: //======================================================================= void NMTTools_PaveFiller::EENewVertices (const TopoDS_Vertex& aNewVertex, - const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) + const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) { Standard_Integer i, aNewShape, nE1, nE2; Standard_Real aT1, aT2; - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; BOPTools_Pave aPave; // BOPTools_CArray1OfEEInterference& aEEs=myIP->EEInterferences(); @@ -881,16 +881,16 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, // aNbNew=aNewLP.Extent(); if (aNbNew) { - BOPTools_ListIteratorOfListOfPave anIt(aNewLP); - for (; anIt.More(); anIt.Next()) { - const BOPTools_Pave& aPave=anIt.Value(); - aPS.Append(aPave); - } - // Clear the ListOfPaveBlock - BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(i)); - aLPB.Clear(); - // Prepare the paveBlocks for that egde again - PreparePaveBlocks(i); + BOPTools_ListIteratorOfListOfPave anIt(aNewLP); + for (; anIt.More(); anIt.Next()) { + const BOPTools_Pave& aPave=anIt.Value(); + aPS.Append(aPave); + } + // Clear the ListOfPaveBlock + BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(i)); + aLPB.Clear(); + // Prepare the paveBlocks for that egde again + PreparePaveBlocks(i); } aNewLP.Clear(); } @@ -901,7 +901,7 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, // purpose: //======================================================================= void NMTTools_PaveFiller::PreparePaveBlocks(const TopAbs_ShapeEnum aType1, - const TopAbs_ShapeEnum aType2) + const TopAbs_ShapeEnum aType2) { myIsDone=Standard_False; // @@ -933,12 +933,12 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE[i])); aNbSplits=aLPB.Extent(); if (!aNbSplits) { - if (aMap.Add(nE[i])) { - PreparePaveBlocks(nE[i]); - if (!myIsDone) { - return; - } - } + if (aMap.Add(nE[i])) { + PreparePaveBlocks(nE[i]); + if (!myIsDone) { + return; + } + } } } }// for (; myDSIt.More(); myDSIt.Next()) @@ -988,12 +988,12 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, BOPTColStd_Dump::PrintMessage(buf); sprintf (buf, "Can not obtain ShrunkRange for Edge %d", nE); throw - BOPTColStd_Failure(buf) ; + BOPTColStd_Failure(buf) ; } // if (iErr==6) { sprintf(buf, - "Warning: [PreparePaveBlocks()] Max.Dummy Shrunk Range for Edge %d\n", nE); + "Warning: [PreparePaveBlocks()] Max.Dummy Shrunk Range for Edge %d\n", nE); BOPTColStd_Dump::PrintMessage(buf); } else { @@ -1012,8 +1012,8 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, // purpose: //======================================================================= void NMTTools_PaveFiller::CorrectShrunkRanges(const Standard_Integer aSide, - const BOPTools_Pave& aPave, - IntTools_ShrunkRange& aShrunkRange) + const BOPTools_Pave& aPave, + IntTools_ShrunkRange& aShrunkRange) { BooleanOperations_KindOfInterference aType; Standard_Integer anIndexInterf ; @@ -1061,7 +1061,7 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, aNewRange.SetFirst(tNV); aNewRange.SetLast (aSR.Last()); if(aNewRange.First() < aNewRange.Last()) { - aShrunkRange.SetShrunkRange(aNewRange); + aShrunkRange.SetShrunkRange(aNewRange); } } } @@ -1073,7 +1073,7 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, aNewRange.SetLast (tNV); if(aNewRange.First() < aNewRange.Last()) { - aShrunkRange.SetShrunkRange(aNewRange); + aShrunkRange.SetShrunkRange(aNewRange); } } } @@ -1084,7 +1084,7 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, //======================================================================= Standard_Boolean NMTTools_PaveFiller::IsBlocksCoinside(const BOPTools_PaveBlock& aPB1, - const BOPTools_PaveBlock& aPB2) const + const BOPTools_PaveBlock& aPB2) const { Standard_Boolean bRetFlag=Standard_True; Standard_Real aTolV11, aTolV12, aTolV21, aTolV22; @@ -1163,10 +1163,10 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, // anItLPE.Initialize(aLPBx); for (; anItLPE.More(); anItLPE.Next()) { - const BOPTools_PaveBlock& aPBx=anItLPE.Value(); - nE=aPBx.OriginalEdge(); - NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE)); - aLCBE.Append(aCBx); + const BOPTools_PaveBlock& aPBx=anItLPE.Value(); + nE=aPBx.OriginalEdge(); + NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE)); + aLCBE.Append(aCBx); } } } @@ -1200,27 +1200,27 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, aTolMax=-1.; anItLPE.Initialize(aLPBE); for (i=0; anItLPE.More(); anItLPE.Next(), ++i) { - const BOPTools_PaveBlock& aPB=anItLPE.Value(); - nSp=aPB.OriginalEdge(); - const TopoDS_Edge& aSp=TopoDS::Edge(myDS->Shape(nSp)); - aTolSp=BRep_Tool::Tolerance(aSp); - if (aTolSp>aTolMax) { - iMax=i; - aTolSp=aTolMax; - } + const BOPTools_PaveBlock& aPB=anItLPE.Value(); + nSp=aPB.OriginalEdge(); + const TopoDS_Edge& aSp=TopoDS::Edge(myDS->Shape(nSp)); + aTolSp=BRep_Tool::Tolerance(aSp); + if (aTolSp>aTolMax) { + iMax=i; + aTolSp=aTolMax; + } } // BOPTools_ListOfPaveBlock aLPBx; // anItLPE.Initialize(aLPBE); for (i=0; anItLPE.More(); anItLPE.Next(), ++i) { - const BOPTools_PaveBlock& aPB=anItLPE.Value(); - if (i==iMax) { - aLPBx.Prepend(aPB); - } - else { - aLPBx.Append(aPB); - } + const BOPTools_PaveBlock& aPB=anItLPE.Value(); + if (i==iMax) { + aLPBx.Prepend(aPB); + } + else { + aLPBx.Append(aPB); + } } // pLPBE=(BOPTools_ListOfPaveBlock *)&aLPBE; @@ -1255,11 +1255,11 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE)); anItCBE.Initialize(aLCBE); for (; anItCBE.More(); anItCBE.Next()) { - const NMTTools_CommonBlock& aCBE=anItCBE.Value(); - if (aCBE.IsEqual(aCB)) { - aLCBE.Remove(anItCBE); - break; - } + const NMTTools_CommonBlock& aCBE=anItCBE.Value(); + if (aCBE.IsEqual(aCB)) { + aLCBE.Remove(anItCBE); + break; + } } } } @@ -1269,7 +1269,7 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, // purpose: //======================================================================= void NMTTools_PaveFiller::SplitCommonBlock(const NMTTools_CommonBlock& aCB, - NMTTools_ListOfCommonBlock& aLCBx) + NMTTools_ListOfCommonBlock& aLCBx) { Standard_Integer i, j, k, nE, aNbE, aNbSPBx, aNbPB; BOPTools_SequenceOfPaveBlock aSPBx; @@ -1296,7 +1296,7 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, for (; anIt.More(); anIt.Next()) { const BOPTools_Pave& aPx=anIt.Value(); if (aPB.IsInBlock(aPx)) { - aPSx.Append(aPx); + aPSx.Append(aPx); } } aNbPB=aPSx.Set().Extent(); @@ -1333,7 +1333,7 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, for (; anIt.More(); anIt.Next()) { const BOPTools_Pave& aPx=anIt.Value(); if (aPB.IsInBlock(aPx)) { - aPSx.Append(aPx); + aPSx.Append(aPx); } } // @@ -1370,8 +1370,8 @@ void MakeNewVertex(const TopTools_ListOfShape& aLV, // purpose: //======================================================================= void VertexParameters(const IntTools_CommonPrt& aCPart, - Standard_Real& aT1, - Standard_Real& aT2) + Standard_Real& aT1, + Standard_Real& aT2) { const IntTools_Range& aR1=aCPart.Range1(); aT1=0.5*(aR1.First()+aR1.Last()); @@ -1395,8 +1395,8 @@ void VertexParameters(const IntTools_CommonPrt& aCPart, // purpose: //======================================================================= Standard_Boolean IsOnPave(const Standard_Real& aT1, - const IntTools_Range& aRange, - const Standard_Real& aTolerance) + const IntTools_Range& aRange, + const Standard_Real& aTolerance) { Standard_Boolean firstisonpave1, firstisonpave2, bIsOnPave; // @@ -1411,7 +1411,7 @@ Standard_Boolean IsOnPave(const Standard_Real& aT1, // purpose: //======================================================================= void FindChains(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, - NMTTools_ListOfCommonBlock& aLCB) + NMTTools_ListOfCommonBlock& aLCB) { Standard_Integer i, j, aNbCB, aNbPB; BOPTools_IMapOfPaveBlock aProcessedBlocks, aChain; @@ -1449,9 +1449,9 @@ void FindChains(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, // purpose: //======================================================================= void ProcessBlock(const BOPTools_PaveBlock& aPB, - const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, - BOPTools_IMapOfPaveBlock& aProcessedBlocks, - BOPTools_IMapOfPaveBlock& aChain) + const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, + BOPTools_IMapOfPaveBlock& aProcessedBlocks, + BOPTools_IMapOfPaveBlock& aChain) { Standard_Integer j, aNbPB; // @@ -1525,17 +1525,17 @@ void ProcessBlock(const BOPTools_PaveBlock& aPB, const TopoDS_Face& aF=TopoDS::Face(myDS->Shape(nF)); const Bnd_Box& aBF=myDS->GetBoundingBox(nF); if (aBF.IsOut(aBV)) { - continue; + continue; } // anIndexIn=0; aFlag=myContext.ComputeVS (aVnew, aF, aU, aV); if (!aFlag) { - BOPTools_VSInterference anInterf (nNewShape, nF, aU, aV); - // - anIndexIn=aVSs.Append(anInterf); - BOPTools_VSInterference& aVS=aVSs(anIndexIn); - aVS.SetNewShape(nNewShape);//-> + BOPTools_VSInterference anInterf (nNewShape, nF, aU, aV); + // + anIndexIn=aVSs.Append(anInterf); + BOPTools_VSInterference& aVS=aVSs(anIndexIn); + aVS.SetNewShape(nNewShape);//-> } } } diff --git a/src/NMTTools/NMTTools_PaveFiller_5.cxx b/src/NMTTools/NMTTools_PaveFiller_5.cxx index abcace893..7f7913ce0 100644 --- a/src/NMTTools/NMTTools_PaveFiller_5.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_5.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PaveFiller_5.cxx -// Created: Mon Dec 15 11:28:33 2003 -// Author: Peter KURNEV -// +// File: NMTTools_PaveFiller_5.cxx +// Created: Mon Dec 15 11:28:33 2003 +// Author: Peter KURNEV +// // #include @@ -87,11 +87,11 @@ static void VertexParameter(const IntTools_CommonPrt& aCPart, - Standard_Real& aT); + Standard_Real& aT); static Standard_Boolean IsOnPave(const Standard_Real& aTR, - const IntTools_Range& aCPRange, - const Standard_Real& aTolerance); + const IntTools_Range& aCPRange, + const Standard_Real& aTolerance); // //======================================================================= // function: PerformEF @@ -170,7 +170,7 @@ static for (; anIt.More(); anIt.Next()) { BOPTools_PaveBlock& aPB=anIt.Value(); if (aCBAPIF.IsCommonBlock(aPB)) { - continue; + continue; } // const IntTools_ShrunkRange& aShrunkRange=aPB.ShrunkRange(); @@ -178,7 +178,7 @@ static const Bnd_Box& aBBE=aShrunkRange.BndBox(); // if (aBBF.IsOut (aBBE)) { - continue; + continue; } // // EF @@ -201,93 +201,93 @@ static aEF.Perform(); // if (aEF.IsDone()) { - Standard_Boolean bCoinsideFlag; - Standard_Integer i, aNbCPrts; - TopAbs_ShapeEnum aType; - // - const IntTools_SequenceOfCommonPrts& aCPrts=aEF.CommonParts(); - // - aNbCPrts=aCPrts.Length(); - for (i=1; i<=aNbCPrts; ++i) { - anIndexIn=0; - // - const IntTools_CommonPrt& aCPart=aCPrts(i); - aType=aCPart.Type(); - // - switch (aType) { - // - case TopAbs_VERTEX: { - Standard_Boolean bIsOnPave1, bIsOnPave2; - Standard_Integer nVF; - Standard_Real aT, aTolToDecide; - TopoDS_Vertex aNewVertex; - // - const IntTools_Range& aR=aCPart.Range1(); - // - // New Vertex - VertexParameter(aCPart, aT); - BOPTools_Tools::MakeNewVertex(aE, aT, aF, aNewVertex); - // - //decide to add pave or not - aTolToDecide=5.e-8; - bIsOnPave1=IsOnPave(anewSR.First(), aR, aTolToDecide); - bIsOnPave2=IsOnPave(anewSR.Last() , aR, aTolToDecide); - // - if (!bIsOnPave1 && !bIsOnPave2) { - nVF=CheckFacePaves(aNewVertex, nF); - if (!nVF) { - // really new vertex - // Add Interference to the Pool - BOPTools_ESInterference anInterf (nE, nF, aCPart); - anIndexIn=aEFs.Append(anInterf); - anInterf.SetNewShape(0); - // - aMapVI.Add(aNewVertex, anIndexIn); - aIMPBx.Add(aPB); - // - myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF); - // - }// if (!nVF) - }// if (!bIsOnPave1 && !bIsOnPave2) - // - //modified by NIZNHY-PKV Fri Apr 18 10:55:38 2008f - else { - const BOPTools_Pave& aPave=(bIsOnPave1)? aPB.Pave1() : aPB.Pave2(); - nVF=aPave.Index(); - const TopoDS_Vertex& aVF=TopoDS::Vertex(myDS->Shape(nVF)); - BOPTools_Tools::UpdateVertex (aVF, aNewVertex); - } - //modified by NIZNHY-PKV Fri Apr 18 10:55:40 2008t - // - }// case TopAbs_VERTEX: - break; - // - case TopAbs_EDGE: { - bCoinsideFlag=BOPTools_Tools::IsBlockInOnFace(aPB, aF, myContext); - if (!bCoinsideFlag) { - break; - } - // - // Fill aMapCB - if (aMapCB.Contains(aPB)) { - TColStd_IndexedMapOfInteger& aMapF=aMapCB.ChangeFromKey(aPB); - aMapF.Add(nF); - } - else { - TColStd_IndexedMapOfInteger aMapF; - aMapF.Add(nF); - aMapCB.Add(aPB, aMapF); - } - // - aIMPBx.Add(aPB); - myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF); - }// case TopAbs_EDGE: - break; + Standard_Boolean bCoinsideFlag; + Standard_Integer i, aNbCPrts; + TopAbs_ShapeEnum aType; + // + const IntTools_SequenceOfCommonPrts& aCPrts=aEF.CommonParts(); + // + aNbCPrts=aCPrts.Length(); + for (i=1; i<=aNbCPrts; ++i) { + anIndexIn=0; + // + const IntTools_CommonPrt& aCPart=aCPrts(i); + aType=aCPart.Type(); + // + switch (aType) { + // + case TopAbs_VERTEX: { + Standard_Boolean bIsOnPave1, bIsOnPave2; + Standard_Integer nVF; + Standard_Real aT, aTolToDecide; + TopoDS_Vertex aNewVertex; + // + const IntTools_Range& aR=aCPart.Range1(); + // + // New Vertex + VertexParameter(aCPart, aT); + BOPTools_Tools::MakeNewVertex(aE, aT, aF, aNewVertex); + // + //decide to add pave or not + aTolToDecide=5.e-8; + bIsOnPave1=IsOnPave(anewSR.First(), aR, aTolToDecide); + bIsOnPave2=IsOnPave(anewSR.Last() , aR, aTolToDecide); + // + if (!bIsOnPave1 && !bIsOnPave2) { + nVF=CheckFacePaves(aNewVertex, nF); + if (!nVF) { + // really new vertex + // Add Interference to the Pool + BOPTools_ESInterference anInterf (nE, nF, aCPart); + anIndexIn=aEFs.Append(anInterf); + anInterf.SetNewShape(0); + // + aMapVI.Add(aNewVertex, anIndexIn); + aIMPBx.Add(aPB); + // + myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF); + // + }// if (!nVF) + }// if (!bIsOnPave1 && !bIsOnPave2) + // + //modified by NIZNHY-PKV Fri Apr 18 10:55:38 2008f + else { + const BOPTools_Pave& aPave=(bIsOnPave1)? aPB.Pave1() : aPB.Pave2(); + nVF=aPave.Index(); + const TopoDS_Vertex& aVF=TopoDS::Vertex(myDS->Shape(nVF)); + BOPTools_Tools::UpdateVertex (aVF, aNewVertex); + } + //modified by NIZNHY-PKV Fri Apr 18 10:55:40 2008t + // + }// case TopAbs_VERTEX: + break; + // + case TopAbs_EDGE: { + bCoinsideFlag=BOPTools_Tools::IsBlockInOnFace(aPB, aF, myContext); + if (!bCoinsideFlag) { + break; + } + // + // Fill aMapCB + if (aMapCB.Contains(aPB)) { + TColStd_IndexedMapOfInteger& aMapF=aMapCB.ChangeFromKey(aPB); + aMapF.Add(nF); + } + else { + TColStd_IndexedMapOfInteger aMapF; + aMapF.Add(nF); + aMapCB.Add(aPB, aMapF); + } + // + aIMPBx.Add(aPB); + myIP->Add(nE, nF, Standard_True, NMTDS_TI_EF); + }// case TopAbs_EDGE: + break; - default: - break; - } // switch (aType) - } // for (i=1; i<=aNbCPrts; i++) + default: + break; + } // switch (aType) + } // for (i=1; i<=aNbCPrts; i++) } //if (aEF.IsDone()) } // for (; anIt.More(); anIt.Next()) }// for (; myDSIt.More(); myDSIt.Next()) @@ -310,15 +310,15 @@ static nEx=aPBx.OriginalEdge(); NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nEx)); if (aLCB.Extent()) { - NMTTools_CommonBlockAPI aCBAPIx(aLCB); - if (aCBAPIx.IsCommonBlock(aPBx)) { - NMTTools_CommonBlock& aCBx=aCBAPIx.CommonBlock(aPBx); - const BOPTools_PaveBlock& aPB1=aCBx.PaveBlock1(); - if (!aMx.Contains(aPB1)){ - aMx.Add(aPB1); - aLCBx.Append(aCBx); - } - } + NMTTools_CommonBlockAPI aCBAPIx(aLCB); + if (aCBAPIx.IsCommonBlock(aPBx)) { + NMTTools_CommonBlock& aCBx=aCBAPIx.CommonBlock(aPBx); + const BOPTools_PaveBlock& aPB1=aCBx.PaveBlock1(); + if (!aMx.Contains(aPB1)){ + aMx.Add(aPB1); + aLCBx.Append(aCBx); + } + } } } } @@ -353,8 +353,8 @@ static if (aCBAPI.IsCommonBlock(aPB)) { NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB); for (j=1; j<=aNbF; ++j) { - nF=aMapF(j); - aCB.AddFace(nF); + nF=aMapF(j); + aCB.AddFace(nF); } } else { @@ -362,8 +362,8 @@ static // aCB.AddPaveBlock(aPB); for (j=1; j<=aNbF; ++j) { - nF=aMapF(j); - aCB.AddFace(nF); + nF=aMapF(j); + aCB.AddFace(nF); } aLCB.Append(aCB); } @@ -529,13 +529,13 @@ static aFlag=myContext.ComputeVE (aNewVertex, aE, aT); // if (!aFlag) { - aPave.SetInterference(-1); - aPave.SetType (BooleanOperations_EdgeSurface); - aPave.SetIndex(aNewShape); - aPave.SetParam(aT); - // - BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE)); - aPaveSet.Append(aPave); + aPave.SetInterference(-1); + aPave.SetType (BooleanOperations_EdgeSurface); + aPave.SetIndex(aNewShape); + aPave.SetParam(aT); + // + BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE)); + aPaveSet.Append(aPave); } } } @@ -627,7 +627,7 @@ static // purpose: //======================================================================= void VertexParameter(const IntTools_CommonPrt& aCPart, - Standard_Real& aT) + Standard_Real& aT) { const IntTools_Range& aR=aCPart.Range1(); aT=0.5*(aR.First()+aR.Last()); @@ -641,8 +641,8 @@ void VertexParameter(const IntTools_CommonPrt& aCPart, // purpose: //======================================================================= Standard_Boolean IsOnPave(const Standard_Real& aTR, - const IntTools_Range& aCPRange, - const Standard_Real& aTolerance) + const IntTools_Range& aCPRange, + const Standard_Real& aTolerance) { Standard_Boolean bIsOnPave; Standard_Real aT1, aT2, dT1, dT2; diff --git a/src/NMTTools/NMTTools_PaveFiller_6.cxx b/src/NMTTools/NMTTools_PaveFiller_6.cxx index b090cd1e5..74c20f46c 100644 --- a/src/NMTTools/NMTTools_PaveFiller_6.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_6.cxx @@ -20,10 +20,10 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // IMPROVED by NIZNHY-PKV Thu Oct 12 16:03:33 2006 -// File: NMTTools_PaveFiller_6.cxx -// Created: Fri Dec 19 10:27:31 2003 -// Author: Peter KURNEV -// +// File: NMTTools_PaveFiller_6.cxx +// Created: Fri Dec 19 10:27:31 2003 +// Author: Peter KURNEV +// #include @@ -103,12 +103,12 @@ /* static void SharedEdges1(const TopoDS_Face& aF1, - const TopoDS_Face& aF2, - TopTools_ListOfShape& aLS); + const TopoDS_Face& aF2, + TopTools_ListOfShape& aLS); */ static Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE, - IntTools_Context& aCtx); + IntTools_Context& aCtx); //======================================================================= // function: PerformFF @@ -166,7 +166,7 @@ static IntTools_FaceFace aFF; // aFF.SetParameters (bToApproxC3d, bToApproxC2dOnS1, - bToApproxC2dOnS2, anApproxTol); + bToApproxC2dOnS2, anApproxTol); // aFF.Perform(aF1, aF2); // @@ -246,48 +246,48 @@ static aType=aS.ShapeType(); // if (aType==TopAbs_EDGE) { - const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(i)); - aItCB.Initialize(aLCB); - for (; aItCB.More(); aItCB.Next()) { - const NMTTools_CommonBlock& aCB=aItCB.Value(); - const BOPTools_PaveBlock &aPB1=aCB.PaveBlock1(); - // - const TColStd_ListOfInteger& aLF=aCB.Faces(); - aNbF=aLF.Extent(); - if (aNbF) { - aItF.Initialize(aLF); - for (; aItF.More(); aItF.Next()) { - nF=aItF.Value(); - if (aMFInOn.IsBound(nF)) { - BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF); - aLPB.Append(aPB1); - } - else { - BOPTools_ListOfPaveBlock aLPB; - aLPB.Append(aPB1); - aMFInOn.Bind(nF, aLPB); - } - } - }// if (aNbF) { - } // for (; aItCB.More(); aItCB.Next()) { + const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(i)); + aItCB.Initialize(aLCB); + for (; aItCB.More(); aItCB.Next()) { + const NMTTools_CommonBlock& aCB=aItCB.Value(); + const BOPTools_PaveBlock &aPB1=aCB.PaveBlock1(); + // + const TColStd_ListOfInteger& aLF=aCB.Faces(); + aNbF=aLF.Extent(); + if (aNbF) { + aItF.Initialize(aLF); + for (; aItF.More(); aItF.Next()) { + nF=aItF.Value(); + if (aMFInOn.IsBound(nF)) { + BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF); + aLPB.Append(aPB1); + } + else { + BOPTools_ListOfPaveBlock aLPB; + aLPB.Append(aPB1); + aMFInOn.Bind(nF, aLPB); + } + } + }// if (aNbF) { + } // for (; aItCB.More(); aItCB.Next()) { }//if (aS.ShapeType()==TopAbs_EDGE) { // else if (aType==TopAbs_FACE) { - BOPTools_ListOfPaveBlock aLPBOn; - // - nF=i; - RealSplitsFace(nF, aLPBOn); - // - aNbOn=aLPBOn.Extent(); - if (aNbOn) { - if (aMFInOn.IsBound(nF)) { - BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF); - aLPB.Append(aLPBOn); - } - else { - aMFInOn.Bind(nF, aLPBOn); - } - } + BOPTools_ListOfPaveBlock aLPBOn; + // + nF=i; + RealSplitsFace(nF, aLPBOn); + // + aNbOn=aLPBOn.Extent(); + if (aNbOn) { + if (aMFInOn.IsBound(nF)) { + BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF); + aLPB.Append(aLPBOn); + } + else { + aMFInOn.Bind(nF, aLPBOn); + } + } } } // for (i=1; i<=aNbS; ++i) { // @@ -301,11 +301,11 @@ static BOPTools_ListOfPaveBlock& aLPB=aMFInOn.ChangeFind(nF); anItPB.Initialize(aLPB); for (; anItPB.More(); anItPB.Next()) { - const BOPTools_PaveBlock& aPB=anItPB.Value(); - nSp=aPB.Edge(); - if (aMTmp.Add(nSp)) { - aLPBX.Append(aPB); - } + const BOPTools_PaveBlock& aPB=anItPB.Value(); + nSp=aPB.Edge(); + if (aMTmp.Add(nSp)) { + aLPBX.Append(aPB); + } } aLPB.Clear(); aLPB.Append(aLPBX); @@ -333,27 +333,27 @@ static NMTTools_MapOfPaveBlock aMPB; // if (aMFInOn.IsBound(nF1)) { - const BOPTools_ListOfPaveBlock& aLPBF1=aMFInOn.Find(nF1); - anItPB.Initialize(aLPBF1); - for (; anItPB.More(); anItPB.Next()) { - const BOPTools_PaveBlock& aPB=anItPB.Value(); - if (aMPB.Add(aPB)) { - aLPB.Append(aPB); - } - } + const BOPTools_ListOfPaveBlock& aLPBF1=aMFInOn.Find(nF1); + anItPB.Initialize(aLPBF1); + for (; anItPB.More(); anItPB.Next()) { + const BOPTools_PaveBlock& aPB=anItPB.Value(); + if (aMPB.Add(aPB)) { + aLPB.Append(aPB); + } + } } if (aMFInOn.IsBound(nF2)) { - const BOPTools_ListOfPaveBlock& aLPBF2=aMFInOn.Find(nF2); - anItPB.Initialize(aLPBF2); - for (; anItPB.More(); anItPB.Next()) { - const BOPTools_PaveBlock& aPB=anItPB.Value(); - if (aMPB.Contains(aPB)) { - aFFi.AppendBlock(aPB); - } - else { - aLPB.Append(aPB); - } - } + const BOPTools_ListOfPaveBlock& aLPBF2=aMFInOn.Find(nF2); + anItPB.Initialize(aLPBF2); + for (; anItPB.More(); anItPB.Next()) { + const BOPTools_PaveBlock& aPB=anItPB.Value(); + if (aMPB.Contains(aPB)) { + aFFi.AppendBlock(aPB); + } + else { + aLPB.Append(aPB); + } + } } } //--- @@ -402,80 +402,80 @@ static // BOPTools_PaveBlockIterator aPBIter(0, aPaveSet); for (; aPBIter.More(); aPBIter.Next()) { - BOPTools_PaveBlock& aPBNew=aPBIter.Value(); - aPBNew.SetCurve(aIC); - aPBNew.SetFace1(nF1); - aPBNew.SetFace2(nF2); - // - nV1=aPBNew.Pave1().Index(); - nV2=aPBNew.Pave2().Index(); - aT1=aPBNew.Pave1().Param(); - aT2=aPBNew.Pave2().Param(); - // - if((nV1==nV2) && (Abs(aT2 - aT1) < aTolPPC)) { - continue;// mkk ft ??? - } - // - // 1 - bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLPB, aTolR3D); - if (bIsExistingPaveBlock) { - continue; - } - // - bIsCoincided=CheckCoincidence(aPBNew, aLPB); - if(bIsCoincided) { - continue; - } - // - // Modified - // to provide checking whether aPBNew already exists in list - // of section edges aLSE - // Thu Sep 14 14:35:18 2006 - // Contribution of Samtech www.samcef.com BEGIN - // 2 - bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLSE, aTolR3D); - if (bIsExistingPaveBlock) { - continue; - } - // Contribution of Samtech www.samcef.com END - // - // Checking of validity in 2D - // - bIsValidIn2D=myContext.IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D); - if (!bIsValidIn2D) { - continue; - } - // - // - // Make Section Edge - TopoDS_Edge aES; - // - const TopoDS_Vertex aV1=TopoDS::Vertex(myDS->Shape(nV1));//mpv - const TopoDS_Vertex aV2=TopoDS::Vertex(myDS->Shape(nV2));//mpv - // - BOPTools_Tools::MakeSectEdge (aIC, aV1, aT1, aV2, aT2, aES); - // - NMTTools_Tools::UpdateEdge (aES, aTolR3D); - bIsMicroEdge=IsMicroEdge(aES, myContext); - if (bIsMicroEdge) { - continue; - } - // - - { - Handle(Geom2d_Curve) aC2D1, aC2D2; - // - aC2D1=aIC.FirstCurve2d(); - aC2D2=aIC.SecondCurve2d(); - // - NMTTools_Tools::MakePCurve(aES, aF1, aC2D1); - NMTTools_Tools::MakePCurve(aES, aF2, aC2D2); - } - // - aMEPB.Add(aES, aPBNew); - aMapEI.Add(aES, i); - // - bHasES=Standard_True; + BOPTools_PaveBlock& aPBNew=aPBIter.Value(); + aPBNew.SetCurve(aIC); + aPBNew.SetFace1(nF1); + aPBNew.SetFace2(nF2); + // + nV1=aPBNew.Pave1().Index(); + nV2=aPBNew.Pave2().Index(); + aT1=aPBNew.Pave1().Param(); + aT2=aPBNew.Pave2().Param(); + // + if((nV1==nV2) && (Abs(aT2 - aT1) < aTolPPC)) { + continue;// mkk ft ??? + } + // + // 1 + bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLPB, aTolR3D); + if (bIsExistingPaveBlock) { + continue; + } + // + bIsCoincided=CheckCoincidence(aPBNew, aLPB); + if(bIsCoincided) { + continue; + } + // + // Modified + // to provide checking whether aPBNew already exists in list + // of section edges aLSE + // Thu Sep 14 14:35:18 2006 + // Contribution of Samtech www.samcef.com BEGIN + // 2 + bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aLSE, aTolR3D); + if (bIsExistingPaveBlock) { + continue; + } + // Contribution of Samtech www.samcef.com END + // + // Checking of validity in 2D + // + bIsValidIn2D=myContext.IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D); + if (!bIsValidIn2D) { + continue; + } + // + // + // Make Section Edge + TopoDS_Edge aES; + // + const TopoDS_Vertex aV1=TopoDS::Vertex(myDS->Shape(nV1));//mpv + const TopoDS_Vertex aV2=TopoDS::Vertex(myDS->Shape(nV2));//mpv + // + BOPTools_Tools::MakeSectEdge (aIC, aV1, aT1, aV2, aT2, aES); + // + NMTTools_Tools::UpdateEdge (aES, aTolR3D); + bIsMicroEdge=IsMicroEdge(aES, myContext); + if (bIsMicroEdge) { + continue; + } + // + + { + Handle(Geom2d_Curve) aC2D1, aC2D2; + // + aC2D1=aIC.FirstCurve2d(); + aC2D2=aIC.SecondCurve2d(); + // + NMTTools_Tools::MakePCurve(aES, aF1, aC2D1); + NMTTools_Tools::MakePCurve(aES, aF2, aC2D2); + } + // + aMEPB.Add(aES, aPBNew); + aMapEI.Add(aES, i); + // + bHasES=Standard_True; }// for (; aPBIter.More(); aPBIter.Next()) } // end of for (j=1; j<=aNbCurves; ++j) // qqf @@ -574,14 +574,14 @@ static nV1=aPBSE.Pave1().Index(); const TopoDS_Shape aV1=myDS->Shape(nV1);//mpv if (aV1.IsSame(aV)) { - aMNewOld.Add(i, nV1); - break; + aMNewOld.Add(i, nV1); + break; } nV2=aPBSE.Pave2().Index(); const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv if (aV2.IsSame(aV)) { - aMNewOld.Add(i, nV2); - break; + aMNewOld.Add(i, nV2); + break; } } } @@ -661,27 +661,27 @@ static const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2)); // if (aCBAPI.IsCommonBlock(aPB)) { - // it can be Common Block - Standard_Real aTolEx; - Handle(Geom2d_Curve) aC2D1, aC2D2; - TopoDS_Face aF1FWD, aF2FWD; - // - NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB); - //const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); - // - aPB=aCB.PaveBlock1(); - mE=aPB.Edge(); // index of edge in tDS - const TopoDS_Edge& aEx=TopoDS::Edge(tDS.Shape(mE)); - aTolEx=BRep_Tool::Tolerance(aEx); + // it can be Common Block + Standard_Real aTolEx; + Handle(Geom2d_Curve) aC2D1, aC2D2; + TopoDS_Face aF1FWD, aF2FWD; // - aF1FWD=aF1; - aF1FWD.Orientation(TopAbs_FORWARD); - aF2FWD=aF2; - aF2FWD.Orientation(TopAbs_FORWARD); - // - NMTTools_Tools::MakePCurve(aEx, aF1FWD, aC2D1); - NMTTools_Tools::MakePCurve(aEx, aF2FWD, aC2D2); - NMTTools_Tools::UpdateEdge (aEx, aTolEx); + NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB); + //const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); + // + aPB=aCB.PaveBlock1(); + mE=aPB.Edge(); // index of edge in tDS + const TopoDS_Edge& aEx=TopoDS::Edge(tDS.Shape(mE)); + aTolEx=BRep_Tool::Tolerance(aEx); + // + aF1FWD=aF1; + aF1FWD.Orientation(TopAbs_FORWARD); + aF2FWD=aF2; + aF2FWD.Orientation(TopAbs_FORWARD); + // + NMTTools_Tools::MakePCurve(aEx, aF1FWD, aC2D1); + NMTTools_Tools::MakePCurve(aEx, aF2FWD, aC2D2); + NMTTools_Tools::UpdateEdge (aEx, aTolEx); } //if (aCBAPI.IsCommonBlock(aPB)) // // new SE @@ -701,22 +701,22 @@ static const TopoDS_Shape aV2=myDS->Shape(nV2);//mpv // if (!aMNewOld.Contains(mE)) { - // add new SE to the myDS - BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; - // - anASSeq.SetNewSuccessor(nV1); - anASSeq.SetNewOrientation(aV1.Orientation()); + // add new SE to the myDS + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + // + anASSeq.SetNewSuccessor(nV1); + anASSeq.SetNewOrientation(aV1.Orientation()); - anASSeq.SetNewSuccessor(nV2); - anASSeq.SetNewOrientation(aV2.Orientation()); - - myDS->InsertShapeAndAncestorsSuccessors(aSp, anASSeq); - nE=myDS->NumberOfInsertedShapes(); - // - aMNewOld.Add(mE, nE); + anASSeq.SetNewSuccessor(nV2); + anASSeq.SetNewOrientation(aV2.Orientation()); + + myDS->InsertShapeAndAncestorsSuccessors(aSp, anASSeq); + nE=myDS->NumberOfInsertedShapes(); + // + aMNewOld.Add(mE, nE); } else { - nE=aMNewOld.FindFromKey(mE); + nE=aMNewOld.FindFromKey(mE); } // Form PaveBlock; BOPTools_PaveBlock aPBx; @@ -817,7 +817,7 @@ static const TColStd_ListOfInteger& aLF=aCB.Faces(); aNbF=aLF.Extent(); if (!aNbF) { - continue; + continue; } // nSp=aPB1.Edge(); @@ -825,11 +825,11 @@ static // aItF.Initialize(aLF); for (; aItF.More(); aItF.Next()) { - nF=aItF.Value(); - aF1FWD=TopoDS::Face(myDS->Shape(nF)); - aF1FWD.Orientation(TopAbs_FORWARD); - // - BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aSp, aF1FWD); + nF=aItF.Value(); + aF1FWD=TopoDS::Face(myDS->Shape(nF)); + aF1FWD.Orientation(TopAbs_FORWARD); + // + BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aSp, aF1FWD); } // for (; aItCB.More(); aItCB.Next()) { }//if (aS.ShapeType()==TopAbs_EDGE) { } @@ -839,8 +839,8 @@ static // purpose: //======================================================================= Standard_Boolean NMTTools_PaveFiller::IsExistingPaveBlock(const BOPTools_PaveBlock& aPBNew, - const BOPTools_ListOfPaveBlock& aLPBR, - const Standard_Real aTolR3D) + const BOPTools_ListOfPaveBlock& aLPBR, + const Standard_Real aTolR3D) { Standard_Boolean bFlag; Standard_Integer nVNew1, nVNew2, nV1, nV2, iC; @@ -859,7 +859,7 @@ static // iC=CheckIntermediatePoint(aPBNew, aPBR, aTolR3D); if (!iC) { - return !bFlag; + return !bFlag; } } } @@ -870,8 +870,8 @@ static // purpose: //======================================================================= Standard_Boolean NMTTools_PaveFiller::IsExistingPaveBlock(const BOPTools_PaveBlock& aPBNew, - const TopTools_ListOfShape& aLSE, - const Standard_Real aTolR3D) + const TopTools_ListOfShape& aLSE, + const Standard_Real aTolR3D) { Standard_Boolean bFlag; Standard_Integer aNbSE, iC; @@ -905,9 +905,9 @@ static // purpose: //======================================================================= Standard_Integer NMTTools_PaveFiller::CheckIntermediatePoint(const BOPTools_PaveBlock& aPB, - const BOPTools_PaveBlock& aPBR, - const Standard_Real aTolC) - + const BOPTools_PaveBlock& aPBR, + const Standard_Real aTolC) + { Standard_Integer iVM, nE2; // @@ -922,8 +922,8 @@ static // purpose: //======================================================================= Standard_Integer NMTTools_PaveFiller::CheckIntermediatePoint(const BOPTools_PaveBlock& aPB, - const TopoDS_Edge& aE2, - const Standard_Real aTolC) + const TopoDS_Edge& aE2, + const Standard_Real aTolC) { Standard_Real aT11, aT12, aTM, aTmp; Standard_Integer iVM; @@ -954,7 +954,7 @@ static // purpose: //======================================================================= void NMTTools_PaveFiller::PutBoundPaveOnCurve(BOPTools_Curve& aBC, - BOPTools_SSInterference& aFFi) + BOPTools_SSInterference& aFFi) { Standard_Boolean bHasBounds, bVF; Standard_Integer nF1, nF2; @@ -992,9 +992,9 @@ static // purpose: //======================================================================= void NMTTools_PaveFiller::PutBoundPaveOnCurve(const gp_Pnt& aP, - const Standard_Real aT, - BOPTools_Curve& aBC, - BOPTools_SSInterference& aFFi) + const Standard_Real aT, + BOPTools_Curve& aBC, + BOPTools_SSInterference& aFFi) { Standard_Boolean bFound1, bFound2; Standard_Integer nV; @@ -1050,9 +1050,9 @@ static // purpose: //======================================================================= Standard_Boolean NMTTools_PaveFiller::FindPave(const gp_Pnt& aP, - const Standard_Real aTolPV, - const BOPTools_PaveSet& aPS, - BOPTools_Pave& aPave) + const Standard_Real aTolPV, + const BOPTools_PaveSet& aPS, + BOPTools_Pave& aPave) { Standard_Integer nV; Standard_Boolean bIsVertex=Standard_False; @@ -1076,9 +1076,9 @@ static // purpose: //======================================================================= void NMTTools_PaveFiller::PrepareSetForFace(const Standard_Integer ,//nF1, - const Standard_Integer ,//nF2, - const BOPTools_ListOfPaveBlock& aLPBC, - BOPTools_PaveSet& aPSF) + const Standard_Integer ,//nF2, + const BOPTools_ListOfPaveBlock& aLPBC, + BOPTools_PaveSet& aPSF) { Standard_Integer nV1, nV2; TColStd_MapOfInteger aMap; @@ -1106,8 +1106,8 @@ static // purpose: //======================================================================= void NMTTools_PaveFiller::PutPaveOnCurve(const BOPTools_PaveSet& aPaveSet, - const Standard_Real aTolR3D, - BOPTools_Curve& aBC) + const Standard_Real aTolR3D, + BOPTools_Curve& aBC) { Standard_Integer nV; Standard_Boolean bIsVertexOnLine; @@ -1155,8 +1155,8 @@ static //======================================================================= /* void SharedEdges1(const TopoDS_Face& aF1, - const TopoDS_Face& aF2, - TopTools_ListOfShape& aLS) + const TopoDS_Face& aF2, + TopTools_ListOfShape& aLS) { Standard_Integer i, aNbE, aNbF;; TopTools_IndexedDataMapOfShapeListOfShape aMEF; @@ -1170,11 +1170,11 @@ void SharedEdges1(const TopoDS_Face& aF1, aNbF=aLF.Extent(); if (aNbF>1) { if (aNbF==2) { - const TopoDS_Shape& aF1x=aLF.First(); - const TopoDS_Shape& aF2x=aLF.Last(); - if (aF1x.IsSame(aF2x)) { - continue; - } + const TopoDS_Shape& aF1x=aLF.First(); + const TopoDS_Shape& aF2x=aLF.Last(); + if (aF1x.IsSame(aF2x)) { + continue; + } } const TopoDS_Shape& aE=aMEF.FindKey(i); aLS.Append (aE); @@ -1188,8 +1188,8 @@ void SharedEdges1(const TopoDS_Face& aF1, // purpose: //======================================================================= Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& aPBNew, - const BOPTools_ListOfPaveBlock& aLPBFF) - + const BOPTools_ListOfPaveBlock& aLPBFF) + { Standard_Boolean bRet; Standard_Real aTE; @@ -1239,7 +1239,7 @@ void SharedEdges1(const TopoDS_Face& aF1, iCount++; iV++; if (iCount>iCountExt) { - break; + break; } } // @@ -1248,17 +1248,17 @@ void SharedEdges1(const TopoDS_Face& aF1, iCount++; iV++; if (iCount>iCountExt) { - break; + break; } } // VE if (!iV) { iVE=myContext.ComputeVE (aV11, aE2, aTE); if (!iVE) { - iCount++; - if (iCount>iCountExt) { - break; - } + iCount++; + if (iCount>iCountExt) { + break; + } } } // VV @@ -1268,7 +1268,7 @@ void SharedEdges1(const TopoDS_Face& aF1, iCount++; iV++; if (iCount>iCountExt) { - break; + break; } } // @@ -1277,17 +1277,17 @@ void SharedEdges1(const TopoDS_Face& aF1, iCount++; iV++; if (iCount>iCountExt) { - break; + break; } } // VE if (!iV) { iVE=myContext.ComputeVE (aV12, aE2, aTE); if (!iVE) { - iCount++; - if (iCount>iCountExt) { - break; - } + iCount++; + if (iCount>iCountExt) { + break; + } } } } // next aPBR @@ -1300,7 +1300,7 @@ void SharedEdges1(const TopoDS_Face& aF1, //purpose : //======================================================================= Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE, - IntTools_Context& aCtx) + IntTools_Context& aCtx) { Standard_Boolean bRet; Standard_Integer iErr; @@ -1310,7 +1310,7 @@ Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE, IntTools_Range aR; // bRet=(BRep_Tool::Degenerated(aE) || - !BRep_Tool::IsGeometric(aE)); + !BRep_Tool::IsGeometric(aE)); if (bRet) { return bRet; } diff --git a/src/NMTTools/NMTTools_PaveFiller_7.cxx b/src/NMTTools/NMTTools_PaveFiller_7.cxx index 86f232ad3..d09e750bd 100644 --- a/src/NMTTools/NMTTools_PaveFiller_7.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_7.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PaveFiller_7.cxx -// Created: Thu Dec 18 15:14:55 2003 -// Author: Peter KURNEV -// +// File: NMTTools_PaveFiller_7.cxx +// Created: Thu Dec 18 15:14:55 2003 +// Author: Peter KURNEV +// // #include @@ -85,7 +85,7 @@ // Contribution of Samtech www.samcef.com BEGIN static void FuseVertices(const TopoDS_Shape& aCompound, - TopTools_DataMapOfShapeShape& aDMVV); + TopTools_DataMapOfShapeShape& aDMVV); // Contribution of Samtech www.samcef.com END //======================================================================= @@ -141,12 +141,12 @@ static aV2.Orientation(TopAbs_REVERSED); //xx if (aNbPaveBlocks==1) { - bIsNewVertex1=myDS->IsNewShape (nV1); - bIsNewVertex2=myDS->IsNewShape (nV2); - if (!bIsNewVertex1 && !bIsNewVertex2) { - aPB.SetEdge(i); - continue; - } + bIsNewVertex1=myDS->IsNewShape (nV1); + bIsNewVertex2=myDS->IsNewShape (nV2); + if (!bIsNewVertex1 && !bIsNewVertex2) { + aPB.SetEdge(i); + continue; + } } //xx BOPTools_Tools::MakeSplitEdge(aE, aV1, t1, aV2, t2, aESplit); @@ -161,8 +161,8 @@ static anASSeq.SetNewOrientation(aV2.Orientation()); // if (anOri==TopAbs_INTERNAL) { - anASSeq.SetNewAncestor(i); - aESplit.Orientation(anOri); + anASSeq.SetNewAncestor(i); + aESplit.Orientation(anOri); } // myDS->InsertShapeAndAncestorsSuccessors(aESplit, anASSeq); @@ -209,28 +209,28 @@ static // Among all PBs of aCB the first PB will be one // that have max tolerance value { - Standard_Real aTolEx, aTolExMax; - BOPTools_ListOfPaveBlock *pLPB, aLPBx; - // - aTolExMax=-1.; - pLPB=(BOPTools_ListOfPaveBlock *)&aCB.PaveBlocks(); - aPBIt.Initialize(*pLPB); - for (; aPBIt.More(); aPBIt.Next()) { - const BOPTools_PaveBlock& aPBx=aPBIt.Value(); - nEx=aPBx.OriginalEdge(); - const TopoDS_Edge& aEx=TopoDS::Edge(myDS->Shape(nEx)); - aTolEx=BRep_Tool::Tolerance(aEx); - if (aTolEx>aTolExMax) { - aTolExMax=aTolEx; - aLPBx.Prepend(aPBx); - } - else{ - aLPBx.Append(aPBx); - } - } - // - pLPB->Clear(); - *pLPB=aLPBx; + Standard_Real aTolEx, aTolExMax; + BOPTools_ListOfPaveBlock *pLPB, aLPBx; + // + aTolExMax=-1.; + pLPB=(BOPTools_ListOfPaveBlock *)&aCB.PaveBlocks(); + aPBIt.Initialize(*pLPB); + for (; aPBIt.More(); aPBIt.Next()) { + const BOPTools_PaveBlock& aPBx=aPBIt.Value(); + nEx=aPBx.OriginalEdge(); + const TopoDS_Edge& aEx=TopoDS::Edge(myDS->Shape(nEx)); + aTolEx=BRep_Tool::Tolerance(aEx); + if (aTolEx>aTolExMax) { + aTolExMax=aTolEx; + aLPBx.Prepend(aPBx); + } + else{ + aLPBx.Append(aPBx); + } + } + // + pLPB->Clear(); + *pLPB=aLPBx; } //modified by NIZNHY-PKV Wed Nov 8 15:59:50 2006t // @@ -241,14 +241,14 @@ static const BOPTools_ListOfPaveBlock& aCBLPB=aCB.PaveBlocks(); aPBIt.Initialize(aCBLPB); for (; aPBIt.More(); aPBIt.Next()) { - BOPTools_PaveBlock& aPBx=aPBIt.Value(); - nEx=aPBx.OriginalEdge(); - if (nEx==nE) { - continue; - } - // - nSpx=SplitIndex(aPBx); - aPBx.SetEdge(nSpx); + BOPTools_PaveBlock& aPBx=aPBIt.Value(); + nEx=aPBx.OriginalEdge(); + if (nEx==nE) { + continue; + } + // + nSpx=SplitIndex(aPBx); + aPBx.SetEdge(nSpx); } // } @@ -314,20 +314,20 @@ static aE=TopoDS::Edge(aExp.Current()); // if (BRep_Tool::Degenerated(aE)) { - continue; + continue; } // nE=myDS->ShapeIndex(aE, iRankF); // if (aME.Contains(nE)) { - continue; + continue; } aME.Add(nE); // BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); aNbPB=aLPB.Extent(); if (aNbPB) { - continue; + continue; } TopExp::Vertices(aE, aV1, aV2); // @@ -429,15 +429,15 @@ static const TopoDS_Shape& aVy=aDMVV.Find(aVx); if (aDMVFF1.IsBound(aVy)) { - TColStd_ListOfInteger& aLIy=aDMVFF1.ChangeFind(aVy); - aIt.Initialize(aLIx); - for(; aIt.More(); aIt.Next()) { - nFx=aIt.Value(); - aLIy.Append(nFx); - } + TColStd_ListOfInteger& aLIy=aDMVFF1.ChangeFind(aVy); + aIt.Initialize(aLIx); + for(; aIt.More(); aIt.Next()) { + nFx=aIt.Value(); + aLIy.Append(nFx); + } } else { - aDMVFF1.Bind(aVy, aLIx); + aDMVFF1.Bind(aVy, aLIx); } } } @@ -455,7 +455,7 @@ static for(; aIt.More(); aIt.Next()) { nFx=aIt.Value(); if (aMIy.Add(nFx)) { - aLIy.Append(nFx); + aLIy.Append(nFx); } } aLIx.Clear(); @@ -540,16 +540,16 @@ static // aIt.Initialize(aLIFF); for (; aIt.More(); aIt.Next()) { - nFx=aIt.Value(); - if (myAloneVertices.Contains(nFx)) { - TColStd_IndexedMapOfInteger& aMVx=myAloneVertices.ChangeFromKey(nFx); - aMVx.Add(nV); - } - else { - TColStd_IndexedMapOfInteger aMVx; - aMVx.Add(nV); - myAloneVertices.Add(nFx, aMVx); - } + nFx=aIt.Value(); + if (myAloneVertices.Contains(nFx)) { + TColStd_IndexedMapOfInteger& aMVx=myAloneVertices.ChangeFromKey(nFx); + aMVx.Add(nV); + } + else { + TColStd_IndexedMapOfInteger aMVx; + aMVx.Add(nV); + myAloneVertices.Add(nFx, aMVx); + } } } } @@ -569,16 +569,16 @@ static const TColStd_IndexedMapOfInteger& aMAV=myAloneVertices(i); aNbAV=aMAV.Extent(); for(j=1; j<=aNbAV; ++j) { - nV=aMAV(j); - if (aMAVF.Contains(nV)) { - TColStd_IndexedMapOfInteger& aMF=aMAVF.ChangeFromKey(nV); - aMF.Add(nF); - } - else{ - TColStd_IndexedMapOfInteger aMF; - aMF.Add(nF); - aMAVF.Add(nV, aMF); - } + nV=aMAV(j); + if (aMAVF.Contains(nV)) { + TColStd_IndexedMapOfInteger& aMF=aMAVF.ChangeFromKey(nV); + aMF.Add(nF); + } + else{ + TColStd_IndexedMapOfInteger aMF; + aMF.Add(nF); + aMAVF.Add(nV, aMF); + } } } // @@ -588,11 +588,11 @@ static const TColStd_IndexedMapOfInteger& aMF=aMAVF(i); aNbF=aMF.Extent(); for(j=1; jAdd(nF1, nF2, Standard_True, NMTDS_TI_FF); - } + nF1=aMF(j); + for(k=j+1; k<=aNbF; ++k) { + nF2=aMF(k); + myIP->Add(nF1, nF2, Standard_True, NMTDS_TI_FF); + } } } } @@ -611,7 +611,7 @@ static // purpose: //======================================================================= void NMTTools_PaveFiller::FuseVertices(const TopoDS_Shape& aCompound, - TopTools_DataMapOfShapeShape& aDMVV)const + TopTools_DataMapOfShapeShape& aDMVV)const { Standard_Integer i, aNbVV, n1, n2, nX; NMTTools_PaveFiller tPF; diff --git a/src/NMTTools/NMTTools_PaveFiller_8.cxx b/src/NMTTools/NMTTools_PaveFiller_8.cxx index 734d415e5..fed900e35 100644 --- a/src/NMTTools/NMTTools_PaveFiller_8.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_8.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PaveFiller_8.cxx -// Created: Fri Dec 19 11:15:53 2003 -// Author: Peter KURNEV -// +// File: NMTTools_PaveFiller_8.cxx +// Created: Fri Dec 19 11:15:53 2003 +// Author: Peter KURNEV +// // #include @@ -52,9 +52,9 @@ // purpose: //======================================================================= void NMTTools_PaveFiller::SharedEdges(const Standard_Integer nF1, - const Standard_Integer nF2, - TColStd_ListOfInteger& aLNE, - TopTools_ListOfShape& aLSE) + const Standard_Integer nF2, + TColStd_ListOfInteger& aLNE, + TopTools_ListOfShape& aLSE) { Standard_Integer nE1, nE2; TColStd_MapOfInteger aM1; @@ -139,7 +139,7 @@ // purpose: //======================================================================= Standard_Integer NMTTools_PaveFiller::CommonBlocksFace(const Standard_Integer nF, - NMTTools_ListOfCommonBlock& aLCB) + NMTTools_ListOfCommonBlock& aLCB) { Standard_Integer nE; TopAbs_ShapeEnum aT; @@ -175,7 +175,7 @@ // purpose: //======================================================================= void NMTTools_PaveFiller::RealSplitsFace(const Standard_Integer nF, - BOPTools_ListOfPaveBlock& aLPB) + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nE; BOPTools_ListIteratorOfListOfPaveBlock anIt; @@ -200,7 +200,7 @@ // purpose: //======================================================================= Standard_Boolean NMTTools_PaveFiller::HasRealSplitsInOnFace(const Standard_Integer nF1, - const Standard_Integer nF2) + const Standard_Integer nF2) { Standard_Boolean bFlag; BOPTools_ListOfPaveBlock aLPB; @@ -222,9 +222,9 @@ // purpose: //======================================================================= void NMTTools_PaveFiller::RealSplitsInFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) + const Standard_Integer nF1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nE1; // @@ -241,8 +241,8 @@ // purpose: //======================================================================= void NMTTools_PaveFiller::RealSplitsInFace(const Standard_Integer nE1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nF1; // @@ -262,7 +262,7 @@ for (; anItLFCB.More(); anItLFCB.Next()) { nF1=anItLFCB.Value(); if (nF1==nF2) { - aLPB.Append(aPB1R); + aLPB.Append(aPB1R); } } } @@ -272,8 +272,8 @@ // purpose: //======================================================================= void NMTTools_PaveFiller::RealSplitsOnEdge(const Standard_Integer nE1, - const Standard_Integer nE2, - BOPTools_ListOfPaveBlock& aLPB) + const Standard_Integer nE2, + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nE; // @@ -294,7 +294,7 @@ const BOPTools_PaveBlock& aPB2=anIt.Value(); nE=aPB2.OriginalEdge(); if (nE==nE2) { - aLPB.Append(aPB1R); + aLPB.Append(aPB1R); } } } @@ -304,8 +304,8 @@ // purpose: //======================================================================= void NMTTools_PaveFiller::RealSplitsOnFace(const Standard_Integer nE1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nE2; // @@ -322,9 +322,9 @@ // purpose: //======================================================================= void NMTTools_PaveFiller::RealSplitsOnFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) + const Standard_Integer nF1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nE1; // @@ -343,7 +343,7 @@ // purpose: //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsFace(const Standard_Integer nF, - BOPTools_ListOfPaveBlock& aLPB) + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nE; TopAbs_ShapeEnum aT; @@ -376,9 +376,9 @@ // purpose: splits of edges from nF1 in nF2 //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) + const Standard_Integer nF1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nE1; TopAbs_ShapeEnum aT1, aT2; @@ -403,8 +403,8 @@ // purpose: splits of edge nE1 in aFace2 //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer nE1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nF1; TopAbs_ShapeEnum aT1, aT2; @@ -431,7 +431,7 @@ for (; anItLFCB.More(); anItLFCB.Next()) { nF1=anItLFCB.Value(); if (nF1==nF2) { - aLPB.Append(aPB1); + aLPB.Append(aPB1); } } } @@ -442,8 +442,8 @@ // purpose: splits of edge nE1 on nE2 //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsOnEdge(const Standard_Integer nE1, - const Standard_Integer nE2, - BOPTools_ListOfPaveBlock& aLPB) + const Standard_Integer nE2, + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nE; TopAbs_ShapeEnum aT1, aT2; @@ -471,7 +471,7 @@ const BOPTools_PaveBlock& aPB2=anIt.Value(); nE=aPB2.OriginalEdge(); if (nE==nE2) { - aLPB.Append(aPB1); + aLPB.Append(aPB1); } } } @@ -482,8 +482,8 @@ // purpose: splits of edge nE1 on face nF2 //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer nE1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nE2, ip; TopAbs_ShapeEnum aT1, aT2; @@ -511,9 +511,9 @@ // purpose: splits of edges from face nF1 on face nF2 //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - BOPTools_ListOfPaveBlock& aLPB) + const Standard_Integer nF1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) { Standard_Integer nE1, ip; TopAbs_ShapeEnum aT1, aT2; @@ -543,7 +543,7 @@ // purpose: //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsFace(const Standard_Integer nF, - TColStd_ListOfInteger& aSplits) + TColStd_ListOfInteger& aSplits) { Standard_Integer nE, iErr; BOPTools_ListIteratorOfListOfPaveBlock aIt; @@ -568,9 +568,9 @@ // purpose: splits of edges from nF1 in nF2 //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - TColStd_ListOfInteger& aSplits) + const Standard_Integer nF1, + const Standard_Integer nF2, + TColStd_ListOfInteger& aSplits) { Standard_Integer nE, iErr; BOPTools_ListIteratorOfListOfPaveBlock aIt; @@ -593,8 +593,8 @@ // purpose: splits of edge nE1 in aFace2 //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer nE1, - const Standard_Integer nF2, - TColStd_ListOfInteger& aSplits) + const Standard_Integer nF2, + TColStd_ListOfInteger& aSplits) { Standard_Integer nE, iErr; BOPTools_ListIteratorOfListOfPaveBlock aIt; @@ -617,8 +617,8 @@ // purpose: splits of edge nE1 on nE2 //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsOnEdge(const Standard_Integer nE1, - const Standard_Integer nE2, - TColStd_ListOfInteger& aSplits) + const Standard_Integer nE2, + TColStd_ListOfInteger& aSplits) { Standard_Integer nE, iErr; BOPTools_ListIteratorOfListOfPaveBlock aIt; @@ -641,8 +641,8 @@ // purpose: splits of edge nE1 on face nF2 //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer nE1, - const Standard_Integer nF2, - TColStd_ListOfInteger& aSplits) + const Standard_Integer nF2, + TColStd_ListOfInteger& aSplits) { Standard_Integer nE, iErr; BOPTools_ListIteratorOfListOfPaveBlock aIt; @@ -665,9 +665,9 @@ // purpose: splits of edges from face nF1 on face nF2 //======================================================================= Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer ,//for overriding - const Standard_Integer nF1, - const Standard_Integer nF2, - TColStd_ListOfInteger& aSplits) + const Standard_Integer nF1, + const Standard_Integer nF2, + TColStd_ListOfInteger& aSplits) { Standard_Integer nE, iErr; BOPTools_ListIteratorOfListOfPaveBlock aIt; diff --git a/src/NMTTools/NMTTools_PaveFiller_9.cxx b/src/NMTTools/NMTTools_PaveFiller_9.cxx index e0b2a3fc7..3c46ff124 100644 --- a/src/NMTTools/NMTTools_PaveFiller_9.cxx +++ b/src/NMTTools/NMTTools_PaveFiller_9.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_PaveFiller_9.cxx -// Created: Fri Dec 19 11:15:53 2003 -// Author: Peter KURNEV -// +// File: NMTTools_PaveFiller_9.cxx +// Created: Fri Dec 19 11:15:53 2003 +// Author: Peter KURNEV +// // #include @@ -58,7 +58,7 @@ // purpose: //======================================================================= void NMTTools_PaveFiller::PrepareFace(const Standard_Integer nF, - TopoDS_Face& newFace) + TopoDS_Face& newFace) { Standard_Boolean bToReverse, bIsDegenerated; Standard_Integer iRankF, nE, nSp, aNbPB; @@ -97,27 +97,27 @@ const BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); aNbPB=aLPB.Extent(); if (!aNbPB) { - aBB.Add(newWire, aE); - continue; + aBB.Add(newWire, aE); + continue; } // aItPB.Initialize(aLPB); for (; aItPB.More(); aItPB.Next()) { - const BOPTools_PaveBlock& aPB=aItPB.Value(); - const BOPTools_PaveBlock& aPBR=RealPaveBlock(aPB); - nSp=aPBR.Edge(); - // - aSp=TopoDS::Edge(myDS->Shape(nSp)); - if (!bIsDegenerated) { - bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, myContext); - if (bToReverse) { - aSp.Reverse(); - } - } - else { - aSp.Orientation(anOrE); - } - aBB.Add(newWire, aSp); + const BOPTools_PaveBlock& aPB=aItPB.Value(); + const BOPTools_PaveBlock& aPBR=RealPaveBlock(aPB); + nSp=aPBR.Edge(); + // + aSp=TopoDS::Edge(myDS->Shape(nSp)); + if (!bIsDegenerated) { + bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, myContext); + if (bToReverse) { + aSp.Reverse(); + } + } + else { + aSp.Orientation(anOrE); + } + aBB.Add(newWire, aSp); } } aBB.Add(newFace, newWire); diff --git a/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock.hxx b/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock.hxx index af49cafff..b121fc402 100644 --- a/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock.hxx +++ b/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock.hxx @@ -62,7 +62,7 @@ NMTTools_StdMapNodeOfMapOfPaveBlock(const BOPTools_PaveBlock& K,const TCollectio // Type management // Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + //Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx b/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx index 6d479e813..3dabfe51c 100644 --- a/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx +++ b/src/NMTTools/NMTTools_StdMapNodeOfMapOfPaveBlock_0.cxx @@ -51,10 +51,10 @@ Standard_EXPORT Handle_Standard_Type& NMTTools_StdMapNodeOfMapOfPaveBlock_Type_( static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("NMTTools_StdMapNodeOfMapOfPaveBlock", - sizeof(NMTTools_StdMapNodeOfMapOfPaveBlock), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(NMTTools_StdMapNodeOfMapOfPaveBlock), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/NMTTools/NMTTools_Tools.cxx b/src/NMTTools/NMTTools_Tools.cxx index da3da38a5..571e3c3c4 100644 --- a/src/NMTTools/NMTTools_Tools.cxx +++ b/src/NMTTools/NMTTools_Tools.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: NMTTools_Tools.cxx -// Created: Mon Dec 8 10:35:15 2003 -// Author: Peter KURNEV -// +// File: NMTTools_Tools.cxx +// Created: Mon Dec 8 10:35:15 2003 +// Author: Peter KURNEV +// // #include @@ -75,14 +75,14 @@ static void ProcessBlock(const Standard_Integer iV, - const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV, - TColStd_IndexedMapOfInteger& aProcessed, - TColStd_IndexedMapOfInteger& aChain); + const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV, + TColStd_IndexedMapOfInteger& aProcessed, + TColStd_IndexedMapOfInteger& aChain); static void ProcessBlock(const TopoDS_Shape& aF, - const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV, - TopTools_IndexedMapOfShape& aProcessed, - TopTools_IndexedMapOfShape& aChain); + const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV, + TopTools_IndexedMapOfShape& aProcessed, + TopTools_IndexedMapOfShape& aChain); //modified by NIZNHY-PKV Thu Nov 16 10:46:53 2006f SKL/PartC5 //======================================================================= @@ -90,7 +90,7 @@ static // purpose: //======================================================================= void NMTTools_Tools::UpdateEdge(const TopoDS_Edge& aE, - const Standard_Real aTolR) + const Standard_Real aTolR) { Standard_Real aTolE, aTolES, aTolV; TopoDS_Iterator aIt; @@ -114,9 +114,9 @@ static // purpose: //======================================================================= void NMTTools_Tools::MakePCurve(const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Handle(Geom2d_Curve)& aC2Dx1) - + const TopoDS_Face& aF, + const Handle(Geom2d_Curve)& aC2Dx1) + { Standard_Real aTolE, aT1, aT2, aOutFirst, aOutLast, aOutTol; Handle(Geom2d_Curve) aC2D, aC2DA; @@ -153,9 +153,9 @@ static // purpose: //======================================================================= void NMTTools_Tools::MakePCurve(const TopoDS_Edge& aE, - const TopoDS_Face& aF, - const Handle(Geom2d_Curve)& aC2Dx, - const Standard_Real aTolR2D) + const TopoDS_Face& aF, + const Handle(Geom2d_Curve)& aC2Dx, + const Standard_Real aTolR2D) { Standard_Integer k, aNbV; Standard_Real aTolEdge, aTolFact, aTolV, aTolVmax; @@ -213,8 +213,8 @@ static // purpose: //======================================================================= Standard_Boolean NMTTools_Tools::IsSplitInOnFace(const TopoDS_Edge& aE, - const TopoDS_Face& aF, - IntTools_Context& aContext) + const TopoDS_Face& aF, + IntTools_Context& aContext) { Standard_Boolean bFlag; Standard_Real aT, aTolE, aTolF, aTol, aDist, aU, aV; @@ -252,7 +252,7 @@ static // purpose : //======================================================================= void NMTTools_Tools::MakeNewVertex(const TopTools_ListOfShape& aLVs, - TopoDS_Vertex& aNewVertex) + TopoDS_Vertex& aNewVertex) { Standard_Integer aNb; Standard_Real aTi, aDi, aDmax=-1.e5; @@ -295,7 +295,7 @@ static // purpose : //======================================================================= void NMTTools_Tools::FindChains(const BOPTools_CArray1OfSSInterference& FFs, - BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) { Standard_Boolean bIsTangentFaces; Standard_Integer j, aNb, anIndex1, anIndex2; @@ -343,7 +343,7 @@ static // purpose : //======================================================================= void NMTTools_Tools::FindChains(const BOPTools_CArray1OfVVInterference& VVs, - BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) { Standard_Integer j, aNb, anIndex1, anIndex2; BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMCV; @@ -385,7 +385,7 @@ static // purpose : //======================================================================= void NMTTools_Tools::FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV, - BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) { Standard_Integer i, j, aNbCV, aNbV, iV, iVx; TColStd_IndexedMapOfInteger aProcessed, aChain; @@ -415,9 +415,9 @@ static // purpose: //======================================================================= void ProcessBlock(const Standard_Integer iV, - const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV, - TColStd_IndexedMapOfInteger& aProcessed, - TColStd_IndexedMapOfInteger& aChain) + const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV, + TColStd_IndexedMapOfInteger& aProcessed, + TColStd_IndexedMapOfInteger& aChain) { Standard_Integer j, aNbV, iVx; // @@ -439,8 +439,8 @@ void ProcessBlock(const Standard_Integer iV, // purpose : //======================================================================= Standard_Boolean NMTTools_Tools::AreFacesSameDomain(const TopoDS_Face& aF1x, - const TopoDS_Face& aF2y, - IntTools_Context& aCtx) + const TopoDS_Face& aF2y, + IntTools_Context& aCtx) { Standard_Boolean bFlag; // Modified Thu Sep 14 14:35:18 2006 @@ -479,7 +479,7 @@ void ProcessBlock(const Standard_Integer iV, const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current()); if (!BRep_Tool::Degenerated(aE)) { if (!aME1.Contains(aE)) { - return bFlag; + return bFlag; } aME2.Add(aE); } @@ -518,7 +518,7 @@ void ProcessBlock(const Standard_Integer iV, // purpose : //======================================================================= void NMTTools_Tools::FindChains(const NMTTools_ListOfCoupleOfShape& aLCS, - NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMapChains) + NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMapChains) { NMTTools_ListIteratorOfListOfCoupleOfShape aItCS; NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMCV; @@ -562,7 +562,7 @@ void ProcessBlock(const Standard_Integer iV, // purpose : //======================================================================= void NMTTools_Tools::FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV, - NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMapChains) + NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMapChains) { Standard_Integer i, j, aNbCV, aNbV; TopTools_IndexedMapOfShape aProcessed, aChain; @@ -592,9 +592,9 @@ void ProcessBlock(const Standard_Integer iV, // purpose: //======================================================================= void ProcessBlock(const TopoDS_Shape& aF, - const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV, - TopTools_IndexedMapOfShape& aProcessed, - TopTools_IndexedMapOfShape& aChain) + const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV, + TopTools_IndexedMapOfShape& aProcessed, + TopTools_IndexedMapOfShape& aChain) { Standard_Integer j, aNbV; // diff --git a/src/OBJECT/GEOM_AISShape.cxx b/src/OBJECT/GEOM_AISShape.cxx index 73495021e..973003606 100644 --- a/src/OBJECT/GEOM_AISShape.cxx +++ b/src/OBJECT/GEOM_AISShape.cxx @@ -73,8 +73,8 @@ using namespace std; static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, - const Handle(AIS_InteractiveContext)& theIC, - SelectMgr_IndexedMapOfOwner& theMap ) + const Handle(AIS_InteractiveContext)& theIC, + SelectMgr_IndexedMapOfOwner& theMap ) { if ( theObj.IsNull() || theIC.IsNull() ) return; @@ -93,20 +93,20 @@ static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, for ( sel->Init(); sel->More(); sel->Next() ) { Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive(); if ( entity.IsNull() ) - continue; + continue; Handle(SelectMgr_EntityOwner) owner = - Handle(SelectMgr_EntityOwner)::DownCast(entity->OwnerId()); + Handle(SelectMgr_EntityOwner)::DownCast(entity->OwnerId()); if ( !owner.IsNull() ) - theMap.Add( owner ); + theMap.Add( owner ); } } } static void indicesToOwners( const TColStd_IndexedMapOfInteger& aIndexMap, - const TopoDS_Shape& aMainShape, - const SelectMgr_IndexedMapOfOwner& anAllMap, - SelectMgr_IndexedMapOfOwner& aToHiliteMap ) + const TopoDS_Shape& aMainShape, + const SelectMgr_IndexedMapOfOwner& anAllMap, + SelectMgr_IndexedMapOfOwner& aToHiliteMap ) { TopTools_IndexedMapOfShape aMapOfShapes; TopExp::MapShapes(aMainShape, aMapOfShapes); @@ -127,7 +127,7 @@ static void indicesToOwners( const TColStd_IndexedMapOfInteger& aIndexMap, } GEOM_AISShape::GEOM_AISShape(const TopoDS_Shape& shape, - const Standard_CString aName) + const Standard_CString aName) : SALOME_AISShape(shape), myName(aName), myDisplayVectors(false) { myShadingColor = Quantity_Color( Quantity_NOC_GOLDENROD ); @@ -162,8 +162,8 @@ Standard_CString GEOM_AISShape::getName(){ } void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, - const Handle(Prs3d_Presentation)& aPrs, - const Standard_Integer aMode) + const Handle(Prs3d_Presentation)& aPrs, + const Standard_Integer aMode) { if (IsInfinite()) aPrs->SetInfiniteState(Standard_True); //pas de prise en compte lors du FITALL @@ -228,10 +228,10 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent if ( C.IsNull() ) continue; if ( anEdgeE.Orientation() == TopAbs_FORWARD ) - C->D1(lp, aP2, aDirVec); + C->D1(lp, aP2, aDirVec); else { - C->D1(fp, aP1, aDirVec); - aP2 = aP1; + C->D1(fp, aP1, aDirVec); + aP2 = aP1; } GeomAdaptor_Curve aAdC; @@ -239,13 +239,13 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent Standard_Real aDist = GCPnts_AbscissaPoint::Length(aAdC, fp, lp); if (aDist > gp::Resolution()) { - gp_Dir aDir; - if ( anEdgeE.Orientation() == TopAbs_FORWARD ) - aDir = aDirVec; - else - aDir = -aDirVec; + gp_Dir aDir; + if ( anEdgeE.Orientation() == TopAbs_FORWARD ) + aDir = aDirVec; + else + aDir = -aDirVec; - Prs3d_Arrow::Draw(aPrs, aP2, aDir, PI/180.*5., aDist/10.); + Prs3d_Arrow::Draw(aPrs, aP2, aDir, PI/180.*5., aDist/10.); } } } @@ -276,7 +276,7 @@ void GEOM_AISShape::SetShadingColor(const Quantity_Color &aCol) } void GEOM_AISShape::highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, - const Standard_Boolean aHighlight ) + const Standard_Boolean aHighlight ) { Handle(AIS_InteractiveObject) anObj = this; Handle(AIS_InteractiveContext) anIC = GetContext(); diff --git a/src/OBJECT/GEOM_AISShape.hxx b/src/OBJECT/GEOM_AISShape.hxx index 188e29b54..ce59e04ef 100644 --- a/src/OBJECT/GEOM_AISShape.hxx +++ b/src/OBJECT/GEOM_AISShape.hxx @@ -83,30 +83,30 @@ public: // } // Methods PUBLIC // - GEOM_AISShape(const TopoDS_Shape& shape, const Standard_CString aName); - Standard_Boolean hasIO() ; - void setIO(const Handle(SALOME_InteractiveObject)& name) ; - void setName(const Standard_CString aName) ; - Standard_CString getName() ; - Handle_SALOME_InteractiveObject getIO() ; - void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight ); - ~GEOM_AISShape(); - - void SetTransparency(const Standard_Real aValue); - void SetShadingColor(const Quantity_Color &aCol); - void SetDisplayVectors(bool isShow); - - virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, - const Handle(Prs3d_Presentation)& aPresentation, - const Standard_Integer aMode = 0) ; - - virtual bool isShowVectors () { return myDisplayVectors; } - + GEOM_AISShape(const TopoDS_Shape& shape, const Standard_CString aName); + Standard_Boolean hasIO() ; + void setIO(const Handle(SALOME_InteractiveObject)& name) ; + void setName(const Standard_CString aName) ; + Standard_CString getName() ; + Handle_SALOME_InteractiveObject getIO() ; + void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight ); + ~GEOM_AISShape(); + + void SetTransparency(const Standard_Real aValue); + void SetShadingColor(const Quantity_Color &aCol); + void SetDisplayVectors(bool isShow); + + virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, + const Handle(Prs3d_Presentation)& aPresentation, + const Standard_Integer aMode = 0) ; + + virtual bool isShowVectors () { return myDisplayVectors; } + // Type management // - friend Handle_Standard_Type& GEOM_AISShape_Type_(); - const Handle(Standard_Type)& DynamicType() const; - Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + friend Handle_Standard_Type& GEOM_AISShape_Type_(); + const Handle(Standard_Type)& DynamicType() const; + Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: Quantity_Color myShadingColor; diff --git a/src/OBJECT/GEOM_AISShape.ixx b/src/OBJECT/GEOM_AISShape.ixx index b72aa5a84..468e47e32 100644 --- a/src/OBJECT/GEOM_AISShape.ixx +++ b/src/OBJECT/GEOM_AISShape.ixx @@ -54,10 +54,10 @@ Standard_EXPORT Handle_Standard_Type& GEOM_AISShape_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,aType5,aType6,aType7,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOM_AISShape", - sizeof(GEOM_AISShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOM_AISShape), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/OBJECT/GEOM_Actor.cxx b/src/OBJECT/GEOM_Actor.cxx index cb0ad3529..00cf1cef3 100644 --- a/src/OBJECT/GEOM_Actor.cxx +++ b/src/OBJECT/GEOM_Actor.cxx @@ -302,7 +302,7 @@ SetVisibility(int theVisibility) { #ifdef MYDEBUG MESSAGE ( "GEOM_Actor::SetVisibility = "<Position[0])*(pos[0] - this->Position[0]) + + (pos[0] - this->Position[0])*(pos[0] - this->Position[0]) + (pos[1] - this->Position[1])*(pos[1] - this->Position[1]) + (pos[2] - this->Position[2])*(pos[2] - this->Position[2])); for (i = 0; i < 3; i++) - { + { Rz[i] = (pos[i] - this->Position[i])/distance; - } + } } vtkMath::Cross(vup,Rz,Rx); diff --git a/src/OBJECT/GEOM_Actor.h b/src/OBJECT/GEOM_Actor.h index e2e46379c..2d04f8bad 100644 --- a/src/OBJECT/GEOM_Actor.h +++ b/src/OBJECT/GEOM_Actor.h @@ -102,7 +102,7 @@ public: void ReleaseGraphicsResources(vtkWindow *); const TopoDS_Shape& getTopo(); void setInputShape(const TopoDS_Shape& ashape, double adef1, - int imode, bool isVector = false); + int imode, bool isVector = false); double getDeflection(); double isVector(); @@ -137,15 +137,15 @@ public: virtual bool PreHighlight(vtkInteractorStyle* theInteractorStyle, - SVTK_SelectionEvent* theSelectionEvent, - bool theIsHighlight); + SVTK_SelectionEvent* theSelectionEvent, + bool theIsHighlight); //! To process highlight (called from #SVTK_InteractorStyle) virtual bool Highlight(vtkInteractorStyle* theInteractorStyle, - SVTK_SelectionEvent* theSelectionEvent, - bool theIsHighlight); + SVTK_SelectionEvent* theSelectionEvent, + bool theIsHighlight); //! Visibility management virtual diff --git a/src/OBJECT/GEOM_AssemblyBuilder.cxx b/src/OBJECT/GEOM_AssemblyBuilder.cxx index 69d7fa9f5..101f40d8b 100644 --- a/src/OBJECT/GEOM_AssemblyBuilder.cxx +++ b/src/OBJECT/GEOM_AssemblyBuilder.cxx @@ -60,22 +60,22 @@ using namespace std; // SALOME -#define MAX2(X, Y) ( Abs(X) > Abs(Y)? Abs(X) : Abs(Y) ) -#define MAX3(X, Y, Z) ( MAX2 ( MAX2(X,Y) , Z) ) +#define MAX2(X, Y) ( Abs(X) > Abs(Y)? Abs(X) : Abs(Y) ) +#define MAX3(X, Y, Z) ( MAX2 ( MAX2(X,Y) , Z) ) void GEOM_AssemblyBuilder::InitProperties(vtkProperty* IsoProp, - vtkProperty* FaceProp, - vtkProperty* EdgeFProp, - vtkProperty* EdgeSProp, - vtkProperty* EdgeIProp, - vtkProperty* VertexProp, - vtkProperty* IsoPVProp, - vtkProperty* EdgePVProp, - vtkProperty* VertexPVProp) + vtkProperty* FaceProp, + vtkProperty* EdgeFProp, + vtkProperty* EdgeSProp, + vtkProperty* EdgeIProp, + vtkProperty* VertexProp, + vtkProperty* IsoPVProp, + vtkProperty* EdgePVProp, + vtkProperty* VertexPVProp) { // Shading like default OCC material FaceProp->SetRepresentationToSurface(); @@ -160,8 +160,8 @@ void GEOM_AssemblyBuilder::InitProperties(vtkProperty* IsoProp, void GEOM_AssemblyBuilder::MeshShape(const TopoDS_Shape myShape, - Standard_Real deflection, - Standard_Boolean forced) + Standard_Real deflection, + Standard_Boolean forced) { // Mesh the shape if necessary Standard_Boolean alreadymesh = Standard_True; @@ -271,54 +271,54 @@ vtkActorCollection* GEOM_AssemblyBuilder::BuildActors(const TopoDS_Shape& myShap TopExp_Explorer ex2; for (ex2.Init(ex.Current(), TopAbs_EDGE); ex2.More(); ex2.Next()) { - const TopoDS_Edge& aEdge = TopoDS::Edge(ex2.Current()); - - if (BRep_Tool::Degenerated(aEdge)) { - continue; - } - - // compute the number of faces - Standard_Integer nbf = edgemap.FindFromKey(ex2.Current()).Extent(); - GEOM_Actor* EdgeActor = GEOM_Actor::New(); - EdgeActor->SubShapeOn(); - EdgeActor->setInputShape(ex2.Current(),deflection,mode); - - switch (nbf) { - - case 0 : // isolated edge - { - EdgeActor->SetShadingProperty(EdgeIProp); - EdgeActor->SetWireframeProperty(EdgeIProp); - } - break; - - case 1 :// edge in only one face - { - EdgeActor->SetShadingProperty(EdgeFProp); - EdgeActor->SetWireframeProperty(EdgeFProp); - } - break; - - default : // edge shared by at least two faces - { - EdgeActor->SetShadingProperty(EdgeSProp); - EdgeActor->SetWireframeProperty(EdgeSProp); - } - } - - EdgeActor->SetPreviewProperty(EdgePVProp); - AISActors->AddItem(EdgeActor); + const TopoDS_Edge& aEdge = TopoDS::Edge(ex2.Current()); + + if (BRep_Tool::Degenerated(aEdge)) { + continue; + } + + // compute the number of faces + Standard_Integer nbf = edgemap.FindFromKey(ex2.Current()).Extent(); + GEOM_Actor* EdgeActor = GEOM_Actor::New(); + EdgeActor->SubShapeOn(); + EdgeActor->setInputShape(ex2.Current(),deflection,mode); + + switch (nbf) { + + case 0 : // isolated edge + { + EdgeActor->SetShadingProperty(EdgeIProp); + EdgeActor->SetWireframeProperty(EdgeIProp); + } + break; + + case 1 :// edge in only one face + { + EdgeActor->SetShadingProperty(EdgeFProp); + EdgeActor->SetWireframeProperty(EdgeFProp); + } + break; + + default : // edge shared by at least two faces + { + EdgeActor->SetShadingProperty(EdgeSProp); + EdgeActor->SetWireframeProperty(EdgeSProp); + } + } + + EdgeActor->SetPreviewProperty(EdgePVProp); + AISActors->AddItem(EdgeActor); } } } else if ( myShape.ShapeType() == TopAbs_WIRE ) { // WIRE Actor TopExp_Explorer ex; for (ex.Init(myShape, TopAbs_EDGE); ex.More(); ex.Next()) { const TopoDS_Edge& aEdge = TopoDS::Edge(ex.Current()); - + if (BRep_Tool::Degenerated(aEdge)) { - continue; + continue; } - + GEOM_Actor* EdgeActor = GEOM_Actor::New(); EdgeActor->setInputShape(ex.Current(),deflection,mode); EdgeActor->SetShadingProperty(EdgeIProp); @@ -358,9 +358,9 @@ vtkActorCollection* GEOM_AssemblyBuilder::BuildActors(const TopoDS_Shape& myShap // BUILD ASSEMBLY //------------------------------------------------------------- vtkAssembly* GEOM_AssemblyBuilder::BuildAssembly(const TopoDS_Shape& myShape, - Standard_Real deflection, - Standard_Integer mode, - Standard_Boolean forced) + Standard_Real deflection, + Standard_Integer mode, + Standard_Boolean forced) { // Create a new vtkAssembly @@ -409,7 +409,7 @@ vtkAssembly* GEOM_AssemblyBuilder::BuildAssembly(const TopoDS_Shape& myShape, const TopoDS_Edge& aEdge = TopoDS::Edge(ex2.Current()); if (BRep_Tool::Degenerated(aEdge)) { - continue; + continue; } @@ -417,26 +417,26 @@ vtkAssembly* GEOM_AssemblyBuilder::BuildAssembly(const TopoDS_Shape& myShape, Standard_Integer nbf = edgemap.FindFromKey(ex2.Current()).Extent(); GEOM_Actor* EdgeActor = GEOM_Actor::New(); switch (nbf) { - + case 0 : // isolated edge - { - EdgeActor->SetShadingProperty(EdgeIProp); - EdgeActor->SetWireframeProperty(EdgeIProp); - } - break; - + { + EdgeActor->SetShadingProperty(EdgeIProp); + EdgeActor->SetWireframeProperty(EdgeIProp); + } + break; + case 1 :// edge in only one face - { - EdgeActor->SetShadingProperty(EdgeFProp); - EdgeActor->SetWireframeProperty(EdgeFProp); - } - break; - + { + EdgeActor->SetShadingProperty(EdgeFProp); + EdgeActor->SetWireframeProperty(EdgeFProp); + } + break; + default : // edge shared by at least two faces - { - EdgeActor->SetShadingProperty(EdgeSProp); - EdgeActor->SetWireframeProperty(EdgeSProp); - } + { + EdgeActor->SetShadingProperty(EdgeSProp); + EdgeActor->SetWireframeProperty(EdgeSProp); + } } EdgeActor->setInputShape(ex2.Current(),deflection,mode); diff --git a/src/OBJECT/GEOM_AssemblyBuilder.h b/src/OBJECT/GEOM_AssemblyBuilder.h index da50e5e92..aed252a9b 100644 --- a/src/OBJECT/GEOM_AssemblyBuilder.h +++ b/src/OBJECT/GEOM_AssemblyBuilder.h @@ -40,18 +40,18 @@ class GEOM_OBJECT_EXPORT GEOM_AssemblyBuilder { private: static void InitProperties(vtkProperty* IsoProp, - vtkProperty* FaceProp, - vtkProperty* EdgeFProp, - vtkProperty* EdgeSProp, - vtkProperty* EdgeIProp, - vtkProperty* VertexProp, - vtkProperty* IsoPVProp, - vtkProperty* EdgePVProp, - vtkProperty* VertePVProp); + vtkProperty* FaceProp, + vtkProperty* EdgeFProp, + vtkProperty* EdgeSProp, + vtkProperty* EdgeIProp, + vtkProperty* VertexProp, + vtkProperty* IsoPVProp, + vtkProperty* EdgePVProp, + vtkProperty* VertePVProp); static void MeshShape(const TopoDS_Shape myShape, - Standard_Real deflection, - Standard_Boolean forced); + Standard_Real deflection, + Standard_Boolean forced); public: @@ -62,19 +62,19 @@ class GEOM_OBJECT_EXPORT GEOM_AssemblyBuilder { //------------------------------------------------------------------ static vtkAssembly* BuildAssembly(const TopoDS_Shape& myShape, - Standard_Real deflection, - Standard_Integer amode, - Standard_Boolean forced); + Standard_Real deflection, + Standard_Integer amode, + Standard_Boolean forced); //------------------------------------------------------------------ // Good performance //------------------------------------------------------------------ static vtkActorCollection* BuildActors(const TopoDS_Shape& myShape, - Standard_Real deflection, - Standard_Integer amode, - Standard_Boolean forced, - Standard_Boolean isVector = Standard_False); + Standard_Real deflection, + Standard_Integer amode, + Standard_Boolean forced, + Standard_Boolean isVector = Standard_False); //------------------------------------------------------------------ diff --git a/src/OBJECT/GEOM_EdgeSource.cxx b/src/OBJECT/GEOM_EdgeSource.cxx index ed1102b4b..1f0996d75 100755 --- a/src/OBJECT/GEOM_EdgeSource.cxx +++ b/src/OBJECT/GEOM_EdgeSource.cxx @@ -143,7 +143,7 @@ void GEOM_EdgeSource::OCC2VTK (const TopoDS_Edge& theEdge, gp_Pnt pt2 = anId2Pnts(id2); if(!isidtrsf) { - // apply edge transformation + // apply edge transformation pt1.Transform(edgeTransf); pt2.Transform(edgeTransf); } diff --git a/src/OBJECT/GEOM_InteractiveObject.cxx b/src/OBJECT/GEOM_InteractiveObject.cxx index 1f82d31bf..9b422b7c2 100644 --- a/src/OBJECT/GEOM_InteractiveObject.cxx +++ b/src/OBJECT/GEOM_InteractiveObject.cxx @@ -42,9 +42,9 @@ GEOM_InteractiveObject::GEOM_InteractiveObject() } GEOM_InteractiveObject::GEOM_InteractiveObject(const char* anIOR, - const char* aFatherIOR, - const char* aComponentDataType, - const char* anEntry) + const char* aFatherIOR, + const char* aComponentDataType, + const char* anEntry) : SALOME_InteractiveObject(anEntry,aComponentDataType) { myIOR = anIOR; diff --git a/src/OBJECT/GEOM_InteractiveObject.hxx b/src/OBJECT/GEOM_InteractiveObject.hxx index 1acd05421..48a9b9cc2 100644 --- a/src/OBJECT/GEOM_InteractiveObject.hxx +++ b/src/OBJECT/GEOM_InteractiveObject.hxx @@ -70,9 +70,9 @@ public: // Standard_EXPORT GEOM_InteractiveObject(); Standard_EXPORT GEOM_InteractiveObject(const char* anIOR, - const char* aFatherIOR, - const char* aComponentDataType, - const char* anEntry = ""); + const char* aFatherIOR, + const char* aComponentDataType, + const char* anEntry = ""); Standard_EXPORT void setIOR(const char* anEntry) ; Standard_EXPORT const char* getIOR() ; Standard_EXPORT void setFatherIOR(const char* anEntry) ; @@ -87,7 +87,7 @@ Standard_EXPORT ~GEOM_InteractiveObject(); // Standard_EXPORT friend Handle_Standard_Type& GEOM_InteractiveObject_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: diff --git a/src/OBJECT/GEOM_InteractiveObject.ixx b/src/OBJECT/GEOM_InteractiveObject.ixx index 56d8f268d..a54b9edce 100644 --- a/src/OBJECT/GEOM_InteractiveObject.ixx +++ b/src/OBJECT/GEOM_InteractiveObject.ixx @@ -46,10 +46,10 @@ Standard_EXPORT Handle_Standard_Type& GEOM_InteractiveObject_Type_() static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; static Handle_Standard_Type _aType = new Standard_Type("GEOM_InteractiveObject", - sizeof(GEOM_InteractiveObject), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); + sizeof(GEOM_InteractiveObject), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); return _aType; } diff --git a/src/OBJECT/GEOM_OCCReader.cxx b/src/OBJECT/GEOM_OCCReader.cxx index 95a4c33b7..381a2ed98 100644 --- a/src/OBJECT/GEOM_OCCReader.cxx +++ b/src/OBJECT/GEOM_OCCReader.cxx @@ -63,8 +63,8 @@ using namespace std; -#define MAX2(X, Y) ( Abs(X) > Abs(Y)? Abs(X) : Abs(Y) ) -#define MAX3(X, Y, Z) ( MAX2 ( MAX2(X,Y) , Z) ) +#define MAX2(X, Y) ( Abs(X) > Abs(Y)? Abs(X) : Abs(Y) ) +#define MAX3(X, Y, Z) ( MAX2 ( MAX2(X,Y) , Z) ) // Constante for iso building static Standard_Real IntersectorConfusion = 1.e-10 ; // -8 ; @@ -130,7 +130,7 @@ void GEOM_OCCReader::Execute() { // Allocation Pts = vtkPoints::New(); Cells = vtkCellArray::New(); - + //Compute number of triangles and points Standard_Integer nbpoly=0,nbpts=0; @@ -142,9 +142,9 @@ void GEOM_OCCReader::Execute() { const TopoDS_Face& aFace = TopoDS::Face(myShape); Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(aFace,aLoc); if(aPoly.IsNull()) { - Pts->Delete(); - Cells->Delete(); - return; + Pts->Delete(); + Cells->Delete(); + return; } nbpts = aPoly->NbNodes(); @@ -154,9 +154,9 @@ void GEOM_OCCReader::Execute() { Cells->Allocate(Cells->EstimateSize(nbpoly,3)); } else { - Cells->Delete(); - Pts->Delete(); - return; + Cells->Delete(); + Pts->Delete(); + return; } } @@ -209,8 +209,8 @@ void GEOM_OCCReader::ComputeWireframe(vtkPoints* Pts,vtkCellArray* Cells){ //======================================================================= void GEOM_OCCReader::TransferFaceWData(const TopoDS_Face& aFace, - vtkPoints* Pts, - vtkCellArray* Cells) + vtkPoints* Pts, + vtkCellArray* Cells) { TopoDS_Face aCopyFace = aFace; aCopyFace.Orientation (TopAbs_FORWARD); @@ -223,17 +223,17 @@ void GEOM_OCCReader::TransferFaceWData(const TopoDS_Face& aFace, //======================================================================= void GEOM_OCCReader::createISO (const TopoDS_Face& TopologicalFace, - const Standard_Real Infinite, - const Standard_Integer NbIsos, - vtkPoints* Pts, - vtkCellArray* Cell) + const Standard_Real Infinite, + const Standard_Integer NbIsos, + vtkPoints* Pts, + vtkCellArray* Cell) { Geom2dHatch_Hatcher aHatcher (Geom2dHatch_Intersector (IntersectorConfusion, - IntersectorTangency), - HatcherConfusion2d, - HatcherConfusion3d, - Standard_True, - Standard_False); + IntersectorTangency), + HatcherConfusion2d, + HatcherConfusion3d, + Standard_True, + Standard_False); Standard_Real myInfinite,myUMin,myUMax,myVMin,myVMax; //myInfinite = Precision::Infinite(); @@ -293,27 +293,27 @@ void GEOM_OCCReader::createISO (const TopoDS_Face& TopologicalFace, //-- Test if a TrimmedCurve is necessary if( Abs(PCurve->FirstParameter()-U1)<= Precision::PConfusion() - && Abs(PCurve->LastParameter()-U2)<= Precision::PConfusion()) { + && Abs(PCurve->LastParameter()-U2)<= Precision::PConfusion()) { aHatcher.AddElement (PCurve, TopologicalEdge.Orientation()) ; } else { if (!PCurve->IsPeriodic()) { - Handle (Geom2d_TrimmedCurve) TrimPCurve =Handle(Geom2d_TrimmedCurve)::DownCast(PCurve); - if (!TrimPCurve.IsNull()) { - if (TrimPCurve->BasisCurve()->FirstParameter()-U1 > Precision::PConfusion() || - U2-TrimPCurve->BasisCurve()->LastParameter() > Precision::PConfusion()) { - aHatcher.AddElement (PCurve, TopologicalEdge.Orientation()) ; - return; - } - } - else { - if (PCurve->FirstParameter()-U1 > Precision::PConfusion()){ - U1=PCurve->FirstParameter(); - } - if (U2-PCurve->LastParameter() > Precision::PConfusion()){ - U2=PCurve->LastParameter(); - } - } + Handle (Geom2d_TrimmedCurve) TrimPCurve =Handle(Geom2d_TrimmedCurve)::DownCast(PCurve); + if (!TrimPCurve.IsNull()) { + if (TrimPCurve->BasisCurve()->FirstParameter()-U1 > Precision::PConfusion() || + U2-TrimPCurve->BasisCurve()->LastParameter() > Precision::PConfusion()) { + aHatcher.AddElement (PCurve, TopologicalEdge.Orientation()) ; + return; + } + } + else { + if (PCurve->FirstParameter()-U1 > Precision::PConfusion()){ + U1=PCurve->FirstParameter(); + } + if (U2-PCurve->LastParameter() > Precision::PConfusion()){ + U2=PCurve->LastParameter(); + } + } } Handle (Geom2d_TrimmedCurve) TrimPCurve = new Geom2d_TrimmedCurve (PCurve, U1, U2) ; aHatcher.AddElement (TrimPCurve, TopologicalEdge.Orientation()) ; @@ -370,16 +370,16 @@ void GEOM_OCCReader::createISO (const TopoDS_Face& TopologicalFace, Index = myUInd(IIso) ; if (Index != 0) { if (aHatcher.TrimDone (Index) && !aHatcher.TrimFailed (Index)) { - aHatcher.ComputeDomains (Index); - if (aHatcher.IsDone (Index)) myNbDom = myNbDom + aHatcher.NbDomains (Index) ; + aHatcher.ComputeDomains (Index); + if (aHatcher.IsDone (Index)) myNbDom = myNbDom + aHatcher.NbDomains (Index) ; } } Index = myVInd(IIso) ; if (Index != 0) { if (aHatcher.TrimDone (Index) && !aHatcher.TrimFailed (Index)) { - aHatcher.ComputeDomains (Index); - if (aHatcher.IsDone (Index)) myNbDom = myNbDom + aHatcher.NbDomains (Index) ; + aHatcher.ComputeDomains (Index); + if (aHatcher.IsDone (Index)) myNbDom = myNbDom + aHatcher.NbDomains (Index) ; } } } @@ -396,22 +396,22 @@ void GEOM_OCCReader::createISO (const TopoDS_Face& TopologicalFace, if (UInd != 0) { Standard_Real UPrm = myUPrm.Value (UIso) ; if (!aHatcher.IsDone (UInd)) { - MESSAGE("DBRep_IsoBuilder:: U iso of parameter: "<= T2 && TI(Intrv + 1) >= T2) - continue; + continue; if (T == GeomAbs_IsoU) { - V1 = Max(T1, TI(Intrv)); - V2 = Min(T2, TI(Intrv + 1)); - stepV = (V2 - V1) / myDiscret; + V1 = Max(T1, TI(Intrv)); + V2 = Min(T2, TI(Intrv + 1)); + stepV = (V2 - V1) / myDiscret; } else { - U1 = Max(T1, TI(Intrv)); - U2 = Min(T2, TI(Intrv + 1)); - stepU = (U2 - U1) / myDiscret; + U1 = Max(T1, TI(Intrv)); + U2 = Min(T2, TI(Intrv + 1)); + stepU = (U2 - U1) / myDiscret; } switch (SurfType) { - //-------------GeomAbs_Plane--------------- + //-------------GeomAbs_Plane--------------- case GeomAbs_Plane : - break; - //----GeomAbs_Cylinder GeomAbs_Cone------ + break; + //----GeomAbs_Cylinder GeomAbs_Cone------ case GeomAbs_Cylinder : case GeomAbs_Cone : - if (T == GeomAbs_IsoV) { - for (j = 1; j < myDiscret; j++) { - U1 += stepU; - V1 += stepV; - S.D0(U1,V1,P); - DrawTo(P,Pts,Cells); - } - } - break; - //---GeomAbs_Sphere GeomAbs_Torus-------- - //GeomAbs_BezierSurface GeomAbs_BezierSurface + if (T == GeomAbs_IsoV) { + for (j = 1; j < myDiscret; j++) { + U1 += stepU; + V1 += stepV; + S.D0(U1,V1,P); + DrawTo(P,Pts,Cells); + } + } + break; + //---GeomAbs_Sphere GeomAbs_Torus-------- + //GeomAbs_BezierSurface GeomAbs_BezierSurface case GeomAbs_Sphere : case GeomAbs_Torus : case GeomAbs_OffsetSurface : case GeomAbs_OtherSurface : - for (j = 1; j < myDiscret; j++) { - U1 += stepU; - V1 += stepV; - S.D0(U1,V1,P); - DrawTo(P,Pts,Cells); - } - break; - //-------------GeomAbs_BSplineSurface------ + for (j = 1; j < myDiscret; j++) { + U1 += stepU; + V1 += stepV; + S.D0(U1,V1,P); + DrawTo(P,Pts,Cells); + } + break; + //-------------GeomAbs_BSplineSurface------ case GeomAbs_BezierSurface : case GeomAbs_BSplineSurface : - for (j = 1; j <= myDiscret/2; j++) { + for (j = 1; j <= myDiscret/2; j++) { - PlotCount = 0; + PlotCount = 0; - PlotIso ( S, T, U1, V1, (T == GeomAbs_IsoV) ? stepU*2. : stepV*2., halt, Pts, Cells); - U1 += stepU*2.; - V1 += stepV*2.; - } - break; - //-------------GeomAbs_SurfaceOfExtrusion-- - //-------------GeomAbs_SurfaceOfRevolution- + PlotIso ( S, T, U1, V1, (T == GeomAbs_IsoV) ? stepU*2. : stepV*2., halt, Pts, Cells); + U1 += stepU*2.; + V1 += stepV*2.; + } + break; + //-------------GeomAbs_SurfaceOfExtrusion-- + //-------------GeomAbs_SurfaceOfRevolution- case GeomAbs_SurfaceOfExtrusion : case GeomAbs_SurfaceOfRevolution : - if ((T == GeomAbs_IsoV && SurfType == GeomAbs_SurfaceOfRevolution) || - (T == GeomAbs_IsoU && SurfType == GeomAbs_SurfaceOfExtrusion)) { - if (SurfType == GeomAbs_SurfaceOfExtrusion) break; - for (j = 1; j < myDiscret; j++) { - U1 += stepU; - V1 += stepV; - S.D0(U1,V1,P); - DrawTo(P,Pts,Cells); - } - } else { - CurvType = (S.BasisCurve())->GetType(); - switch (CurvType) { - case GeomAbs_Line : - break; - case GeomAbs_Circle : - case GeomAbs_Ellipse : - for (j = 1; j < myDiscret; j++) { - U1 += stepU; - V1 += stepV; - S.D0(U1,V1,P); - DrawTo(P,Pts,Cells); - } - break; - case GeomAbs_Parabola : - case GeomAbs_Hyperbola : - case GeomAbs_BezierCurve : - case GeomAbs_BSplineCurve : - case GeomAbs_OtherCurve : - for (j = 1; j <= myDiscret/2; j++) { - - PlotCount = 0; - - PlotIso ( S, T, U1, V1,(T == GeomAbs_IsoV) ? stepU*2. : stepV*2., halt, Pts, Cells); - U1 += stepU*2.; - V1 += stepV*2.; - } - break; - } - } + if ((T == GeomAbs_IsoV && SurfType == GeomAbs_SurfaceOfRevolution) || + (T == GeomAbs_IsoU && SurfType == GeomAbs_SurfaceOfExtrusion)) { + if (SurfType == GeomAbs_SurfaceOfExtrusion) break; + for (j = 1; j < myDiscret; j++) { + U1 += stepU; + V1 += stepV; + S.D0(U1,V1,P); + DrawTo(P,Pts,Cells); + } + } else { + CurvType = (S.BasisCurve())->GetType(); + switch (CurvType) { + case GeomAbs_Line : + break; + case GeomAbs_Circle : + case GeomAbs_Ellipse : + for (j = 1; j < myDiscret; j++) { + U1 += stepU; + V1 += stepV; + S.D0(U1,V1,P); + DrawTo(P,Pts,Cells); + } + break; + case GeomAbs_Parabola : + case GeomAbs_Hyperbola : + case GeomAbs_BezierCurve : + case GeomAbs_BSplineCurve : + case GeomAbs_OtherCurve : + for (j = 1; j <= myDiscret/2; j++) { + + PlotCount = 0; + + PlotIso ( S, T, U1, V1,(T == GeomAbs_IsoV) ? stepU*2. : stepV*2., halt, Pts, Cells); + U1 += stepU*2.; + V1 += stepV*2.; + } + break; + } + } } } S.D0(U2,V2,P); @@ -648,13 +648,13 @@ void GEOM_OCCReader::DrawIso(GeomAbs_IsoType T, //======================================================================= void GEOM_OCCReader::PlotIso (BRepAdaptor_Surface& S, - GeomAbs_IsoType T, - Standard_Real& U, - Standard_Real& V, - Standard_Real Step, - Standard_Boolean& halt, - vtkPoints* Pts, - vtkCellArray* Cells) + GeomAbs_IsoType T, + Standard_Real& U, + Standard_Real& V, + Standard_Real Step, + Standard_Boolean& halt, + vtkPoints* Pts, + vtkCellArray* Cells) { ++PlotCount; @@ -696,8 +696,8 @@ void GEOM_OCCReader::PlotIso (BRepAdaptor_Surface& S, //======================================================================= void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge, - vtkPoints* Pts, - vtkCellArray* Cells) { + vtkPoints* Pts, + vtkCellArray* Cells) { Handle(Poly_PolygonOnTriangulation) aEdgePoly; @@ -742,9 +742,9 @@ void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge, gp_Pnt pt2 = theNodesP(j+1); if(!isidtrsf) { - // apply edge transformation - pt1.Transform(edgeTransf); - pt2.Transform(edgeTransf); + // apply edge transformation + pt1.Transform(edgeTransf); + pt2.Transform(edgeTransf); } // insert pt1 @@ -777,9 +777,9 @@ void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge, gp_Pnt pt2 = theNodesPoly(id2); if(!isidtrsf) { - // apply edge transformation - pt1.Transform(edgeTransf); - pt2.Transform(edgeTransf); + // apply edge transformation + pt1.Transform(edgeTransf); + pt2.Transform(edgeTransf); } // insert pt1 @@ -925,8 +925,8 @@ void GEOM_OCCReader::TransferEdgeWData(const TopoDS_Edge& aEdge, //======================================================================= void GEOM_OCCReader::TransferVertexWData(const TopoDS_Vertex& aVertex, - vtkPoints* Pts, - vtkCellArray* Cells) { + vtkPoints* Pts, + vtkCellArray* Cells) { #define ZERO_COORD coord[0] = 0.0; coord[1] = 0.0; coord[2] = 0.0 gp_Pnt P = BRep_Tool::Pnt( aVertex ); @@ -955,7 +955,7 @@ void GEOM_OCCReader::TransferVertexWData(const TopoDS_Vertex& aVertex, Cells->InsertNextCell(2,pts); #undef ZERO_COORD -} +} //======================================================================= // Function : TransferEdgeSData( @@ -963,8 +963,8 @@ void GEOM_OCCReader::TransferVertexWData(const TopoDS_Vertex& aVertex, //======================================================================= void GEOM_OCCReader::TransferEdgeSData(const TopoDS_Edge& aFace, - vtkPoints* Pts, - vtkCellArray* Cells) + vtkPoints* Pts, + vtkCellArray* Cells) { } @@ -974,8 +974,8 @@ void GEOM_OCCReader::TransferEdgeSData(const TopoDS_Edge& aFace, // Purpose : Transfert shading data for FACE //======================================================================= void GEOM_OCCReader::TransferFaceSData(const TopoDS_Face& aFace, - vtkPoints* Pts, - vtkCellArray* Cells) { + vtkPoints* Pts, + vtkCellArray* Cells) { TopLoc_Location aLoc; Handle(Poly_Triangulation) aPoly = BRep_Tool::Triangulation(aFace,aLoc); @@ -991,7 +991,7 @@ void GEOM_OCCReader::TransferFaceSData(const TopoDS_Face& aFace, Standard_Integer nbNodesInFace = aPoly->NbNodes(); Standard_Integer nbTriInFace = aPoly->NbTriangles(); - + const Poly_Array1OfTriangle& Triangles = aPoly->Triangles(); const TColgp_Array1OfPnt& Nodes = aPoly->Nodes(); @@ -1006,10 +1006,10 @@ void GEOM_OCCReader::TransferFaceSData(const TopoDS_Face& aFace, for(i=1;i<=nbTriInFace;i++) { // Get the triangle - + Standard_Integer N1,N2,N3; Triangles(i).Get(N1,N2,N3); - + vtkIdType pts[3]; pts[0] = N1-1; pts[1] = N2-1; pts[2] = N3-1; Cells->InsertNextCell(3,pts); diff --git a/src/OBJECT/GEOM_OCCReader.h b/src/OBJECT/GEOM_OCCReader.h index 869ec4f29..5d91931d0 100644 --- a/src/OBJECT/GEOM_OCCReader.h +++ b/src/OBJECT/GEOM_OCCReader.h @@ -48,9 +48,9 @@ class vtkCellArray; class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkPolyDataSource { - // methods + // methods - public: + public: static GEOM_OCCReader* New(); @@ -67,59 +67,59 @@ class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkPolyDataSource { GEOM_OCCReader(); ~GEOM_OCCReader(); - void Execute(); + void Execute(); void ComputeShading(vtkPoints* Pts,vtkCellArray* Cells); void ComputeWireframe(vtkPoints* Pts,vtkCellArray* Cells); void TransferFaceSData(const TopoDS_Face& aFace, - vtkPoints* Pts, - vtkCellArray* Cells); + vtkPoints* Pts, + vtkCellArray* Cells); void TransferFaceWData(const TopoDS_Face& aFace, - vtkPoints* Pts, - vtkCellArray* Cells); + vtkPoints* Pts, + vtkCellArray* Cells); void TransferEdgeSData(const TopoDS_Edge& aEdge, - vtkPoints* Pts, - vtkCellArray* Cells); + vtkPoints* Pts, + vtkCellArray* Cells); void TransferEdgeWData(const TopoDS_Edge& aEdge, - vtkPoints* Pts, - vtkCellArray* Cells); + vtkPoints* Pts, + vtkCellArray* Cells); void TransferVertexWData(const TopoDS_Vertex& aVertex, - vtkPoints* Pts, - vtkCellArray* Cells); + vtkPoints* Pts, + vtkCellArray* Cells); void createISO(const TopoDS_Face &, - double, int, - vtkPoints* Pts, - vtkCellArray* Cells); + double, int, + vtkPoints* Pts, + vtkCellArray* Cells); void DrawIso(GeomAbs_IsoType aType, - Standard_Real PParm, - Standard_Real p1, - Standard_Real p2, - vtkPoints* Pts, - vtkCellArray* Cells, - Standard_Integer& startidx); + Standard_Real PParm, + Standard_Real p1, + Standard_Real p2, + vtkPoints* Pts, + vtkCellArray* Cells, + Standard_Integer& startidx); void MoveTo(gp_Pnt P, - vtkPoints* Pts); + vtkPoints* Pts); void DrawTo(gp_Pnt P, - vtkPoints* Pts, - vtkCellArray* Cells); + vtkPoints* Pts, + vtkCellArray* Cells); void PlotIso(BRepAdaptor_Surface& S, - GeomAbs_IsoType T, - Standard_Real& U, - Standard_Real& V, - Standard_Real Step, - Standard_Boolean& halt, - vtkPoints* Pts, - vtkCellArray* Cells); + GeomAbs_IsoType T, + Standard_Real& U, + Standard_Real& V, + Standard_Real Step, + Standard_Boolean& halt, + vtkPoints* Pts, + vtkCellArray* Cells); // fields @@ -127,7 +127,7 @@ class GEOM_OBJECT_EXPORT GEOM_OCCReader : public vtkPolyDataSource { Standard_Boolean forced; int discretiso; - int amode; + int amode; int nbisos; TopoDS_Shape myShape; bool myIsVector; diff --git a/src/OBJECT/GEOM_ShadingFace.cxx b/src/OBJECT/GEOM_ShadingFace.cxx index 755b32925..44354eb15 100755 --- a/src/OBJECT/GEOM_ShadingFace.cxx +++ b/src/OBJECT/GEOM_ShadingFace.cxx @@ -76,7 +76,7 @@ OCC2VTK(const TopoDS_Face& theFace, if(!aLoc.IsIdentity()){ identity = false; myTransf = aLoc.Transformation(); - } + } Standard_Integer i; int aNbOfNodes = thePts->GetNumberOfPoints(); diff --git a/src/OBJECT/GEOM_VTKTrihedron.cxx b/src/OBJECT/GEOM_VTKTrihedron.cxx index b88a14528..a5d3e8b09 100644 --- a/src/OBJECT/GEOM_VTKTrihedron.cxx +++ b/src/OBJECT/GEOM_VTKTrihedron.cxx @@ -97,8 +97,8 @@ GEOM_VTKTrihedronAxis::~GEOM_VTKTrihedronAxis() void GEOM_VTKTrihedronAxis::SetSize( vtkFloatingPointType theSize ) { vtkFloatingPointType aPosition[ 3 ] = { myOri[ 0 ] + myDir[ 0 ] * theSize, - myOri[ 1 ] + myDir[ 1 ] * theSize, - myOri[ 2 ] + myDir[ 2 ] * theSize }; + myOri[ 1 ] + myDir[ 1 ] * theSize, + myOri[ 2 ] + myDir[ 2 ] * theSize }; myLineSource->SetPoint1( myOri[ 0 ], myOri[ 1 ], myOri[ 2 ] ); myLineSource->SetPoint2( aPosition ); diff --git a/src/OBJECT/GEOM_WireframeFace.cxx b/src/OBJECT/GEOM_WireframeFace.cxx index 08430275f..04fa3aac6 100755 --- a/src/OBJECT/GEOM_WireframeFace.cxx +++ b/src/OBJECT/GEOM_WireframeFace.cxx @@ -101,7 +101,7 @@ void GEOM_WireframeFace:: OCC2VTK(const TopoDS_Face& theFace, vtkPolyData* thePolyData, - vtkPoints* thePts, + vtkPoints* thePts, const int theNbIso[2], const int theDiscret) { @@ -113,7 +113,7 @@ OCC2VTK(const TopoDS_Face& theFace, void GEOM_WireframeFace:: CreateIso(const TopoDS_Face& theFace, - const int theNbIso[2], + const int theNbIso[2], const int theDiscret, vtkPolyData* thePolyData, vtkPoints* thePts) @@ -128,10 +128,10 @@ CreateIso(const TopoDS_Face& theFace, Geom2dHatch_Hatcher aHatcher(Geom2dHatch_Intersector(INTERSECTOR_CONFUSION, INTERSECTOR_TANGENCY), - HATHCER_CONFUSION_2D, - HATHCER_CONFUSION_3D, - Standard_True, - Standard_False); + HATHCER_CONFUSION_2D, + HATHCER_CONFUSION_3D, + Standard_True, + Standard_False); Standard_Real anUMin, anUMax, aVMin, aVMax; TColStd_Array1OfReal anUPrm(1, theNbIso[0]), aVPrm(1, theNbIso[1]); @@ -184,29 +184,29 @@ CreateIso(const TopoDS_Face& theFace, //-- Test if a TrimmedCurve is necessary if(Abs(PCurve->FirstParameter()-U1) <= Precision::PConfusion() && - Abs(PCurve->LastParameter()-U2) <= Precision::PConfusion()) + Abs(PCurve->LastParameter()-U2) <= Precision::PConfusion()) { aHatcher.AddElement(PCurve, anEdge.Orientation()) ; }else{ if(!PCurve->IsPeriodic()){ - Handle(Geom2d_TrimmedCurve) TrimPCurve = + Handle(Geom2d_TrimmedCurve) TrimPCurve = Handle(Geom2d_TrimmedCurve)::DownCast(PCurve); - if(!TrimPCurve.IsNull()){ + if(!TrimPCurve.IsNull()){ Handle_Geom2d_Curve aBasisCurve = TrimPCurve->BasisCurve(); - if(aBasisCurve->FirstParameter()-U1 > Precision::PConfusion() || - U2-aBasisCurve->LastParameter() > Precision::PConfusion()) + if(aBasisCurve->FirstParameter()-U1 > Precision::PConfusion() || + U2-aBasisCurve->LastParameter() > Precision::PConfusion()) { - aHatcher.AddElement(PCurve, anEdge.Orientation()) ; - return; - } - }else{ - if(PCurve->FirstParameter()-U1 > Precision::PConfusion()){ - U1=PCurve->FirstParameter(); - } - if(U2-PCurve->LastParameter() > Precision::PConfusion()){ - U2=PCurve->LastParameter(); - } - } + aHatcher.AddElement(PCurve, anEdge.Orientation()) ; + return; + } + }else{ + if(PCurve->FirstParameter()-U1 > Precision::PConfusion()){ + U1=PCurve->FirstParameter(); + } + if(U2-PCurve->LastParameter() > Precision::PConfusion()){ + U2=PCurve->LastParameter(); + } + } } Handle(Geom2d_TrimmedCurve) TrimPCurve = new Geom2d_TrimmedCurve(PCurve, U1, U2); @@ -262,8 +262,8 @@ CreateIso(const TopoDS_Face& theFace, Index = anUInd(IIso) ; if(Index != 0){ if(aHatcher.TrimDone(Index) && !aHatcher.TrimFailed(Index)){ - aHatcher.ComputeDomains(Index); - if(aHatcher.IsDone (Index)) + aHatcher.ComputeDomains(Index); + if(aHatcher.IsDone (Index)) aNbDom = aHatcher.NbDomains (Index); } } @@ -273,8 +273,8 @@ CreateIso(const TopoDS_Face& theFace, Index = aVInd(IIso); if(Index != 0){ if(aHatcher.TrimDone (Index) && !aHatcher.TrimFailed(Index)){ - aHatcher.ComputeDomains (Index); - if(aHatcher.IsDone (Index)) + aHatcher.ComputeDomains (Index); + if(aHatcher.IsDone (Index)) aNbDom = aHatcher.NbDomains (Index); } } @@ -288,14 +288,14 @@ CreateIso(const TopoDS_Face& theFace, if(UInd != 0){ Standard_Real UPrm = anUPrm.Value(UIso); if(aHatcher.IsDone(UInd)){ - Standard_Integer NbDom = aHatcher.NbDomains(UInd); - for(Standard_Integer IDom = 1 ; IDom <= NbDom ; IDom++){ - const HatchGen_Domain& Dom = aHatcher.Domain(UInd, IDom) ; - Standard_Real V1 = Dom.HasFirstPoint()? Dom.FirstPoint().Parameter(): aVMin - VTKINFINITE; - Standard_Real V2 = Dom.HasSecondPoint()? Dom.SecondPoint().Parameter(): aVMax + VTKINFINITE; - CreateIso_(theFace, GeomAbs_IsoU, UPrm, V1, V2, theDiscret, thePolyData, thePts); - } - } + Standard_Integer NbDom = aHatcher.NbDomains(UInd); + for(Standard_Integer IDom = 1 ; IDom <= NbDom ; IDom++){ + const HatchGen_Domain& Dom = aHatcher.Domain(UInd, IDom) ; + Standard_Real V1 = Dom.HasFirstPoint()? Dom.FirstPoint().Parameter(): aVMin - VTKINFINITE; + Standard_Real V2 = Dom.HasSecondPoint()? Dom.SecondPoint().Parameter(): aVMax + VTKINFINITE; + CreateIso_(theFace, GeomAbs_IsoU, UPrm, V1, V2, theDiscret, thePolyData, thePts); + } + } } } @@ -304,13 +304,13 @@ CreateIso(const TopoDS_Face& theFace, if(VInd != 0){ Standard_Real VPrm = aVPrm.Value(VIso); if(aHatcher.IsDone (VInd)){ - Standard_Integer NbDom = aHatcher.NbDomains(VInd); - for (Standard_Integer IDom = 1 ; IDom <= NbDom ; IDom++){ - const HatchGen_Domain& Dom = aHatcher.Domain(VInd, IDom); - Standard_Real U1 = Dom.HasFirstPoint()? Dom.FirstPoint().Parameter(): aVMin - VTKINFINITE; - Standard_Real U2 = Dom.HasSecondPoint()? Dom.SecondPoint().Parameter(): aVMax + VTKINFINITE; - CreateIso_(theFace, GeomAbs_IsoV, VPrm, U1, U2, theDiscret, thePolyData, thePts); - } + Standard_Integer NbDom = aHatcher.NbDomains(VInd); + for (Standard_Integer IDom = 1 ; IDom <= NbDom ; IDom++){ + const HatchGen_Domain& Dom = aHatcher.Domain(VInd, IDom); + Standard_Real U1 = Dom.HasFirstPoint()? Dom.FirstPoint().Parameter(): aVMin - VTKINFINITE; + Standard_Real U2 = Dom.HasSecondPoint()? Dom.SecondPoint().Parameter(): aVMax + VTKINFINITE; + CreateIso_(theFace, GeomAbs_IsoV, VPrm, U1, U2, theDiscret, thePolyData, thePts); + } } } } @@ -364,101 +364,101 @@ CreateIso_(const TopoDS_Face& theFace, V2 = Par; stepV = 0; nbIntv = nbUIntv; - } - + } + S.D0(U1,V1,P); MoveTo(P,thePts); for(Intrv = 1; Intrv <= nbIntv; Intrv++){ if(TI(Intrv) <= T1 && TI(Intrv + 1) <= T1) - continue; + continue; if(TI(Intrv) >= T2 && TI(Intrv + 1) >= T2) - continue; + continue; if(theIsoType == GeomAbs_IsoU){ - V1 = Max(T1, TI(Intrv)); - V2 = Min(T2, TI(Intrv + 1)); - stepV = (V2 - V1) / theDiscret; + V1 = Max(T1, TI(Intrv)); + V2 = Min(T2, TI(Intrv + 1)); + stepV = (V2 - V1) / theDiscret; }else{ - U1 = Max(T1, TI(Intrv)); - U2 = Min(T2, TI(Intrv + 1)); - stepU = (U2 - U1) / theDiscret; + U1 = Max(T1, TI(Intrv)); + U2 = Min(T2, TI(Intrv + 1)); + stepU = (U2 - U1) / theDiscret; } switch (SurfType) { case GeomAbs_Plane : - break; + break; case GeomAbs_Cylinder : case GeomAbs_Cone : - if(theIsoType == GeomAbs_IsoV){ - for(j = 1; j < theDiscret; j++){ - U1 += stepU; - V1 += stepV; - S.D0(U1,V1,P); - DrawTo(P,thePolyData,thePts); - } - } - break; + if(theIsoType == GeomAbs_IsoV){ + for(j = 1; j < theDiscret; j++){ + U1 += stepU; + V1 += stepV; + S.D0(U1,V1,P); + DrawTo(P,thePolyData,thePts); + } + } + break; case GeomAbs_Sphere : case GeomAbs_Torus : case GeomAbs_OffsetSurface : case GeomAbs_OtherSurface : - for(j = 1; j < theDiscret; j++){ - U1 += stepU; - V1 += stepV; - S.D0(U1,V1,P); - DrawTo(P,thePolyData,thePts); - } - break; + for(j = 1; j < theDiscret; j++){ + U1 += stepU; + V1 += stepV; + S.D0(U1,V1,P); + DrawTo(P,thePolyData,thePts); + } + break; case GeomAbs_BezierSurface : case GeomAbs_BSplineSurface : - for(j = 1; j <= theDiscret/2; j++){ + for(j = 1; j <= theDiscret/2; j++){ Standard_Real aStep = (theIsoType == GeomAbs_IsoV) ? stepU*2. : stepV*2.; - CreateIso__(S, theIsoType, U1, V1, aStep, thePolyData, thePts); - U1 += stepU*2.; - V1 += stepV*2.; - } - break; + CreateIso__(S, theIsoType, U1, V1, aStep, thePolyData, thePts); + U1 += stepU*2.; + V1 += stepV*2.; + } + break; case GeomAbs_SurfaceOfExtrusion : case GeomAbs_SurfaceOfRevolution : - if((theIsoType == GeomAbs_IsoV && SurfType == GeomAbs_SurfaceOfRevolution) || - (theIsoType == GeomAbs_IsoU && SurfType == GeomAbs_SurfaceOfExtrusion)) + if((theIsoType == GeomAbs_IsoV && SurfType == GeomAbs_SurfaceOfRevolution) || + (theIsoType == GeomAbs_IsoU && SurfType == GeomAbs_SurfaceOfExtrusion)) { - if(SurfType == GeomAbs_SurfaceOfExtrusion) + if(SurfType == GeomAbs_SurfaceOfExtrusion) break; - for(j = 1; j < theDiscret; j++){ - U1 += stepU; - V1 += stepV; - S.D0(U1,V1,P); - DrawTo(P,thePolyData,thePts); - } - }else{ - CurvType = (S.BasisCurve())->GetType(); - switch(CurvType){ - case GeomAbs_Line : - break; - case GeomAbs_Circle : - case GeomAbs_Ellipse : - for (j = 1; j < theDiscret; j++) { - U1 += stepU; - V1 += stepV; - S.D0(U1,V1,P); - DrawTo(P,thePolyData,thePts); - } - break; - case GeomAbs_Parabola : - case GeomAbs_Hyperbola : - case GeomAbs_BezierCurve : - case GeomAbs_BSplineCurve : - case GeomAbs_OtherCurve : - for(j = 1; j <= theDiscret/2; j++){ + for(j = 1; j < theDiscret; j++){ + U1 += stepU; + V1 += stepV; + S.D0(U1,V1,P); + DrawTo(P,thePolyData,thePts); + } + }else{ + CurvType = (S.BasisCurve())->GetType(); + switch(CurvType){ + case GeomAbs_Line : + break; + case GeomAbs_Circle : + case GeomAbs_Ellipse : + for (j = 1; j < theDiscret; j++) { + U1 += stepU; + V1 += stepV; + S.D0(U1,V1,P); + DrawTo(P,thePolyData,thePts); + } + break; + case GeomAbs_Parabola : + case GeomAbs_Hyperbola : + case GeomAbs_BezierCurve : + case GeomAbs_BSplineCurve : + case GeomAbs_OtherCurve : + for(j = 1; j <= theDiscret/2; j++){ Standard_Real aStep = (theIsoType == GeomAbs_IsoV) ? stepU*2. : stepV*2.; - CreateIso__(S, theIsoType, U1, V1, aStep, thePolyData, thePts); - U1 += stepU*2.; - V1 += stepV*2.; - } - break; - } - } + CreateIso__(S, theIsoType, U1, V1, aStep, thePolyData, thePts); + U1 += stepU*2.; + V1 += stepV*2.; + } + break; + } + } } } S.D0(U2,V2,P); @@ -473,9 +473,9 @@ void GEOM_WireframeFace:: CreateIso__(const BRepAdaptor_Surface& theSurface, GeomAbs_IsoType theIsoType, - Standard_Real& theU, - Standard_Real& theV, - Standard_Real theStep, + Standard_Real& theU, + Standard_Real& theV, + Standard_Real theStep, vtkPolyData* thePolyData, vtkPoints* thePts) { diff --git a/src/OBJECT/GEOM_WireframeFace.h b/src/OBJECT/GEOM_WireframeFace.h index 2958694df..7abf3f14b 100755 --- a/src/OBJECT/GEOM_WireframeFace.h +++ b/src/OBJECT/GEOM_WireframeFace.h @@ -61,7 +61,7 @@ protected: static void CreateIso(const TopoDS_Face& theFace, - const int theNbIso[2], + const int theNbIso[2], const int theDiscret, vtkPolyData* thePolyData, vtkPoints* thePts); @@ -81,9 +81,9 @@ protected: void CreateIso__(const BRepAdaptor_Surface& theSurface, GeomAbs_IsoType theIsoType, - Standard_Real& theU, - Standard_Real& theV, - Standard_Real theStep, + Standard_Real& theU, + Standard_Real& theV, + Standard_Real theStep, vtkPolyData* thePolyData, vtkPoints* thePts); diff --git a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx index f1c646c57..3da8378c8 100644 --- a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx +++ b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx @@ -123,7 +123,7 @@ void OperationGUI_ArchimedeDlg::Init() connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_ARCHIMEDE" ) ); @@ -220,7 +220,7 @@ void OperationGUI_ArchimedeDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); globalSelection( GEOM_ALLSHAPES ); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); } diff --git a/src/OperationGUI/OperationGUI_ChamferDlg.cxx b/src/OperationGUI/OperationGUI_ChamferDlg.cxx index ba19442f0..68192ab25 100644 --- a/src/OperationGUI/OperationGUI_ChamferDlg.cxx +++ b/src/OperationGUI/OperationGUI_ChamferDlg.cxx @@ -583,7 +583,7 @@ void OperationGUI_ChamferDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -751,37 +751,37 @@ bool OperationGUI_ChamferDlg::isValid (QString& msg) case 1: if (myRadioButton[ RadioButton21 ]->isChecked()) { - ok = mySpinBox[ SpinBox21 ]->isValid( msg, !IsPreview() ) && ok; - ok = mySpinBox[ SpinBox22 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox21 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox22 ]->isValid( msg, !IsPreview() ) && ok; } else { - ok = mySpinBox[ SpinBox23 ]->isValid( msg, !IsPreview() ) && ok; - ok = mySpinBox[ SpinBox24 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox23 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox24 ]->isValid( msg, !IsPreview() ) && ok; } return !myShape->_is_nil() && myFace[ Face1 ] > 0 && myFace[ Face2 ] > 0 && ok; case 2: if (myRadioButton[ RadioButton31 ]->isChecked()) { - ok = mySpinBox[ SpinBox31 ]->isValid( msg, !IsPreview() ) && ok; - ok = mySpinBox[ SpinBox32 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox31 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox32 ]->isValid( msg, !IsPreview() ) && ok; } else { - ok = mySpinBox[ SpinBox33 ]->isValid( msg, !IsPreview() ) && ok; - ok = mySpinBox[ SpinBox34 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox33 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox34 ]->isValid( msg, !IsPreview() ) && ok; } return !myShape->_is_nil() && myFaces.Extent() > 0 && ok; case 3: if (myRadioButton[ RadioButton41 ]->isChecked()) { - ok = mySpinBox[ SpinBox41 ]->isValid( msg, !IsPreview() ) && ok; - ok = mySpinBox[ SpinBox42 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox41 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox42 ]->isValid( msg, !IsPreview() ) && ok; } else { - ok = mySpinBox[ SpinBox43 ]->isValid( msg, !IsPreview() ) && ok; - ok = mySpinBox[ SpinBox44 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox43 ]->isValid( msg, !IsPreview() ) && ok; + ok = mySpinBox[ SpinBox44 ]->isValid( msg, !IsPreview() ) && ok; } return !myShape->_is_nil() && myEdges.Extent() > 0 && ok; default: return false; @@ -812,26 +812,26 @@ bool OperationGUI_ChamferDlg::execute (ObjectList& objects) else if (anId == 1) { if (flag) { anObj = anOper->MakeChamferEdge(myShape, - mySpinBox[ SpinBox21 ]->value(), - mySpinBox[ SpinBox22 ]->value(), - myFace[ Face1 ], - myFace[ Face2 ]); + mySpinBox[ SpinBox21 ]->value(), + mySpinBox[ SpinBox22 ]->value(), + myFace[ Face1 ], + myFace[ Face2 ]); if (!anObj->_is_nil()) { - aParameters << mySpinBox[ SpinBox21 ]->text(); - aParameters << mySpinBox[ SpinBox22 ]->text(); + aParameters << mySpinBox[ SpinBox21 ]->text(); + aParameters << mySpinBox[ SpinBox22 ]->text(); } } else { anObj = anOper->MakeChamferEdgeAD(myShape, - mySpinBox[ SpinBox23 ]->value(), - mySpinBox[ SpinBox24 ]->value() * PI180, - myFace[ Face1 ], - myFace[ Face2 ]); + mySpinBox[ SpinBox23 ]->value(), + mySpinBox[ SpinBox24 ]->value() * PI180, + myFace[ Face1 ], + myFace[ Face2 ]); if (!anObj->_is_nil()) { - aParameters << mySpinBox[ SpinBox23 ]->text(); - aParameters << mySpinBox[ SpinBox24 ]->text(); + aParameters << mySpinBox[ SpinBox23 ]->text(); + aParameters << mySpinBox[ SpinBox24 ]->text(); } } } @@ -845,24 +845,24 @@ bool OperationGUI_ChamferDlg::execute (ObjectList& objects) if (flag) { anObj = anOper->MakeChamferFaces(myShape, - mySpinBox[ SpinBox31 ]->value(), - mySpinBox[ SpinBox32 ]->value(), - anArray); + mySpinBox[ SpinBox31 ]->value(), + mySpinBox[ SpinBox32 ]->value(), + anArray); if (!anObj->_is_nil()) { - aParameters << mySpinBox[ SpinBox31 ]->text(); - aParameters << mySpinBox[ SpinBox32 ]->text(); + aParameters << mySpinBox[ SpinBox31 ]->text(); + aParameters << mySpinBox[ SpinBox32 ]->text(); } } else { anObj = anOper->MakeChamferFacesAD(myShape, - mySpinBox[ SpinBox33 ]->value(), - mySpinBox[ SpinBox34 ]->value() * PI180, - anArray); + mySpinBox[ SpinBox33 ]->value(), + mySpinBox[ SpinBox34 ]->value() * PI180, + anArray); if (!anObj->_is_nil()) { - aParameters << mySpinBox[ SpinBox33 ]->text(); - aParameters << mySpinBox[ SpinBox34 ]->text(); + aParameters << mySpinBox[ SpinBox33 ]->text(); + aParameters << mySpinBox[ SpinBox34 ]->text(); } } } @@ -873,24 +873,24 @@ bool OperationGUI_ChamferDlg::execute (ObjectList& objects) anArray[ i - 1 ] = myEdges(i); if (flag) { anObj = anOper->MakeChamferEdges(myShape, - mySpinBox[ SpinBox41 ]->value(), - mySpinBox[ SpinBox42 ]->value(), - anArray); + mySpinBox[ SpinBox41 ]->value(), + mySpinBox[ SpinBox42 ]->value(), + anArray); if (!anObj->_is_nil()) { - aParameters << mySpinBox[ SpinBox41 ]->text(); - aParameters << mySpinBox[ SpinBox42 ]->text(); + aParameters << mySpinBox[ SpinBox41 ]->text(); + aParameters << mySpinBox[ SpinBox42 ]->text(); } } else { anObj = anOper->MakeChamferEdgesAD(myShape, - mySpinBox[ SpinBox43 ]->value(), - mySpinBox[ SpinBox44 ]->value() * PI180, - anArray); + mySpinBox[ SpinBox43 ]->value(), + mySpinBox[ SpinBox44 ]->value() * PI180, + anArray); if (!anObj->_is_nil()) { - aParameters << mySpinBox[ SpinBox43 ]->text(); - aParameters << mySpinBox[ SpinBox44 ]->text(); + aParameters << mySpinBox[ SpinBox43 ]->text(); + aParameters << mySpinBox[ SpinBox44 ]->text(); } } } diff --git a/src/OperationGUI/OperationGUI_ChamferDlg.h b/src/OperationGUI/OperationGUI_ChamferDlg.h index dfbe25d92..dcdc019ab 100644 --- a/src/OperationGUI/OperationGUI_ChamferDlg.h +++ b/src/OperationGUI/OperationGUI_ChamferDlg.h @@ -49,9 +49,9 @@ class OperationGUI_ChamferDlg : public GEOMBase_Skeleton enum { MainObj1, MainObj2, Face1, Face2, MainObj3, Faces, MainObj4, Edges}; enum { SpinBox1, - SpinBox21, SpinBox22, SpinBox23, SpinBox24, - SpinBox31, SpinBox32, SpinBox33, SpinBox34, - SpinBox41, SpinBox42, SpinBox43, SpinBox44 }; + SpinBox21, SpinBox22, SpinBox23, SpinBox24, + SpinBox31, SpinBox32, SpinBox33, SpinBox34, + SpinBox41, SpinBox42, SpinBox43, SpinBox44 }; enum { RadioButton21, RadioButton22, RadioButton31, RadioButton32, RadioButton41, RadioButton42 }; @@ -81,9 +81,9 @@ private: void Init(); void enterEvent( QEvent* ); void createSelWg( const QString&, QPixmap&, QWidget*, - QGridLayout*, const int ); + QGridLayout*, const int ); void createRadioWg( const QString&, const QString&, QWidget*, - QGridLayout*, const int, const int, const int ); + QGridLayout*, const int, const int, const int ); void activateSelection(); void enableWidgets(); diff --git a/src/OperationGUI/OperationGUI_ClippingDlg.cxx b/src/OperationGUI/OperationGUI_ClippingDlg.cxx index b24298447..7bdc0d6e4 100644 --- a/src/OperationGUI/OperationGUI_ClippingDlg.cxx +++ b/src/OperationGUI/OperationGUI_ClippingDlg.cxx @@ -160,12 +160,12 @@ void OperationGUI_ClippingDlg::Init() center[2] = ( bounds[4] + bounds[5] ) / 2.0; double width = sqrt( ( bounds[1]-bounds[0] ) * ( bounds[1]-bounds[0] ) + - ( bounds[3]-bounds[2] ) * ( bounds[3]-bounds[2] ) + - ( bounds[5]-bounds[4] ) * ( bounds[5]-bounds[4] ) ); + ( bounds[3]-bounds[2] ) * ( bounds[3]-bounds[2] ) + + ( bounds[5]-bounds[4] ) * ( bounds[5]-bounds[4] ) ); double distance = sqrt( ( position[0]-center[0] ) * ( position[0]-center[0] ) + - ( position[1]-center[1] ) * ( position[1]-center[1] ) + - ( position[2]-center[2] ) * ( position[2]-center[2] ) ); + ( position[1]-center[1] ) * ( position[1]-center[1] ) + + ( position[2]-center[2] ) * ( position[2]-center[2] ) ); vtkFloatingPointType range[2] = { distance - width/2.0, distance + width/2.0 }; @@ -307,12 +307,12 @@ void OperationGUI_ClippingDlg::onReset() center[2] = ( bounds[4] + bounds[5] ) / 2.0; double width = sqrt( ( bounds[1]-bounds[0] ) * ( bounds[1]-bounds[0] ) + - ( bounds[3]-bounds[2] ) * ( bounds[3]-bounds[2] ) + - ( bounds[5]-bounds[4] ) * ( bounds[5]-bounds[4] ) ); + ( bounds[3]-bounds[2] ) * ( bounds[3]-bounds[2] ) + + ( bounds[5]-bounds[4] ) * ( bounds[5]-bounds[4] ) ); double distance = sqrt( ( position[0]-center[0] ) * ( position[0]-center[0] ) + - ( position[1]-center[1] ) * ( position[1]-center[1] ) + - ( position[2]-center[2] ) * ( position[2]-center[2] ) ); + ( position[1]-center[1] ) * ( position[1]-center[1] ) + + ( position[2]-center[2] ) * ( position[2]-center[2] ) ); vtkFloatingPointType range[2] = { distance - width/2.0, distance + width/2.0 }; diff --git a/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx b/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx index 56f9cb31a..c713a5ddd 100644 --- a/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx +++ b/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx @@ -195,36 +195,36 @@ void OperationGUI_Fillet1d2dDlg::SelectionIntoArgument() GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult); if (aResult && !anObj->_is_nil()) { - QString aName = GEOMBase::GetName( anObj ); - TopoDS_Shape aShape; - if ( GEOMBase::GetShape( anObj, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) { - TColStd_IndexedMapOfInteger aMap; - aSelMgr->GetIndexes(aSelList.First(), aMap); - if ( aMap.Extent() == 1 ) { // Local Selection - int anIndex = aMap( 1 ); - aName += QString( myIs1D ? ":wire_%1" : ":face_%1" ).arg( anIndex ); + QString aName = GEOMBase::GetName( anObj ); + TopoDS_Shape aShape; + if ( GEOMBase::GetShape( anObj, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) { + TColStd_IndexedMapOfInteger aMap; + aSelMgr->GetIndexes(aSelList.First(), aMap); + if ( aMap.Extent() == 1 ) { // Local Selection + int anIndex = aMap( 1 ); + aName += QString( myIs1D ? ":wire_%1" : ":face_%1" ).arg( anIndex ); - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( anObj, aName ); - - if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); - anObj = aShapesOp->GetSubShape( anObj, anIndex ); - } - else - anObj = aFindedObject; // get Object from study - } - else { // Global Selection - if ( aShape.ShapeType() != (myIs1D ? TopAbs_WIRE : TopAbs_FACE) ) { - anObj = GEOM::GEOM_Object::_nil(); - aName = ""; - } - } - } - myShape = anObj; - myEditCurrentArgument->setText(aName + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( anObj, aName ); + + if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + anObj = aShapesOp->GetSubShape( anObj, anIndex ); + } + else + anObj = aFindedObject; // get Object from study + } + else { // Global Selection + if ( aShape.ShapeType() != (myIs1D ? TopAbs_WIRE : TopAbs_FACE) ) { + anObj = GEOM::GEOM_Object::_nil(); + aName = ""; + } + } + } + myShape = anObj; + myEditCurrentArgument->setText(aName ); - displayPreview(); + displayPreview(); } } } else if (myEditCurrentArgument == GroupVertexes->LineEdit2) { @@ -250,7 +250,7 @@ void OperationGUI_Fillet1d2dDlg::SelectionIntoArgument() isPreview = true; myEditCurrentArgument->setText(aName); - myVertexes = anIndexes; + myVertexes = anIndexes; } } } diff --git a/src/OperationGUI/OperationGUI_FilletDlg.cxx b/src/OperationGUI/OperationGUI_FilletDlg.cxx index e6986bf03..242a03173 100644 --- a/src/OperationGUI/OperationGUI_FilletDlg.cxx +++ b/src/OperationGUI/OperationGUI_FilletDlg.cxx @@ -495,7 +495,7 @@ void OperationGUI_FilletDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -596,20 +596,20 @@ bool OperationGUI_FilletDlg::isValid (QString& msg) return !myShape->_is_nil() && ok; case 1: if (Group2->RadioButton1->isChecked()) - ok = Group2->SpinBox_DX->isValid( msg, !IsPreview() ); + ok = Group2->SpinBox_DX->isValid( msg, !IsPreview() ); else { - ok = Group2->SpinBox_DY->isValid( msg, !IsPreview() ) && ok; - ok = Group2->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok; + ok = Group2->SpinBox_DY->isValid( msg, !IsPreview() ) && ok; + ok = Group2->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok; } return !myShape->_is_nil() && myEdges.Extent() > 0 && ok; case 2: if (Group3->RadioButton1->isChecked()) - ok = Group3->SpinBox_DX->isValid( msg, !IsPreview() ); + ok = Group3->SpinBox_DX->isValid( msg, !IsPreview() ); else { - ok = Group3->SpinBox_DY->isValid( msg, !IsPreview() ) && ok; - ok = Group3->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok; + ok = Group3->SpinBox_DY->isValid( msg, !IsPreview() ) && ok; + ok = Group3->SpinBox_DZ->isValid( msg, !IsPreview() ) && ok; } return !myShape->_is_nil() && myFaces.Extent() > 0 && ok; default: return false; @@ -645,18 +645,18 @@ bool OperationGUI_FilletDlg::execute (ObjectList& objects) { anObj = anOper->MakeFilletEdges(myShape, getRadius(), aList); if (!anObj->_is_nil()) - aParameters << Group2->SpinBox_DX->text(); + aParameters << Group2->SpinBox_DX->text(); } else { anObj = anOper->MakeFilletEdgesR1R2(myShape, - Group2->SpinBox_DY->value(), - Group2->SpinBox_DZ->value(), - aList); + Group2->SpinBox_DY->value(), + Group2->SpinBox_DZ->value(), + aList); if (!anObj->_is_nil()) { - aParameters << Group2->SpinBox_DY->text(); - aParameters << Group2->SpinBox_DZ->text(); + aParameters << Group2->SpinBox_DY->text(); + aParameters << Group2->SpinBox_DZ->text(); } } } @@ -670,16 +670,16 @@ bool OperationGUI_FilletDlg::execute (ObjectList& objects) if (Group3->RadioButton1->isChecked()) { anObj = anOper->MakeFilletFaces(myShape, getRadius(), aList); if (!anObj->_is_nil()) - aParameters << Group3->SpinBox_DX->text(); + aParameters << Group3->SpinBox_DX->text(); } else { anObj = anOper->MakeFilletFacesR1R2(myShape, - Group3->SpinBox_DY->value(), - Group3->SpinBox_DZ->value(), aList); + Group3->SpinBox_DY->value(), + Group3->SpinBox_DZ->value(), aList); if (!anObj->_is_nil()) { - aParameters << Group3->SpinBox_DY->text(); - aParameters << Group3->SpinBox_DZ->text(); + aParameters << Group3->SpinBox_DY->text(); + aParameters << Group3->SpinBox_DZ->text(); } } } diff --git a/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx index 729e46f58..49958ccdd 100644 --- a/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx +++ b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx @@ -267,7 +267,7 @@ void OperationGUI_GetShapesOnShapeDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); globalSelection(GEOM_ALLSHAPES); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); } //================================================================================= @@ -333,8 +333,8 @@ bool OperationGUI_GetShapesOnShapeDlg::execute (ObjectList& objects) GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow(getOperation()); GEOM::GEOM_Object_var anObj = anOper->GetShapesOnShapeAsCompound(myObject2, myObject1, - (CORBA::Short) aLimit, - aState); + (CORBA::Short) aLimit, + aState); if (!anObj->_is_nil()) objects.push_back(anObj._retn()); diff --git a/src/OperationGUI/OperationGUI_MaterialDlg.cxx b/src/OperationGUI/OperationGUI_MaterialDlg.cxx index 7474b761e..eb5666828 100644 --- a/src/OperationGUI/OperationGUI_MaterialDlg.cxx +++ b/src/OperationGUI/OperationGUI_MaterialDlg.cxx @@ -110,7 +110,7 @@ void OperationGUI_MaterialDlg::Init() QStringList labels; labels << GEOMBase::GetName( anObject ); labels << ( ind < myListMaterials.length() ? - QString::number( myListMaterials[ind] ) : QString( "0" ) ); + QString::number( myListMaterials[ind] ) : QString( "0" ) ); GroupPoints->ListView1->addTopLevelItem( new QTreeWidgetItem( labels ) ); } } @@ -124,7 +124,7 @@ void OperationGUI_MaterialDlg::Init() connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetMaterial() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); } @@ -197,7 +197,7 @@ void OperationGUI_MaterialDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); return; } diff --git a/src/OperationGUI/OperationGUI_MaterialDlg.h b/src/OperationGUI/OperationGUI_MaterialDlg.h index a4ed8d65e..a35d3e955 100644 --- a/src/OperationGUI/OperationGUI_MaterialDlg.h +++ b/src/OperationGUI/OperationGUI_MaterialDlg.h @@ -40,7 +40,7 @@ class OperationGUI_MaterialDlg : public GEOMBase_Skeleton public: OperationGUI_MaterialDlg( GeometryGUI*, QWidget*, GEOM::ListOfGO, - bool = false ); + bool = false ); ~OperationGUI_MaterialDlg(); private: diff --git a/src/OperationGUI/OperationGUI_PartitionDlg.cxx b/src/OperationGUI/OperationGUI_PartitionDlg.cxx index f79ede15e..7c606ad0a 100644 --- a/src/OperationGUI/OperationGUI_PartitionDlg.cxx +++ b/src/OperationGUI/OperationGUI_PartitionDlg.cxx @@ -142,7 +142,7 @@ void OperationGUI_PartitionDlg::Init() connect( GroupPoints->ComboBox1, SIGNAL( activated( int ) ), this, SLOT( ComboTextChanged() ) ); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_PARTITION" ) ); @@ -200,7 +200,7 @@ void OperationGUI_PartitionDlg::ConstructorsClicked( int constructorId ) myEditCurrentArgument->setFocus(); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); } @@ -335,7 +335,7 @@ void OperationGUI_PartitionDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -369,7 +369,7 @@ GEOM::GEOM_IOperations_ptr OperationGUI_PartitionDlg::createOperation() bool OperationGUI_PartitionDlg::isValid( QString& ) { return ( myListShapes.length() || myListTools.length() || - myListKeepInside.length() || myListRemoveInside.length() ); + myListKeepInside.length() || myListRemoveInside.length() ); } @@ -403,8 +403,8 @@ bool OperationGUI_PartitionDlg::execute( ObjectList& objects ) if ( isValid( msg ) ) { GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow(getOperation()); anObj = anOper->MakePartition( myListShapes, myListTools, - myListKeepInside, myListRemoveInside, - aLimit, false, myListMaterials, aKeepNonlimitShapes ); + myListKeepInside, myListRemoveInside, + aLimit, false, myListMaterials, aKeepNonlimitShapes ); res = true; } @@ -437,8 +437,8 @@ void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { // empty list of arguments means that all arguments should be restored getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), - /*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory, - /*theInheritFirstArg=*/myListShapes.length() == 1 ); // ? false + /*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory, + /*theInheritFirstArg=*/myListShapes.length() == 1 ); // ? false } } diff --git a/src/PARTITION/Partition_Inter3d.cxx b/src/PARTITION/Partition_Inter3d.cxx index 87de80135..56bb3bd72 100644 --- a/src/PARTITION/Partition_Inter3d.cxx +++ b/src/PARTITION/Partition_Inter3d.cxx @@ -109,7 +109,7 @@ Partition_Inter3d::Partition_Inter3d(const Handle(BRepAlgo_AsDes)& AsDes) //======================================================================= void Partition_Inter3d::CompletPart3d(const TopTools_ListOfShape& SetOfFaces1, - const TopTools_DataMapOfShapeShape& FaceShapeMap) + const TopTools_DataMapOfShapeShape& FaceShapeMap) { if (myAsDes.IsNull()) myAsDes = new BRepAlgo_AsDes; @@ -144,17 +144,17 @@ void Partition_Inter3d::CompletPart3d(const TopTools_ListOfShape& SetOfFaces1, for (; itLI.More(); itLI.Next()) { TopoDS_Face F2 = TopoDS::Face(BOS.TouchedShape(itLI)); if (F1.IsSame(F2) || IsDone(F1,F2)) - continue; + continue; TopoDS_Shape S2; if (FaceShapeMap.IsBound(F2)) S2 = FaceShapeMap.Find(F2); if (!S1.IsNull() && S1.IsSame(S2)) - continue; // descendants of one shape + continue; // descendants of one shape TopExp_Explorer expE (F2, TopAbs_EDGE); for ( ; expE.More(); expE.Next()) - if (EM.Contains( expE.Current() )) - break; + if (EM.Contains( expE.Current() )) + break; if (expE.More()) { // faces have a common edge, check if they are a tool and a face @@ -169,7 +169,7 @@ void Partition_Inter3d::CompletPart3d(const TopTools_ListOfShape& SetOfFaces1, F1.Orientation(TopAbs_FORWARD); F2.Orientation(TopAbs_FORWARD); - FacesPartition(F1,F2); + FacesPartition(F1,F2); } // mark as modified a face which has at least one new edge @@ -178,8 +178,8 @@ void Partition_Inter3d::CompletPart3d(const TopTools_ListOfShape& SetOfFaces1, TopTools_ListIteratorOfListOfShape itE (myAsDes->Descendant( F1 )); for ( ; itE.More(); itE.Next()) { if (myNewEdges.Contains( itE.Value())) { - myTouched.Add( F1 ); - break; + myTouched.Add( F1 ); + break; } } } @@ -191,8 +191,8 @@ void Partition_Inter3d::CompletPart3d(const TopTools_ListOfShape& SetOfFaces1, //======================================================================= static void PutInBounds (const TopoDS_Face& F, - const TopoDS_Edge& E, - Handle(Geom2d_Curve)& C2d) + const TopoDS_Edge& E, + Handle(Geom2d_Curve)& C2d) { Standard_Real umin,umax,vmin,vmax; Standard_Real f,l; @@ -279,8 +279,8 @@ static void PutInBounds (const TopoDS_Face& F, Standard_Real d2 = umin - minC + period; if (d2 < d1) du =-period; if ( du != 0.) { - gp_Vec2d T2(du,0.); - C2d->Translate(T2); + gp_Vec2d T2(du,0.); + C2d->Translate(T2); } } } @@ -310,8 +310,8 @@ static void PutInBounds (const TopoDS_Face& F, Standard_Real d2 = vmin - minC + period; if (d2 < d1) dv =-period; if ( dv != 0.) { - gp_Vec2d T2(0.,dv); - C2d->Translate(T2); + gp_Vec2d T2(0.,dv); + C2d->Translate(T2); } } } @@ -323,8 +323,8 @@ static void PutInBounds (const TopoDS_Face& F, //======================================================================= void Partition_Inter3d::Inter3D(const TopoDS_Face& F1, - const TopoDS_Face& F2, - TopTools_ListOfShape& L) + const TopoDS_Face& F2, + TopTools_ListOfShape& L) { BRep_Builder B; @@ -371,8 +371,8 @@ void Partition_Inter3d::Inter3D(const TopoDS_Face& F1, itLE.Next(); if (itLE.More()) { - pc1 = Handle(Geom2d_Curve)::DownCast(pc1->Copy()); - pc2 = Handle(Geom2d_Curve)::DownCast(pc2->Copy()); + pc1 = Handle(Geom2d_Curve)::DownCast(pc1->Copy()); + pc2 = Handle(Geom2d_Curve)::DownCast(pc2->Copy()); } } } @@ -430,35 +430,35 @@ void Partition_Inter3d::Inter3D(const TopoDS_Face& F1, oe = TopoDS::Edge( DS.Shape( itP.Support())); if (itP.IsVertex()) { // there is a vertex at intersection - if ( !MIV.Add( itP.Current() )) - continue; - V = TopoDS::Vertex( DS.Shape( itP.Current())); - if ( !sde.IsNull() && (V.IsSame(sdeV1) || V.IsSame(sdeV2)) ) - oe = sde; - V = ReplaceSameDomainV( V , oe ); - V.Orientation( TopAbs_INTERNAL); - B.UpdateVertex( V, itP.Parameter(), se, 0.); // AddVonE() sets real U + if ( !MIV.Add( itP.Current() )) + continue; + V = TopoDS::Vertex( DS.Shape( itP.Current())); + if ( !sde.IsNull() && (V.IsSame(sdeV1) || V.IsSame(sdeV2)) ) + oe = sde; + V = ReplaceSameDomainV( V , oe ); + V.Orientation( TopAbs_INTERNAL); + B.UpdateVertex( V, itP.Parameter(), se, 0.); // AddVonE() sets real U } else { // create a new vertex at the intersection point - const TopOpeBRepDS_Point& DSP = DS.Point( itP.Current()); - V = BRepLib_MakeVertex( DSP.Point() ); - V.Orientation( TopAbs_INTERNAL); - B.UpdateVertex( V, itP.Parameter(), se, DSP.Tolerance()); - // make V be on the other edge - TopOpeBRepDS_PointIterator itOP (DS.ShapeInterferences( oe )); - for (; itOP.More(); itOP.Next()) { - const TopOpeBRepDS_Point& ODSP = DS.Point( itOP.Current()); - if ( DSP.IsEqual (ODSP)) { - B.UpdateVertex( V, itOP.Parameter(), TopoDS::Edge(oe), ODSP.Tolerance()); - break; - } - } + const TopOpeBRepDS_Point& DSP = DS.Point( itP.Current()); + V = BRepLib_MakeVertex( DSP.Point() ); + V.Orientation( TopAbs_INTERNAL); + B.UpdateVertex( V, itP.Parameter(), se, DSP.Tolerance()); + // make V be on the other edge + TopOpeBRepDS_PointIterator itOP (DS.ShapeInterferences( oe )); + for (; itOP.More(); itOP.Next()) { + const TopOpeBRepDS_Point& ODSP = DS.Point( itOP.Current()); + if ( DSP.IsEqual (ODSP)) { + B.UpdateVertex( V, itOP.Parameter(), TopoDS::Edge(oe), ODSP.Tolerance()); + break; + } + } } // add V on the both intersecting edges TopoDS_Vertex addedV = Partition_Inter2d::AddVonE( V,se,oe,myAsDes,dummyF); if (!addedV.IsSame( V )) - mySameDomainVM.Bind (V, addedV); // equal vertex is already there + mySameDomainVM.Bind (V, addedV); // equal vertex is already there MV.Add( addedV ); // to ease storage of vertices of ON splits } @@ -497,8 +497,8 @@ void Partition_Inter3d::Inter3D(const TopoDS_Face& F1, TopTools_ListIteratorOfListOfShape itE( myAsDes->Descendant( F )); if (myAsDes->HasDescendant( F )) { for ( ; itE.More(); itE.Next()) - if (se.IsSame( itE.Value() )) - break; + if (se.IsSame( itE.Value() )) + break; } if (!itE.More()) { @@ -508,21 +508,21 @@ void Partition_Inter3d::Inter3D(const TopoDS_Face& F1, Standard_Real tol, f,l, umin=1e100, umax=-1e100; Handle(Geom2d_Curve) pc = BRep_Tool::CurveOnSurface( se, F, f,l); if (pc.IsNull()) { - itSP.Initialize( TopB.Splits(se,TopAbs_ON) ); - for ( ; itSP.More(); itSP.Next()) { - const TopoDS_Edge& E = TopoDS::Edge ( itSP.Value()); - BRep_Tool::Range(E, f, l); - umin = Min( umin, f); - umax = Max( umax, l); - } - Handle(Geom_Curve) C3d = BRep_Tool::Curve( se, f, l); - if (umin < umax) // sometimes umin == umax for closed edge - C3d = new Geom_TrimmedCurve( C3d, umin, umax); - pc = TopOpeBRepTool_CurveTool::MakePCurveOnFace (F,C3d,tol); - if (pc.IsNull()) { - MESSAGE (" CANT BUILD PCURVE "); - } - B.UpdateEdge( se, pc, F, tol); + itSP.Initialize( TopB.Splits(se,TopAbs_ON) ); + for ( ; itSP.More(); itSP.Next()) { + const TopoDS_Edge& E = TopoDS::Edge ( itSP.Value()); + BRep_Tool::Range(E, f, l); + umin = Min( umin, f); + umax = Max( umax, l); + } + Handle(Geom_Curve) C3d = BRep_Tool::Curve( se, f, l); + if (umin < umax) // sometimes umin == umax for closed edge + C3d = new Geom_TrimmedCurve( C3d, umin, umax); + pc = TopOpeBRepTool_CurveTool::MakePCurveOnFace (F,C3d,tol); + if (pc.IsNull()) { + MESSAGE (" CANT BUILD PCURVE "); + } + B.UpdateEdge( se, pc, F, tol); } } @@ -532,7 +532,7 @@ void Partition_Inter3d::Inter3D(const TopoDS_Face& F1, for ( ; itSP.More(); itSP.Next()) { const TopoDS_Shape& SP = itSP.Value(); if (!SPM.Add( SP )) - SPM.Remove( SP ); + SPM.Remove( SP ); } } @@ -551,7 +551,7 @@ void Partition_Inter3d::Inter3D(const TopoDS_Face& F1, for ( ; itSP.More(); itSP.Next()) { if (!SPM.Contains( itSP.Value() )) - continue; + continue; const TopoDS_Edge& S = TopoDS::Edge ( itSP.Value()); @@ -562,30 +562,30 @@ void Partition_Inter3d::Inter3D(const TopoDS_Face& F1, TopExp::Vertices (S, VS[0], VS[1]); for (j=0; j<2; ++j) { - if (mySameDomainVM.IsBound( VS[j] )) - VS[j] = TopoDS::Vertex( mySameDomainVM( VS[j] )); - if ( !MV.Contains( VS[j] )) { - // find equal vertex on se - point interference - gp_Pnt P1 = BRep_Tool::Pnt( VS[j] ); - TopTools_ListIteratorOfListOfShape itV( myAsDes->Descendant(se) ); - for (; itV.More(); itV.Next()) { - V = TopoDS::Vertex( itV.Value() ); + if (mySameDomainVM.IsBound( VS[j] )) + VS[j] = TopoDS::Vertex( mySameDomainVM( VS[j] )); + if ( !MV.Contains( VS[j] )) { + // find equal vertex on se - point interference + gp_Pnt P1 = BRep_Tool::Pnt( VS[j] ); + TopTools_ListIteratorOfListOfShape itV( myAsDes->Descendant(se) ); + for (; itV.More(); itV.Next()) { + V = TopoDS::Vertex( itV.Value() ); if ( V.IsSame( VS[j] )) break; - gp_Pnt P2 = BRep_Tool::Pnt( V ); - if (P1.IsEqual( P2, Precision::Confusion())) { - mySameDomainVM.Bind (VS[j], V); - VS[j] = V; - break; - } - } - if (!itV.More()) // no interferences with edges - myAsDes->Add( se, VS[j]); - } + gp_Pnt P2 = BRep_Tool::Pnt( V ); + if (P1.IsEqual( P2, Precision::Confusion())) { + mySameDomainVM.Bind (VS[j], V); + VS[j] = V; + break; + } + } + if (!itV.More()) // no interferences with edges + myAsDes->Add( se, VS[j]); + } // add ends of ON splits to F in order to detect later // if a split is on face in IsSplitOn() - mySectionEdgesAD->Add( F, VS[j]); + mySectionEdgesAD->Add( F, VS[j]); } // in the descendants of F, first go ends of an ON split and // then a split itself @@ -604,7 +604,7 @@ void Partition_Inter3d::Inter3D(const TopoDS_Face& F1, //======================================================================= void Partition_Inter3d::FacesPartition(const TopoDS_Face& F1, - const TopoDS_Face& F2) + const TopoDS_Face& F2) //(const TopTools_DataMapOfShapeListOfShape& /*SetOfFaces2*/) { TopTools_ListOfShape LInt; @@ -620,7 +620,7 @@ void Partition_Inter3d::FacesPartition(const TopoDS_Face& F1, //======================================================================= void Partition_Inter3d::SetDone(const TopoDS_Face& F1, - const TopoDS_Face& F2) + const TopoDS_Face& F2) { if (!myDone.IsBound(F1)) { TopTools_ListOfShape emptyList; @@ -640,7 +640,7 @@ void Partition_Inter3d::SetDone(const TopoDS_Face& F1, //======================================================================= Standard_Boolean Partition_Inter3d::IsDone(const TopoDS_Face& F1, - const TopoDS_Face& F2) + const TopoDS_Face& F2) const { @@ -659,8 +659,8 @@ Standard_Boolean Partition_Inter3d::IsDone(const TopoDS_Face& F1, //======================================================================= void Partition_Inter3d::StorePart3d(const TopoDS_Face& F1, - const TopoDS_Face& F2, - const TopTools_ListOfShape& LInt) + const TopoDS_Face& F2, + const TopTools_ListOfShape& LInt) { if (!LInt.IsEmpty()) { myAsDes->Add( F1,LInt); @@ -771,13 +771,13 @@ Standard_Boolean Partition_Inter3d::HasSameDomainF(const TopoDS_Shape& F) const //======================================================================= Standard_Boolean Partition_Inter3d::IsSameDomainF(const TopoDS_Shape& F1, - const TopoDS_Shape& F2) const + const TopoDS_Shape& F2) const { if (mySameDomainFM.IsBound( F1 )) { TopTools_ListIteratorOfListOfShape it (mySameDomainFM( F1 )); for (; it.More(); it.Next()) if (F2.IsSame( it.Value())) - return Standard_True; + return Standard_True; } return F1.IsSame( F2 ); } @@ -789,7 +789,7 @@ Standard_Boolean Partition_Inter3d::IsSameDomainF(const TopoDS_Shape& F1, //======================================================================= TopoDS_Vertex Partition_Inter3d::ReplaceSameDomainV(const TopoDS_Vertex& V, - const TopoDS_Edge& E) const + const TopoDS_Edge& E) const { TopoDS_Vertex SDV = V; if (mySameDomainVM.IsBound( V )) { @@ -859,8 +859,8 @@ Standard_Boolean Standard_Boolean Partition_Inter3d::IsSplitOn(const TopoDS_Edge& NewE, - const TopoDS_Edge& OldE, - const TopoDS_Face& F) const + const TopoDS_Edge& OldE, + const TopoDS_Face& F) const { if (! mySectionEdgesAD->HasDescendant(F)) return Standard_False; @@ -868,7 +868,7 @@ Standard_Boolean TopTools_ListIteratorOfListOfShape itE ( mySectionEdgesAD->Descendant(F) ); for ( ; itE.More(); itE.Next()) { if ( itE.Value().ShapeType() != TopAbs_EDGE || - ! OldE.IsSame ( itE.Value() )) + ! OldE.IsSame ( itE.Value() )) continue; // an edge encountered, its vertices and a split come next itE.Next(); @@ -884,7 +884,7 @@ Standard_Boolean TopExp::Vertices( OldE, V1, V2); if ( V1.IsSame(V2) && - (V1.IsSame(V3) || V1.IsSame(V4)) ) { + (V1.IsSame(V3) || V1.IsSame(V4)) ) { // closed old edge; use the split for the test itE.Next(); if (!itE.More()) break; @@ -893,21 +893,21 @@ Standard_Boolean Standard_Real f1,l1, f2,l2; Handle(Geom2d_Curve) PC1 = BRep_Tool::CurveOnSurface( split, F ,f1,l1); if (!PC1.IsNull()) { - Handle(Geom2d_Curve) PC2 = BRep_Tool::CurveOnSurface(NewE, F ,f2,l2); - gp_Pnt2d P = PC2->Value( 0.5*(f2+l2) ); - Geom2dAPI_ProjectPointOnCurve proj (P, PC1, f1, l1); - if (proj.NbPoints() && - proj.LowerDistance() <= Precision::Confusion()) - return Standard_True; + Handle(Geom2d_Curve) PC2 = BRep_Tool::CurveOnSurface(NewE, F ,f2,l2); + gp_Pnt2d P = PC2->Value( 0.5*(f2+l2) ); + Geom2dAPI_ProjectPointOnCurve proj (P, PC1, f1, l1); + if (proj.NbPoints() && + proj.LowerDistance() <= Precision::Confusion()) + return Standard_True; } else { Handle(Geom_Curve) C1 = BRep_Tool::Curve( split ,f1,l1); - Handle(Geom_Curve) C2 = BRep_Tool::Curve( NewE ,f2,l2); - gp_Pnt P = C2->Value( 0.5*(f2+l2) ); - GeomAPI_ProjectPointOnCurve proj (P, C1, f1, l1); - if (proj.NbPoints() && - proj.LowerDistance() <= Precision::Confusion()) - return Standard_True; + Handle(Geom_Curve) C2 = BRep_Tool::Curve( NewE ,f2,l2); + gp_Pnt P = C2->Value( 0.5*(f2+l2) ); + GeomAPI_ProjectPointOnCurve proj (P, C1, f1, l1); + if (proj.NbPoints() && + proj.LowerDistance() <= Precision::Confusion()) + return Standard_True; } } else { diff --git a/src/PARTITION/Partition_Loop.cxx b/src/PARTITION/Partition_Loop.cxx index 807bc74af..a14b233ba 100644 --- a/src/PARTITION/Partition_Loop.cxx +++ b/src/PARTITION/Partition_Loop.cxx @@ -101,7 +101,7 @@ void Partition_Loop::AddConstEdge (const TopoDS_Edge& E) //purpose : //======================================================================= static Standard_Real FindDelta(TopTools_ListOfShape& LE, - const TopoDS_Face& F) + const TopoDS_Face& F) { Standard_Real dist, f, l; Standard_Real d = Precision::Infinite(); @@ -123,13 +123,13 @@ static Standard_Real FindDelta(TopTools_ListOfShape& LE, //function : SelectEdge //purpose : Find the edge connected by the vertex in the list . // Is erased of the list. If is too in the list -// with the same orientation, it's erased of the list +// with the same orientation, it's erased of the list //======================================================================= static Standard_Boolean SelectEdge(const TopoDS_Face& F, - const TopoDS_Edge& CE, - const TopoDS_Vertex& CV, - TopoDS_Edge& NE, - TopTools_ListOfShape& LE) + const TopoDS_Edge& CE, + const TopoDS_Vertex& CV, + TopoDS_Edge& NE, + TopTools_ListOfShape& LE) { TopTools_ListIteratorOfListOfShape itl; NE.Nullify(); @@ -149,7 +149,7 @@ static Standard_Boolean SelectEdge(const TopoDS_Face& F, TopoDS_Face FForward = F; Handle(Geom2d_Curve) Cc, C; FForward.Orientation(TopAbs_FORWARD); - + Cc = BRep_Tool::CurveOnSurface(CE,FForward,cf,cl); Standard_Real dist,distmin = 100*BRep_Tool::Tolerance(CV); Standard_Real uc,u; @@ -163,63 +163,63 @@ static Standard_Boolean SelectEdge(const TopoDS_Face& F, for ( itl.Initialize(LE); itl.More(); itl.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); if (!E.IsSame(CE)) { - C = BRep_Tool::CurveOnSurface(E,FForward,f,l); - if (E.Orientation () == TopAbs_FORWARD) u = f; - else u = l; - P2 = C->Value(u); - dist = PV.Distance(P2); - if (dist <= distmin){ - distmin = dist; - } - + C = BRep_Tool::CurveOnSurface(E,FForward,f,l); + if (E.Orientation () == TopAbs_FORWARD) u = f; + else u = l; + P2 = C->Value(u); + dist = PV.Distance(P2); + if (dist <= distmin){ + distmin = dist; + } + } } Standard_Real anglemax = - PI; - TopoDS_Edge SelectedEdge; + TopoDS_Edge SelectedEdge; for ( itl.Initialize(LE); itl.More(); itl.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); if (!E.IsSame(CE)) { - C = BRep_Tool::CurveOnSurface(E,FForward,f,l); - if (E.Orientation () == TopAbs_FORWARD) u = f; - else u = l; - P2 = C->Value(u); - dist = PV.Distance(P2); - if (dist <= distmin + (1./3)*delta){ - gp_Pnt2d PC, P; - gp_Vec2d CTg1, CTg2, Tg1, Tg2; - Cc->D2(uc, PC, CTg1, CTg2); - C->D2(u, P, Tg1, Tg2); - - Standard_Real angle; - - if (CE.Orientation () == TopAbs_REVERSED && E.Orientation () == TopAbs_FORWARD) { - angle = CTg1.Angle(Tg1.Reversed()); - } - else if (CE.Orientation () == TopAbs_FORWARD && E.Orientation () == TopAbs_REVERSED) { - angle = (CTg1.Reversed()).Angle(Tg1); - } - else if (CE.Orientation () == TopAbs_REVERSED && E.Orientation () == TopAbs_REVERSED) { - angle = CTg1.Angle(Tg1); - } - else if (CE.Orientation () == TopAbs_FORWARD && E.Orientation () == TopAbs_FORWARD) { - angle = (CTg1.Reversed()).Angle(Tg1.Reversed()); - } - if (angle >= anglemax) { - anglemax = angle ; - SelectedEdge = E; - } - } + C = BRep_Tool::CurveOnSurface(E,FForward,f,l); + if (E.Orientation () == TopAbs_FORWARD) u = f; + else u = l; + P2 = C->Value(u); + dist = PV.Distance(P2); + if (dist <= distmin + (1./3)*delta){ + gp_Pnt2d PC, P; + gp_Vec2d CTg1, CTg2, Tg1, Tg2; + Cc->D2(uc, PC, CTg1, CTg2); + C->D2(u, P, Tg1, Tg2); + + Standard_Real angle; + + if (CE.Orientation () == TopAbs_REVERSED && E.Orientation () == TopAbs_FORWARD) { + angle = CTg1.Angle(Tg1.Reversed()); + } + else if (CE.Orientation () == TopAbs_FORWARD && E.Orientation () == TopAbs_REVERSED) { + angle = (CTg1.Reversed()).Angle(Tg1); + } + else if (CE.Orientation () == TopAbs_REVERSED && E.Orientation () == TopAbs_REVERSED) { + angle = CTg1.Angle(Tg1); + } + else if (CE.Orientation () == TopAbs_FORWARD && E.Orientation () == TopAbs_FORWARD) { + angle = (CTg1.Reversed()).Angle(Tg1.Reversed()); + } + if (angle >= anglemax) { + anglemax = angle ; + SelectedEdge = E; + } + } } } for ( itl.Initialize(LE); itl.More(); itl.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); if (E.IsEqual(SelectedEdge)) { - NE = TopoDS::Edge(E); - LE.Remove(itl); - break; + NE = TopoDS::Edge(E); + LE.Remove(itl); + break; } - } + } } else if (LE.Extent() == 1) { NE = TopoDS::Edge(LE.First()); @@ -236,9 +236,9 @@ static Standard_Boolean SelectEdge(const TopoDS_Face& F, //purpose : //======================================================================= static Standard_Boolean SamePnt2d(TopoDS_Vertex V, - TopoDS_Edge& E1, - TopoDS_Edge& E2, - TopoDS_Face& F) + TopoDS_Edge& E1, + TopoDS_Edge& E2, + TopoDS_Face& F) { Standard_Real f1,f2,l1,l2; gp_Pnt2d P1,P2; @@ -261,7 +261,7 @@ static Standard_Boolean SamePnt2d(TopoDS_Vertex V, //purpose : //======================================================================= static void PurgeNewEdges(TopTools_ListOfShape& ConstEdges, - const TopTools_MapOfOrientedShape& UsedEdges) + const TopTools_MapOfOrientedShape& UsedEdges) { TopTools_ListIteratorOfListOfShape it(ConstEdges); while ( it.More()) { @@ -280,8 +280,8 @@ static void PurgeNewEdges(TopTools_ListOfShape& ConstEdges, //purpose : //======================================================================= static void StoreInMVE (const TopoDS_Face& F, - TopoDS_Edge& E, - TopTools_DataMapOfShapeListOfShape& MVE ) + TopoDS_Edge& E, + TopTools_DataMapOfShapeListOfShape& MVE ) { TopoDS_Vertex V1, V2; @@ -292,7 +292,7 @@ static void StoreInMVE (const TopoDS_Face& F, MVE.Bind(V1,Empty); } MVE(V1).Append(E); - + if (!MVE.IsBound(V2)) { MVE.Bind(V2,Empty); } @@ -351,8 +351,8 @@ void Partition_Loop::Perform() if (!MVE.IsBound(CV)) continue; for ( itl.Initialize(MVE(CV)); itl.More(); itl.Next()) { if (itl.Value().IsEqual(CE)) { - MVE(CV).Remove(itl); - break; + MVE(CV).Remove(itl); + break; } } @@ -368,39 +368,39 @@ void Partition_Loop::Perform() //-------------- // stop test - //-------------- + //-------------- if (!MVE.IsBound(CV) || MVE(CV).IsEmpty() || CV.IsSame(VF) ) { - if (CV.IsSame(VF)) { - if (MVE(CV).Extent() == 1 ) MVE.UnBind(CV); - else { - for ( itl.Initialize(MVE(CV)); itl.More(); itl.Next()) { - if (itl.Value().IsEqual(CE)) { - MVE(CV).Remove(itl); - break; - } - } - } - } - End=Standard_True; + if (CV.IsSame(VF)) { + if (MVE(CV).Extent() == 1 ) MVE.UnBind(CV); + else { + for ( itl.Initialize(MVE(CV)); itl.More(); itl.Next()) { + if (itl.Value().IsEqual(CE)) { + MVE(CV).Remove(itl); + break; + } + } + } + } + End=Standard_True; } //-------------- // select edge //-------------- else { - Standard_Boolean find = SelectEdge(myFace,CE,CV,NE,MVE(CV)); - if (find) { - CE=NE; - if (MVE(CV).IsEmpty()) MVE.UnBind(CV); - if (CE.IsNull() ) { - MESSAGE ( " CE is NULL !!! " ) - End=Standard_True; - } - } - else { - MESSAGE ( " edge doesn't exist " ) - End=Standard_True; - } + Standard_Boolean find = SelectEdge(myFace,CE,CV,NE,MVE(CV)); + if (find) { + CE=NE; + if (MVE(CV).IsEmpty()) MVE.UnBind(CV); + if (CE.IsNull() ) { + MESSAGE ( " CE is NULL !!! " ) + End=Standard_True; + } + } + else { + MESSAGE ( " edge doesn't exist " ) + End=Standard_True; + } } } @@ -412,7 +412,7 @@ void Partition_Loop::Perform() else{ MESSAGE ( "wire not closed" ) } - myNewWires.Append (NW); + myNewWires.Append (NW); } PurgeNewEdges(myConstEdges,UsedEdges); @@ -460,7 +460,7 @@ void Partition_Loop::WiresToFaces() if (FR.IsDone()) { for (; FR.More(); FR.Next()) { - myNewFaces.Append(FR.Current().Oriented(OriF)); + myNewFaces.Append(FR.Current().Oriented(OriF)); } } } diff --git a/src/PARTITION/Partition_Loop3d.cxx b/src/PARTITION/Partition_Loop3d.cxx index ccca4a36b..798cc2d7b 100644 --- a/src/PARTITION/Partition_Loop3d.cxx +++ b/src/PARTITION/Partition_Loop3d.cxx @@ -101,7 +101,7 @@ const TopTools_ListOfShape& { const TopoDS_Shape& FF = itF.Value(); if (AvoidFacesMap.Contains( FF ) || - ! AddedFacesMap.Add( FF ) ) + ! AddedFacesMap.Add( FF ) ) continue; // make a new shell @@ -135,14 +135,14 @@ const TopTools_ListOfShape& for (; EdgeExp.More(); EdgeExp.Next()) { const TopoDS_Edge& E = TopoDS::Edge( EdgeExp.Current()); - if (! CheckedEdgesMap.Add( E )) - continue; + if (! CheckedEdgesMap.Add( E )) + continue; - // candidate faces list + // candidate faces list const TopTools_ListOfShape& FL = myEFMap.ChangeFromKey(E); if (FL.IsEmpty()) continue; - // select one of neighbors + // select one of neighbors TopoDS_Face SelF; if (FL.Extent() == 2) { if (! F.IsSame( FL.First() )) @@ -152,7 +152,7 @@ const TopTools_ListOfShape& } else { // check if a face already added to Shell shares E - TopTools_ListIteratorOfListOfShape it (FL); + TopTools_ListIteratorOfListOfShape it (FL); Standard_Boolean found = Standard_False; for (; !found && it.More(); it.Next()) if (F != it.Value()) @@ -190,8 +190,8 @@ const TopTools_ListOfShape& } } if (!SelF.IsNull() && - AddedFacesMap.Add( SelF ) && - !AvoidFacesMap.Contains( SelF )) + AddedFacesMap.Add( SelF ) && + !AvoidFacesMap.Contains( SelF )) Builder.Add( Shell, SelF); } // loop on edges of F @@ -219,7 +219,7 @@ const TopTools_ListOfShape& //======================================================================= gp_Vec Partition_Loop3d::Normal(const TopoDS_Edge& E, - const TopoDS_Face& F) + const TopoDS_Face& F) { gp_Vec Norm, V1, V2; Standard_Real First, Last; @@ -245,7 +245,7 @@ gp_Vec Partition_Loop3d::Normal(const TopoDS_Edge& E, //======================================================================= static gp_Vec NextNormal(const TopoDS_Edge& E, - const TopoDS_Face& F) + const TopoDS_Face& F) { Standard_Real First, Last; @@ -284,7 +284,7 @@ static gp_Vec NextNormal(const TopoDS_Edge& E, //======================================================================= static TopoDS_Edge FindEinF(const TopoDS_Edge& E, - const TopoDS_Face& F) + const TopoDS_Face& F) { TopExp_Explorer expl (F, TopAbs_EDGE); for (; expl.More(); expl.Next()) @@ -303,11 +303,11 @@ static TopoDS_Edge FindEinF(const TopoDS_Edge& E, //======================================================================= Standard_Boolean Partition_Loop3d::IsInside(const TopoDS_Edge& E, - const TopoDS_Face& F1, - const TopoDS_Face& F2, - const Standard_Boolean CountDot, - Standard_Real& Dot, - Standard_Boolean& GoodOri) + const TopoDS_Face& F1, + const TopoDS_Face& F2, + const Standard_Boolean CountDot, + Standard_Real& Dot, + Standard_Boolean& GoodOri) { Standard_Real f, l; gp_Pnt P; diff --git a/src/PARTITION/Partition_Spliter.cxx b/src/PARTITION/Partition_Spliter.cxx index b9f437e42..7dcb3d85a 100644 --- a/src/PARTITION/Partition_Spliter.cxx +++ b/src/PARTITION/Partition_Spliter.cxx @@ -370,8 +370,8 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) if (isTool1 || isTool2) { TopExp::Vertices(EE,V1,V2); - Standard_Real Tol = Max (BRep_Tool::Tolerance( V1 ), - BRep_Tool::Tolerance( V2 )); + Standard_Real Tol = Max (BRep_Tool::Tolerance( V1 ), + BRep_Tool::Tolerance( V2 )); gp_Pnt P1 = BRep_Tool::Pnt(V1); gp_Pnt P2 = BRep_Tool::Pnt(V2); @@ -408,7 +408,7 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) TopTools_ListOfShape LNE; MakeEdges (EE,aListV, LNE); myImagesEdges.Bind(EE,LNE); - LSE.Append( LNE ); + LSE.Append( LNE ); } } @@ -424,7 +424,7 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) const TopTools_ListOfShape& aListVV = myAsDes->Descendant(EE); MakeEdges (EE, aListVV, LNE); myImagesEdges.Bind(EE,LNE); - LSE.Append( LNE ); + LSE.Append( LNE ); } } #ifdef PART_PERF @@ -454,9 +454,9 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) if (myMapTools.Contains( itl.Value() )) continue; // skip tool faces for ( exp.Init( itl.Value(), TopAbs_EDGE ); exp.More(); exp.Next()) { - itNE.Initialize( myImagesEdges.Image( exp.Current() )); - for ( ; itNE.More(); itNE.Next()) - myBuilder.Add ( myShape, itNE.Value() ); + itNE.Initialize( myImagesEdges.Image( exp.Current() )); + for ( ; itNE.More(); itNE.Next()) + myBuilder.Add ( myShape, itNE.Value() ); } } // add splits of new edges @@ -496,10 +496,10 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) Limit == TopAbs_FACE) { for (itl.Initialize(myListShapes);itl.More();itl.Next()) { if ( myMapTools.Contains( itl.Value() )) - continue; // no result needed for a tool face + continue; // no result needed for a tool face const TopoDS_Shape& FacesComp = myImageShape.Image( itl.Value() ).First(); for ( exp.Init( FacesComp, Limit); exp.More(); exp.Next()) - myBuilder.Add ( myShape, exp.Current()); + myBuilder.Add ( myShape, exp.Current()); } return; } @@ -510,7 +510,7 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) //----------------------------------------------- Standard_Boolean makeSolids = (Limit == TopAbs_SHAPE || - Limit < TopAbs_SHELL); + Limit < TopAbs_SHELL); for (itl.Initialize(myListShapes);itl.More();itl.Next()) { const TopoDS_Shape & S = itl.Value(); @@ -640,8 +640,8 @@ void Partition_Spliter::MakeSolids(const TopoDS_Shape & theSolid, //======================================================================= TopoDS_Shape Partition_Spliter::FindFacesInside(const TopoDS_Shape& theShape, - const Standard_Boolean CheckClosed, - const Standard_Boolean All) + const Standard_Boolean CheckClosed, + const Standard_Boolean All) { // ================================================ // check if internal faces have been already found @@ -707,12 +707,12 @@ TopoDS_Shape Partition_Spliter::FindFacesInside(const TopoDS_Shape& theShape, // iterate on edges of split faces of aShape, // add to DMSEFP edges that are new for (expl.Init( sf, TopAbs_EDGE ); expl.More(); expl.Next()) { - TopoDS_Shape se = expl.Current(); - if ( MSE.Contains(se)) {// section edge - if (!DMSEFP.IsBound(se)) - DMSEFP.Bind(se,EmptyL); - DMSEFP(se).Append(sf); - } + TopoDS_Shape se = expl.Current(); + if ( MSE.Contains(se)) {// section edge + if (!DMSEFP.IsBound(se)) + DMSEFP.Bind(se,EmptyL); + DMSEFP(se).Append(sf); + } } } } @@ -765,13 +765,13 @@ TopoDS_Shape Partition_Spliter::FindFacesInside(const TopoDS_Shape& theShape, // remove aFace1 form DMSEFP and MFP LSF.Remove( itl ); // == itl.Next(); if (!MFP.Remove( aFace1 )) - continue; // was not is MFP ( i.e already checked) + continue; // was not is MFP ( i.e already checked) // check if aFace1 was already added to 2 shells if (!All && - myAddedFacesMap.Contains( aFace1 ) && - myAddedFacesMap.Contains( aFace1.Reversed() )) { - skipAlreadyAdded = Standard_True; - continue; + myAddedFacesMap.Contains( aFace1 ) && + myAddedFacesMap.Contains( aFace1.Reversed() )) { + skipAlreadyAdded = Standard_True; + continue; } // find another face which originates from the same face as aFace1: @@ -809,21 +809,21 @@ TopoDS_Shape Partition_Spliter::FindFacesInside(const TopoDS_Shape& theShape, Standard_Boolean sameDom1 = anOrigFace.IsSame( origF1 ); Standard_Boolean sameDom2 = anOrigFace.IsSame( origF2 ); if (!(sameDom1 || sameDom2) && myInter3d.HasSameDomainF( anOrigFace )) { - sameDom1 = myInter3d.IsSameDomainF( anOrigFace, origF1); + sameDom1 = myInter3d.IsSameDomainF( anOrigFace, origF1); if (origF1 == origF2) sameDom2 = sameDom1; else myInter3d.IsSameDomainF( anOrigFace, origF2); } if (sameDom1 && sameDom2) - continue; + continue; if ((sameDom1 || sameDom2)) { - inside = Partition_Loop3d::IsInside (E, - TopoDS::Face(FL.First()), - TopoDS::Face(FL.Last()), - 1, dot, GoodOri); - if (inside || (dot + Precision::Angular() >= 1.0)) - continue; // E is convex between origF1 and origF2 or they are tangent + inside = Partition_Loop3d::IsInside (E, + TopoDS::Face(FL.First()), + TopoDS::Face(FL.Last()), + 1, dot, GoodOri); + if (inside || (dot + Precision::Angular() >= 1.0)) + continue; // E is convex between origF1 and origF2 or they are tangent } @@ -833,7 +833,7 @@ TopoDS_Shape Partition_Spliter::FindFacesInside(const TopoDS_Shape& theShape, const TopoDS_Shape& aShapeFace = sameDom1 ? FL.Last() : FL.First(); // analyse aFace1 state inside = Partition_Loop3d::IsInside (E, TopoDS::Face(aShapeFace), aFace1, - 1, dot, GoodOri); + 1, dot, GoodOri); if (inside && isSectionE) { // aFace1 must be tested with both adjacent faces of CSF @@ -996,7 +996,7 @@ TopoDS_Shape Partition_Spliter::FindFacesInside(const TopoDS_Shape& theShape, MFP.Add( F ); // remove bad face from DMEF for (expl.Init( F, TopAbs_EDGE); expl.More(); expl.Next()) { - const TopoDS_Shape& E = expl.Current(); + const TopoDS_Shape& E = expl.Current(); TopTools_ListOfShape& FL = DMEF.ChangeFromKey( E ); for (itl.Initialize( FL ); itl.More(); itl.Next() ) { if ( F.IsSame( itl.Value() )) { @@ -1081,10 +1081,10 @@ void Partition_Spliter::MakeShells(const TopoDS_Shape& S, //======================================================================= static void findEqual (const TopTools_ListOfShape& EL1, - const TopTools_ListOfShape& EL2, - const Standard_Boolean addSame, - TopTools_DataMapOfShapeListOfShape& EEM, - TopTools_MapOfShape& AllEqMap) + const TopTools_ListOfShape& EL2, + const Standard_Boolean addSame, + TopTools_DataMapOfShapeListOfShape& EEM, + TopTools_MapOfShape& AllEqMap) { // map vertices to edges for EL2 TopTools_DataMapOfShapeListOfShape VEM; @@ -1095,7 +1095,7 @@ static void findEqual (const TopTools_ListOfShape& EL1, for (itV.Initialize( itE2.Value() ); itV.More(); itV.Next()) { const TopoDS_Shape& V = itV.Value(); if (! VEM.IsBound( V ) ) - VEM.Bind( V, emptyL); + VEM.Bind( V, emptyL); VEM( V ).Append( itE2.Value()); } } @@ -1123,49 +1123,49 @@ static void findEqual (const TopTools_ListOfShape& EL1, continue; if (E1.IsSame(E2)) { - if (!addSame) - continue; + if (!addSame) + continue; } else { - TopExp::Vertices( E2, V3, V4); - if (!V2.IsSame(V4) && !V2.IsSame(V3)) - continue; - // E1 and E2 have same vertices - // check D1 at end points. + TopExp::Vertices( E2, V3, V4); + if (!V2.IsSame(V4) && !V2.IsSame(V3)) + continue; + // E1 and E2 have same vertices + // check D1 at end points. C2 = BRep_Tool::Curve( E2, f,l); C1 = BRep_Tool::Curve( E1, f,l); - u = BRep_Tool::Parameter(V1,E1); + u = BRep_Tool::Parameter(V1,E1); C1->D1(u, P, D1); - u = BRep_Tool::Parameter(V1.IsSame(V3) ? V3 : V4, E2); - C2->D1(u, P, D2); + u = BRep_Tool::Parameter(V1.IsSame(V3) ? V3 : V4, E2); + C2->D1(u, P, D2); D1.Normalize(); D2.Normalize(); if (Abs(D1*D2) + Precision::Angular() < 1.0) continue; - if (! V1.IsSame(V2)) { - u = BRep_Tool::Parameter(V2,E1); - C1->D1(u, P, D1); - u = BRep_Tool::Parameter(V2.IsSame(V3) ? V3 : V4, E2); - C2->D1(u, P, D2); - D1.Normalize(); D2.Normalize(); - if (Abs(D1*D2) + Precision::Angular() < 1.0) - continue; - } + if (! V1.IsSame(V2)) { + u = BRep_Tool::Parameter(V2,E1); + C1->D1(u, P, D1); + u = BRep_Tool::Parameter(V2.IsSame(V3) ? V3 : V4, E2); + C2->D1(u, P, D2); + D1.Normalize(); D2.Normalize(); + if (Abs(D1*D2) + Precision::Angular() < 1.0) + continue; + } // check distance at a couple of internal points tol = Max(BRep_Tool::Tolerance(E1), BRep_Tool::Tolerance(E2)); GeomAdaptor_Curve AC1(C1); Extrema.Initialize(AC1,f,l); - Standard_Boolean ok = Standard_True, hasMin = Standard_False; - BRep_Tool::Range( E2, f, l); + Standard_Boolean ok = Standard_True, hasMin = Standard_False; + BRep_Tool::Range( E2, f, l); Standard_Integer i=1, nbi=3; for (; iValue( f+(l-f)*i/nbi )); Standard_Integer j=1, nbj=Extrema.NbExt(); for (; j<=nbj && ok; ++j) { if (Extrema.IsMin(j)) { - hasMin = Standard_True; + hasMin = Standard_True; ok = Extrema.Value(j) <= tol; - } + } } } if ( !hasMin || !ok) @@ -1174,7 +1174,7 @@ static void findEqual (const TopTools_ListOfShape& EL1, // bind E2 to E1 in EEM if (!EEM.IsBound(E1)) { EEM.Bind (E1, emptyL); - AllEqMap.Add (E1); + AllEqMap.Add (E1); } EEM(E1).Append(E2); AllEqMap.Add (E2); @@ -1205,7 +1205,7 @@ TopoDS_Shape Partition_Spliter::MakeFaces (const TopoDS_Shape& S) myImagesFaces.LastImage( F, LNF ); TopAbs_Orientation oriF = F.Orientation(); for ( itl.Initialize( LNF ); itl.More(); itl.Next()) - itl.Value().Orientation( oriF ); + itl.Value().Orientation( oriF ); } else { @@ -1223,74 +1223,74 @@ TopoDS_Shape Partition_Spliter::MakeFaces (const TopoDS_Shape& S) // LE: old edges + new not splitted edges const TopTools_ListOfShape& LE = myAsDes->Descendant(F); for (itl.Initialize(LE); itl.More(); itl.Next()) { - const TopoDS_Edge& E = TopoDS::Edge( itl.Value() ); + const TopoDS_Edge& E = TopoDS::Edge( itl.Value() ); - Standard_Boolean isSectionE = myInter3d.IsSectionEdge(E); - Standard_Boolean isNewE = !EM.Contains( E ); + Standard_Boolean isSectionE = myInter3d.IsSectionEdge(E); + Standard_Boolean isNewE = !EM.Contains( E ); - // LSE: list of split edges - TopTools_ListOfShape LSE; - myImagesEdges.LastImage(E,LSE); // splits of E or E itself + // LSE: list of split edges + TopTools_ListOfShape LSE; + myImagesEdges.LastImage(E,LSE); // splits of E or E itself - for (itNE.Initialize(LSE); itNE.More(); itNE.Next()) { + for (itNE.Initialize(LSE); itNE.More(); itNE.Next()) { - TopoDS_Edge NE = TopoDS::Edge( itNE.Value() ); - Standard_Boolean isSameE = NE.IsSame ( E ); - - if ( isNewE || isSectionE || !isSameE) { - if (AddedEqualM.Contains( NE )) { + TopoDS_Edge NE = TopoDS::Edge( itNE.Value() ); + Standard_Boolean isSameE = NE.IsSame ( E ); + + if ( isNewE || isSectionE || !isSameE) { + if (AddedEqualM.Contains( NE )) { // a seam must be twice in a loop if (!BRep_Tool::IsClosed( E, F ) || !EqualSeamM.Add( NE )) continue; } - if (isNewE) { - if (isSectionE) { - if ( ! myInter3d.IsSplitOn( NE, E, F) ) - continue; - } - else { - TopoDS_Vertex V1,V2; - TopExp::Vertices(NE,V1,V2); - const TopTools_ListOfShape& EL1 = myAsDes->Ascendant(V1); - const TopTools_ListOfShape& EL2 = myAsDes->Ascendant(V2); - if ( EL1.Extent() < 2 && EL2.Extent() < 2 ) - continue; - } - } - else { - NE.Orientation( E.Orientation()); - if (!isSameE) { - // orient NE because it may be a split of other edge - Standard_Real f,l,u; - Handle(Geom_Curve) C3d = BRep_Tool::Curve( E,f,l ); - Handle(Geom_Curve) NC3d = BRep_Tool::Curve( NE,f,l); - if ( C3d != NC3d) { - gp_Vec D1, ND1; gp_Pnt P; - TopoDS_Vertex V = TopExp::FirstVertex(NE); - u = BRep_Tool::Parameter(V,NE); - NC3d->D1 (u, P, ND1); - u = BRep_Tool::Parameter(V,E); - C3d ->D1 (u, P, D1); - if (ND1.Dot(D1) < 0) - NE.Reverse(); - } - } - } - if (myEqualEdges.Contains( NE )) + if (isNewE) { + if (isSectionE) { + if ( ! myInter3d.IsSplitOn( NE, E, F) ) + continue; + } + else { + TopoDS_Vertex V1,V2; + TopExp::Vertices(NE,V1,V2); + const TopTools_ListOfShape& EL1 = myAsDes->Ascendant(V1); + const TopTools_ListOfShape& EL2 = myAsDes->Ascendant(V2); + if ( EL1.Extent() < 2 && EL2.Extent() < 2 ) + continue; + } + } + else { + NE.Orientation( E.Orientation()); + if (!isSameE) { + // orient NE because it may be a split of other edge + Standard_Real f,l,u; + Handle(Geom_Curve) C3d = BRep_Tool::Curve( E,f,l ); + Handle(Geom_Curve) NC3d = BRep_Tool::Curve( NE,f,l); + if ( C3d != NC3d) { + gp_Vec D1, ND1; gp_Pnt P; + TopoDS_Vertex V = TopExp::FirstVertex(NE); + u = BRep_Tool::Parameter(V,NE); + NC3d->D1 (u, P, ND1); + u = BRep_Tool::Parameter(V,E); + C3d ->D1 (u, P, D1); + if (ND1.Dot(D1) < 0) + NE.Reverse(); + } + } + } + if (myEqualEdges.Contains( NE )) AddedEqualM.Add( NE ); - needRebuild = Standard_True; - } + needRebuild = Standard_True; + } - if (isNewE || isSectionE) - myNewSection.Add( NE ); + if (isNewE || isSectionE) + myNewSection.Add( NE ); - if (isNewE) - loops.AddSectionEdge(NE); - else - loops.AddConstEdge(NE); - } + if (isNewE) + loops.AddSectionEdge(NE); + else + loops.AddConstEdge(NE); + } } //------------------- @@ -1298,7 +1298,7 @@ TopoDS_Shape Partition_Spliter::MakeFaces (const TopoDS_Shape& S) //------------------- if (needRebuild) { - + loops.Perform(); loops.WiresToFaces(myImagesEdges); @@ -1376,8 +1376,8 @@ TopoDS_Shape Partition_Spliter::MakeFaces (const TopoDS_Shape& S) } // if (needRebuild) else { - LNF.Append( F ); - myImagesFaces.Bind(F,LNF); + LNF.Append( F ); + myImagesFaces.Bind(F,LNF); } } // if (myImagesFaces.HasImage( F )) @@ -1397,7 +1397,7 @@ TopoDS_Shape Partition_Spliter::MakeFaces (const TopoDS_Shape& S) //======================================================================= static void Tri(const TopoDS_Edge& E, - TopTools_SequenceOfShape& Seq, + TopTools_SequenceOfShape& Seq, const Partition_Inter3d & theInter3d) { Standard_Boolean Invert = Standard_True; @@ -1422,12 +1422,12 @@ static void Tri(const TopoDS_Edge& E, Seq.Remove(i+1); // remove V2 else Seq.Remove(i); - i--; - continue; + i--; + continue; } if (U2 < U1) { - Seq.Exchange(i,i+1); - Invert = Standard_True; + Seq.Exchange(i,i+1); + Invert = Standard_True; } } } @@ -1453,7 +1453,7 @@ void Partition_Spliter::MakeEdges (const TopoDS_Edge& E, if (VOnE.Extent() < 3) { // do not rebuild not cut edge if (( VF.IsSame( VOnE.First() ) && VL.IsSame( VOnE.Last() )) || - VL.IsSame( VOnE.First() ) && VF.IsSame( VOnE.Last() ) ) { + VL.IsSame( VOnE.First() ) && VF.IsSame( VOnE.Last() ) ) { NE.Append( E ); return; } @@ -1470,7 +1470,7 @@ void Partition_Spliter::MakeEdges (const TopoDS_Edge& E, if (SV.Length() < 3) { // do not rebuild not cut edge if (( VF.IsSame( SV.First() ) && VL.IsSame( SV.Last() )) || - VL.IsSame( SV.First() ) && VF.IsSame( SV.Last() ) ) { + VL.IsSame( SV.First() ) && VF.IsSame( SV.Last() ) ) { NE.Append( E ); return; } @@ -1491,11 +1491,11 @@ void Partition_Spliter::MakeEdges (const TopoDS_Edge& E, Standard_Real minDU = 1.e10; TopoDS_Vertex endV = Partition_Inter2d::FindEndVertex(VOnE, f,l, E, isFirst,minDU); if (endV.IsSame(SV.First())) - SV.Append(endV); + SV.Append(endV); else if (endV.IsSame(SV.Last())) - SV.Prepend(endV); + SV.Prepend(endV); else - MESSAGE ("END VERTEX IS IN SEQUNCE MIDDLE"); + MESSAGE ("END VERTEX IS IN SEQUNCE MIDDLE"); } NbVer = SV.Length(); } @@ -1512,13 +1512,13 @@ void Partition_Spliter::MakeEdges (const TopoDS_Edge& E, if (iVer==1) U1 = f; - else { + else { V1.Orientation(TopAbs_INTERNAL); U1=BRep_Tool::Parameter(V1,WE); } if (iVer+1 == NbVer) U2 = l; - else { + else { V2.Orientation(TopAbs_INTERNAL); U2=BRep_Tool::Parameter(V2,WE); } @@ -1769,7 +1769,7 @@ void Partition_Spliter::RemoveShapesInside (const TopoDS_Shape& S) TopExp_Explorer expResF( it.Value(), TopAbs_FACE ); for (; expResF.More(); expResF.Next()) if (!MIF.Contains( expResF.Current())) - break; + break; if (expResF.More()) // add shape to result @@ -1777,9 +1777,9 @@ void Partition_Spliter::RemoveShapesInside (const TopoDS_Shape& S) else // add faces of a removed shape to RFM for (expResF.ReInit(); expResF.More(); expResF.Next()) { - const TopoDS_Shape& F = expResF.Current(); - if ( ! RFM.Remove ( F )) - RFM.Add( F ); + const TopoDS_Shape& F = expResF.Current(); + if ( ! RFM.Remove ( F )) + RFM.Add( F ); } } @@ -1876,7 +1876,7 @@ Standard_Boolean Partition_Spliter::CheckTool(const TopoDS_Shape& S) myImagesFaces.LastImage( F, LNF); TopTools_ListIteratorOfListOfShape itF (LNF); for ( ; itF.More(); itF.Next()) - myBuilder.Add( C, itF.Value().Oriented(Fori) ); + myBuilder.Add( C, itF.Value().Oriented(Fori) ); continue; } @@ -1904,22 +1904,22 @@ Standard_Boolean Partition_Spliter::CheckTool(const TopoDS_Shape& S) // add section edges TopExp_Explorer expE; for ( ; expE.More(); expE.Next()) { - if (! myImagesEdges.HasImage( expE.Current() )) - continue; - myImagesEdges.LastImage( expE.Current(), NEL ); - for ( itNE.Initialize( NEL ); itNE.More(); itNE.Next()) - myBuilder.Add ( NW, itNE.Value()); + if (! myImagesEdges.HasImage( expE.Current() )) + continue; + myImagesEdges.LastImage( expE.Current(), NEL ); + for ( itNE.Initialize( NEL ); itNE.More(); itNE.Next()) + myBuilder.Add ( NW, itNE.Value()); } } if (hasNewE) { // add new adges NEL = myAsDes->Descendant( F ); for ( itNE.Initialize( NEL ); itNE.More(); itNE.Next()) { - TopTools_ListOfShape SEL; // splits - myImagesEdges.LastImage( itNE.Value(), SEL ); - TopTools_ListIteratorOfListOfShape itSE (SEL); - for ( ; itSE.More(); itSE.Next()) - myBuilder.Add ( NW, itSE.Value()); + TopTools_ListOfShape SEL; // splits + myImagesEdges.LastImage( itNE.Value(), SEL ); + TopTools_ListIteratorOfListOfShape itSE (SEL); + for ( ; itSE.More(); itSE.Next()) + myBuilder.Add ( NW, itSE.Value()); } } myBuilder.Add( NF, NW ); diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index 00f0b3d99..5dcbdc41e 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -468,10 +468,10 @@ bool PrimitiveGUI_BoxDlg::execute (ObjectList& objects) anObj = anOper->MakeBoxDXDYDZ(x, y, z); if (!anObj->_is_nil() && !IsPreview()) { - QStringList aParameters; - aParameters << GroupDimensions->SpinBox_DX->text(); - aParameters << GroupDimensions->SpinBox_DY->text(); - aParameters << GroupDimensions->SpinBox_DZ->text(); + QStringList aParameters; + aParameters << GroupDimensions->SpinBox_DX->text(); + aParameters << GroupDimensions->SpinBox_DY->text(); + aParameters << GroupDimensions->SpinBox_DZ->text(); anObj->SetParameters(aParameters.join(":").toLatin1().constData()); } res = true; diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx index 91807dfc6..0c434b2a6 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx @@ -401,7 +401,7 @@ void PrimitiveGUI_ConeDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -478,10 +478,10 @@ bool PrimitiveGUI_ConeDlg::execute (ObjectList& objects) anObj = anOper->MakeConePntVecR1R2H(myPoint, myDir, getRadius1(), getRadius2(), getHeight()); if (!anObj->_is_nil() && !IsPreview()) { - QStringList aParameters; - aParameters << GroupPoints->SpinBox_DX->text(); - aParameters << GroupPoints->SpinBox_DY->text(); - aParameters << GroupPoints->SpinBox_DZ->text(); + QStringList aParameters; + aParameters << GroupPoints->SpinBox_DX->text(); + aParameters << GroupPoints->SpinBox_DY->text(); + aParameters << GroupPoints->SpinBox_DZ->text(); anObj->SetParameters(aParameters.join(":").toLatin1().constData()); } res = true; diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index b7123270b..a316c5ddc 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -397,7 +397,7 @@ void PrimitiveGUI_CylinderDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -469,9 +469,9 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects) anObj = anOper->MakeCylinderPntVecRH(myPoint, myDir, getRadius(), getHeight()); if (!anObj->_is_nil() && !IsPreview()) { - QStringList aParameters; - aParameters << GroupPoints->SpinBox_DX->text(); - aParameters << GroupPoints->SpinBox_DY->text(); + QStringList aParameters; + aParameters << GroupPoints->SpinBox_DX->text(); + aParameters << GroupPoints->SpinBox_DY->text(); anObj->SetParameters(aParameters.join(":").toLatin1().constData()); } res = true; diff --git a/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx index ab40eb1bd..9bffe1132 100755 --- a/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_DiskDlg.cxx @@ -496,7 +496,7 @@ void PrimitiveGUI_DiskDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx index 49d47717f..dfbab6629 100755 --- a/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_FaceDlg.cxx @@ -50,7 +50,7 @@ // TRUE to construct a modal dialog. //================================================================================= PrimitiveGUI_FaceDlg::PrimitiveGUI_FaceDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_FACE_OBJ_HW"))); @@ -149,7 +149,7 @@ void PrimitiveGUI_FaceDlg::Init() initSpinBox( GroupDimensions->SpinBox_DY, 0.00001, COORD_MAX, aStep, 5 ); // VSR: TODO: DBL_DIGITS_DISPLAY GroupDimensions->SpinBox_DY->setValue( aDefaultSize ); - + /* signals and slots connections */ connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ); connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ); @@ -176,7 +176,7 @@ void PrimitiveGUI_FaceDlg::Init() connect( GroupType->RadioButton2, SIGNAL( clicked() ), this, SLOT( TypeButtonClicked() ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_FACE" ) ); @@ -338,26 +338,26 @@ void PrimitiveGUI_FaceDlg::SelectionIntoArgument() TopoDS_Shape aShape; if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) { if (GroupType->RadioButton2->isChecked()) - aNeedType = TopAbs_FACE; + aNeedType = TopAbs_FACE; TColStd_IndexedMapOfInteger aMap; aSelMgr->GetIndexes( aSelList.First(), aMap ); if ( aMap.Extent() == 1 ) { // Local Selection - int anIndex = aMap( 1 ); - if ( aNeedType == TopAbs_EDGE ) + int anIndex = aMap( 1 ); + if ( aNeedType == TopAbs_EDGE ) aName += QString( ":edge_%1" ).arg( anIndex ); else - aName += QString( ":face_%1" ).arg( anIndex ); + aName += QString( ":face_%1" ).arg( anIndex ); - //Find SubShape Object in Father - GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName ); + //Find SubShape Object in Father + GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather( aSelectedObject, aName ); - if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); - aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); - } - else - aSelectedObject = aFindedObject; // get Object from study + if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study + GEOM::GEOM_IShapesOperations_var aShapesOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); + } + else + aSelectedObject = aFindedObject; // get Object from study } else { // Global Selection if ( aShape.ShapeType() != aNeedType ) { @@ -420,7 +420,7 @@ void PrimitiveGUI_FaceDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -498,7 +498,7 @@ bool PrimitiveGUI_FaceDlg::execute (ObjectList& objects) switch (getConstructorId()) { case 0: anObj = anOper->MakeFaceHW(GroupDimensions->SpinBox_DX->value(), - GroupDimensions->SpinBox_DY->value(), myOrientationType); + GroupDimensions->SpinBox_DY->value(), myOrientationType); if (!anObj->_is_nil() && !IsPreview()) { aParameters << GroupDimensions->SpinBox_DX->text(); diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx index 70ad0500b..506e8b33d 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx @@ -50,7 +50,7 @@ // TRUE to construct a modal dialog. //================================================================================= PrimitiveGUI_SphereDlg::PrimitiveGUI_SphereDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) :GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_SPHERE_P" ) ) ); @@ -135,7 +135,7 @@ void PrimitiveGUI_SphereDlg::Init() connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_SPHERE" ) ); @@ -175,7 +175,7 @@ void PrimitiveGUI_SphereDlg::ConstructorsClicked( int constructorId ) myPoint = GEOM::GEOM_Object::_nil(); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); break; } case 1: @@ -263,12 +263,12 @@ void PrimitiveGUI_SphereDlg::SelectionIntoArgument() GEOM::GEOM_Object_var aFindedObject = findObjectInFather(aSelectedObject, aName ); if ( aFindedObject == GEOM::GEOM_Object::_nil() ) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = - getGeomEngine()->GetIShapesOperations( getStudyId() ); - aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); + GEOM::GEOM_IShapesOperations_var aShapesOp = + getGeomEngine()->GetIShapesOperations( getStudyId() ); + aSelectedObject = aShapesOp->GetSubShape( aSelectedObject, anIndex ); } else { - aSelectedObject = aFindedObject; // get Object from study + aSelectedObject = aFindedObject; // get Object from study } } else { // Global Selection @@ -325,7 +325,7 @@ void PrimitiveGUI_SphereDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -402,14 +402,14 @@ bool PrimitiveGUI_SphereDlg::execute( ObjectList& objects ) case 0 : { if ( !CORBA::is_nil( myPoint ) ) { - anObj = anOper->MakeSpherePntR( myPoint, getRadius() ); - if (!anObj->_is_nil() && !IsPreview()) + anObj = anOper->MakeSpherePntR( myPoint, getRadius() ); + if (!anObj->_is_nil() && !IsPreview()) { - QStringList aParameters; - aParameters << GroupPoints->SpinBox_DX->text(); + QStringList aParameters; + aParameters << GroupPoints->SpinBox_DX->text(); anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } - res = true; + } + res = true; } break; } @@ -418,8 +418,8 @@ bool PrimitiveGUI_SphereDlg::execute( ObjectList& objects ) anObj = anOper->MakeSphereR( getRadius() ); if (!anObj->_is_nil() && !IsPreview()) { - QStringList aParameters; - aParameters << GroupDimensions->SpinBox_DX->text(); + QStringList aParameters; + aParameters << GroupDimensions->SpinBox_DX->text(); anObj->SetParameters(aParameters.join(":").toLatin1().constData()); } res = true; diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx index 849e5d1a9..0a532e75c 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx @@ -394,7 +394,7 @@ void PrimitiveGUI_TorusDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -465,9 +465,9 @@ bool PrimitiveGUI_TorusDlg::execute (ObjectList& objects) anObj = anOper->MakeTorusPntVecRR(myPoint, myDir, getRadius1(), getRadius2()); if (!anObj->_is_nil() && !IsPreview()) { - QStringList aParameters; - aParameters << GroupPoints->SpinBox_DX->text(); - aParameters << GroupPoints->SpinBox_DY->text(); + QStringList aParameters; + aParameters << GroupPoints->SpinBox_DX->text(); + aParameters << GroupPoints->SpinBox_DY->text(); anObj->SetParameters(aParameters.join(":").toLatin1().constData()); } res = true; diff --git a/src/RepairGUI/RepairGUI_ChangeOrientationDlg.cxx b/src/RepairGUI/RepairGUI_ChangeOrientationDlg.cxx index 93fd613a9..6398033c9 100644 --- a/src/RepairGUI/RepairGUI_ChangeOrientationDlg.cxx +++ b/src/RepairGUI/RepairGUI_ChangeOrientationDlg.cxx @@ -46,8 +46,8 @@ // TRUE to construct a modal dialog. //================================================================================= RepairGUI_ChangeOrientationDlg::RepairGUI_ChangeOrientationDlg( GeometryGUI* theGeometryGUI, - QWidget* parent, - bool modal ) + QWidget* parent, + bool modal ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal ) { //QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SUPRESS_FACE"))); @@ -113,7 +113,7 @@ void RepairGUI_ChangeOrientationDlg::Init() connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( CreateCopyModeChanged( bool ) ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "CHANGE_ORIENTATION_NEW_OBJ_NAME" ) ); resize(100,100); @@ -225,7 +225,7 @@ void RepairGUI_ChangeOrientationDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); } diff --git a/src/RepairGUI/RepairGUI_CloseContourDlg.cxx b/src/RepairGUI/RepairGUI_CloseContourDlg.cxx index b22a55200..ce95bb76b 100644 --- a/src/RepairGUI/RepairGUI_CloseContourDlg.cxx +++ b/src/RepairGUI/RepairGUI_CloseContourDlg.cxx @@ -272,7 +272,7 @@ void RepairGUI_CloseContourDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument->setText( "" ); diff --git a/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx index 142e5b3b7..94f9aac4e 100644 --- a/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx +++ b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx @@ -141,7 +141,7 @@ void RepairGUI_DivideEdgeDlg::Init() connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "DEVIDE_EDGE_NEW_OBJECT_NAME" ) ); resize(100,100); @@ -261,7 +261,7 @@ void RepairGUI_DivideEdgeDlg::SelectionIntoArgument() { myIndex = aMap( 1 ); myObject = aSelectedObj; - myEditCurrentArgument->setText( aName += QString( ":edge_%1" ).arg( myIndex ) ); + myEditCurrentArgument->setText( aName += QString( ":edge_%1" ).arg( myIndex ) ); } else if ( aType == TopAbs_EDGE ) // single shape selection { @@ -317,7 +317,7 @@ void RepairGUI_DivideEdgeDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); // myObject = GEOM::GEOM_Object::_nil(); myIndex = -1; diff --git a/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx b/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx index 77aee17da..6d0cacbe6 100644 --- a/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx +++ b/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx @@ -156,10 +156,10 @@ void RepairGUI_FreeBoundDlg::onHelp() platform = "application"; #endif SUIT_MessageBox::warning( this, - tr( "WRN_WARNING" ), - tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg( app->resourceMgr()->stringValue( "ExternalBrowser", - platform ) ).arg( myHelpFileName ) ); + tr( "WRN_WARNING" ), + tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). + arg( app->resourceMgr()->stringValue( "ExternalBrowser", + platform ) ).arg( myHelpFileName ) ); } } @@ -185,7 +185,7 @@ void RepairGUI_FreeBoundDlg::onActivate() setEnabled( true ); myGeomGUI->SetActiveDialogBox( this ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), SLOT( onSelectionDone() ) ); + SIGNAL( currentSelectionChanged() ), SLOT( onSelectionDone() ) ); activateSelection(); onSelectionDone(); } @@ -226,7 +226,7 @@ void RepairGUI_FreeBoundDlg::Init() connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), SLOT ( onDeactivate() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), SLOT( onSelectionDone() ) ); + SIGNAL( currentSelectionChanged() ), SLOT( onSelectionDone() ) ); activateSelection(); onSelectionDone(); diff --git a/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx b/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx index 7f97162a7..684b383c8 100644 --- a/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_FreeFacesDlg.cxx @@ -66,7 +66,7 @@ // TRUE to construct a modal dialog. //================================================================================= RepairGUI_FreeFacesDlg::RepairGUI_FreeFacesDlg( GeometryGUI* GUI, QWidget* parent, - bool modal ) + bool modal ) : QDialog( parent, false ), GEOMBase_Helper( dynamic_cast( parent ) ), myGeomGUI( GUI ), @@ -170,11 +170,11 @@ void RepairGUI_FreeFacesDlg::onHelp() platform = "application"; #endif SUIT_MessageBox::warning( this, - tr( "WRN_WARNING" ), - tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ). - arg( app->resourceMgr()->stringValue( "ExternalBrowser", - platform ) ). - arg( myHelpFileName ) ); + tr( "WRN_WARNING" ), + tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ). + arg( app->resourceMgr()->stringValue( "ExternalBrowser", + platform ) ). + arg( myHelpFileName ) ); } } @@ -200,7 +200,7 @@ void RepairGUI_FreeFacesDlg::onActivate() setEnabled( true ); myGeomGUI->SetActiveDialogBox( this ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), SLOT( onSelectionDone() ) ); + SIGNAL( currentSelectionChanged() ), SLOT( onSelectionDone() ) ); activateSelection(); } @@ -215,7 +215,7 @@ void RepairGUI_FreeFacesDlg::Init() /* signals and slots connections */ connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), SLOT ( onDeactivate() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), SLOT ( onSelectionDone() ) ); + SIGNAL( currentSelectionChanged() ), SLOT ( onSelectionDone() ) ); activateSelection(); onSelectionDone(); @@ -330,9 +330,9 @@ bool RepairGUI_FreeFacesDlg::execute( ObjectList& objects ) try { getDisplayer()->SetColor( Quantity_NOC_RED ); getDisplayer()->SetToActivate( false ); - aPrs = !aFace.IsNull() ? getDisplayer()->BuildPrs( aFace ) : 0; + aPrs = !aFace.IsNull() ? getDisplayer()->BuildPrs( aFace ) : 0; if ( aPrs ) - displayPreview( aPrs, true ); + displayPreview( aPrs, true ); } catch( const SALOME::SALOME_Exception& e ) { diff --git a/src/RepairGUI/RepairGUI_GlueDlg.cxx b/src/RepairGUI/RepairGUI_GlueDlg.cxx index 9c6bdd49e..3810eb952 100644 --- a/src/RepairGUI/RepairGUI_GlueDlg.cxx +++ b/src/RepairGUI/RepairGUI_GlueDlg.cxx @@ -103,7 +103,7 @@ RepairGUI_GlueDlg::RepairGUI_GlueDlg( GeometryGUI* theGeometryGUI, QWidget* pare myTolEdt2->setValue( DEFAULT_TOLERANCE_VALUE ); myDetectBtn = new QPushButton( tr( "GEOM_DETECT" ) + QString( " [%1]" ).arg( tr( "GLUE_FACES" ) ), - GroupPoints2->Box ); + GroupPoints2->Box ); mySubShapesChk = new QCheckBox( tr( "SELECT_FACES" ), GroupPoints2->Box ); boxLayout = new QGridLayout( GroupPoints2->Box ); @@ -171,7 +171,7 @@ void RepairGUI_GlueDlg::Init() connect( mySubShapesChk, SIGNAL( stateChanged( int ) ), this, SLOT( onSubShapesChk() ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); connect( myDetectBtn, SIGNAL( clicked() ), this, SLOT( onDetect() ) ); @@ -229,7 +229,7 @@ void RepairGUI_GlueDlg::ConstructorsClicked( int constructorId ) myEditCurrentArgument->setFocus(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); qApp->processEvents(); updateGeometry(); @@ -344,7 +344,7 @@ void RepairGUI_GlueDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); //GroupPoints->LineEdit1->setText(""); //GroupPoints2->LineEdit1->setText(""); @@ -415,8 +415,8 @@ bool RepairGUI_GlueDlg::execute( ObjectList& objects ) aResult = !anObj->_is_nil(); if ( aResult && !IsPreview() ) { - QStringList aParameters; - aParameters << myTolEdt->text(); + QStringList aParameters; + aParameters << myTolEdt->text(); anObj->SetParameters(aParameters.join(":").toLatin1().constData()); objects.push_back( anObj._retn() ); @@ -467,12 +467,12 @@ bool RepairGUI_GlueDlg::execute( ObjectList& objects ) if ( aResult ) { - if ( !IsPreview() ) - { - QStringList aParameters; - aParameters << myTolEdt2->text(); + if ( !IsPreview() ) + { + QStringList aParameters; + aParameters << myTolEdt2->text(); anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - } + } objects.push_back( anObj._retn() ); } @@ -502,7 +502,7 @@ void RepairGUI_GlueDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy, // empty list of arguments means that all arguments should be restored getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), - aFindMethod, /*theInheritFirstArg=*/true ); + aFindMethod, /*theInheritFirstArg=*/true ); } } @@ -595,7 +595,7 @@ bool RepairGUI_GlueDlg::onAcceptLocal() addInStudy( *it, aName.toLatin1().data() ); display( *it, false ); } - + if ( nbObjs ) { commitCommand(); updateObjBrowser(); @@ -606,11 +606,11 @@ bool RepairGUI_GlueDlg::onAcceptLocal() } // JFA 28.12.2004 BEGIN // To enable warnings - GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() ); + GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() ); if ( !CORBA::is_nil(anOper) && !anOper->IsDone() ) { - wc.suspend(); - QString msgw = QObject::tr( anOper->GetErrorCode() ); - SUIT_MessageBox::warning( this, tr( "WRN_WARNING" ), msgw, tr( "BUT_OK" ) ); + wc.suspend(); + QString msgw = QObject::tr( anOper->GetErrorCode() ); + SUIT_MessageBox::warning( this, tr( "WRN_WARNING" ), msgw, tr( "BUT_OK" ) ); } // JFA 28.12.2004 END } @@ -661,7 +661,7 @@ void RepairGUI_GlueDlg::onDetect() } connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ) ; + this, SLOT( SelectionIntoArgument() ) ) ; SUIT_MessageBox::information( this, tr( "GEOM_FREE_BOUNDS_TLT" ), msg, tr( "Close" ) ); updateButtonState(); activateSelection(); @@ -679,7 +679,7 @@ void RepairGUI_GlueDlg::activateSelection() if ( anId == 0 ) { // Case of whole gluing disconnect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); globalSelection( GEOM_ALLSHAPES ); if ( myObject->_is_nil()) @@ -695,10 +695,10 @@ void RepairGUI_GlueDlg::activateSelection() else { displayPreview( true, false, false, 2/*line width*/, 1/*display mode*/, Quantity_NOC_RED ); disconnect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ) ; + this, SLOT( SelectionIntoArgument() ) ) ; globalSelection( GEOM_PREVIEW ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ) ; + this, SLOT( SelectionIntoArgument() ) ) ; } } updateViewer(); diff --git a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx index 16c05ad48..d744df7f7 100644 --- a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx +++ b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx @@ -46,7 +46,7 @@ // TRUE to construct a modal dialog. //================================================================================= RepairGUI_RemoveExtraEdgesDlg::RepairGUI_RemoveExtraEdgesDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal ) + bool modal ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal ) { SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); @@ -118,7 +118,7 @@ void RepairGUI_RemoveExtraEdgesDlg::Init() connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); initName( tr( "REMOVE_EXTRA_EDGES_NEW_OBJ_NAME" ) ); resize(100,100); @@ -230,7 +230,7 @@ void RepairGUI_RemoveExtraEdgesDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); activateSelection(); } @@ -307,7 +307,7 @@ void RepairGUI_RemoveExtraEdgesDlg::restoreSubShapes( SALOMEDS::Study_ptr theS if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { // empty list of arguments means that all arguments should be restored getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), - /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory - /*theInheritFirstArg=*/true ); + /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory + /*theInheritFirstArg=*/true ); } } diff --git a/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx b/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx index 5ab5ce7cb..0feb58ca4 100644 --- a/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx +++ b/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx @@ -273,7 +273,7 @@ void RepairGUI_RemoveHolesDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument->setText( "" ); diff --git a/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx b/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx index 3cdf23de6..b9a5b226e 100644 --- a/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx +++ b/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx @@ -260,7 +260,7 @@ void RepairGUI_RemoveIntWiresDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument->setText( "" ); diff --git a/src/RepairGUI/RepairGUI_SewingDlg.cxx b/src/RepairGUI/RepairGUI_SewingDlg.cxx index 2b0d66551..a2f39ae3d 100644 --- a/src/RepairGUI/RepairGUI_SewingDlg.cxx +++ b/src/RepairGUI/RepairGUI_SewingDlg.cxx @@ -51,7 +51,7 @@ // TRUE to construct a modal dialog. //================================================================================= RepairGUI_SewingDlg::RepairGUI_SewingDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal ) + bool modal ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_SEWING" ) ) ); @@ -79,7 +79,7 @@ RepairGUI_SewingDlg::RepairGUI_SewingDlg( GeometryGUI* theGeometryGUI, QWidget* myTolEdt->setValue( DEFAULT_TOLERANCE_VALUE ); QLabel* aLbl1 = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints->Box ); myFreeBoundBtn = new QPushButton( tr( "GEOM_DETECT" ) + QString( " [%1]" ).arg( tr( "GEOM_FREE_BOUNDARIES" ) ), - GroupPoints->Box ); + GroupPoints->Box ); aLay->addWidget( aLbl1, 0, 0 ); aLay->addWidget( myTolEdt, 0, 1 ); aLay->addWidget( myFreeBoundBtn, 1, 0, 1, 2 ); @@ -120,7 +120,7 @@ void RepairGUI_SewingDlg::Init() myClosed = -1; myOpen = -1; - + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); @@ -129,7 +129,7 @@ void RepairGUI_SewingDlg::Init() connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); connect( myFreeBoundBtn, SIGNAL( clicked() ), this, SLOT( onDetect() ) ); @@ -155,7 +155,7 @@ void RepairGUI_SewingDlg::ClickOnOk() bool RepairGUI_SewingDlg::ClickOnApply() { if ( !onAccept() ) - return false; + return false; initName(); @@ -227,7 +227,7 @@ void RepairGUI_SewingDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); GroupPoints->LineEdit1->setText( "" ); myObject = GEOM::GEOM_Object::_nil(); @@ -290,9 +290,9 @@ bool RepairGUI_SewingDlg::execute( ObjectList& objects ) myOpen = anOpen->length(); int i; for ( i = 0; i < myClosed; i++ ) - objects.push_back( aClosed[i]._retn() ); + objects.push_back( aClosed[i]._retn() ); for ( i = 0; i < myOpen; i++ ) - objects.push_back( anOpen[i]._retn() ); + objects.push_back( anOpen[i]._retn() ); } else myClosed = -1; @@ -304,8 +304,8 @@ bool RepairGUI_SewingDlg::execute( ObjectList& objects ) { if ( !IsPreview() ) { - QStringList aParameters; - aParameters << myTolEdt->text(); + QStringList aParameters; + aParameters << myTolEdt->text(); anObj->SetParameters(aParameters.join(":").toLatin1().constData()); } objects.push_back( anObj._retn() ); diff --git a/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx index 570df5381..ffe7f6596 100755 --- a/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx +++ b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx @@ -55,7 +55,7 @@ // TRUE to construct a modal dialog. //================================================================================= RepairGUI_ShapeProcessDlg::RepairGUI_ShapeProcessDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal ) + bool modal ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal ) { setHelpFileName( "shape_processing_operation_page.html" ); @@ -80,7 +80,7 @@ void RepairGUI_ShapeProcessDlg::init() initParamsValues(); initSelection(); - + setWindowTitle( tr( "GEOM_SHAPEPROCESS_TITLE" ) ); mainFrame()->GroupConstructors->hide(); @@ -296,7 +296,7 @@ void RepairGUI_ShapeProcessDlg::init() connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( onApply() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( selectionChanged() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( selectionChanged() ) ); connect( mySelectWdgt->PushButton1, SIGNAL( clicked() ), this, SLOT( selectClicked() ) ); connect( mySelectWdgt->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( lineEditReturnPressed() ) ); @@ -349,7 +349,7 @@ bool RepairGUI_ShapeProcessDlg::onApply() void RepairGUI_ShapeProcessDlg::selectionChanged() { reset(); - + LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); SALOME_ListIO aSelList; aSelMgr->selectedObjects(aSelList); @@ -360,7 +360,7 @@ void RepairGUI_ShapeProcessDlg::selectionChanged() for (SALOME_ListIteratorOfListIO anIt (aSelList); anIt.More(); anIt.Next()) { GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value(), aRes ); if ( !CORBA::is_nil( aSelectedObject ) && aRes ) - myObjects[i++] = aSelectedObject; + myObjects[i++] = aSelectedObject; } myObjects->length( i ); if ( i == 1 ) @@ -400,8 +400,8 @@ void RepairGUI_ShapeProcessDlg::activate() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication( ) ))->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( selectionChanged() ) ); - + SIGNAL( currentSelectionChanged() ), this, SLOT( selectionChanged() ) ); + reset(); //myGeomGUI->SetState( 0 ); initSelection(); @@ -426,7 +426,7 @@ void RepairGUI_ShapeProcessDlg::enterEvent( QEvent* ) void RepairGUI_ShapeProcessDlg::reset() { myObjects = new GEOM::ListOfGO(); - myObjects->length( 0 ); + myObjects->length( 0 ); mySelectWdgt->LineEdit1->setText( "" ); } @@ -570,9 +570,9 @@ bool RepairGUI_ShapeProcessDlg::isValid( QString& msg ) const QString& aParam = aListIter.next(); QWidget* aControl = getControl( aParam ); if ( qobject_cast( aControl ) ) - ok = qobject_cast( aControl )->isValid( msg, !IsPreview() ) && ok; + ok = qobject_cast( aControl )->isValid( msg, !IsPreview() ) && ok; else if ( qobject_cast( aControl ) ) - ok = qobject_cast( aControl )->isValid( msg, !IsPreview() ) && ok; + ok = qobject_cast( aControl )->isValid( msg, !IsPreview() ) && ok; } } @@ -603,19 +603,19 @@ bool RepairGUI_ShapeProcessDlg::execute( ObjectList& objects ) /*//-- check -- int z; - MESSAGE("Objects : "); - for ( z = 0; z < myObjects->length(); z++ ) - MESSAGE(myObjects[z]->GetName() << " "); - MESSAGE("\nOperators : "); - for ( z = 0; z < anOperators->length(); z++ ) - MESSAGE(anOperators[z] << " "); - MESSAGE("\nParameters : "); - for ( z = 0; z < aParams->length(); z++ ) - MESSAGE(aParams[z] << " "); - MESSAGE("\nValues : "); - for ( z = 0; z < aValues->length(); z ++ ) - MESSAGE(aValues[z] << " "); - MESSAGE("\n"); + MESSAGE("Objects : "); + for ( z = 0; z < myObjects->length(); z++ ) + MESSAGE(myObjects[z]->GetName() << " "); + MESSAGE("\nOperators : "); + for ( z = 0; z < anOperators->length(); z++ ) + MESSAGE(anOperators[z] << " "); + MESSAGE("\nParameters : "); + for ( z = 0; z < aParams->length(); z++ ) + MESSAGE(aParams[z] << " "); + MESSAGE("\nValues : "); + for ( z = 0; z < aValues->length(); z ++ ) + MESSAGE(aValues[z] << " "); + MESSAGE("\n"); */// ----------- QStringList anErrorObjNames; @@ -629,15 +629,15 @@ bool RepairGUI_ShapeProcessDlg::execute( ObjectList& objects ) { if ( !IsPreview() ) { - QStringList aParameters; + QStringList aParameters; - for ( int i = 0; i < anOperators->length(); i++ ) - aParameters << QString( anOperators[i] ); + for ( int i = 0; i < anOperators->length(); i++ ) + aParameters << QString( anOperators[i] ); - for ( int i = 0; i < aParams->length(); i++ ) - aParameters << QString( aParams[i] ); + for ( int i = 0; i < aParams->length(); i++ ) + aParameters << QString( aParams[i] ); - aParameters << getTexts( aParams ); + aParameters << getTexts( aParams ); anObj->SetParameters(aParameters.join(":").toLatin1().constData()); } objects.push_back( anObj._retn() ); @@ -668,7 +668,7 @@ GEOM::string_array* RepairGUI_ShapeProcessDlg::getActiveOperators() for ( int i = 0; i < aCheckedList.count(); i++ ) anOperators[i] = CORBA::string_dup( aCheckedList[i].toLatin1().constData() ); - + return anOperators._retn(); } @@ -816,7 +816,7 @@ QStringList RepairGUI_ShapeProcessDlg::getTexts( const GEOM::string_array& thePa { QString aText = getText( aCtrl ); if( !aText.isNull() ) - aTexts.append( aText ); + aTexts.append( aText ); } } @@ -849,7 +849,7 @@ void RepairGUI_ShapeProcessDlg::advOptionToggled( bool on ) QAbstractButton* btn = (QAbstractButton*)sender(); if ( on && btn->isCheckable() && SUIT_MessageBox::warning( this, - tr( "GEOM_WRN_WARNING" ), tr( "TIME_CONSUMING" ), - SUIT_MessageBox::Yes | SUIT_MessageBox::No ) == SUIT_MessageBox::No ) + tr( "GEOM_WRN_WARNING" ), tr( "TIME_CONSUMING" ), + SUIT_MessageBox::Yes | SUIT_MessageBox::No ) == SUIT_MessageBox::No ) btn->toggle(); } diff --git a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx index dea6227e0..8186438fd 100644 --- a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx @@ -106,7 +106,7 @@ void RepairGUI_SuppressFacesDlg::Init() //myGeomGUI->SetState( 0 ); initSelection(); - + /* signals and slots connections */ connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); @@ -115,7 +115,7 @@ void RepairGUI_SuppressFacesDlg::Init() connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); initName( tr( "SUPRESS_FACE_NEW_OBJ_NAME" ) ); resize(100,100); @@ -179,19 +179,19 @@ void RepairGUI_SuppressFacesDlg::SelectionIntoArgument() if ( !CORBA::is_nil( aSelectedObject ) && aRes ) { TopoDS_Shape aShape; if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) ) { - if ( aShape.ShapeType() <= TopAbs_FACE ) { // FACE, SHELL, SOLID, COMPOUND - GEOM::short_array anIndexes; - - TColStd_IndexedMapOfInteger aMap; - aSelMgr->GetIndexes( anIO, aMap ); - - if ( !aMap.IsEmpty() ) { - Convert( aMap, anIndexes ); - myObjects[i++] = aSelectedObject; // append the object - myFaces.append( anIndexes ); // append faces' indexes - numFaces += anIndexes.length();// just for text field output - } - } + if ( aShape.ShapeType() <= TopAbs_FACE ) { // FACE, SHELL, SOLID, COMPOUND + GEOM::short_array anIndexes; + + TColStd_IndexedMapOfInteger aMap; + aSelMgr->GetIndexes( anIO, aMap ); + + if ( !aMap.IsEmpty() ) { + Convert( aMap, anIndexes ); + myObjects[i++] = aSelectedObject; // append the object + myFaces.append( anIndexes ); // append faces' indexes + numFaces += anIndexes.length();// just for text field output + } + } } } } @@ -247,7 +247,7 @@ void RepairGUI_SuppressFacesDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); //myGeomGUI->SetState( 0 ); initSelection(); diff --git a/src/RepairGUI/RepairGUI_SuppressFacesDlg.h b/src/RepairGUI/RepairGUI_SuppressFacesDlg.h index 66a36ca94..b67613118 100644 --- a/src/RepairGUI/RepairGUI_SuppressFacesDlg.h +++ b/src/RepairGUI/RepairGUI_SuppressFacesDlg.h @@ -56,7 +56,7 @@ private: void enterEvent( QEvent* ); void Convert( const TColStd_IndexedMapOfInteger&, - GEOM::short_array& ); + GEOM::short_array& ); void initSelection(); diff --git a/src/STEPExport/STEPExport.cxx b/src/STEPExport/STEPExport.cxx index 6c2e9fac1..f07067790 100644 --- a/src/STEPExport/STEPExport.cxx +++ b/src/STEPExport/STEPExport.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: STEPExport.cxx -// Created: Wed May 19 14:53:52 2004 -// Author: Pavel TELKOV -// +// File: STEPExport.cxx +// Created: Wed May 19 14:53:52 2004 +// Author: Pavel TELKOV +// // #include "utilities.h" @@ -81,11 +81,11 @@ STEPEXPORT_EXPORT status = aWriter.Transfer( theShape, STEPControl_AsIs ); //VRV: OCC 4.0 migration if ( status == IFSelect_RetDone ) - status = aWriter.Write( theFileName.ToCString() ); + status = aWriter.Write( theFileName.ToCString() ); // Return previous locale if ( status == IFSelect_RetDone ) - return 1; + return 1; } catch(Standard_Failure) { diff --git a/src/STEPImport/STEPImport.cxx b/src/STEPImport/STEPImport.cxx index e4786f2aa..cb5535376 100644 --- a/src/STEPImport/STEPImport.cxx +++ b/src/STEPImport/STEPImport.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: STEPImport.cxx -// Created: Wed May 19 14:41:10 2004 -// Author: Pavel TELKOV -// +// File: STEPImport.cxx +// Created: Wed May 19 14:41:10 2004 +// Author: Pavel TELKOV +// // #include "utilities.h" @@ -73,7 +73,7 @@ STEPIMPORT_EXPORT TopoDS_Shape Import (const TCollection_AsciiString& theFileName, const TCollection_AsciiString& /*theFormatName*/, TCollection_AsciiString& theError, - const TDF_Label&) + const TDF_Label&) { MESSAGE("Import STEP model from file " << theFileName.ToCString()); // Set "C" numeric locale to save numbers correctly @@ -94,41 +94,41 @@ STEPIMPORT_EXPORT IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString()); if (status == IFSelect_RetDone) { - Standard_Boolean failsonly = Standard_False ; - aReader.PrintCheckLoad (failsonly, IFSelect_ItemsByEntity); - /* Root transfers */ - Standard_Integer nbr = aReader.NbRootsForTransfer(); - aReader.PrintCheckTransfer (failsonly, IFSelect_ItemsByEntity); + Standard_Boolean failsonly = Standard_False ; + aReader.PrintCheckLoad (failsonly, IFSelect_ItemsByEntity); + /* Root transfers */ + Standard_Integer nbr = aReader.NbRootsForTransfer(); + aReader.PrintCheckTransfer (failsonly, IFSelect_ItemsByEntity); - for ( Standard_Integer n=1; n <= nbr; n++) { - Standard_Boolean ok = aReader.TransferRoot(n); - /* Collecting resulting entities */ - Standard_Integer nbs = aReader.NbShapes(); - if (!ok || nbs == 0) - { - // THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::ImportStep", SALOME::BAD_PARAM); - continue; // skip empty root - } - /* For a single entity */ - else if (nbr == 1 && nbs == 1) { - aResShape = aReader.Shape(1); - break; - } + for ( Standard_Integer n=1; n <= nbr; n++) { + Standard_Boolean ok = aReader.TransferRoot(n); + /* Collecting resulting entities */ + Standard_Integer nbs = aReader.NbShapes(); + if (!ok || nbs == 0) + { + // THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::ImportStep", SALOME::BAD_PARAM); + continue; // skip empty root + } + /* For a single entity */ + else if (nbr == 1 && nbs == 1) { + aResShape = aReader.Shape(1); + break; + } - for ( Standard_Integer i=1; i<=nbs; i++ ) { - TopoDS_Shape aShape = aReader.Shape(i); - if ( aShape.IsNull() ) { - // THROW_SALOME_CORBA_EXCEPTION("Null shape in GEOM_Gen_i::ImportStep", SALOME::BAD_PARAM) ; - //return aResShape; - continue; - } - else { - B.Add( compound, aShape ) ; - } - } - } - if ( aResShape.IsNull() ) - aResShape = compound; + for ( Standard_Integer i=1; i<=nbs; i++ ) { + TopoDS_Shape aShape = aReader.Shape(i); + if ( aShape.IsNull() ) { + // THROW_SALOME_CORBA_EXCEPTION("Null shape in GEOM_Gen_i::ImportStep", SALOME::BAD_PARAM) ; + //return aResShape; + continue; + } + else { + B.Add( compound, aShape ) ; + } + } + } + if ( aResShape.IsNull() ) + aResShape = compound; } else { // switch (status) { @@ -148,7 +148,7 @@ STEPIMPORT_EXPORT // break; // } theError = "Wrong format of the imported file. Can't import file."; - aResShape.Nullify(); + aResShape.Nullify(); } } catch (Standard_Failure) { diff --git a/src/STLExport/STLExport.cxx b/src/STLExport/STLExport.cxx index 49a2d2cc4..84e2907a0 100644 --- a/src/STLExport/STLExport.cxx +++ b/src/STLExport/STLExport.cxx @@ -19,10 +19,10 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: STLExport.cxx -// Created: Wed May 19 14:53:52 2004 -// Author: Pavel TELKOV -// +// File: STLExport.cxx +// Created: Wed May 19 14:53:52 2004 +// Author: Pavel TELKOV +// // #include "utilities.h" diff --git a/src/ShHealOper/ShHealOper_FillHoles.cxx b/src/ShHealOper/ShHealOper_FillHoles.cxx index 3e8f0d4bd..bd4e5d470 100644 --- a/src/ShHealOper/ShHealOper_FillHoles.cxx +++ b/src/ShHealOper/ShHealOper_FillHoles.cxx @@ -227,7 +227,7 @@ Standard_Boolean ShHealOper_FillHoles::prepareWires(const TopTools_SequenceOfSha if (!BRep_Tool::Degenerated (TopoDS::Edge (aExp.Current()))) if(myEdgeFaces.Contains(aExp.Current()) && myEdgeFaces.FindFromKey(aExp.Current()).Extent() >1) continue; - aSeqEdges->Append(aExp.Current()); + aSeqEdges->Append(aExp.Current()); } } @@ -278,7 +278,7 @@ Handle(Geom_Surface) ShHealOper_FillHoles::buildSurface(const TopoDS_Wire& theWi try { GeomPlate_BuildPlateSurface aBuilder(myDegree, myNbPtsOnCur, myNbIter, - myTol2d, myTol3d, myTolAng, myTolCrv); + myTol2d, myTol3d, myTolAng, myTolCrv); TopoDS_Iterator aIter; for(aIter.Initialize (theWire); aIter.More(); aIter.Next()) { @@ -286,7 +286,7 @@ Handle(Geom_Surface) ShHealOper_FillHoles::buildSurface(const TopoDS_Wire& theWi BRepAdaptor_Curve adC(ae); Handle(BRepAdaptor_HCurve) aHAD= new BRepAdaptor_HCurve(adC); Handle(BRepFill_CurveConstraint) aConst = - new BRepFill_CurveConstraint (aHAD, (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d); + new BRepFill_CurveConstraint (aHAD, (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d); //Handle(GeomPlate_CurveConstraint) aConst = // new GeomPlate_CurveConstraint(aHAD, (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d); aBuilder.Add (aConst); diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx index f5d58b658..bf33d2043 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx @@ -368,7 +368,7 @@ void TransformationGUI_MirrorDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.h b/src/TransformationGUI/TransformationGUI_MirrorDlg.h index 668254090..ad6912d24 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.h +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.h @@ -40,7 +40,7 @@ class TransformationGUI_MirrorDlg : public GEOMBase_Skeleton public: TransformationGUI_MirrorDlg( GeometryGUI*, QWidget* = 0, - bool = false, Qt::WindowFlags = 0 ); + bool = false, Qt::WindowFlags = 0 ); ~TransformationGUI_MirrorDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index 9f4ae0478..3516b050e 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -449,7 +449,7 @@ void TransformationGUI_MultiRotationDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h index 6e2c319df..d47bf4b55 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h @@ -41,7 +41,7 @@ class TransformationGUI_MultiRotationDlg : public GEOMBase_Skeleton public: TransformationGUI_MultiRotationDlg( GeometryGUI*, QWidget* = 0, - bool = false, Qt::WindowFlags = 0 ); + bool = false, Qt::WindowFlags = 0 ); ~TransformationGUI_MultiRotationDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index 0e992818c..c41e0a12f 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -498,7 +498,7 @@ void TransformationGUI_MultiTranslationDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -687,8 +687,8 @@ bool TransformationGUI_MultiTranslationDlg::execute (ObjectList& objects) if (!CORBA::is_nil(myBase) && !CORBA::is_nil(myVectorU) && !CORBA::is_nil(myVectorV)) { anObj = anOper->MultiTranslate2D(myBase, - myVectorU, myStepU, myNbTimesU, - myVectorV, myStepV, myNbTimesV); + myVectorU, myStepU, myNbTimesU, + myVectorV, myStepV, myNbTimesV); if(!IsPreview()) { aParameters<SpinBox_DX1->text(); aParameters<SpinBox_DY1->text(); diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h index 112147caa..49359aab8 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h @@ -41,7 +41,7 @@ class TransformationGUI_MultiTranslationDlg : public GEOMBase_Skeleton public: TransformationGUI_MultiTranslationDlg( GeometryGUI*, QWidget* = 0, - bool = false, Qt::WindowFlags = 0 ); + bool = false, Qt::WindowFlags = 0 ); ~TransformationGUI_MultiTranslationDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx index e3bacd73e..c6a59d39f 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -42,7 +42,7 @@ // TRUE to construct a modal dialog. //================================================================================= TransformationGUI_OffsetDlg::TransformationGUI_OffsetDlg( GeometryGUI* theGeometryGUI, QWidget* parent, - bool modal, Qt::WindowFlags fl ) + bool modal, Qt::WindowFlags fl ) : GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_OFFSET" ) ) ); @@ -120,7 +120,7 @@ void TransformationGUI_OffsetDlg::Init() connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); connect( GroupPoints->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox() ) ); connect( GroupPoints->CheckButton1, SIGNAL( toggled( bool ) ), this, SLOT( CreateCopyModeChanged( bool ) ) ); @@ -237,7 +237,7 @@ void TransformationGUI_OffsetDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), - SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); globalSelection( GEOM_ALLSHAPES ); myEditCurrentArgument = GroupPoints->LineEdit1; myEditCurrentArgument->setFocus(); @@ -302,7 +302,7 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects ) if(!IsPreview()) { anObj->SetParameters(GroupPoints->SpinBox_DX->text().toLatin1().constData()); } - objects.push_back( anObj._retn() ); + objects.push_back( anObj._retn() ); } } } @@ -310,7 +310,7 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects ) for ( int i = 0; i < myObjects.length(); i++ ) { anObj = anOper->OffsetShape( myObjects[i], GetOffset() ); if ( !anObj->_is_nil() ) - objects.push_back( anObj._retn() ); + objects.push_back( anObj._retn() ); } } res = true; @@ -328,8 +328,8 @@ void TransformationGUI_OffsetDlg::restoreSubShapes( SALOMEDS::Study_ptr theStu if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) { // empty list of arguments means that all arguments should be restored getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(), - /*theFindMethod=*/GEOM::FSM_Transformed, - /*theInheritFirstArg=*/true ); + /*theFindMethod=*/GEOM::FSM_Transformed, + /*theInheritFirstArg=*/true ); } } diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.h b/src/TransformationGUI/TransformationGUI_OffsetDlg.h index c83ec5fed..c830c1352 100644 --- a/src/TransformationGUI/TransformationGUI_OffsetDlg.h +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.h @@ -40,7 +40,7 @@ class TransformationGUI_OffsetDlg : public GEOMBase_Skeleton public: TransformationGUI_OffsetDlg( GeometryGUI*, QWidget* = 0, - bool = false, Qt::WindowFlags = 0 ); + bool = false, Qt::WindowFlags = 0 ); ~TransformationGUI_OffsetDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx index 8f01e5246..62ef268ca 100644 --- a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx @@ -401,19 +401,19 @@ void TransformationGUI_PositionDlg::SelectionIntoArgument() GEOM::GEOM_Object_var aFindedObject = GEOMBase_Helper::findObjectInFather(aSelectedObject, aName); if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study - GEOM::GEOM_IShapesOperations_var aShapesOp = - getGeomEngine()->GetIShapesOperations(getStudyId()); - aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); + GEOM::GEOM_IShapesOperations_var aShapesOp = + getGeomEngine()->GetIShapesOperations(getStudyId()); + aSelectedObject = aShapesOp->GetSubShape(aSelectedObject, anIndex); } else { // get Object from study - aSelectedObject = aFindedObject; + aSelectedObject = aFindedObject; } } else { if (S.ShapeType() != TopAbs_EDGE && S.ShapeType() != TopAbs_WIRE) { - aSelectedObject = GEOM::GEOM_Object::_nil(); - aName = ""; - return; + aSelectedObject = GEOM::GEOM_Object::_nil(); + aName = ""; + return; } } @@ -554,10 +554,10 @@ void TransformationGUI_PositionDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -614,9 +614,9 @@ bool TransformationGUI_PositionDlg::execute (ObjectList& objects) case 0: { for (int i = 0; i < myObjects.length(); i++) { - anObj = toCreateCopy ? - anOper->PositionShapeCopy(myObjects[i], myObjects[i], myEndLCS) : - anOper->PositionShape(myObjects[i], myObjects[i], myEndLCS); + anObj = toCreateCopy ? + anOper->PositionShapeCopy(myObjects[i], myObjects[i], myEndLCS) : + anOper->PositionShape(myObjects[i], myObjects[i], myEndLCS); if (!anObj->_is_nil()) objects.push_back(anObj._retn()); @@ -629,8 +629,8 @@ bool TransformationGUI_PositionDlg::execute (ObjectList& objects) for (int i = 0; i < myObjects.length(); i++) { if (toCreateCopy) anObj = toCreateCopy ? - anOper->PositionShapeCopy(myObjects[i], myStartLCS, myEndLCS) : - anOper->PositionShape(myObjects[i], myStartLCS, myEndLCS); + anOper->PositionShapeCopy(myObjects[i], myStartLCS, myEndLCS) : + anOper->PositionShape(myObjects[i], myStartLCS, myEndLCS); if (!anObj->_is_nil()) objects.push_back(anObj._retn()); } @@ -642,9 +642,9 @@ bool TransformationGUI_PositionDlg::execute (ObjectList& objects) double aDistance = Group1->SpinBox_DX->value(); bool toReverse = Group1->CheckButton3->isChecked(); for (int i = 0; i < myObjects.length(); i++) { - anObj = anOper->PositionAlongPath(myObjects[i], myPath, aDistance, toCreateCopy, toReverse); - if (!anObj->_is_nil()) - objects.push_back(anObj._retn()); + anObj = anOper->PositionAlongPath(myObjects[i], myPath, aDistance, toCreateCopy, toReverse); + if (!anObj->_is_nil()) + objects.push_back(anObj._retn()); } res = true; break; diff --git a/src/TransformationGUI/TransformationGUI_PositionDlg.h b/src/TransformationGUI/TransformationGUI_PositionDlg.h index a48959b92..305e4796c 100644 --- a/src/TransformationGUI/TransformationGUI_PositionDlg.h +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.h @@ -40,7 +40,7 @@ class TransformationGUI_PositionDlg : public GEOMBase_Skeleton public: TransformationGUI_PositionDlg( GeometryGUI*, QWidget* = 0, - bool = false, Qt::WindowFlags = 0 ); + bool = false, Qt::WindowFlags = 0 ); ~TransformationGUI_PositionDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx index 1ff684460..a0f8f7803 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx @@ -334,7 +334,7 @@ void TransformationGUI_RotationDlg::SelectionIntoArgument() if (myEditCurrentArgument == GroupPoints->LineEdit1) { /* if (myObjects.length()) { if (getConstructorId() == 0 && myAxis->_is_nil() || getConstructorId() == 1 && myCentPoint->_is_nil() ) - GroupPoints->PushButton2->click(); + GroupPoints->PushButton2->click(); }*/ // here commented, because multiple objects can be selected IPAL 21437 } else if (myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 0) { @@ -463,7 +463,7 @@ void TransformationGUI_RotationDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -564,10 +564,10 @@ bool TransformationGUI_RotationDlg::execute (ObjectList& objects) if (!anObj->_is_nil()) { if(!IsPreview()) { anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - updateAttributes(anObj, aParameters); - } + updateAttributes(anObj, aParameters); + } objects.push_back(anObj._retn()); - } + } } } res = true; diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.h b/src/TransformationGUI/TransformationGUI_RotationDlg.h index 9b774f704..c3a42fa77 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.h +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.h @@ -40,7 +40,7 @@ class TransformationGUI_RotationDlg : public GEOMBase_Skeleton public: TransformationGUI_RotationDlg( GeometryGUI*, QWidget* = 0, - bool = false, Qt::WindowFlags = 0 ); + bool = false, Qt::WindowFlags = 0 ); ~TransformationGUI_RotationDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx index 6ad61b4ec..112c1c61b 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx @@ -413,7 +413,7 @@ void TransformationGUI_ScaleDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -525,7 +525,7 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects) for (int i = 0; i < myObjects.length(); i++) { anObj = anOper->ScaleShapeAlongAxesCopy(myObjects[i], myPoint, SpinBox_FX->value(), - SpinBox_FY->value(), SpinBox_FZ->value()); + SpinBox_FY->value(), SpinBox_FZ->value()); if (!anObj->_is_nil()) if(!IsPreview()) { QStringList aParameters; @@ -542,7 +542,7 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects) for (int i = 0; i < myObjects.length(); i++) { anObj = anOper->ScaleShapeAlongAxes(myObjects[i], myPoint, SpinBox_FX->value(), - SpinBox_FY->value(), SpinBox_FZ->value()); + SpinBox_FY->value(), SpinBox_FZ->value()); if (!anObj->_is_nil()) objects.push_back(anObj._retn()); } diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.h b/src/TransformationGUI/TransformationGUI_ScaleDlg.h index 0c22428d0..29c85ff5c 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.h +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.h @@ -45,7 +45,7 @@ class TransformationGUI_ScaleDlg : public GEOMBase_Skeleton public: TransformationGUI_ScaleDlg( GeometryGUI*, QWidget* = 0, - bool = false, Qt::WindowFlags = 0 ); + bool = false, Qt::WindowFlags = 0 ); ~TransformationGUI_ScaleDlg(); protected: diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx index 5bdd8ee5f..5818b64d7 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx @@ -481,7 +481,7 @@ void TransformationGUI_TranslationDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), - this, SLOT( SelectionIntoArgument() ) ); + this, SLOT( SelectionIntoArgument() ) ); ConstructorsClicked( getConstructorId() ); } @@ -575,7 +575,7 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects) anObj = anOper->TranslateDXDYDZCopy(myObjects[i], dx, dy, dz); if (!anObj->_is_nil()) { if(!IsPreview()) - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toLatin1().constData()); objects.push_back(anObj._retn()); } } @@ -586,11 +586,11 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects) anObj = anOper->TranslateDXDYDZ(myObjects[i], dx, dy, dz); if (!anObj->_is_nil()) { if(!IsPreview()) { - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - updateAttributes(anObj, aParameters); - } + anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + updateAttributes(anObj, aParameters); + } objects.push_back(anObj._retn()); - } + } } } res = true; @@ -628,11 +628,11 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects) myCurrObject = myObjects[i]; anObj = anOper->TranslateVectorDistance(myObjects[i], myVector, aDistance, toCreateCopy); if (!anObj->_is_nil()) { - if(!IsPreview()) { + if(!IsPreview()) { anObj->SetParameters(aParameters.join(":").toLatin1().constData()); - if (!toCreateCopy) - updateAttributes(anObj, aParameters); - } + if (!toCreateCopy) + updateAttributes(anObj, aParameters); + } objects.push_back(anObj._retn()); } } diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.h b/src/TransformationGUI/TransformationGUI_TranslationDlg.h index e08425b5a..9f6dcabcc 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.h +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.h @@ -40,7 +40,7 @@ class TransformationGUI_TranslationDlg : public GEOMBase_Skeleton public: TransformationGUI_TranslationDlg( GeometryGUI*, QWidget* = 0, - bool = false, Qt::WindowFlags = 0 ); + bool = false, Qt::WindowFlags = 0 ); ~TransformationGUI_TranslationDlg(); protected: -- 2.39.2