From 0fef9c4085da8931675084f2349a66e8b0091adf Mon Sep 17 00:00:00 2001 From: szv Date: Mon, 5 Dec 2016 14:41:36 +0300 Subject: [PATCH] IGES simplification --- src/IFSelect/IFSelect_SelectPointed.cxx | 13 - src/IFSelect/IFSelect_SelectPointed.hxx | 24 +- src/IGESAppli/IGESAppli.cxx | 52 +- src/IGESAppli/IGESAppli.hxx | 115 +-- src/IGESAppli/IGESAppli_DrilledHole.cxx | 40 +- src/IGESAppli/IGESAppli_DrilledHole.hxx | 54 +- src/IGESAppli/IGESAppli_ElementResults.cxx | 147 ++-- src/IGESAppli/IGESAppli_ElementResults.hxx | 56 +- src/IGESAppli/IGESAppli_FiniteElement.cxx | 25 +- src/IGESAppli/IGESAppli_FiniteElement.hxx | 38 +- src/IGESAppli/IGESAppli_Flow.cxx | 79 +- src/IGESAppli/IGESAppli_Flow.hxx | 53 +- src/IGESAppli/IGESAppli_FlowLineSpec.cxx | 11 +- src/IGESAppli/IGESAppli_FlowLineSpec.hxx | 34 +- src/IGESAppli/IGESAppli_GeneralModule.cxx | 680 ++++++------------ src/IGESAppli/IGESAppli_GeneralModule.hxx | 41 +- src/IGESAppli/IGESAppli_LevelFunction.cxx | 20 +- src/IGESAppli/IGESAppli_LevelFunction.hxx | 39 +- .../IGESAppli_LevelToPWBLayerMap.cxx | 25 +- .../IGESAppli_LevelToPWBLayerMap.hxx | 39 +- src/IGESAppli/IGESAppli_LineWidening.cxx | 47 +- src/IGESAppli/IGESAppli_LineWidening.hxx | 53 +- src/IGESAppli/IGESAppli_NodalConstraint.cxx | 26 +- src/IGESAppli/IGESAppli_NodalConstraint.hxx | 40 +- src/IGESAppli/IGESAppli_NodalDisplAndRot.cxx | 36 +- src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx | 39 +- src/IGESAppli/IGESAppli_NodalResults.cxx | 86 ++- src/IGESAppli/IGESAppli_NodalResults.hxx | 46 +- src/IGESAppli/IGESAppli_Node.cxx | 33 +- src/IGESAppli/IGESAppli_Node.hxx | 30 +- src/IGESAppli/IGESAppli_PWBArtworkStackup.cxx | 21 +- src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx | 38 +- src/IGESAppli/IGESAppli_PWBDrilledHole.cxx | 31 +- src/IGESAppli/IGESAppli_PWBDrilledHole.hxx | 45 +- src/IGESAppli/IGESAppli_PartNumber.cxx | 32 +- src/IGESAppli/IGESAppli_PartNumber.hxx | 47 +- src/IGESAppli/IGESAppli_PinNumber.cxx | 22 +- src/IGESAppli/IGESAppli_PinNumber.hxx | 35 +- src/IGESAppli/IGESAppli_PipingFlow.cxx | 73 +- src/IGESAppli/IGESAppli_PipingFlow.hxx | 51 +- src/IGESAppli/IGESAppli_Protocol.cxx | 154 +++- src/IGESAppli/IGESAppli_Protocol.hxx | 31 +- src/IGESAppli/IGESAppli_ReadWriteModule.cxx | 5 - src/IGESAppli/IGESAppli_ReadWriteModule.hxx | 26 +- .../IGESAppli_ReferenceDesignator.cxx | 24 +- .../IGESAppli_ReferenceDesignator.hxx | 35 +- src/IGESAppli/IGESAppli_RegionRestriction.cxx | 40 +- src/IGESAppli/IGESAppli_RegionRestriction.hxx | 44 +- src/IGESAppli/IGESAppli_ToolDrilledHole.cxx | 30 - src/IGESAppli/IGESAppli_ToolDrilledHole.hxx | 38 +- .../IGESAppli_ToolElementResults.cxx | 142 ---- .../IGESAppli_ToolElementResults.hxx | 38 +- src/IGESAppli/IGESAppli_ToolFiniteElement.cxx | 35 - src/IGESAppli/IGESAppli_ToolFiniteElement.hxx | 38 +- src/IGESAppli/IGESAppli_ToolFlow.cxx | 103 --- src/IGESAppli/IGESAppli_ToolFlow.hxx | 37 +- src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx | 27 - src/IGESAppli/IGESAppli_ToolFlowLineSpec.hxx | 38 +- src/IGESAppli/IGESAppli_ToolLevelFunction.cxx | 30 - src/IGESAppli/IGESAppli_ToolLevelFunction.hxx | 38 +- .../IGESAppli_ToolLevelToPWBLayerMap.cxx | 42 -- .../IGESAppli_ToolLevelToPWBLayerMap.hxx | 38 +- src/IGESAppli/IGESAppli_ToolLineWidening.cxx | 36 - src/IGESAppli/IGESAppli_ToolLineWidening.hxx | 38 +- .../IGESAppli_ToolNodalConstraint.cxx | 39 - .../IGESAppli_ToolNodalConstraint.hxx | 38 +- .../IGESAppli_ToolNodalDisplAndRot.cxx | 68 -- .../IGESAppli_ToolNodalDisplAndRot.hxx | 38 +- src/IGESAppli/IGESAppli_ToolNodalResults.cxx | 91 --- src/IGESAppli/IGESAppli_ToolNodalResults.hxx | 38 +- src/IGESAppli/IGESAppli_ToolNode.cxx | 33 - src/IGESAppli/IGESAppli_ToolNode.hxx | 38 +- .../IGESAppli_ToolPWBArtworkStackup.cxx | 29 - .../IGESAppli_ToolPWBArtworkStackup.hxx | 38 +- .../IGESAppli_ToolPWBDrilledHole.cxx | 28 - .../IGESAppli_ToolPWBDrilledHole.hxx | 38 +- src/IGESAppli/IGESAppli_ToolPartNumber.cxx | 33 - src/IGESAppli/IGESAppli_ToolPartNumber.hxx | 38 +- src/IGESAppli/IGESAppli_ToolPinNumber.cxx | 33 - src/IGESAppli/IGESAppli_ToolPinNumber.hxx | 38 +- src/IGESAppli/IGESAppli_ToolPipingFlow.cxx | 92 --- src/IGESAppli/IGESAppli_ToolPipingFlow.hxx | 38 +- .../IGESAppli_ToolReferenceDesignator.cxx | 34 - .../IGESAppli_ToolReferenceDesignator.hxx | 38 +- .../IGESAppli_ToolRegionRestriction.cxx | 38 - .../IGESAppli_ToolRegionRestriction.hxx | 38 +- src/IGESBasic/IGESBasic.cxx | 16 +- src/IGESBasic/IGESBasic.hxx | 114 +-- src/IGESBasic/IGESBasic_GeneralModule.cxx | 223 ------ src/IGESBasic/IGESBasic_GeneralModule.hxx | 42 +- src/IGESBasic/IGESBasic_ReadWriteModule.cxx | 5 - src/IGESBasic/IGESBasic_ReadWriteModule.hxx | 31 +- .../IGESBasic_ToolAssocGroupType.cxx | 19 - .../IGESBasic_ToolAssocGroupType.hxx | 35 +- .../IGESBasic_ToolExternalRefFile.cxx | 23 - .../IGESBasic_ToolExternalRefFile.hxx | 38 +- .../IGESBasic_ToolExternalRefFileIndex.cxx | 29 - .../IGESBasic_ToolExternalRefFileIndex.hxx | 34 +- .../IGESBasic_ToolExternalRefFileName.cxx | 19 - .../IGESBasic_ToolExternalRefFileName.hxx | 35 +- .../IGESBasic_ToolExternalRefLibName.cxx | 25 - .../IGESBasic_ToolExternalRefLibName.hxx | 38 +- .../IGESBasic_ToolExternalRefName.cxx | 23 - .../IGESBasic_ToolExternalRefName.hxx | 38 +- .../IGESBasic_ToolExternalReferenceFile.cxx | 21 - .../IGESBasic_ToolExternalReferenceFile.hxx | 35 +- src/IGESBasic/IGESBasic_ToolGroup.cxx | 22 - src/IGESBasic/IGESBasic_ToolGroup.hxx | 31 +- .../IGESBasic_ToolGroupWithoutBackP.cxx | 22 - .../IGESBasic_ToolGroupWithoutBackP.hxx | 31 +- src/IGESBasic/IGESBasic_ToolHierarchy.cxx | 17 - src/IGESBasic/IGESBasic_ToolHierarchy.hxx | 35 +- src/IGESBasic/IGESBasic_ToolName.cxx | 19 - src/IGESBasic/IGESBasic_ToolName.hxx | 35 +- src/IGESBasic/IGESBasic_ToolOrderedGroup.cxx | 21 - src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx | 31 +- ...IGESBasic_ToolOrderedGroupWithoutBackP.cxx | 22 - ...IGESBasic_ToolOrderedGroupWithoutBackP.hxx | 31 +- src/IGESBasic/IGESBasic_ToolSingleParent.cxx | 23 - src/IGESBasic/IGESBasic_ToolSingleParent.hxx | 31 +- .../IGESBasic_ToolSingularSubfigure.cxx | 27 - .../IGESBasic_ToolSingularSubfigure.hxx | 34 +- src/IGESBasic/IGESBasic_ToolSubfigureDef.cxx | 26 - src/IGESBasic/IGESBasic_ToolSubfigureDef.hxx | 31 +- src/IGESControl/IGESControl_Controller.cxx | 14 +- src/IGESControl/IGESControl_Reader.cxx | 1 - src/IGESData/FILES | 2 - src/IGESData/IGESData_DefaultGeneral.cxx | 26 - src/IGESData/IGESData_DefaultGeneral.hxx | 39 +- src/IGESData/IGESData_FileProtocol.cxx | 32 +- src/IGESData/IGESData_FileProtocol.hxx | 40 +- src/IGESData/IGESData_FileRecognizer.hxx | 100 --- src/IGESData/IGESData_FileRecognizer_0.cxx | 44 -- src/IGESData/IGESData_GeneralModule.cxx | 110 --- src/IGESData/IGESData_GeneralModule.hxx | 34 - src/IGESData/IGESData_IGESEntity.cxx | 2 - src/IGESData/IGESData_IGESEntity.hxx | 38 +- src/IGESData/IGESData_IGESReaderTool.cxx | 36 +- src/IGESData/IGESData_IGESReaderTool.hxx | 16 +- src/IGESData/IGESData_Protocol.cxx | 4 - src/IGESData/IGESData_Protocol.hxx | 28 - src/IGESData/IGESData_ReadWriteModule.cxx | 9 +- src/IGESData/IGESData_ReadWriteModule.hxx | 30 +- src/IGESData/IGESData_SpecificModule.hxx | 26 +- src/IGESDefs/IGESDefs.cxx | 16 +- src/IGESDefs/IGESDefs.hxx | 70 +- src/IGESDefs/IGESDefs_GeneralModule.cxx | 125 ---- src/IGESDefs/IGESDefs_GeneralModule.hxx | 41 +- src/IGESDefs/IGESDefs_ReadWriteModule.cxx | 5 - src/IGESDefs/IGESDefs_ReadWriteModule.hxx | 31 +- .../IGESDefs_ToolAssociativityDef.cxx | 53 -- .../IGESDefs_ToolAssociativityDef.hxx | 38 +- src/IGESDefs/IGESDefs_ToolAttributeDef.cxx | 102 --- src/IGESDefs/IGESDefs_ToolAttributeDef.hxx | 31 +- src/IGESDefs/IGESDefs_ToolAttributeTable.cxx | 84 --- src/IGESDefs/IGESDefs_ToolAttributeTable.hxx | 31 +- src/IGESDefs/IGESDefs_ToolGenericData.cxx | 67 -- src/IGESDefs/IGESDefs_ToolGenericData.hxx | 31 +- src/IGESDefs/IGESDefs_ToolMacroDef.cxx | 37 - src/IGESDefs/IGESDefs_ToolMacroDef.hxx | 38 +- src/IGESDefs/IGESDefs_ToolTabularData.cxx | 53 -- src/IGESDefs/IGESDefs_ToolTabularData.hxx | 38 +- src/IGESDefs/IGESDefs_ToolUnitsData.cxx | 42 -- src/IGESDefs/IGESDefs_ToolUnitsData.hxx | 38 +- src/IGESDimen/IGESDimen.cxx | 16 +- src/IGESDimen/IGESDimen.hxx | 132 +--- src/IGESDimen/IGESDimen_GeneralModule.cxx | 284 -------- src/IGESDimen/IGESDimen_GeneralModule.hxx | 41 +- .../IGESDimen_ToolAngularDimension.cxx | 29 - .../IGESDimen_ToolAngularDimension.hxx | 34 +- .../IGESDimen_ToolBasicDimension.cxx | 17 - .../IGESDimen_ToolBasicDimension.hxx | 35 +- src/IGESDimen/IGESDimen_ToolCenterLine.cxx | 28 - src/IGESDimen/IGESDimen_ToolCenterLine.hxx | 35 +- .../IGESDimen_ToolCurveDimension.cxx | 26 - .../IGESDimen_ToolCurveDimension.hxx | 31 +- .../IGESDimen_ToolDiameterDimension.cxx | 26 - .../IGESDimen_ToolDiameterDimension.hxx | 34 +- .../IGESDimen_ToolDimensionDisplayData.cxx | 48 -- .../IGESDimen_ToolDimensionDisplayData.hxx | 35 +- .../IGESDimen_ToolDimensionTolerance.cxx | 20 - .../IGESDimen_ToolDimensionTolerance.hxx | 35 +- .../IGESDimen_ToolDimensionUnits.cxx | 24 - .../IGESDimen_ToolDimensionUnits.hxx | 35 +- .../IGESDimen_ToolDimensionedGeometry.cxx | 22 - .../IGESDimen_ToolDimensionedGeometry.hxx | 31 +- src/IGESDimen/IGESDimen_ToolFlagNote.cxx | 36 - src/IGESDimen/IGESDimen_ToolFlagNote.hxx | 34 +- src/IGESDimen/IGESDimen_ToolGeneralLabel.cxx | 22 - src/IGESDimen/IGESDimen_ToolGeneralLabel.hxx | 31 +- src/IGESDimen/IGESDimen_ToolGeneralNote.cxx | 77 -- src/IGESDimen/IGESDimen_ToolGeneralNote.hxx | 31 +- src/IGESDimen/IGESDimen_ToolGeneralSymbol.cxx | 35 - src/IGESDimen/IGESDimen_ToolGeneralSymbol.hxx | 31 +- src/IGESDimen/IGESDimen_ToolLeaderArrow.cxx | 35 - src/IGESDimen/IGESDimen_ToolLeaderArrow.hxx | 38 +- .../IGESDimen_ToolLinearDimension.cxx | 28 - .../IGESDimen_ToolLinearDimension.hxx | 34 +- .../IGESDimen_ToolNewDimensionedGeometry.cxx | 33 - .../IGESDimen_ToolNewDimensionedGeometry.hxx | 31 +- .../IGESDimen_ToolNewGeneralNote.cxx | 96 --- .../IGESDimen_ToolNewGeneralNote.hxx | 31 +- .../IGESDimen_ToolOrdinateDimension.cxx | 16 - .../IGESDimen_ToolOrdinateDimension.hxx | 31 +- .../IGESDimen_ToolPointDimension.cxx | 22 - .../IGESDimen_ToolPointDimension.hxx | 34 +- .../IGESDimen_ToolRadiusDimension.cxx | 19 - .../IGESDimen_ToolRadiusDimension.hxx | 31 +- src/IGESDimen/IGESDimen_ToolSection.cxx | 28 - src/IGESDimen/IGESDimen_ToolSection.hxx | 35 +- src/IGESDimen/IGESDimen_ToolSectionedArea.cxx | 36 - src/IGESDimen/IGESDimen_ToolSectionedArea.hxx | 34 +- src/IGESDimen/IGESDimen_ToolWitnessLine.cxx | 27 - src/IGESDimen/IGESDimen_ToolWitnessLine.hxx | 35 +- src/IGESDraw/IGESDraw.cxx | 16 +- src/IGESDraw/IGESDraw.hxx | 96 +-- src/IGESDraw/IGESDraw_GeneralModule.cxx | 207 ------ src/IGESDraw/IGESDraw_GeneralModule.hxx | 50 +- .../IGESDraw_ToolCircArraySubfigure.cxx | 41 -- .../IGESDraw_ToolCircArraySubfigure.hxx | 38 +- src/IGESDraw/IGESDraw_ToolConnectPoint.cxx | 32 - src/IGESDraw/IGESDraw_ToolConnectPoint.hxx | 31 +- src/IGESDraw/IGESDraw_ToolDrawing.cxx | 42 -- src/IGESDraw/IGESDraw_ToolDrawing.hxx | 31 +- .../IGESDraw_ToolDrawingWithRotation.cxx | 45 -- .../IGESDraw_ToolDrawingWithRotation.hxx | 31 +- src/IGESDraw/IGESDraw_ToolLabelDisplay.cxx | 50 -- src/IGESDraw/IGESDraw_ToolLabelDisplay.hxx | 34 +- .../IGESDraw_ToolNetworkSubfigure.cxx | 41 -- .../IGESDraw_ToolNetworkSubfigure.hxx | 31 +- .../IGESDraw_ToolNetworkSubfigureDef.cxx | 48 -- .../IGESDraw_ToolNetworkSubfigureDef.hxx | 31 +- src/IGESDraw/IGESDraw_ToolPerspectiveView.cxx | 21 - src/IGESDraw/IGESDraw_ToolPerspectiveView.hxx | 35 +- src/IGESDraw/IGESDraw_ToolPlanar.cxx | 27 - src/IGESDraw/IGESDraw_ToolPlanar.hxx | 31 +- .../IGESDraw_ToolRectArraySubfigure.cxx | 37 - .../IGESDraw_ToolRectArraySubfigure.hxx | 34 +- .../IGESDraw_ToolSegmentedViewsVisible.cxx | 82 --- .../IGESDraw_ToolSegmentedViewsVisible.hxx | 34 +- src/IGESDraw/IGESDraw_ToolView.cxx | 26 - src/IGESDraw/IGESDraw_ToolView.hxx | 31 +- src/IGESDraw/IGESDraw_ToolViewsVisible.cxx | 53 -- src/IGESDraw/IGESDraw_ToolViewsVisible.hxx | 40 +- .../IGESDraw_ToolViewsVisibleWithAttr.cxx | 84 --- .../IGESDraw_ToolViewsVisibleWithAttr.hxx | 40 +- src/IGESFile/IGESFile_Read.cxx | 29 +- src/IGESFile/IGESFile_Read.hxx | 13 - src/IGESGeom/IGESGeom.cxx | 16 +- src/IGESGeom/IGESGeom.hxx | 132 +--- src/IGESGeom/IGESGeom_GeneralModule.cxx | 307 -------- src/IGESGeom/IGESGeom_GeneralModule.hxx | 41 +- src/IGESGeom/IGESGeom_SpecificModule.cxx | 5 - src/IGESGeom/IGESGeom_SpecificModule.hxx | 26 +- src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx | 74 -- src/IGESGeom/IGESGeom_ToolBSplineCurve.hxx | 35 +- src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx | 82 --- src/IGESGeom/IGESGeom_ToolBSplineSurface.hxx | 35 +- src/IGESGeom/IGESGeom_ToolBoundary.cxx | 58 -- src/IGESGeom/IGESGeom_ToolBoundary.hxx | 31 +- src/IGESGeom/IGESGeom_ToolBoundedSurface.cxx | 37 - src/IGESGeom/IGESGeom_ToolBoundedSurface.hxx | 31 +- src/IGESGeom/IGESGeom_ToolCircularArc.cxx | 39 - src/IGESGeom/IGESGeom_ToolCircularArc.hxx | 38 +- src/IGESGeom/IGESGeom_ToolCompositeCurve.cxx | 26 - src/IGESGeom/IGESGeom_ToolCompositeCurve.hxx | 34 +- src/IGESGeom/IGESGeom_ToolConicArc.cxx | 37 - src/IGESGeom/IGESGeom_ToolConicArc.hxx | 35 +- src/IGESGeom/IGESGeom_ToolCopiousData.cxx | 73 -- src/IGESGeom/IGESGeom_ToolCopiousData.hxx | 35 +- src/IGESGeom/IGESGeom_ToolCurveOnSurface.cxx | 30 - src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx | 31 +- src/IGESGeom/IGESGeom_ToolDirection.cxx | 15 - src/IGESGeom/IGESGeom_ToolDirection.hxx | 35 +- src/IGESGeom/IGESGeom_ToolFlash.cxx | 18 - src/IGESGeom/IGESGeom_ToolFlash.hxx | 31 +- src/IGESGeom/IGESGeom_ToolLine.cxx | 22 - src/IGESGeom/IGESGeom_ToolLine.hxx | 38 +- src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx | 44 -- src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx | 31 +- src/IGESGeom/IGESGeom_ToolOffsetSurface.cxx | 22 - src/IGESGeom/IGESGeom_ToolOffsetSurface.hxx | 34 +- src/IGESGeom/IGESGeom_ToolPlane.cxx | 30 - src/IGESGeom/IGESGeom_ToolPlane.hxx | 31 +- src/IGESGeom/IGESGeom_ToolPoint.cxx | 21 - src/IGESGeom/IGESGeom_ToolPoint.hxx | 34 +- src/IGESGeom/IGESGeom_ToolRuledSurface.cxx | 24 - src/IGESGeom/IGESGeom_ToolRuledSurface.hxx | 34 +- src/IGESGeom/IGESGeom_ToolSplineCurve.cxx | 83 --- src/IGESGeom/IGESGeom_ToolSplineCurve.hxx | 35 +- src/IGESGeom/IGESGeom_ToolSplineSurface.cxx | 61 -- src/IGESGeom/IGESGeom_ToolSplineSurface.hxx | 35 +- .../IGESGeom_ToolSurfaceOfRevolution.cxx | 27 - .../IGESGeom_ToolSurfaceOfRevolution.hxx | 34 +- .../IGESGeom_ToolTabulatedCylinder.cxx | 21 - .../IGESGeom_ToolTabulatedCylinder.hxx | 34 +- .../IGESGeom_ToolTransformationMatrix.cxx | 42 -- .../IGESGeom_ToolTransformationMatrix.hxx | 35 +- src/IGESGeom/IGESGeom_ToolTrimmedSurface.cxx | 42 -- src/IGESGeom/IGESGeom_ToolTrimmedSurface.hxx | 31 +- src/IGESGraph/IGESGraph.cxx | 16 +- src/IGESGraph/IGESGraph.hxx | 96 +-- src/IGESGraph/IGESGraph_GeneralModule.cxx | 223 ------ src/IGESGraph/IGESGraph_GeneralModule.hxx | 41 +- src/IGESGraph/IGESGraph_Protocol.cxx | 12 +- src/IGESGraph/IGESGraph_ToolColor.cxx | 31 - src/IGESGraph/IGESGraph_ToolColor.hxx | 38 +- .../IGESGraph_ToolDefinitionLevel.cxx | 30 - .../IGESGraph_ToolDefinitionLevel.hxx | 38 +- src/IGESGraph/IGESGraph_ToolDrawingSize.cxx | 15 - src/IGESGraph/IGESGraph_ToolDrawingSize.hxx | 35 +- src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx | 23 - src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx | 35 +- src/IGESGraph/IGESGraph_ToolHighLight.cxx | 15 - src/IGESGraph/IGESGraph_ToolHighLight.hxx | 35 +- .../IGESGraph_ToolIntercharacterSpacing.cxx | 16 - .../IGESGraph_ToolIntercharacterSpacing.hxx | 35 +- .../IGESGraph_ToolLineFontDefPattern.cxx | 24 - .../IGESGraph_ToolLineFontDefPattern.hxx | 35 +- .../IGESGraph_ToolLineFontDefTemplate.cxx | 16 - .../IGESGraph_ToolLineFontDefTemplate.hxx | 31 +- .../IGESGraph_ToolLineFontPredefined.cxx | 15 - .../IGESGraph_ToolLineFontPredefined.hxx | 35 +- src/IGESGraph/IGESGraph_ToolNominalSize.cxx | 26 - src/IGESGraph/IGESGraph_ToolNominalSize.hxx | 35 +- src/IGESGraph/IGESGraph_ToolPick.cxx | 15 - src/IGESGraph/IGESGraph_ToolPick.hxx | 35 +- .../IGESGraph_ToolTextDisplayTemplate.cxx | 42 -- .../IGESGraph_ToolTextDisplayTemplate.hxx | 34 +- src/IGESGraph/IGESGraph_ToolTextFontDef.cxx | 81 --- src/IGESGraph/IGESGraph_ToolTextFontDef.hxx | 34 +- .../IGESGraph_ToolUniformRectGrid.cxx | 19 - .../IGESGraph_ToolUniformRectGrid.hxx | 35 +- src/IGESSolid/IGESSolid.cxx | 17 +- src/IGESSolid/IGESSolid.hxx | 8 +- src/IGESSolid/IGESSolid_Block.cxx | 115 ++- src/IGESSolid/IGESSolid_Block.hxx | 44 +- src/IGESSolid/IGESSolid_BooleanTree.cxx | 49 +- src/IGESSolid/IGESSolid_BooleanTree.hxx | 32 +- src/IGESSolid/IGESSolid_ConeFrustum.cxx | 64 +- src/IGESSolid/IGESSolid_ConeFrustum.hxx | 42 +- src/IGESSolid/IGESSolid_ConicalSurface.cxx | 42 +- src/IGESSolid/IGESSolid_ConicalSurface.hxx | 45 +- src/IGESSolid/IGESSolid_Cylinder.cxx | 57 +- src/IGESSolid/IGESSolid_Cylinder.hxx | 38 +- .../IGESSolid_CylindricalSurface.cxx | 36 +- .../IGESSolid_CylindricalSurface.hxx | 49 +- src/IGESSolid/IGESSolid_EdgeList.cxx | 44 +- src/IGESSolid/IGESSolid_EdgeList.hxx | 38 +- src/IGESSolid/IGESSolid_Ellipsoid.cxx | 117 ++- src/IGESSolid/IGESSolid_Ellipsoid.hxx | 46 +- src/IGESSolid/IGESSolid_Face.cxx | 32 +- src/IGESSolid/IGESSolid_Face.hxx | 38 +- src/IGESSolid/IGESSolid_GeneralModule.cxx | 270 +------ src/IGESSolid/IGESSolid_GeneralModule.hxx | 45 +- src/IGESSolid/IGESSolid_Loop.cxx | 58 +- src/IGESSolid/IGESSolid_Loop.hxx | 35 +- src/IGESSolid/IGESSolid_ManifoldSolid.cxx | 33 +- src/IGESSolid/IGESSolid_ManifoldSolid.hxx | 40 +- src/IGESSolid/IGESSolid_PlaneSurface.cxx | 30 +- src/IGESSolid/IGESSolid_PlaneSurface.hxx | 43 +- src/IGESSolid/IGESSolid_Protocol.cxx | 5 +- src/IGESSolid/IGESSolid_Protocol.hxx | 35 +- src/IGESSolid/IGESSolid_RightAngularWedge.cxx | 124 ++-- src/IGESSolid/IGESSolid_RightAngularWedge.hxx | 50 +- src/IGESSolid/IGESSolid_SelectedComponent.cxx | 30 +- src/IGESSolid/IGESSolid_SelectedComponent.hxx | 31 +- src/IGESSolid/IGESSolid_Shell.cxx | 39 +- src/IGESSolid/IGESSolid_Shell.hxx | 34 +- src/IGESSolid/IGESSolid_SolidAssembly.cxx | 33 +- src/IGESSolid/IGESSolid_SolidAssembly.hxx | 37 +- src/IGESSolid/IGESSolid_SolidInstance.cxx | 19 +- src/IGESSolid/IGESSolid_SolidInstance.hxx | 33 +- .../IGESSolid_SolidOfLinearExtrusion.cxx | 34 +- .../IGESSolid_SolidOfLinearExtrusion.hxx | 39 +- src/IGESSolid/IGESSolid_SolidOfRevolution.cxx | 65 +- src/IGESSolid/IGESSolid_SolidOfRevolution.hxx | 40 +- src/IGESSolid/IGESSolid_Sphere.cxx | 31 +- src/IGESSolid/IGESSolid_Sphere.hxx | 34 +- src/IGESSolid/IGESSolid_SphericalSurface.cxx | 49 +- src/IGESSolid/IGESSolid_SphericalSurface.hxx | 44 +- src/IGESSolid/IGESSolid_ToolBlock.cxx | 29 - src/IGESSolid/IGESSolid_ToolBlock.hxx | 38 +- src/IGESSolid/IGESSolid_ToolBooleanTree.cxx | 62 -- src/IGESSolid/IGESSolid_ToolBooleanTree.hxx | 38 +- src/IGESSolid/IGESSolid_ToolConeFrustum.cxx | 31 - src/IGESSolid/IGESSolid_ToolConeFrustum.hxx | 38 +- .../IGESSolid_ToolConicalSurface.cxx | 51 -- .../IGESSolid_ToolConicalSurface.hxx | 38 +- src/IGESSolid/IGESSolid_ToolCylinder.cxx | 27 - src/IGESSolid/IGESSolid_ToolCylinder.hxx | 38 +- .../IGESSolid_ToolCylindricalSurface.cxx | 48 -- .../IGESSolid_ToolCylindricalSurface.hxx | 38 +- src/IGESSolid/IGESSolid_ToolEdgeList.cxx | 102 --- src/IGESSolid/IGESSolid_ToolEdgeList.hxx | 38 +- src/IGESSolid/IGESSolid_ToolEllipsoid.cxx | 30 - src/IGESSolid/IGESSolid_ToolEllipsoid.hxx | 38 +- src/IGESSolid/IGESSolid_ToolFace.cxx | 74 -- src/IGESSolid/IGESSolid_ToolFace.hxx | 38 +- src/IGESSolid/IGESSolid_ToolLoop.cxx | 117 --- src/IGESSolid/IGESSolid_ToolLoop.hxx | 38 +- src/IGESSolid/IGESSolid_ToolManifoldSolid.cxx | 45 -- src/IGESSolid/IGESSolid_ToolManifoldSolid.hxx | 38 +- src/IGESSolid/IGESSolid_ToolPlaneSurface.cxx | 76 -- src/IGESSolid/IGESSolid_ToolPlaneSurface.hxx | 38 +- .../IGESSolid_ToolRightAngularWedge.cxx | 32 - .../IGESSolid_ToolRightAngularWedge.hxx | 38 +- .../IGESSolid_ToolSelectedComponent.cxx | 25 - .../IGESSolid_ToolSelectedComponent.hxx | 38 +- src/IGESSolid/IGESSolid_ToolShell.cxx | 72 -- src/IGESSolid/IGESSolid_ToolShell.hxx | 38 +- src/IGESSolid/IGESSolid_ToolSolidAssembly.cxx | 47 -- src/IGESSolid/IGESSolid_ToolSolidAssembly.hxx | 38 +- src/IGESSolid/IGESSolid_ToolSolidInstance.cxx | 24 - src/IGESSolid/IGESSolid_ToolSolidInstance.hxx | 38 +- .../IGESSolid_ToolSolidOfLinearExtrusion.cxx | 29 - .../IGESSolid_ToolSolidOfLinearExtrusion.hxx | 38 +- .../IGESSolid_ToolSolidOfRevolution.cxx | 29 - .../IGESSolid_ToolSolidOfRevolution.hxx | 38 +- src/IGESSolid/IGESSolid_ToolSphere.cxx | 23 - src/IGESSolid/IGESSolid_ToolSphere.hxx | 38 +- .../IGESSolid_ToolSphericalSurface.cxx | 49 -- .../IGESSolid_ToolSphericalSurface.hxx | 38 +- .../IGESSolid_ToolToroidalSurface.cxx | 50 -- .../IGESSolid_ToolToroidalSurface.hxx | 38 +- src/IGESSolid/IGESSolid_ToolTorus.cxx | 28 - src/IGESSolid/IGESSolid_ToolTorus.hxx | 38 +- src/IGESSolid/IGESSolid_ToolVertexList.cxx | 66 -- src/IGESSolid/IGESSolid_ToolVertexList.hxx | 38 +- src/IGESSolid/IGESSolid_ToroidalSurface.cxx | 57 +- src/IGESSolid/IGESSolid_ToroidalSurface.hxx | 50 +- src/IGESSolid/IGESSolid_Torus.cxx | 61 +- src/IGESSolid/IGESSolid_Torus.hxx | 38 +- src/IGESSolid/IGESSolid_VertexList.cxx | 19 +- src/IGESSolid/IGESSolid_VertexList.hxx | 30 +- src/IGESToBRep/IGESToBRep_Reader.cxx | 22 +- src/Interface/FILES | 6 - src/Interface/Interface_CopyControl.cxx | 20 - src/Interface/Interface_CopyControl.hxx | 80 --- src/Interface/Interface_CopyMap.cxx | 61 -- src/Interface/Interface_CopyMap.hxx | 88 --- src/Interface/Interface_CopyTool.cxx | 314 -------- src/Interface/Interface_CopyTool.hxx | 218 ------ src/Interface/Interface_FileReaderTool.cxx | 36 +- src/Interface/Interface_FileReaderTool.hxx | 27 +- src/Interface/Interface_GeneralModule.cxx | 30 - src/Interface/Interface_GeneralModule.hxx | 100 +-- src/Interface/Interface_Protocol.hxx | 5 +- src/Interface/Interface_ReaderModule.cxx | 10 - src/Interface/Interface_ReaderModule.hxx | 12 - src/Interface/Interface_ReportEntity.cxx | 90 +-- src/Interface/Interface_ReportEntity.hxx | 43 +- src/Interface/Interface_UndefinedContent.cxx | 25 - src/Interface/Interface_UndefinedContent.hxx | 29 +- src/LibCtl/LibCtl_Library.gxx | 14 +- .../RWHeaderSection_GeneralModule.cxx | 107 +-- .../RWHeaderSection_GeneralModule.hxx | 30 +- src/RWStepAP214/RWStepAP214_GeneralModule.cxx | 14 - src/RWStepAP214/RWStepAP214_GeneralModule.hxx | 27 - src/StepData/StepData_GeneralModule.hxx | 1 - src/StepData/StepData_Protocol.cxx | 7 - src/StepData/StepData_Protocol.hxx | 3 - src/StepData/StepData_ReadWriteModule.hxx | 28 +- src/StepData/StepData_StepModel.cxx | 1 - src/StepData/StepData_StepReaderTool.cxx | 51 +- src/StepData/StepData_StepReaderTool.hxx | 21 +- src/StepData/StepData_UndefinedEntity.cxx | 16 - src/StepData/StepData_UndefinedEntity.hxx | 27 +- src/StepData/StepData_WriterLib.hxx | 10 +- src/StepFile/StepFile_Read.cxx | 2 - src/StepSelect/StepSelect_StepType.cxx | 10 +- src/XSDRAWIGES/XSDRAWIGES.cxx | 1 - 472 files changed, 2321 insertions(+), 18283 deletions(-) delete mode 100644 src/IGESData/IGESData_FileRecognizer.hxx delete mode 100644 src/IGESData/IGESData_FileRecognizer_0.cxx delete mode 100644 src/Interface/Interface_CopyControl.cxx delete mode 100644 src/Interface/Interface_CopyControl.hxx delete mode 100644 src/Interface/Interface_CopyMap.cxx delete mode 100644 src/Interface/Interface_CopyMap.hxx delete mode 100644 src/Interface/Interface_CopyTool.cxx delete mode 100644 src/Interface/Interface_CopyTool.hxx diff --git a/src/IFSelect/IFSelect_SelectPointed.cxx b/src/IFSelect/IFSelect_SelectPointed.cxx index c374a66410..52f665eb4c 100644 --- a/src/IFSelect/IFSelect_SelectPointed.cxx +++ b/src/IFSelect/IFSelect_SelectPointed.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include @@ -146,18 +145,6 @@ IFSelect_SelectPointed::IFSelect_SelectPointed () return theitems.Value(num); } - void IFSelect_SelectPointed::Update - (const Handle(Interface_CopyControl)& control) -{ - Standard_Integer nb = theitems.Length(); - for (Standard_Integer i = nb; i > 0; i --) { - Handle(Standard_Transient) enfr, ento; - enfr = theitems.Value(i); - if (!control->Search(enfr,ento)) theitems.Remove(i); - else theitems.SetValue(i,ento); - } -} - // .... Actions Generales Interface_EntityIterator IFSelect_SelectPointed::RootResult diff --git a/src/IFSelect/IFSelect_SelectPointed.hxx b/src/IFSelect/IFSelect_SelectPointed.hxx index af27105f35..a4c8a41055 100644 --- a/src/IFSelect/IFSelect_SelectPointed.hxx +++ b/src/IFSelect/IFSelect_SelectPointed.hxx @@ -27,7 +27,6 @@ #include class Interface_InterfaceError; class Standard_Transient; -class Interface_CopyControl; class Interface_EntityIterator; class Interface_Graph; class TCollection_AsciiString; @@ -106,10 +105,6 @@ public: //! Returns an item given its rank, or a Null Handle Standard_EXPORT Handle(Standard_Transient) Item (const Standard_Integer num) const; - //! Rebuilds the selected list. Any selected entity which has a - //! bound result is replaced by this result, else it is removed. - Standard_EXPORT void Update (const Handle(Interface_CopyControl)& control); - //! Returns the list of selected items. Only the selected entities //! which are present in the graph are given (this result assures //! uniqueness). @@ -119,29 +114,12 @@ public: //! It is "Pointed Entities" Standard_EXPORT TCollection_AsciiString Label() const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IFSelect_SelectPointed,IFSelect_SelectBase) -protected: - - - - -private: - + private: Standard_Boolean theset; TColStd_SequenceOfTransient theitems; - - }; - - - - - - #endif // _IFSelect_SelectPointed_HeaderFile diff --git a/src/IGESAppli/IGESAppli.cxx b/src/IGESAppli/IGESAppli.cxx index cba9bf81b2..dd4dc47d39 100644 --- a/src/IGESAppli/IGESAppli.cxx +++ b/src/IGESAppli/IGESAppli.cxx @@ -24,26 +24,56 @@ #include #include -// Ancillary data to work on a Package of IGES Entities with a Protocol -// (Modules are created and loaded in appropriate libraries, once by Init) -static Handle(IGESAppli_Protocol) protocol; - +#include +#include +#include +#include +#include +//#include +void IGESAppli::Init () +{ + //Instead of IGESSolid::Init(); { + //Instead of IGESGeom::Init(); { + //Instead of IGESBasic::Init(); { + IGESData::Init(); // usefull for Undefined Type or Erroneous Entities + IGESBasic::Protocol(); + //} + IGESGeom::Protocol(); + //} + //IGESSolid::Protocol(); + //} + //Instead of IGESDefs::Init(); { + //Instead of IGESGraph::Init(); { + //IGESBasic::Init(); + IGESGraph::Protocol(); + //} + IGESDefs::Protocol(); + //} + //Instead of IGESDraw::Init(); { + //Instead of IGESDimen::Init(); { + //IGESGeom::Init(); + //IGESGraph::Init(); + IGESDimen::Protocol(); + //} + IGESDraw::Protocol(); + //} + IGESAppli::Protocol(); +} - void IGESAppli::Init () +const Handle(IGESAppli_Protocol) & IGESAppli::Protocol () { - IGESDefs::Init(); - IGESDraw::Init(); + static Handle(IGESAppli_Protocol) protocol; if (protocol.IsNull()) { protocol = new IGESAppli_Protocol; + /*Interface_GeneralLib::SetGlobal (new IGESSolid_GeneralModule, protocol); + Interface_ReaderLib::SetGlobal (new IGESSolid_ReadWriteModule,protocol); + IGESData_WriterLib::SetGlobal (new IGESSolid_ReadWriteModule,protocol); + IGESData_SpecificLib::SetGlobal (new IGESSolid_SpecificModule, protocol);*/ Interface_GeneralLib::SetGlobal (new IGESAppli_GeneralModule, protocol); Interface_ReaderLib::SetGlobal (new IGESAppli_ReadWriteModule,protocol); IGESData_WriterLib::SetGlobal (new IGESAppli_ReadWriteModule,protocol); IGESData_SpecificLib::SetGlobal (new IGESAppli_SpecificModule, protocol); } -} - - Handle(IGESAppli_Protocol) IGESAppli::Protocol () -{ return protocol; } diff --git a/src/IGESAppli/IGESAppli.hxx b/src/IGESAppli/IGESAppli.hxx index 1f544e9645..0f67ebedb4 100644 --- a/src/IGESAppli/IGESAppli.hxx +++ b/src/IGESAppli/IGESAppli.hxx @@ -18,132 +18,21 @@ #define _IGESAppli_HeaderFile #include -#include #include - -class IGESAppli_Protocol; -class IGESAppli_Node; -class IGESAppli_FiniteElement; -class IGESAppli_NodalDisplAndRot; -class IGESAppli_NodalResults; -class IGESAppli_ElementResults; -class IGESAppli_Flow; -class IGESAppli_PipingFlow; -class IGESAppli_RegionRestriction; -class IGESAppli_LevelFunction; -class IGESAppli_LineWidening; -class IGESAppli_DrilledHole; -class IGESAppli_ReferenceDesignator; -class IGESAppli_PinNumber; -class IGESAppli_PartNumber; -class IGESAppli_FlowLineSpec; -class IGESAppli_LevelToPWBLayerMap; -class IGESAppli_PWBArtworkStackup; -class IGESAppli_PWBDrilledHole; -class IGESAppli_NodalConstraint; -class IGESAppli_ToolNode; -class IGESAppli_ToolFiniteElement; -class IGESAppli_ToolNodalDisplAndRot; -class IGESAppli_ToolNodalResults; -class IGESAppli_ToolElementResults; -class IGESAppli_ToolFlow; -class IGESAppli_ToolPipingFlow; -class IGESAppli_ToolRegionRestriction; -class IGESAppli_ToolLevelFunction; -class IGESAppli_ToolLineWidening; -class IGESAppli_ToolDrilledHole; -class IGESAppli_ToolReferenceDesignator; -class IGESAppli_ToolPinNumber; -class IGESAppli_ToolPartNumber; -class IGESAppli_ToolFlowLineSpec; -class IGESAppli_ToolLevelToPWBLayerMap; -class IGESAppli_ToolPWBArtworkStackup; -class IGESAppli_ToolPWBDrilledHole; -class IGESAppli_ToolNodalConstraint; class IGESAppli_Protocol; -class IGESAppli_ReadWriteModule; -class IGESAppli_GeneralModule; -class IGESAppli_SpecificModule; //! This package represents collection of miscellaneous //! entities from IGES class IGESAppli { -public: - - DEFINE_STANDARD_ALLOC + public: - //! Prepares dynamic data (Protocol, Modules) for this package Standard_EXPORT static void Init(); //! Returns the Protocol for this Package - Standard_EXPORT static Handle(IGESAppli_Protocol) Protocol(); - - - - -protected: - - - - - -private: - - - - -friend class IGESAppli_Node; -friend class IGESAppli_FiniteElement; -friend class IGESAppli_NodalDisplAndRot; -friend class IGESAppli_NodalResults; -friend class IGESAppli_ElementResults; -friend class IGESAppli_Flow; -friend class IGESAppli_PipingFlow; -friend class IGESAppli_RegionRestriction; -friend class IGESAppli_LevelFunction; -friend class IGESAppli_LineWidening; -friend class IGESAppli_DrilledHole; -friend class IGESAppli_ReferenceDesignator; -friend class IGESAppli_PinNumber; -friend class IGESAppli_PartNumber; -friend class IGESAppli_FlowLineSpec; -friend class IGESAppli_LevelToPWBLayerMap; -friend class IGESAppli_PWBArtworkStackup; -friend class IGESAppli_PWBDrilledHole; -friend class IGESAppli_NodalConstraint; -friend class IGESAppli_ToolNode; -friend class IGESAppli_ToolFiniteElement; -friend class IGESAppli_ToolNodalDisplAndRot; -friend class IGESAppli_ToolNodalResults; -friend class IGESAppli_ToolElementResults; -friend class IGESAppli_ToolFlow; -friend class IGESAppli_ToolPipingFlow; -friend class IGESAppli_ToolRegionRestriction; -friend class IGESAppli_ToolLevelFunction; -friend class IGESAppli_ToolLineWidening; -friend class IGESAppli_ToolDrilledHole; -friend class IGESAppli_ToolReferenceDesignator; -friend class IGESAppli_ToolPinNumber; -friend class IGESAppli_ToolPartNumber; -friend class IGESAppli_ToolFlowLineSpec; -friend class IGESAppli_ToolLevelToPWBLayerMap; -friend class IGESAppli_ToolPWBArtworkStackup; -friend class IGESAppli_ToolPWBDrilledHole; -friend class IGESAppli_ToolNodalConstraint; -friend class IGESAppli_Protocol; -friend class IGESAppli_ReadWriteModule; -friend class IGESAppli_GeneralModule; -friend class IGESAppli_SpecificModule; - + Standard_EXPORT static const Handle(IGESAppli_Protocol) & Protocol(); }; - - - - - - #endif // _IGESAppli_HeaderFile diff --git a/src/IGESAppli/IGESAppli_DrilledHole.cxx b/src/IGESAppli/IGESAppli_DrilledHole.cxx index d612ffce1d..521a0a7471 100644 --- a/src/IGESAppli/IGESAppli_DrilledHole.cxx +++ b/src/IGESAppli/IGESAppli_DrilledHole.cxx @@ -17,13 +17,10 @@ //-------------------------------------------------------------------- #include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_DrilledHole,IGESData_IGESEntity) -IGESAppli_DrilledHole::IGESAppli_DrilledHole () { } - - void IGESAppli_DrilledHole::Init +void IGESAppli_DrilledHole::Init (const Standard_Integer nbPropVal, const Standard_Real aSize, const Standard_Real anotherSize, const Standard_Integer aPlating, const Standard_Integer aLayer, @@ -38,33 +35,12 @@ IGESAppli_DrilledHole::IGESAppli_DrilledHole () { } InitTypeAndForm(406,6); } - - Standard_Integer IGESAppli_DrilledHole::NbPropertyValues () const -{ - return theNbPropertyValues; -} - - Standard_Real IGESAppli_DrilledHole::DrillDiaSize () const -{ - return theDrillDiaSize; -} - - Standard_Real IGESAppli_DrilledHole::FinishDiaSize () const -{ - return theFinishDiaSize; -} - - Standard_Boolean IGESAppli_DrilledHole::IsPlating () const -{ - return (thePlatingFlag != 0); -} - - Standard_Integer IGESAppli_DrilledHole::NbLowerLayer () const -{ - return theNbLowerLayer; -} - - Standard_Integer IGESAppli_DrilledHole::NbHigherLayer () const +void IGESAppli_DrilledHole::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return theNbHigherLayer; + if (SubordinateStatus() != 0) + if (DefLevel() != IGESData_DefOne && + DefLevel() != IGESData_DefSeveral) + theCheck->AddFail("Level type : Not value/reference"); + if (NbPropertyValues() != 5) + theCheck->AddFail("Number of Property Values != 5"); } diff --git a/src/IGESAppli/IGESAppli_DrilledHole.hxx b/src/IGESAppli/IGESAppli_DrilledHole.hxx index c533f9084e..673f95c020 100644 --- a/src/IGESAppli/IGESAppli_DrilledHole.hxx +++ b/src/IGESAppli/IGESAppli_DrilledHole.hxx @@ -17,14 +17,7 @@ #ifndef _IGESAppli_DrilledHole_HeaderFile #define _IGESAppli_DrilledHole_HeaderFile -#include -#include - -#include -#include #include -#include - class IGESAppli_DrilledHole; DEFINE_STANDARD_HANDLE(IGESAppli_DrilledHole, IGESData_IGESEntity) @@ -35,11 +28,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_DrilledHole, IGESData_IGESEntity) //! through a printed circuit board. class IGESAppli_DrilledHole : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_DrilledHole(); + IGESAppli_DrilledHole() {} //! This method is used to set the fields of the class //! DrilledHole @@ -54,36 +45,29 @@ public: Standard_EXPORT void Init (const Standard_Integer nbPropVal, const Standard_Real aSize, const Standard_Real anotherSize, const Standard_Integer aPlating, const Standard_Integer aLayer, const Standard_Integer anotherLayer); //! is always 5 - Standard_EXPORT Standard_Integer NbPropertyValues() const; - + Standard_Integer NbPropertyValues() const { return theNbPropertyValues; } + //! returns the drill diameter size - Standard_EXPORT Standard_Real DrillDiaSize() const; - + Standard_Real DrillDiaSize() const { return theDrillDiaSize; } + //! returns the finish diameter size - Standard_EXPORT Standard_Real FinishDiaSize() const; - + Standard_Real FinishDiaSize() const { return theFinishDiaSize; } + //! Returns Plating Status : //! False = not plating / True = is plating - Standard_EXPORT Standard_Boolean IsPlating() const; - - //! returns the lower numbered layer - Standard_EXPORT Standard_Integer NbLowerLayer() const; - - //! returns the higher numbered layer - Standard_EXPORT Standard_Integer NbHigherLayer() const; + Standard_Boolean IsPlating() const { return (thePlatingFlag != 0); } + //! returns the lower numbered layer + Standard_Integer NbLowerLayer() const { return theNbLowerLayer; } + //! returns the higher numbered layer + Standard_Integer NbHigherLayer() const { return theNbHigherLayer; } + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_DrilledHole,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbPropertyValues; Standard_Real theDrillDiaSize; @@ -91,14 +75,6 @@ private: Standard_Integer thePlatingFlag; Standard_Integer theNbLowerLayer; Standard_Integer theNbHigherLayer; - - }; - - - - - - #endif // _IGESAppli_DrilledHole_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ElementResults.cxx b/src/IGESAppli/IGESAppli_ElementResults.cxx index d7a10d7d50..90500c6435 100644 --- a/src/IGESAppli/IGESAppli_ElementResults.cxx +++ b/src/IGESAppli/IGESAppli_ElementResults.cxx @@ -24,13 +24,11 @@ #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_ElementResults,IGESData_IGESEntity) -IGESAppli_ElementResults::IGESAppli_ElementResults () { } - - void IGESAppli_ElementResults::Init +void IGESAppli_ElementResults::Init (const Handle(IGESDimen_GeneralNote)& aNote, const Standard_Integer aSubCase, const Standard_Real aTime, const Standard_Integer nbResults, const Standard_Integer aResRepFlag, @@ -83,101 +81,66 @@ IGESAppli_ElementResults::IGESAppli_ElementResults () { } // FormNumber -> Type of the Results } - void IGESAppli_ElementResults::SetFormNumber (const Standard_Integer form) +void IGESAppli_ElementResults::SetFormNumber (const Standard_Integer form) { if (form < 0 || form > 34) Standard_OutOfRange::Raise ("IGESAppli_ElementResults : SetFormNumber"); InitTypeAndForm(148,form); } - - Handle(IGESDimen_GeneralNote) IGESAppli_ElementResults::Note () const -{ - return theNote; -} - - Standard_Integer IGESAppli_ElementResults::SubCaseNumber () const -{ - return theSubcaseNumber; -} - - Standard_Real IGESAppli_ElementResults::Time () const -{ - return theTime; -} - - Standard_Integer IGESAppli_ElementResults::NbResultValues () const -{ - return theNbResultValues; -} - - Standard_Integer IGESAppli_ElementResults::ResultReportFlag () const -{ - return theResultReportFlag; -} - - Standard_Integer IGESAppli_ElementResults::NbElements () const +Standard_Integer IGESAppli_ElementResults::NbElements () const { return theElements->Length(); } - Standard_Integer IGESAppli_ElementResults::ElementIdentifier - (const Standard_Integer Index) const +Standard_Integer IGESAppli_ElementResults::ElementIdentifier (const Standard_Integer Index) const { return theElementIdentifiers->Value(Index); } - Handle(IGESAppli_FiniteElement) IGESAppli_ElementResults::Element - (const Standard_Integer Index) const +const Handle(IGESAppli_FiniteElement) & IGESAppli_ElementResults::Element (const Standard_Integer Index) const { return theElements->Value(Index); } - Standard_Integer IGESAppli_ElementResults::ElementTopologyType - (const Standard_Integer Index) const +Standard_Integer IGESAppli_ElementResults::ElementTopologyType (const Standard_Integer Index) const { return theElementTopologyTypes->Value(Index); } - Standard_Integer IGESAppli_ElementResults::NbLayers - (const Standard_Integer Index) const +Standard_Integer IGESAppli_ElementResults::NbLayers (const Standard_Integer Index) const { return theNbLayers->Value(Index); } - Standard_Integer IGESAppli_ElementResults::DataLayerFlag - (const Standard_Integer Index) const +Standard_Integer IGESAppli_ElementResults::DataLayerFlag (const Standard_Integer Index) const { return theDataLayerFlags->Value(Index); } - Standard_Integer IGESAppli_ElementResults::NbResultDataLocs - (const Standard_Integer Index) const +Standard_Integer IGESAppli_ElementResults::NbResultDataLocs (const Standard_Integer Index) const { return theNbResultDataLocs->Value(Index); } // ?? VERIFIER - Standard_Integer IGESAppli_ElementResults::ResultDataLoc - (const Standard_Integer NElem, const Standard_Integer NLoc) const +Standard_Integer IGESAppli_ElementResults::ResultDataLoc (const Standard_Integer NElem, const Standard_Integer NLoc) const { return theResultDataLocs->Value(NElem)->Value(NLoc); } - Standard_Integer IGESAppli_ElementResults::NbResults - (const Standard_Integer Index) const +Standard_Integer IGESAppli_ElementResults::NbResults (const Standard_Integer Index) const { return theResultData->Value(Index)->Length(); } - Standard_Real IGESAppli_ElementResults::ResultData - (const Standard_Integer NElem, const Standard_Integer num) const +Standard_Real IGESAppli_ElementResults::ResultData (const Standard_Integer NElem, const Standard_Integer num) const { return theResultData->Value(NElem)->Value(num); } - Standard_Integer IGESAppli_ElementResults::ResultRank +Standard_Integer IGESAppli_ElementResults::ResultRank (const Standard_Integer NElem, const Standard_Integer NVal, const Standard_Integer NLay, const Standard_Integer NLoc) const { @@ -186,15 +149,91 @@ IGESAppli_ElementResults::IGESAppli_ElementResults () { } return num; } - Standard_Real IGESAppli_ElementResults::ResultData +Standard_Real IGESAppli_ElementResults::ResultData (const Standard_Integer NElem, const Standard_Integer NVal, const Standard_Integer NLay, const Standard_Integer NLoc) const { return theResultData->Value(NElem)->Value(ResultRank(NElem,NVal,NLay,NLoc)); } - Handle(TColStd_HArray1OfReal) IGESAppli_ElementResults::ResultList - (const Standard_Integer NElem) const +Handle(TColStd_HArray1OfReal) IGESAppli_ElementResults::ResultList (const Standard_Integer NElem) const { return theResultData->Value(NElem); } + +void IGESAppli_ElementResults::OwnShared(Interface_EntityIterator &theIter) const +{ + theIter.GetOneItem(Note()); + const Standard_Integer num = NbElements(); + for ( Standard_Integer i = 1; i <= num; i++ ) + theIter.GetOneItem(Element(i)); +} + +void IGESAppli_ElementResults::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const +{ + Standard_Integer rrf = ResultReportFlag(); + if (rrf < 0 || rrf > 3) theCheck->AddFail("Result Report Flag not in [0-3]"); + Standard_Integer nv = NbResultValues(); + Standard_Boolean OK = Standard_True; + switch (FormNumber()) { + case 0 : if (nv < 0) OK = Standard_False; break; + case 1 : if (nv != 1) OK = Standard_False; break; + case 2 : if (nv != 1) OK = Standard_False; break; + case 3 : if (nv != 3) OK = Standard_False; break; + case 4 : if (nv != 6) OK = Standard_False; break; + case 5 : if (nv != 3) OK = Standard_False; break; + case 6 : if (nv != 3) OK = Standard_False; break; + case 7 : if (nv != 3) OK = Standard_False; break; + case 8 : if (nv != 3) OK = Standard_False; break; + case 9 : if (nv != 3) OK = Standard_False; break; + case 10 : if (nv != 1) OK = Standard_False; break; + case 11 : if (nv != 1) OK = Standard_False; break; + case 12 : if (nv != 3) OK = Standard_False; break; + case 13 : if (nv != 1) OK = Standard_False; break; + case 14 : if (nv != 1) OK = Standard_False; break; + case 15 : if (nv != 3) OK = Standard_False; break; + case 16 : if (nv != 1) OK = Standard_False; break; + case 17 : if (nv != 3) OK = Standard_False; break; + case 18 : if (nv != 3) OK = Standard_False; break; + case 19 : if (nv != 3) OK = Standard_False; break; + case 20 : if (nv != 3) OK = Standard_False; break; + case 21 : if (nv != 3) OK = Standard_False; break; + case 22 : if (nv != 3) OK = Standard_False; break; + case 23 : if (nv != 6) OK = Standard_False; break; + case 24 : if (nv != 6) OK = Standard_False; break; + case 25 : if (nv != 6) OK = Standard_False; break; + case 26 : if (nv != 6) OK = Standard_False; break; + case 27 : if (nv != 6) OK = Standard_False; break; + case 28 : if (nv != 6) OK = Standard_False; break; + case 29 : if (nv != 9) OK = Standard_False; break; + case 30 : if (nv != 9) OK = Standard_False; break; + case 31 : if (nv != 9) OK = Standard_False; break; + case 32 : if (nv != 9) OK = Standard_False; break; + case 33 : if (nv != 9) OK = Standard_False; break; + case 34 : if (nv != 9) OK = Standard_False; break; + default : theCheck->AddFail("Incorrect Form Number"); break; + } + if (!OK) theCheck->AddFail("Incorrect count of real values in array V for FEM node"); + const Standard_Integer ne = NbElements(); + for (Standard_Integer i = 1; i <= ne; i ++) { + char mess[100]; + Standard_Integer dlf = DataLayerFlag(i); + Standard_Integer nl = NbLayers(i); + Standard_Integer nrl = NbResultDataLocs(i); + if (dlf < 0 || dlf > 4) + theCheck->AddFail("One of the Data Layer Flags not in [0-4]"); + if (dlf < 4 && NbLayers(i) != 1) { + sprintf(mess,"Nb. of Layers n0.%d not ONE while Data Layer Flag is in [0-3]",i); + theCheck->AddFail(mess); + } + if (rrf == 1 || rrf == 2) + if (nrl != 1 || ResultDataLoc(i,1) != 0) { + sprintf(mess,"Result Data Locs n0.%d incorrect for Result Report = 1 or 2",i); + theCheck->AddFail(mess); + } + if (NbResults(i) != (nv*nl*nrl)) { + sprintf(mess,"Nb. of results for Element n0.%d incorrect, should be %d",i,nv*nl*nrl); + theCheck->AddFail(mess); + } + } +} diff --git a/src/IGESAppli/IGESAppli_ElementResults.hxx b/src/IGESAppli/IGESAppli_ElementResults.hxx index f265002969..18e3761f95 100644 --- a/src/IGESAppli/IGESAppli_ElementResults.hxx +++ b/src/IGESAppli/IGESAppli_ElementResults.hxx @@ -17,11 +17,6 @@ #ifndef _IGESAppli_ElementResults_HeaderFile #define _IGESAppli_ElementResults_HeaderFile -#include -#include - -#include -#include #include #include #include @@ -29,8 +24,6 @@ class IGESDimen_GeneralNote; class IGESBasic_HArray1OfHArray1OfInteger; class IGESBasic_HArray1OfHArray1OfReal; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESAppli_FiniteElement; @@ -42,11 +35,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_ElementResults, IGESData_IGESEntity) //! Used to find the results of FEM analysis class IGESAppli_ElementResults : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_ElementResults(); + IGESAppli_ElementResults() {} //! This method is used to set the fields of the class //! ElementResults @@ -70,28 +61,28 @@ public: Standard_EXPORT void SetFormNumber (const Standard_Integer form); //! returns General Note Entity describing analysis case - Standard_EXPORT Handle(IGESDimen_GeneralNote) Note() const; - + const Handle(IGESDimen_GeneralNote) & Note() const { return theNote; } + //! returns analysis Subcase number - Standard_EXPORT Standard_Integer SubCaseNumber() const; - + Standard_Integer SubCaseNumber() const { return theSubcaseNumber; } + //! returns analysis time value - Standard_EXPORT Standard_Real Time() const; - + Standard_Real Time() const { return theTime; } + //! returns number of result values per FEM - Standard_EXPORT Standard_Integer NbResultValues() const; - + Standard_Integer NbResultValues() const { return theNbResultValues; } + //! returns Results Reporting Flag - Standard_EXPORT Standard_Integer ResultReportFlag() const; - + Standard_Integer ResultReportFlag() const { return theResultReportFlag; } + //! returns number of FEM elements Standard_EXPORT Standard_Integer NbElements() const; - + //! returns FEM element number for elements Standard_EXPORT Standard_Integer ElementIdentifier (const Standard_Integer Index) const; //! returns FEM element - Standard_EXPORT Handle(IGESAppli_FiniteElement) Element (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESAppli_FiniteElement) & Element (const Standard_Integer Index) const; //! returns element Topology Types Standard_EXPORT Standard_Integer ElementTopologyType (const Standard_Integer Index) const; @@ -136,18 +127,13 @@ public: //! addressed as by ResultRank (See above) Standard_EXPORT Handle(TColStd_HArray1OfReal) ResultList (const Standard_Integer NElem) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_ElementResults,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESDimen_GeneralNote) theNote; Standard_Integer theSubcaseNumber; @@ -162,14 +148,6 @@ private: Handle(TColStd_HArray1OfInteger) theNbResultDataLocs; Handle(IGESBasic_HArray1OfHArray1OfInteger) theResultDataLocs; Handle(IGESBasic_HArray1OfHArray1OfReal) theResultData; - - }; - - - - - - #endif // _IGESAppli_ElementResults_HeaderFile diff --git a/src/IGESAppli/IGESAppli_FiniteElement.cxx b/src/IGESAppli/IGESAppli_FiniteElement.cxx index 9c943d735a..54c306f513 100644 --- a/src/IGESAppli/IGESAppli_FiniteElement.cxx +++ b/src/IGESAppli/IGESAppli_FiniteElement.cxx @@ -21,15 +21,12 @@ #include #include #include -#include +#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_FiniteElement,IGESData_IGESEntity) -IGESAppli_FiniteElement::IGESAppli_FiniteElement () { } - - - void IGESAppli_FiniteElement::Init +void IGESAppli_FiniteElement::Init (const Standard_Integer aType, const Handle(IGESAppli_HArray1OfNode)& allNodes, const Handle(TCollection_HAsciiString)& aName) @@ -42,23 +39,19 @@ IGESAppli_FiniteElement::IGESAppli_FiniteElement () { } InitTypeAndForm(136,0); } - Standard_Integer IGESAppli_FiniteElement::Topology () const +Standard_Integer IGESAppli_FiniteElement::NbNodes () const { - return theTopology; + return theNodes->Length(); } - Handle(IGESAppli_Node) IGESAppli_FiniteElement::Node - (const Standard_Integer Index) const +const Handle(IGESAppli_Node) & IGESAppli_FiniteElement::Node (const Standard_Integer Index) const { return theNodes->Value(Index); } - Handle(TCollection_HAsciiString) IGESAppli_FiniteElement::Name () const +void IGESAppli_FiniteElement::OwnShared(Interface_EntityIterator &theIter) const { - return theName; -} - - Standard_Integer IGESAppli_FiniteElement::NbNodes () const -{ - return theNodes->Length(); + const Standard_Integer upper = theNodes->Length(); + for (Standard_Integer i= 1; i <= upper ; i ++) + theIter.GetOneItem(theNodes->Value(i)); } diff --git a/src/IGESAppli/IGESAppli_FiniteElement.hxx b/src/IGESAppli/IGESAppli_FiniteElement.hxx index 77d59a4ed4..7c0a1943f2 100644 --- a/src/IGESAppli/IGESAppli_FiniteElement.hxx +++ b/src/IGESAppli/IGESAppli_FiniteElement.hxx @@ -17,14 +17,9 @@ #ifndef _IGESAppli_FiniteElement_HeaderFile #define _IGESAppli_FiniteElement_HeaderFile -#include -#include - -#include #include #include class TCollection_HAsciiString; -class Standard_OutOfRange; class IGESAppli_Node; @@ -37,11 +32,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_FiniteElement, IGESData_IGESEntity) //! element topology. class IGESAppli_FiniteElement : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_FiniteElement(); + IGESAppli_FiniteElement() {} //! This method is used to set the fields of the class //! FiniteElement @@ -51,42 +44,27 @@ public: Standard_EXPORT void Init (const Standard_Integer aType, const Handle(IGESAppli_HArray1OfNode)& allNodes, const Handle(TCollection_HAsciiString)& aName); //! returns Topology type - Standard_EXPORT Standard_Integer Topology() const; - + Standard_Integer Topology() const { return theTopology; } + //! returns the number of nodes defining the element Standard_EXPORT Standard_Integer NbNodes() const; //! returns Node defining element entity //! raises exception if Index <= 0 or Index > NbNodes() - Standard_EXPORT Handle(IGESAppli_Node) Node (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESAppli_Node) & Node (const Standard_Integer Index) const; //! returns Element Type Name - Standard_EXPORT Handle(TCollection_HAsciiString) Name() const; - - + const Handle(TCollection_HAsciiString) & Name() const { return theName; } + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_FiniteElement,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theTopology; Handle(IGESAppli_HArray1OfNode) theNodes; Handle(TCollection_HAsciiString) theName; - - }; - - - - - - #endif // _IGESAppli_FiniteElement_HeaderFile diff --git a/src/IGESAppli/IGESAppli_Flow.cxx b/src/IGESAppli/IGESAppli_Flow.cxx index 7a3c4b451d..265580eb8f 100644 --- a/src/IGESAppli/IGESAppli_Flow.cxx +++ b/src/IGESAppli/IGESAppli_Flow.cxx @@ -22,15 +22,12 @@ #include #include #include -#include +#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Flow,IGESData_IGESEntity) -IGESAppli_Flow::IGESAppli_Flow () { } - - - void IGESAppli_Flow::Init +void IGESAppli_Flow::Init (const Standard_Integer nbContextFlags, const Standard_Integer aFlowType, const Standard_Integer aFuncFlag, const Handle(IGESData_HArray1OfIGESEntity)& allFlowAssocs, @@ -52,7 +49,7 @@ IGESAppli_Flow::IGESAppli_Flow () { } InitTypeAndForm(402,18); } - Standard_Boolean IGESAppli_Flow::OwnCorrect () +Standard_Boolean IGESAppli_Flow::OwnCorrect () { if (theNbContextFlags == 2) return Standard_False; theNbContextFlags = 2; @@ -60,83 +57,87 @@ IGESAppli_Flow::IGESAppli_Flow () { } } - Standard_Integer IGESAppli_Flow::NbContextFlags () const -{ - return theNbContextFlags; -} - - Standard_Integer IGESAppli_Flow::NbFlowAssociativities () const +Standard_Integer IGESAppli_Flow::NbFlowAssociativities () const { return (theFlowAssociativities.IsNull() ? 0 : theFlowAssociativities->Length()); } - Standard_Integer IGESAppli_Flow::NbConnectPoints () const +Standard_Integer IGESAppli_Flow::NbConnectPoints () const { return (theConnectPoints.IsNull() ? 0 : theConnectPoints->Length()); } - Standard_Integer IGESAppli_Flow::NbJoins () const +Standard_Integer IGESAppli_Flow::NbJoins () const { return (theJoins.IsNull() ? 0 : theJoins->Length()); } - Standard_Integer IGESAppli_Flow::NbFlowNames () const +Standard_Integer IGESAppli_Flow::NbFlowNames () const { return (theFlowNames.IsNull() ? 0 : theFlowNames->Length()); } - Standard_Integer IGESAppli_Flow::NbTextDisplayTemplates () const +Standard_Integer IGESAppli_Flow::NbTextDisplayTemplates () const { return (theTextDisplayTemplates.IsNull() ? 0 : theTextDisplayTemplates->Length()); } - Standard_Integer IGESAppli_Flow::NbContFlowAssociativities () const +Standard_Integer IGESAppli_Flow::NbContFlowAssociativities () const { return (theContFlowAssociativities.IsNull() ? 0 : theContFlowAssociativities->Length()); } - Standard_Integer IGESAppli_Flow::TypeOfFlow () const -{ - return theTypeOfFlow; -} - - Standard_Integer IGESAppli_Flow::FunctionFlag () const -{ - return theFunctionFlag; -} - - Handle(IGESData_IGESEntity) IGESAppli_Flow::FlowAssociativity - (const Standard_Integer Index) const +const Handle(IGESData_IGESEntity) & IGESAppli_Flow::FlowAssociativity (const Standard_Integer Index) const { return theFlowAssociativities->Value(Index); } - Handle(IGESDraw_ConnectPoint) IGESAppli_Flow::ConnectPoint - (const Standard_Integer Index) const +const Handle(IGESDraw_ConnectPoint) & IGESAppli_Flow::ConnectPoint (const Standard_Integer Index) const { return theConnectPoints->Value(Index); } - Handle(IGESData_IGESEntity) IGESAppli_Flow::Join - (const Standard_Integer Index) const +const Handle(IGESData_IGESEntity) & IGESAppli_Flow::Join (const Standard_Integer Index) const { return theJoins->Value(Index); } - Handle(TCollection_HAsciiString) IGESAppli_Flow::FlowName - (const Standard_Integer Index) const +const Handle(TCollection_HAsciiString) & IGESAppli_Flow::FlowName (const Standard_Integer Index) const { return theFlowNames->Value(Index); } - Handle(IGESGraph_TextDisplayTemplate) IGESAppli_Flow::TextDisplayTemplate - (const Standard_Integer Index) const +const Handle(IGESGraph_TextDisplayTemplate) & IGESAppli_Flow::TextDisplayTemplate (const Standard_Integer Index) const { return theTextDisplayTemplates->Value(Index); } - Handle(IGESData_IGESEntity) IGESAppli_Flow::ContFlowAssociativity - (const Standard_Integer Index) const +const Handle(IGESData_IGESEntity) & IGESAppli_Flow::ContFlowAssociativity (const Standard_Integer Index) const { return theContFlowAssociativities->Value(Index); } + +void IGESAppli_Flow::OwnShared(Interface_EntityIterator &theIter) const +{ + Standard_Integer i, num; + for ( num = NbFlowAssociativities(), i = 1; i <= num; i++ ) + theIter.GetOneItem(FlowAssociativity(i)); + for ( num = NbConnectPoints(), i = 1; i <= num; i++ ) + theIter.GetOneItem(ConnectPoint(i)); + for ( num = NbJoins(), i = 1; i <= num; i++ ) + theIter.GetOneItem(Join(i)); + for ( num = NbTextDisplayTemplates(), i = 1; i <= num; i++ ) + theIter.GetOneItem(TextDisplayTemplate(i)); + for ( num = NbContFlowAssociativities(), i = 1; i <= num; i++ ) + theIter.GetOneItem(ContFlowAssociativity(i)); +} + +void IGESAppli_Flow::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const +{ + if (NbContextFlags() != 2) + theCheck->AddFail("Number of Context Flags != 2"); + if ((TypeOfFlow() < 0) || (TypeOfFlow() > 2)) + theCheck->AddFail("Type of Flow != 0,1,2"); + if ((FunctionFlag() < 0) || (FunctionFlag() > 2)) + theCheck->AddFail("Function Flag != 0,1,2"); +} diff --git a/src/IGESAppli/IGESAppli_Flow.hxx b/src/IGESAppli/IGESAppli_Flow.hxx index 6d24843dd3..478a4a5e09 100644 --- a/src/IGESAppli/IGESAppli_Flow.hxx +++ b/src/IGESAppli/IGESAppli_Flow.hxx @@ -17,17 +17,11 @@ #ifndef _IGESAppli_Flow_HeaderFile #define _IGESAppli_Flow_HeaderFile -#include -#include - -#include #include #include #include #include #include -#include -class Standard_OutOfRange; class IGESData_IGESEntity; class IGESDraw_ConnectPoint; class TCollection_HAsciiString; @@ -44,11 +38,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_Flow, IGESData_IGESEntity) //! including additional intermediate connect points. class IGESAppli_Flow : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_Flow(); + IGESAppli_Flow() {} //! This method is used to set the fields of the class Flow //! - nbContextFlags : Count of Context Flags, always = 2 @@ -66,7 +58,7 @@ public: Standard_EXPORT Standard_Boolean OwnCorrect(); //! returns number of Count of Context Flags, always = 2 - Standard_EXPORT Standard_Integer NbContextFlags() const; + Standard_Integer NbContextFlags() const { return theNbContextFlags; } //! returns number of Flow Associativity Entities Standard_EXPORT Standard_Integer NbFlowAssociativities() const; @@ -89,49 +81,44 @@ public: //! returns Type of Flow = 0 : Not Specified (default) //! 1 : Logical //! 2 : Physical - Standard_EXPORT Standard_Integer TypeOfFlow() const; - + Standard_Integer TypeOfFlow() const { return theTypeOfFlow; } + //! returns Function Flag = 0 : Not Specified (default) //! 1 : Electrical Signal //! 2 : Fluid Flow Path - Standard_EXPORT Standard_Integer FunctionFlag() const; - + Standard_Integer FunctionFlag() const { return theFunctionFlag; } + //! returns Flow Associativity Entity //! raises exception if Index <= 0 or Index > NbFlowAssociativities() - Standard_EXPORT Handle(IGESData_IGESEntity) FlowAssociativity (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESData_IGESEntity) & FlowAssociativity (const Standard_Integer Index) const; //! returns Connect Point Entity //! raises exception if Index <= 0 or Index > NbConnectPoints() - Standard_EXPORT Handle(IGESDraw_ConnectPoint) ConnectPoint (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESDraw_ConnectPoint) & ConnectPoint (const Standard_Integer Index) const; //! returns Join Entity //! raises exception if Index <= 0 or Index > NbJoins() - Standard_EXPORT Handle(IGESData_IGESEntity) Join (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESData_IGESEntity) & Join (const Standard_Integer Index) const; //! returns Flow Name //! raises exception if Index <= 0 or Index > NbFlowNames() - Standard_EXPORT Handle(TCollection_HAsciiString) FlowName (const Standard_Integer Index) const; + Standard_EXPORT const Handle(TCollection_HAsciiString) & FlowName (const Standard_Integer Index) const; //! returns Text Display Template Entity //! raises exception if Index <= 0 or Index > NbTextDisplayTemplates() - Standard_EXPORT Handle(IGESGraph_TextDisplayTemplate) TextDisplayTemplate (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESGraph_TextDisplayTemplate) & TextDisplayTemplate (const Standard_Integer Index) const; //! returns Continuation Flow Associativity Entity //! raises exception if Index <= 0 or Index > NbContFlowAssociativities() - Standard_EXPORT Handle(IGESData_IGESEntity) ContFlowAssociativity (const Standard_Integer Index) const; - + Standard_EXPORT const Handle(IGESData_IGESEntity) & ContFlowAssociativity (const Standard_Integer Index) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_Flow,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbContextFlags; Standard_Integer theTypeOfFlow; @@ -142,14 +129,6 @@ private: Handle(Interface_HArray1OfHAsciiString) theFlowNames; Handle(IGESGraph_HArray1OfTextDisplayTemplate) theTextDisplayTemplates; Handle(IGESData_HArray1OfIGESEntity) theContFlowAssociativities; - - }; - - - - - - #endif // _IGESAppli_Flow_HeaderFile diff --git a/src/IGESAppli/IGESAppli_FlowLineSpec.cxx b/src/IGESAppli/IGESAppli_FlowLineSpec.cxx index 27c747ceef..a47848f632 100644 --- a/src/IGESAppli/IGESAppli_FlowLineSpec.cxx +++ b/src/IGESAppli/IGESAppli_FlowLineSpec.cxx @@ -24,9 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_FlowLineSpec,IGESData_IGESEntity) -IGESAppli_FlowLineSpec::IGESAppli_FlowLineSpec () { } - - void IGESAppli_FlowLineSpec::Init +void IGESAppli_FlowLineSpec::Init (const Handle(Interface_HArray1OfHAsciiString)& allProperties) { if (allProperties->Lower() != 1) @@ -35,18 +33,17 @@ IGESAppli_FlowLineSpec::IGESAppli_FlowLineSpec () { } InitTypeAndForm(406,14); } - Standard_Integer IGESAppli_FlowLineSpec::NbPropertyValues () const +Standard_Integer IGESAppli_FlowLineSpec::NbPropertyValues () const { return theNameAndModifiers->Length(); } - Handle(TCollection_HAsciiString) IGESAppli_FlowLineSpec::FlowLineName () const +const Handle(TCollection_HAsciiString) & IGESAppli_FlowLineSpec::FlowLineName () const { return theNameAndModifiers->Value(1); } - Handle(TCollection_HAsciiString) IGESAppli_FlowLineSpec::Modifier - (const Standard_Integer Index) const +const Handle(TCollection_HAsciiString) & IGESAppli_FlowLineSpec::Modifier (const Standard_Integer Index) const { return theNameAndModifiers->Value(Index); } diff --git a/src/IGESAppli/IGESAppli_FlowLineSpec.hxx b/src/IGESAppli/IGESAppli_FlowLineSpec.hxx index 13f1b6bdd1..3e396a2efa 100644 --- a/src/IGESAppli/IGESAppli_FlowLineSpec.hxx +++ b/src/IGESAppli/IGESAppli_FlowLineSpec.hxx @@ -17,13 +17,8 @@ #ifndef _IGESAppli_FlowLineSpec_HeaderFile #define _IGESAppli_FlowLineSpec_HeaderFile -#include -#include - #include #include -#include -class Standard_OutOfRange; class TCollection_HAsciiString; @@ -36,11 +31,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_FlowLineSpec, IGESData_IGESEntity) //! used to represent a flow line class IGESAppli_FlowLineSpec : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_FlowLineSpec(); + IGESAppli_FlowLineSpec() {} //! This method is used to set the fields of the class //! FlowLineSpec @@ -51,34 +44,17 @@ public: Standard_EXPORT Standard_Integer NbPropertyValues() const; //! returns primary flow line specification name - Standard_EXPORT Handle(TCollection_HAsciiString) FlowLineName() const; + Standard_EXPORT const Handle(TCollection_HAsciiString) & FlowLineName() const; //! returns specified modifier element //! raises exception if Index <= 1 or Index > NbPropertyValues - Standard_EXPORT Handle(TCollection_HAsciiString) Modifier (const Standard_Integer Index) const; - - - + Standard_EXPORT const Handle(TCollection_HAsciiString) & Modifier (const Standard_Integer Index) const; DEFINE_STANDARD_RTTIEXT(IGESAppli_FlowLineSpec,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(Interface_HArray1OfHAsciiString) theNameAndModifiers; - - }; - - - - - - #endif // _IGESAppli_FlowLineSpec_HeaderFile diff --git a/src/IGESAppli/IGESAppli_GeneralModule.cxx b/src/IGESAppli/IGESAppli_GeneralModule.cxx index 873c63a18a..fb684b5115 100644 --- a/src/IGESAppli/IGESAppli_GeneralModule.cxx +++ b/src/IGESAppli/IGESAppli_GeneralModule.cxx @@ -11,6 +11,55 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include @@ -51,281 +100,281 @@ #include #include #include + #include #include #include #include -#include #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_GeneralModule,IGESData_GeneralModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESAppli_GeneralModule::IGESAppli_GeneralModule () { } +void IGESAppli_GeneralModule::OwnSharedCase (const Standard_Integer, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const +{ + ent->OwnShared(iter); +} - void IGESAppli_GeneralModule::OwnSharedCase - (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, - Interface_EntityIterator& iter) const +IGESData_DirChecker IGESAppli_GeneralModule::DirChecker (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const { + // For IGESSolid { switch (CN) { case 1 : { - DeclareAndCast(IGESAppli_DrilledHole,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolDrilledHole tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_Block,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolBlock tool; + return tool.DirChecker(anent); } - break; case 2 : { - DeclareAndCast(IGESAppli_ElementResults,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolElementResults tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_BooleanTree,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolBooleanTree tool; + return tool.DirChecker(anent); } - break; case 3 : { - DeclareAndCast(IGESAppli_FiniteElement,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolFiniteElement tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_ConeFrustum,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolConeFrustum tool; + return tool.DirChecker(anent); } - break; case 4 : { - DeclareAndCast(IGESAppli_Flow,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolFlow tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_ConicalSurface,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolConicalSurface tool; + return tool.DirChecker(anent); } - break; case 5 : { - DeclareAndCast(IGESAppli_FlowLineSpec,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolFlowLineSpec tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_Cylinder,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolCylinder tool; + return tool.DirChecker(anent); } - break; case 6 : { - DeclareAndCast(IGESAppli_LevelFunction,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolLevelFunction tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_CylindricalSurface,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolCylindricalSurface tool; + return tool.DirChecker(anent); } - break; case 7 : { - DeclareAndCast(IGESAppli_LevelToPWBLayerMap,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolLevelToPWBLayerMap tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_EdgeList,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolEdgeList tool; + return tool.DirChecker(anent); } - break; case 8 : { - DeclareAndCast(IGESAppli_LineWidening,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolLineWidening tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_Ellipsoid,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolEllipsoid tool; + return tool.DirChecker(anent); } - break; case 9 : { - DeclareAndCast(IGESAppli_NodalConstraint,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolNodalConstraint tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_Face,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolFace tool; + return tool.DirChecker(anent); } - break; case 10 : { - DeclareAndCast(IGESAppli_NodalDisplAndRot,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolNodalDisplAndRot tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_Loop,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolLoop tool; + return tool.DirChecker(anent); } - break; case 11 : { - DeclareAndCast(IGESAppli_NodalResults,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolNodalResults tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_ManifoldSolid,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolManifoldSolid tool; + return tool.DirChecker(anent); } - break; case 12 : { - DeclareAndCast(IGESAppli_Node,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolNode tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_PlaneSurface,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolPlaneSurface tool; + return tool.DirChecker(anent); } - break; case 13 : { - DeclareAndCast(IGESAppli_PWBArtworkStackup,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolPWBArtworkStackup tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_RightAngularWedge,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolRightAngularWedge tool; + return tool.DirChecker(anent); } - break; case 14 : { - DeclareAndCast(IGESAppli_PWBDrilledHole,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolPWBDrilledHole tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_SelectedComponent,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolSelectedComponent tool; + return tool.DirChecker(anent); } - break; case 15 : { - DeclareAndCast(IGESAppli_PartNumber,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolPartNumber tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_Shell,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolShell tool; + return tool.DirChecker(anent); } - break; case 16 : { - DeclareAndCast(IGESAppli_PinNumber,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolPinNumber tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_SolidAssembly,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolSolidAssembly tool; + return tool.DirChecker(anent); } - break; case 17 : { - DeclareAndCast(IGESAppli_PipingFlow,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolPipingFlow tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_SolidInstance,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolSolidInstance tool; + return tool.DirChecker(anent); } - break; case 18 : { - DeclareAndCast(IGESAppli_ReferenceDesignator,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolReferenceDesignator tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_SolidOfLinearExtrusion,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolSolidOfLinearExtrusion tool; + return tool.DirChecker(anent); } - break; case 19 : { - DeclareAndCast(IGESAppli_RegionRestriction,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolRegionRestriction tool; - tool.OwnShared(anent,iter); + DeclareAndCast(IGESSolid_SolidOfRevolution,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolSolidOfRevolution tool; + return tool.DirChecker(anent); } - break; - default : break; - } -} - - - IGESData_DirChecker IGESAppli_GeneralModule::DirChecker - (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const -{ - switch (CN) { - case 1 : { + case 20 : { + DeclareAndCast(IGESSolid_Sphere,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolSphere tool; + return tool.DirChecker(anent); + } + case 21 : { + DeclareAndCast(IGESSolid_SphericalSurface,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolSphericalSurface tool; + return tool.DirChecker(anent); + } + case 22 : { + DeclareAndCast(IGESSolid_ToroidalSurface,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolToroidalSurface tool; + return tool.DirChecker(anent); + } + case 23 : { + DeclareAndCast(IGESSolid_Torus,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolTorus tool; + return tool.DirChecker(anent); + } + case 24 : { + DeclareAndCast(IGESSolid_VertexList,anent,ent); + if (anent.IsNull()) break; + IGESSolid_ToolVertexList tool; + return tool.DirChecker(anent); + } + // } + case 25 : { DeclareAndCast(IGESAppli_DrilledHole,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolDrilledHole tool; return tool.DirChecker(anent); } - case 2 : { + case 26 : { DeclareAndCast(IGESAppli_ElementResults,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolElementResults tool; return tool.DirChecker(anent); } - case 3 : { + case 27 : { DeclareAndCast(IGESAppli_FiniteElement,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolFiniteElement tool; return tool.DirChecker(anent); } - case 4 : { + case 28 : { DeclareAndCast(IGESAppli_Flow,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolFlow tool; return tool.DirChecker(anent); } - case 5 : { + case 29 : { DeclareAndCast(IGESAppli_FlowLineSpec,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolFlowLineSpec tool; return tool.DirChecker(anent); } - case 6 : { + case 30 : { DeclareAndCast(IGESAppli_LevelFunction,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolLevelFunction tool; return tool.DirChecker(anent); } - case 7 : { + case 31 : { DeclareAndCast(IGESAppli_LevelToPWBLayerMap,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolLevelToPWBLayerMap tool; return tool.DirChecker(anent); } - case 8 : { + case 32 : { DeclareAndCast(IGESAppli_LineWidening,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolLineWidening tool; return tool.DirChecker(anent); } - case 9 : { + case 33 : { DeclareAndCast(IGESAppli_NodalConstraint,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolNodalConstraint tool; return tool.DirChecker(anent); } - case 10 : { + case 34 : { DeclareAndCast(IGESAppli_NodalDisplAndRot,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolNodalDisplAndRot tool; return tool.DirChecker(anent); } - case 11 : { + case 35 : { DeclareAndCast(IGESAppli_NodalResults,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolNodalResults tool; return tool.DirChecker(anent); } - case 12 : { + case 36 : { DeclareAndCast(IGESAppli_Node,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolNode tool; return tool.DirChecker(anent); } - case 13 : { + case 37 : { DeclareAndCast(IGESAppli_PWBArtworkStackup,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolPWBArtworkStackup tool; return tool.DirChecker(anent); } - case 14 : { + case 38 : { DeclareAndCast(IGESAppli_PWBDrilledHole,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolPWBDrilledHole tool; return tool.DirChecker(anent); } - case 15 : { + case 39 : { DeclareAndCast(IGESAppli_PartNumber,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolPartNumber tool; return tool.DirChecker(anent); } - case 16 : { + case 40 : { DeclareAndCast(IGESAppli_PinNumber,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolPinNumber tool; return tool.DirChecker(anent); } - case 17 : { + case 41 : { DeclareAndCast(IGESAppli_PipingFlow,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolPipingFlow tool; return tool.DirChecker(anent); } - case 18 : { + case 42 : { DeclareAndCast(IGESAppli_ReferenceDesignator,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolReferenceDesignator tool; return tool.DirChecker(anent); } - case 19 : { + case 43 : { DeclareAndCast(IGESAppli_RegionRestriction,anent,ent); if (anent.IsNull()) break; IGESAppli_ToolRegionRestriction tool; @@ -337,326 +386,71 @@ IGESAppli_GeneralModule::IGESAppli_GeneralModule () { } } - void IGESAppli_GeneralModule::OwnCheckCase - (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, - const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const +void IGESAppli_GeneralModule::OwnCheckCase (const Standard_Integer, const Handle(IGESData_IGESEntity)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const { - switch (CN) { - case 1 : { - DeclareAndCast(IGESAppli_DrilledHole,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolDrilledHole tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 2 : { - DeclareAndCast(IGESAppli_ElementResults,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolElementResults tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 3 : { - DeclareAndCast(IGESAppli_FiniteElement,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolFiniteElement tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 4 : { - DeclareAndCast(IGESAppli_Flow,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolFlow tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 5 : { - DeclareAndCast(IGESAppli_FlowLineSpec,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolFlowLineSpec tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 6 : { - DeclareAndCast(IGESAppli_LevelFunction,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolLevelFunction tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 7 : { - DeclareAndCast(IGESAppli_LevelToPWBLayerMap,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolLevelToPWBLayerMap tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 8 : { - DeclareAndCast(IGESAppli_LineWidening,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolLineWidening tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 9 : { - DeclareAndCast(IGESAppli_NodalConstraint,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolNodalConstraint tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 10 : { - DeclareAndCast(IGESAppli_NodalDisplAndRot,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolNodalDisplAndRot tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 11 : { - DeclareAndCast(IGESAppli_NodalResults,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolNodalResults tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 12 : { - DeclareAndCast(IGESAppli_Node,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolNode tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 13 : { - DeclareAndCast(IGESAppli_PWBArtworkStackup,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolPWBArtworkStackup tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 14 : { - DeclareAndCast(IGESAppli_PWBDrilledHole,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolPWBDrilledHole tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 15 : { - DeclareAndCast(IGESAppli_PartNumber,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolPartNumber tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 16 : { - DeclareAndCast(IGESAppli_PinNumber,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolPinNumber tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 17 : { - DeclareAndCast(IGESAppli_PipingFlow,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolPipingFlow tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 18 : { - DeclareAndCast(IGESAppli_ReferenceDesignator,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolReferenceDesignator tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 19 : { - DeclareAndCast(IGESAppli_RegionRestriction,anent,ent); - if (anent.IsNull()) return; - IGESAppli_ToolRegionRestriction tool; - tool.OwnCheck(anent,shares,ach); - } - break; - default : break; - } + ent->OwnCheck(shares,ach); } - Standard_Boolean IGESAppli_GeneralModule::NewVoid - (const Standard_Integer CN, Handle(Standard_Transient)& ent) const + +Standard_Boolean IGESAppli_GeneralModule::NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& ent) const { + // For IGESSolid { switch (CN) { - case 1 : ent = new IGESAppli_DrilledHole; break; - case 2 : ent = new IGESAppli_ElementResults; break; - case 3 : ent = new IGESAppli_FiniteElement; break; - case 4 : ent = new IGESAppli_Flow; break; - case 5 : ent = new IGESAppli_FlowLineSpec; break; - case 6 : ent = new IGESAppli_LevelFunction; break; - case 7 : ent = new IGESAppli_LevelToPWBLayerMap; break; - case 8 : ent = new IGESAppli_LineWidening; break; - case 9 : ent = new IGESAppli_NodalConstraint; break; - case 10 : ent = new IGESAppli_NodalDisplAndRot; break; - case 11 : ent = new IGESAppli_NodalResults; break; - case 12 : ent = new IGESAppli_Node; break; - case 13 : ent = new IGESAppli_PWBArtworkStackup; break; - case 14 : ent = new IGESAppli_PWBDrilledHole; break; - case 15 : ent = new IGESAppli_PartNumber; break; - case 16 : ent = new IGESAppli_PinNumber; break; - case 17 : ent = new IGESAppli_PipingFlow; break; - case 18 : ent = new IGESAppli_ReferenceDesignator; break; - case 19 : ent = new IGESAppli_RegionRestriction; break; + case 1 : ent = new IGESSolid_Block; break; + case 2 : ent = new IGESSolid_BooleanTree; break; + case 3 : ent = new IGESSolid_ConeFrustum; break; + case 4 : ent = new IGESSolid_ConicalSurface; break; + case 5 : ent = new IGESSolid_Cylinder; break; + case 6 : ent = new IGESSolid_CylindricalSurface; break; + case 7 : ent = new IGESSolid_EdgeList; break; + case 8 : ent = new IGESSolid_Ellipsoid; break; + case 9 : ent = new IGESSolid_Face; break; + case 10 : ent = new IGESSolid_Loop; break; + case 11 : ent = new IGESSolid_ManifoldSolid; break; + case 12 : ent = new IGESSolid_PlaneSurface; break; + case 13 : ent = new IGESSolid_RightAngularWedge; break; + case 14 : ent = new IGESSolid_SelectedComponent; break; + case 15 : ent = new IGESSolid_Shell; break; + case 16 : ent = new IGESSolid_SolidAssembly; break; + case 17 : ent = new IGESSolid_SolidInstance; break; + case 18 : ent = new IGESSolid_SolidOfLinearExtrusion; break; + case 19 : ent = new IGESSolid_SolidOfRevolution; break; + case 20 : ent = new IGESSolid_Sphere; break; + case 21 : ent = new IGESSolid_SphericalSurface; break; + case 22 : ent = new IGESSolid_ToroidalSurface; break; + case 23 : ent = new IGESSolid_Torus; break; + case 24 : ent = new IGESSolid_VertexList; break; + // } + case 25 : ent = new IGESAppli_DrilledHole; break; + case 26 : ent = new IGESAppli_ElementResults; break; + case 27 : ent = new IGESAppli_FiniteElement; break; + case 28 : ent = new IGESAppli_Flow; break; + case 29 : ent = new IGESAppli_FlowLineSpec; break; + case 30 : ent = new IGESAppli_LevelFunction; break; + case 31 : ent = new IGESAppli_LevelToPWBLayerMap; break; + case 32 : ent = new IGESAppli_LineWidening; break; + case 33 : ent = new IGESAppli_NodalConstraint; break; + case 34 : ent = new IGESAppli_NodalDisplAndRot; break; + case 35 : ent = new IGESAppli_NodalResults; break; + case 36 : ent = new IGESAppli_Node; break; + case 37 : ent = new IGESAppli_PWBArtworkStackup; break; + case 38 : ent = new IGESAppli_PWBDrilledHole; break; + case 39 : ent = new IGESAppli_PartNumber; break; + case 40 : ent = new IGESAppli_PinNumber; break; + case 41 : ent = new IGESAppli_PipingFlow; break; + case 42 : ent = new IGESAppli_ReferenceDesignator; break; + case 43 : ent = new IGESAppli_RegionRestriction; break; default : return Standard_False; // by default, Failure on Recognize } return Standard_True; } - void IGESAppli_GeneralModule::OwnCopyCase - (const Standard_Integer CN, - const Handle(IGESData_IGESEntity)& entfrom, - const Handle(IGESData_IGESEntity)& entto, - Interface_CopyTool& TC) const -{ - switch (CN) { - case 1 : { - DeclareAndCast(IGESAppli_DrilledHole,enfr,entfrom); - DeclareAndCast(IGESAppli_DrilledHole,ento,entto); - IGESAppli_ToolDrilledHole tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 2 : { - DeclareAndCast(IGESAppli_ElementResults,enfr,entfrom); - DeclareAndCast(IGESAppli_ElementResults,ento,entto); - IGESAppli_ToolElementResults tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 3 : { - DeclareAndCast(IGESAppli_FiniteElement,enfr,entfrom); - DeclareAndCast(IGESAppli_FiniteElement,ento,entto); - IGESAppli_ToolFiniteElement tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 4 : { - DeclareAndCast(IGESAppli_Flow,enfr,entfrom); - DeclareAndCast(IGESAppli_Flow,ento,entto); - IGESAppli_ToolFlow tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 5 : { - DeclareAndCast(IGESAppli_FlowLineSpec,enfr,entfrom); - DeclareAndCast(IGESAppli_FlowLineSpec,ento,entto); - IGESAppli_ToolFlowLineSpec tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 6 : { - DeclareAndCast(IGESAppli_LevelFunction,enfr,entfrom); - DeclareAndCast(IGESAppli_LevelFunction,ento,entto); - IGESAppli_ToolLevelFunction tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 7 : { - DeclareAndCast(IGESAppli_LevelToPWBLayerMap,enfr,entfrom); - DeclareAndCast(IGESAppli_LevelToPWBLayerMap,ento,entto); - IGESAppli_ToolLevelToPWBLayerMap tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 8 : { - DeclareAndCast(IGESAppli_LineWidening,enfr,entfrom); - DeclareAndCast(IGESAppli_LineWidening,ento,entto); - IGESAppli_ToolLineWidening tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 9 : { - DeclareAndCast(IGESAppli_NodalConstraint,enfr,entfrom); - DeclareAndCast(IGESAppli_NodalConstraint,ento,entto); - IGESAppli_ToolNodalConstraint tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 10 : { - DeclareAndCast(IGESAppli_NodalDisplAndRot,enfr,entfrom); - DeclareAndCast(IGESAppli_NodalDisplAndRot,ento,entto); - IGESAppli_ToolNodalDisplAndRot tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 11 : { - DeclareAndCast(IGESAppli_NodalResults,enfr,entfrom); - DeclareAndCast(IGESAppli_NodalResults,ento,entto); - IGESAppli_ToolNodalResults tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 12 : { - DeclareAndCast(IGESAppli_Node,enfr,entfrom); - DeclareAndCast(IGESAppli_Node,ento,entto); - IGESAppli_ToolNode tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 13 : { - DeclareAndCast(IGESAppli_PWBArtworkStackup,enfr,entfrom); - DeclareAndCast(IGESAppli_PWBArtworkStackup,ento,entto); - IGESAppli_ToolPWBArtworkStackup tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 14 : { - DeclareAndCast(IGESAppli_PWBDrilledHole,enfr,entfrom); - DeclareAndCast(IGESAppli_PWBDrilledHole,ento,entto); - IGESAppli_ToolPWBDrilledHole tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 15 : { - DeclareAndCast(IGESAppli_PartNumber,enfr,entfrom); - DeclareAndCast(IGESAppli_PartNumber,ento,entto); - IGESAppli_ToolPartNumber tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 16 : { - DeclareAndCast(IGESAppli_PinNumber,enfr,entfrom); - DeclareAndCast(IGESAppli_PinNumber,ento,entto); - IGESAppli_ToolPinNumber tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 17 : { - DeclareAndCast(IGESAppli_PipingFlow,enfr,entfrom); - DeclareAndCast(IGESAppli_PipingFlow,ento,entto); - IGESAppli_ToolPipingFlow tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 18 : { - DeclareAndCast(IGESAppli_ReferenceDesignator,enfr,entfrom); - DeclareAndCast(IGESAppli_ReferenceDesignator,ento,entto); - IGESAppli_ToolReferenceDesignator tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 19 : { - DeclareAndCast(IGESAppli_RegionRestriction,enfr,entfrom); - DeclareAndCast(IGESAppli_RegionRestriction,ento,entto); - IGESAppli_ToolRegionRestriction tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - default : break; - } -} - - - Standard_Integer IGESAppli_GeneralModule::CategoryNumber - (const Standard_Integer CN, const Handle(Standard_Transient)& /*ent*/, - const Interface_ShareTool& ) const +Standard_Integer IGESAppli_GeneralModule::CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& /*ent*/, const Interface_ShareTool& ) const { - if (CN == 4 || CN == 5 || CN == 17) return Interface_Category::Number("Piping"); - if (CN == 2 || CN == 3 || (CN >= 9 && CN <= 12)) return Interface_Category::Number("FEA"); + // For IGESSolid { + if (CN >= 1 && CN <= 24) return Interface_Category::Number("Shape"); + // } + if (CN == 28 || CN == 29 || CN == 41) return Interface_Category::Number("Piping"); + if (CN == 26 || CN == 27 || (CN >= 33 && CN <= 36)) return Interface_Category::Number("FEA"); return Interface_Category::Number("Professional"); } diff --git a/src/IGESAppli/IGESAppli_GeneralModule.hxx b/src/IGESAppli/IGESAppli_GeneralModule.hxx index 535bb5b34a..0cef4f7b65 100644 --- a/src/IGESAppli/IGESAppli_GeneralModule.hxx +++ b/src/IGESAppli/IGESAppli_GeneralModule.hxx @@ -17,19 +17,7 @@ #ifndef _IGESAppli_GeneralModule_HeaderFile #define _IGESAppli_GeneralModule_HeaderFile -#include -#include - #include -#include -#include -class IGESData_IGESEntity; -class Interface_EntityIterator; -class IGESData_DirChecker; -class Interface_ShareTool; -class Interface_Check; -class Standard_Transient; -class Interface_CopyTool; class IGESAppli_GeneralModule; @@ -39,12 +27,10 @@ DEFINE_STANDARD_HANDLE(IGESAppli_GeneralModule, IGESData_GeneralModule) //! This Services comprise : Shared & Implied Lists, Copy, Check class IGESAppli_GeneralModule : public IGESData_GeneralModule { + public: -public: - - //! Creates a GeneralModule from IGESAppli and puts it into GeneralLib - Standard_EXPORT IGESAppli_GeneralModule(); + IGESAppli_GeneralModule() {} //! Lists the Entities shared by a given IGESEntity , from //! its specific parameters : specific for each type @@ -61,36 +47,13 @@ public: //! Specific creation of a new void entity Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const Standard_OVERRIDE; - //! Copies parameters which are specific of each Type of Entity - Standard_EXPORT void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - //! Returns a category number which characterizes an entity //! FEA for : ElementResults,FiniteElement,Node&Co //! Piping for : Flow & Co //! Professional for : others (in fact Schematics) Standard_EXPORT virtual Standard_Integer CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESAppli_GeneralModule,IGESData_GeneralModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESAppli_GeneralModule_HeaderFile diff --git a/src/IGESAppli/IGESAppli_LevelFunction.cxx b/src/IGESAppli/IGESAppli_LevelFunction.cxx index 62dbb193ee..104ae9d2cd 100644 --- a/src/IGESAppli/IGESAppli_LevelFunction.cxx +++ b/src/IGESAppli/IGESAppli_LevelFunction.cxx @@ -17,14 +17,10 @@ //-------------------------------------------------------------------- #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_LevelFunction,IGESData_IGESEntity) -IGESAppli_LevelFunction::IGESAppli_LevelFunction () { } - - void IGESAppli_LevelFunction::Init (const Standard_Integer nbPropVal, const Standard_Integer aCode, @@ -36,18 +32,8 @@ IGESAppli_LevelFunction::IGESAppli_LevelFunction () { } InitTypeAndForm(406,3); } - - Standard_Integer IGESAppli_LevelFunction::NbPropertyValues () const -{ - return theNbPropertyValues; -} - - Standard_Integer IGESAppli_LevelFunction::FuncDescriptionCode () const -{ - return theFuncDescripCode; -} - - Handle(TCollection_HAsciiString) IGESAppli_LevelFunction::FuncDescription () const +void IGESAppli_LevelFunction::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return theFuncDescrip; + if (NbPropertyValues() != 2) + theCheck->AddFail("Number of Property Values != 2"); } diff --git a/src/IGESAppli/IGESAppli_LevelFunction.hxx b/src/IGESAppli/IGESAppli_LevelFunction.hxx index fd98e0def3..0ef994fc7c 100644 --- a/src/IGESAppli/IGESAppli_LevelFunction.hxx +++ b/src/IGESAppli/IGESAppli_LevelFunction.hxx @@ -17,10 +17,6 @@ #ifndef _IGESAppli_LevelFunction_HeaderFile #define _IGESAppli_LevelFunction_HeaderFile -#include -#include - -#include #include class TCollection_HAsciiString; @@ -34,11 +30,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_LevelFunction, IGESData_IGESEntity) //! in the sending system class IGESAppli_LevelFunction : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_LevelFunction(); + IGESAppli_LevelFunction() {} //! This method is used to set the fields of the class //! LevelFunction @@ -50,39 +44,24 @@ public: Standard_EXPORT void Init (const Standard_Integer nbPropVal, const Standard_Integer aCode, const Handle(TCollection_HAsciiString)& aFuncDescrip); //! is always 2 - Standard_EXPORT Standard_Integer NbPropertyValues() const; - + Standard_Integer NbPropertyValues() const { return theNbPropertyValues; } + //! returns the function description code . Default = 0 - Standard_EXPORT Standard_Integer FuncDescriptionCode() const; - + Standard_Integer FuncDescriptionCode() const { return theFuncDescripCode; } + //! returns the function description //! Default = null string - Standard_EXPORT Handle(TCollection_HAsciiString) FuncDescription() const; - - + const Handle(TCollection_HAsciiString) & FuncDescription() const { return theFuncDescrip; } + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_LevelFunction,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbPropertyValues; Standard_Integer theFuncDescripCode; Handle(TCollection_HAsciiString) theFuncDescrip; - - }; - - - - - - #endif // _IGESAppli_LevelFunction_HeaderFile diff --git a/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.cxx b/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.cxx index 8aa1e1cdff..f5aa1aa939 100644 --- a/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.cxx +++ b/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.cxx @@ -19,15 +19,11 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_LevelToPWBLayerMap,IGESData_IGESEntity) -IGESAppli_LevelToPWBLayerMap::IGESAppli_LevelToPWBLayerMap () { } - - - void IGESAppli_LevelToPWBLayerMap::Init +void IGESAppli_LevelToPWBLayerMap::Init (const Standard_Integer nbPropVal, const Handle(TColStd_HArray1OfInteger)& allExchLevels, const Handle(Interface_HArray1OfHAsciiString)& allNativeLevels, @@ -48,36 +44,27 @@ IGESAppli_LevelToPWBLayerMap::IGESAppli_LevelToPWBLayerMap () { } InitTypeAndForm(406,24); } - Standard_Integer IGESAppli_LevelToPWBLayerMap::NbPropertyValues () const -{ - return theNbPropertyValues; -} - - Standard_Integer IGESAppli_LevelToPWBLayerMap::NbLevelToLayerDefs () const +Standard_Integer IGESAppli_LevelToPWBLayerMap::NbLevelToLayerDefs () const { return theExchangeFileLevelNumber->Length(); } - Standard_Integer IGESAppli_LevelToPWBLayerMap::ExchangeFileLevelNumber - (const Standard_Integer Index) const +Standard_Integer IGESAppli_LevelToPWBLayerMap::ExchangeFileLevelNumber (const Standard_Integer Index) const { return theExchangeFileLevelNumber->Value(Index); } - Handle(TCollection_HAsciiString) IGESAppli_LevelToPWBLayerMap::NativeLevel - (const Standard_Integer Index) const +const Handle(TCollection_HAsciiString) & IGESAppli_LevelToPWBLayerMap::NativeLevel (const Standard_Integer Index) const { return theNativeLevel->Value(Index); } - Standard_Integer IGESAppli_LevelToPWBLayerMap::PhysicalLayerNumber - (const Standard_Integer Index) const +Standard_Integer IGESAppli_LevelToPWBLayerMap::PhysicalLayerNumber (const Standard_Integer Index) const { return thePhysicalLayerNumber->Value(Index); } - Handle(TCollection_HAsciiString) IGESAppli_LevelToPWBLayerMap::ExchangeFileLevelIdent - (const Standard_Integer Index) const +const Handle(TCollection_HAsciiString) & IGESAppli_LevelToPWBLayerMap::ExchangeFileLevelIdent (const Standard_Integer Index) const { return theExchangeFileLevelIdent->Value(Index); } diff --git a/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx b/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx index 66aaddd1a1..d34f24007d 100644 --- a/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx +++ b/src/IGESAppli/IGESAppli_LevelToPWBLayerMap.hxx @@ -17,15 +17,9 @@ #ifndef _IGESAppli_LevelToPWBLayerMap_HeaderFile #define _IGESAppli_LevelToPWBLayerMap_HeaderFile -#include -#include - -#include #include #include #include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class TCollection_HAsciiString; @@ -40,11 +34,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_LevelToPWBLayerMap, IGESData_IGESEntity) //! identification class IGESAppli_LevelToPWBLayerMap : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_LevelToPWBLayerMap(); + IGESAppli_LevelToPWBLayerMap() {} //! This method is used to set the fields of the class //! LevelToPWBLayerMap @@ -58,8 +50,8 @@ public: Standard_EXPORT void Init (const Standard_Integer nbPropVal, const Handle(TColStd_HArray1OfInteger)& allExchLevels, const Handle(Interface_HArray1OfHAsciiString)& allNativeLevels, const Handle(TColStd_HArray1OfInteger)& allPhysLevels, const Handle(Interface_HArray1OfHAsciiString)& allExchIdents); //! returns number of property values - Standard_EXPORT Standard_Integer NbPropertyValues() const; - + Standard_Integer NbPropertyValues() const { return theNbPropertyValues; } + //! returns number of level to layer definitions Standard_EXPORT Standard_Integer NbLevelToLayerDefs() const; @@ -69,40 +61,23 @@ public: //! returns Native Level Identification //! raises exception if Index <= 0 or Index > NbLevelToLayerDefs - Standard_EXPORT Handle(TCollection_HAsciiString) NativeLevel (const Standard_Integer Index) const; + Standard_EXPORT const Handle(TCollection_HAsciiString) & NativeLevel (const Standard_Integer Index) const; //! returns Physical Layer Number //! raises exception if Index <= 0 or Index > NbLevelToLayerDefs Standard_EXPORT Standard_Integer PhysicalLayerNumber (const Standard_Integer Index) const; - Standard_EXPORT Handle(TCollection_HAsciiString) ExchangeFileLevelIdent (const Standard_Integer Index) const; - - - + Standard_EXPORT const Handle(TCollection_HAsciiString) & ExchangeFileLevelIdent (const Standard_Integer Index) const; DEFINE_STANDARD_RTTIEXT(IGESAppli_LevelToPWBLayerMap,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbPropertyValues; Handle(TColStd_HArray1OfInteger) theExchangeFileLevelNumber; Handle(Interface_HArray1OfHAsciiString) theNativeLevel; Handle(TColStd_HArray1OfInteger) thePhysicalLayerNumber; Handle(Interface_HArray1OfHAsciiString) theExchangeFileLevelIdent; - - }; - - - - - - #endif // _IGESAppli_LevelToPWBLayerMap_HeaderFile diff --git a/src/IGESAppli/IGESAppli_LineWidening.cxx b/src/IGESAppli/IGESAppli_LineWidening.cxx index 5f36d2d9af..0356b3f2b1 100644 --- a/src/IGESAppli/IGESAppli_LineWidening.cxx +++ b/src/IGESAppli/IGESAppli_LineWidening.cxx @@ -18,14 +18,10 @@ #include #include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_LineWidening,IGESData_IGESEntity) -IGESAppli_LineWidening::IGESAppli_LineWidening () { } - - - void IGESAppli_LineWidening::Init +void IGESAppli_LineWidening::Init (const Standard_Integer nbPropVal, const Standard_Real aWidth, const Standard_Integer aCornering, const Standard_Integer aExtnFlag, const Standard_Integer aJustifFlag, @@ -40,33 +36,18 @@ IGESAppli_LineWidening::IGESAppli_LineWidening () { } InitTypeAndForm(406,5); } - - Standard_Integer IGESAppli_LineWidening::NbPropertyValues () const -{ - return theNbPropertyValues; -} - - Standard_Real IGESAppli_LineWidening::WidthOfMetalization () const -{ - return theWidth; -} - - Standard_Integer IGESAppli_LineWidening::CorneringCode () const -{ - return theCorneringCode; -} - - Standard_Integer IGESAppli_LineWidening::ExtensionFlag () const -{ - return theExtensionFlag; -} - - Standard_Integer IGESAppli_LineWidening::JustificationFlag () const -{ - return theJustificationFlag; -} - - Standard_Real IGESAppli_LineWidening::ExtensionValue () const +void IGESAppli_LineWidening::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return theExtensionValue; + if (SubordinateStatus() != 0) + if (DefLevel() == IGESData_DefOne || + DefLevel() == IGESData_DefSeveral) + theCheck->AddWarning("Level type: defined while ignored"); + if (NbPropertyValues() != 5) + theCheck->AddFail("Number of Property Values != 5"); + if (CorneringCode() != 0 && CorneringCode() != 1) + theCheck->AddFail("Cornering Code incorrect"); + if (ExtensionFlag() < 0 || ExtensionFlag() > 2) + theCheck->AddFail("Extension Flag value incorrect"); + if (JustificationFlag() < 0 || JustificationFlag() > 2) + theCheck->AddFail("Justification Flag value incorrect"); } diff --git a/src/IGESAppli/IGESAppli_LineWidening.hxx b/src/IGESAppli/IGESAppli_LineWidening.hxx index f2457351a3..b0f7e578da 100644 --- a/src/IGESAppli/IGESAppli_LineWidening.hxx +++ b/src/IGESAppli/IGESAppli_LineWidening.hxx @@ -17,14 +17,8 @@ #ifndef _IGESAppli_LineWidening_HeaderFile #define _IGESAppli_LineWidening_HeaderFile -#include -#include - -#include -#include #include - class IGESAppli_LineWidening; DEFINE_STANDARD_HANDLE(IGESAppli_LineWidening, IGESData_IGESEntity) @@ -34,11 +28,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_LineWidening, IGESData_IGESEntity) //! used to define locations of items. class IGESAppli_LineWidening : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_LineWidening(); + IGESAppli_LineWidening() {} //! This method is used to set the fields of the class //! LineWidening @@ -60,43 +52,36 @@ public: //! returns the number of property values //! is always 5 - Standard_EXPORT Standard_Integer NbPropertyValues() const; - + Standard_Integer NbPropertyValues() const { return theNbPropertyValues; } + //! returns the width of metallization - Standard_EXPORT Standard_Real WidthOfMetalization() const; - + Standard_Real WidthOfMetalization() const { return theWidth; } + //! returns the cornering code //! 0 = Rounded / 1 = Squared - Standard_EXPORT Standard_Integer CorneringCode() const; - + Standard_Integer CorneringCode() const { return theCorneringCode; } + //! returns the extension flag //! 0 = No extension //! 1 = One-half width extension //! 2 = Extension set by theExtnVal - Standard_EXPORT Standard_Integer ExtensionFlag() const; - + Standard_Integer ExtensionFlag() const { return theExtensionFlag; } + //! returns the justification flag //! 0 = Centre justified //! 1 = Left justified //! 2 = Right justified - Standard_EXPORT Standard_Integer JustificationFlag() const; - + Standard_Integer JustificationFlag() const { return theJustificationFlag; } + //! returns the Extension Value //! Present only if theExtnFlag = 2 - Standard_EXPORT Standard_Real ExtensionValue() const; - - + Standard_Real ExtensionValue() const { return theExtensionValue; } + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_LineWidening,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbPropertyValues; Standard_Real theWidth; @@ -104,14 +89,6 @@ private: Standard_Integer theExtensionFlag; Standard_Integer theJustificationFlag; Standard_Real theExtensionValue; - - }; - - - - - - #endif // _IGESAppli_LineWidening_HeaderFile diff --git a/src/IGESAppli/IGESAppli_NodalConstraint.cxx b/src/IGESAppli/IGESAppli_NodalConstraint.cxx index 7a97892b22..31239808c8 100644 --- a/src/IGESAppli/IGESAppli_NodalConstraint.cxx +++ b/src/IGESAppli/IGESAppli_NodalConstraint.cxx @@ -21,14 +21,11 @@ #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_NodalConstraint,IGESData_IGESEntity) -IGESAppli_NodalConstraint::IGESAppli_NodalConstraint () { } - - - void IGESAppli_NodalConstraint::Init +void IGESAppli_NodalConstraint::Init (const Standard_Integer aType, const Handle(IGESAppli_Node)& aNode, const Handle(IGESDefs_HArray1OfTabularData)& allTabData) @@ -41,23 +38,26 @@ IGESAppli_NodalConstraint::IGESAppli_NodalConstraint () { } InitTypeAndForm(418,0); } - Standard_Integer IGESAppli_NodalConstraint::NbCases () const +Standard_Integer IGESAppli_NodalConstraint::NbCases () const { return theTabularDataProps->Length(); } - Standard_Integer IGESAppli_NodalConstraint::Type () const +const Handle(IGESDefs_TabularData) & IGESAppli_NodalConstraint::TabularData (const Standard_Integer Index) const { - return theType; + return theTabularDataProps->Value(Index); } - Handle(IGESAppli_Node) IGESAppli_NodalConstraint::NodeEntity () const +void IGESAppli_NodalConstraint::OwnShared(Interface_EntityIterator &theIter) const { - return theNode; + theIter.GetOneItem(NodeEntity()); + const Standard_Integer num = NbCases(); + for ( Standard_Integer i = 1; i <= num; i++ ) + theIter.GetOneItem(TabularData(i)); } - Handle(IGESDefs_TabularData) IGESAppli_NodalConstraint::TabularData - (const Standard_Integer Index) const +void IGESAppli_NodalConstraint::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return theTabularDataProps->Value(Index); + if ((Type() != 1) && (Type() != 2)) + theCheck->AddFail("Type of Constraint != 1,2"); } diff --git a/src/IGESAppli/IGESAppli_NodalConstraint.hxx b/src/IGESAppli/IGESAppli_NodalConstraint.hxx index db54f948e7..5a31a6ccdb 100644 --- a/src/IGESAppli/IGESAppli_NodalConstraint.hxx +++ b/src/IGESAppli/IGESAppli_NodalConstraint.hxx @@ -17,14 +17,9 @@ #ifndef _IGESAppli_NodalConstraint_HeaderFile #define _IGESAppli_NodalConstraint_HeaderFile -#include -#include - -#include #include #include class IGESAppli_Node; -class Standard_OutOfRange; class IGESDefs_TabularData; @@ -39,11 +34,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_NodalConstraint, IGESData_IGESEntity) //! the load or constraint data class IGESAppli_NodalConstraint : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_NodalConstraint(); + IGESAppli_NodalConstraint() {} //! This method is used to set the fields of the class //! NodalConstraint @@ -57,39 +50,26 @@ public: Standard_EXPORT Standard_Integer NbCases() const; //! returns whether Loads (1) or Constraints (2) - Standard_EXPORT Standard_Integer Type() const; - + Standard_Integer Type() const { return theType; } + //! returns the Node - Standard_EXPORT Handle(IGESAppli_Node) NodeEntity() const; - + const Handle(IGESAppli_Node) & NodeEntity() const { return theNode; } + //! returns Tabular Data Property carrying load or constraint vector //! raises exception if Index <= 0 or Index > NbCases - Standard_EXPORT Handle(IGESDefs_TabularData) TabularData (const Standard_Integer Index) const; - + Standard_EXPORT const Handle(IGESDefs_TabularData) & TabularData (const Standard_Integer Index) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_NodalConstraint,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theType; Handle(IGESAppli_Node) theNode; Handle(IGESDefs_HArray1OfTabularData) theTabularDataProps; - - }; - - - - - - #endif // _IGESAppli_NodalConstraint_HeaderFile diff --git a/src/IGESAppli/IGESAppli_NodalDisplAndRot.cxx b/src/IGESAppli/IGESAppli_NodalDisplAndRot.cxx index 046b39625f..86eee184f1 100644 --- a/src/IGESAppli/IGESAppli_NodalDisplAndRot.cxx +++ b/src/IGESAppli/IGESAppli_NodalDisplAndRot.cxx @@ -23,15 +23,12 @@ #include #include #include -#include +#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_NodalDisplAndRot,IGESData_IGESEntity) -IGESAppli_NodalDisplAndRot::IGESAppli_NodalDisplAndRot () { } - - - void IGESAppli_NodalDisplAndRot::Init +void IGESAppli_NodalDisplAndRot::Init (const Handle(IGESDimen_HArray1OfGeneralNote)& allNotes, const Handle(TColStd_HArray1OfInteger)& allIdentifiers, const Handle(IGESAppli_HArray1OfNode)& allNodes, @@ -66,43 +63,48 @@ IGESAppli_NodalDisplAndRot::IGESAppli_NodalDisplAndRot () { } InitTypeAndForm(138,0); } - Standard_Integer IGESAppli_NodalDisplAndRot::NbCases () const +Standard_Integer IGESAppli_NodalDisplAndRot::NbCases () const { return theNotes->Length(); } - Standard_Integer IGESAppli_NodalDisplAndRot::NbNodes () const +Standard_Integer IGESAppli_NodalDisplAndRot::NbNodes () const { return theNodes->Length(); } - Handle(IGESDimen_GeneralNote) IGESAppli_NodalDisplAndRot::Note - (const Standard_Integer Index) const +const Handle(IGESDimen_GeneralNote) & IGESAppli_NodalDisplAndRot::Note (const Standard_Integer Index) const { return theNotes->Value(Index); } - Standard_Integer IGESAppli_NodalDisplAndRot::NodeIdentifier - (const Standard_Integer Index) const +Standard_Integer IGESAppli_NodalDisplAndRot::NodeIdentifier (const Standard_Integer Index) const { return theNodeIdentifiers->Value(Index); } - Handle(IGESAppli_Node) IGESAppli_NodalDisplAndRot::Node - (const Standard_Integer Index) const +const Handle(IGESAppli_Node) & IGESAppli_NodalDisplAndRot::Node (const Standard_Integer Index) const { return theNodes->Value(Index); } - gp_XYZ IGESAppli_NodalDisplAndRot::TranslationParameter - (const Standard_Integer NodeNum, const Standard_Integer CaseNum) const +const gp_XYZ & IGESAppli_NodalDisplAndRot::TranslationParameter (const Standard_Integer NodeNum, const Standard_Integer CaseNum) const { return theTransParam->Value(NodeNum)->Value(CaseNum); } - gp_XYZ IGESAppli_NodalDisplAndRot::RotationalParameter - (const Standard_Integer NodeNum, const Standard_Integer CaseNum) const +const gp_XYZ & IGESAppli_NodalDisplAndRot::RotationalParameter (const Standard_Integer NodeNum, const Standard_Integer CaseNum) const { return theRotParam->Value(NodeNum)->Value(CaseNum); } +void IGESAppli_NodalDisplAndRot::OwnShared(Interface_EntityIterator &theIter) const +{ + const Standard_Integer nbcases = theNotes->Length(); + const Standard_Integer nbnodes = theNodes->Length(); + + for (Standard_Integer i = 1; i <= nbcases; i ++) + theIter.GetOneItem(theNotes->Value(i)); + for (Standard_Integer j = 1; j <= nbnodes; j ++) + theIter.GetOneItem(theNodes->Value(j)); +} diff --git a/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx b/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx index 7e9f7e064b..881f771270 100644 --- a/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx +++ b/src/IGESAppli/IGESAppli_NodalDisplAndRot.hxx @@ -17,17 +17,11 @@ #ifndef _IGESAppli_NodalDisplAndRot_HeaderFile #define _IGESAppli_NodalDisplAndRot_HeaderFile -#include -#include - #include #include #include #include -#include class IGESBasic_HArray1OfHArray1OfXYZ; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESDimen_GeneralNote; class IGESAppli_Node; class gp_XYZ; @@ -42,11 +36,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_NodalDisplAndRot, IGESData_IGESEntity) //! data. class IGESAppli_NodalDisplAndRot : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_NodalDisplAndRot(); + IGESAppli_NodalDisplAndRot() {} //! This method is used to set the fields of the class //! NodalDisplAndRot @@ -72,7 +64,7 @@ public: //! returns the General Note that describes the Index analysis case //! raises exception if Index <= 0 or Index > NbCases - Standard_EXPORT Handle(IGESDimen_GeneralNote) Note (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESDimen_GeneralNote) & Note (const Standard_Integer Index) const; //! returns the node identifier as specified by the Index //! raises exception if Index <= 0 or Index > NbNodes @@ -80,44 +72,29 @@ public: //! returns the node as specified by the Index //! raises exception if Index <= 0 or Index > NbNodes - Standard_EXPORT Handle(IGESAppli_Node) Node (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESAppli_Node) & Node (const Standard_Integer Index) const; //! returns the Translational Parameters for the particular Index //! Exception raised if NodeNum <= 0 or NodeNum > NbNodes() //! or CaseNum <= 0 or CaseNum > NbCases() - Standard_EXPORT gp_XYZ TranslationParameter (const Standard_Integer NodeNum, const Standard_Integer CaseNum) const; + Standard_EXPORT const gp_XYZ & TranslationParameter (const Standard_Integer NodeNum, const Standard_Integer CaseNum) const; //! returns the Rotational Parameters for Index //! Exception raised if NodeNum <= 0 or NodeNum > NbNodes() //! or CaseNum <= 0 or CaseNum > NbCases() - Standard_EXPORT gp_XYZ RotationalParameter (const Standard_Integer NodeNum, const Standard_Integer CaseNum) const; - - + Standard_EXPORT const gp_XYZ & RotationalParameter (const Standard_Integer NodeNum, const Standard_Integer CaseNum) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_NodalDisplAndRot,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESDimen_HArray1OfGeneralNote) theNotes; Handle(TColStd_HArray1OfInteger) theNodeIdentifiers; Handle(IGESAppli_HArray1OfNode) theNodes; Handle(IGESBasic_HArray1OfHArray1OfXYZ) theTransParam; Handle(IGESBasic_HArray1OfHArray1OfXYZ) theRotParam; - - }; - - - - - - #endif // _IGESAppli_NodalDisplAndRot_HeaderFile diff --git a/src/IGESAppli/IGESAppli_NodalResults.cxx b/src/IGESAppli/IGESAppli_NodalResults.cxx index 525222cfd2..dd6112782d 100644 --- a/src/IGESAppli/IGESAppli_NodalResults.cxx +++ b/src/IGESAppli/IGESAppli_NodalResults.cxx @@ -21,17 +21,14 @@ #include #include #include -#include +#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_NodalResults,IGESData_IGESEntity) -IGESAppli_NodalResults::IGESAppli_NodalResults () { } - - // Data : Col -> // Nodes. Row : Data per Node - void IGESAppli_NodalResults::Init +void IGESAppli_NodalResults::Init (const Handle(IGESDimen_GeneralNote)& aNote, const Standard_Integer aNumber, const Standard_Real aTime, const Handle(TColStd_HArray1OfInteger)& allNodeIdentifiers, @@ -53,53 +50,88 @@ IGESAppli_NodalResults::IGESAppli_NodalResults () { } // FormNumber -> Type of the Results } - void IGESAppli_NodalResults::SetFormNumber (const Standard_Integer form) +void IGESAppli_NodalResults::SetFormNumber (const Standard_Integer form) { if (form < 0 || form > 34) Standard_OutOfRange::Raise ("IGESAppli_NodalResults : SetFormNumber"); InitTypeAndForm(146,form); } - - Handle(IGESDimen_GeneralNote) IGESAppli_NodalResults::Note () const -{ - return theNote; -} - - Handle(IGESAppli_Node) IGESAppli_NodalResults::Node - (const Standard_Integer Index) const +const Handle(IGESAppli_Node) & IGESAppli_NodalResults::Node (const Standard_Integer Index) const { return theNodes->Value(Index); } - Standard_Integer IGESAppli_NodalResults::NbNodes () const +Standard_Integer IGESAppli_NodalResults::NbNodes () const { return theNodes->Length(); } - Standard_Integer IGESAppli_NodalResults::SubCaseNumber () const +Standard_Integer IGESAppli_NodalResults::NbData () const { - return theSubCaseNum; + return theData->RowLength(); } - Standard_Real IGESAppli_NodalResults::Time () const +Standard_Integer IGESAppli_NodalResults::NodeIdentifier (const Standard_Integer Index) const { - return theTime; + return theNodeIdentifiers->Value(Index); } - Standard_Integer IGESAppli_NodalResults::NbData () const +Standard_Real IGESAppli_NodalResults::Data (const Standard_Integer NodeNum, const Standard_Integer DataNum) const { - return theData->RowLength(); + return theData->Value(NodeNum,DataNum); } - Standard_Integer IGESAppli_NodalResults::NodeIdentifier - (const Standard_Integer Index) const +void IGESAppli_NodalResults::OwnShared(Interface_EntityIterator &theIter) const { - return theNodeIdentifiers->Value(Index); + theIter.GetOneItem(Note()); + const Standard_Integer nbnodes = NbNodes(); + for (Standard_Integer i = 1; i <= nbnodes; i++) + theIter.GetOneItem(Node(i)); } - Standard_Real IGESAppli_NodalResults::Data - (const Standard_Integer NodeNum, const Standard_Integer DataNum) const +void IGESAppli_NodalResults::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return theData->Value(NodeNum,DataNum); + const Standard_Integer FormNum = FormNumber(); + const Standard_Integer nv = NbData(); + Standard_Boolean OK = Standard_True; + switch (FormNum) { + case 0 : if (nv < 0) OK = Standard_False; break; + case 1 : if (nv != 1) OK = Standard_False; break; + case 2 : if (nv != 1) OK = Standard_False; break; + case 3 : if (nv != 3) OK = Standard_False; break; + case 4 : if (nv != 6) OK = Standard_False; break; + case 5 : if (nv != 3) OK = Standard_False; break; + case 6 : if (nv != 3) OK = Standard_False; break; + case 7 : if (nv != 3) OK = Standard_False; break; + case 8 : if (nv != 3) OK = Standard_False; break; + case 9 : if (nv != 3) OK = Standard_False; break; + case 10 : if (nv != 1) OK = Standard_False; break; + case 11 : if (nv != 1) OK = Standard_False; break; + case 12 : if (nv != 3) OK = Standard_False; break; + case 13 : if (nv != 1) OK = Standard_False; break; + case 14 : if (nv != 1) OK = Standard_False; break; + case 15 : if (nv != 3) OK = Standard_False; break; + case 16 : if (nv != 1) OK = Standard_False; break; + case 17 : if (nv != 3) OK = Standard_False; break; + case 18 : if (nv != 3) OK = Standard_False; break; + case 19 : if (nv != 3) OK = Standard_False; break; + case 20 : if (nv != 3) OK = Standard_False; break; + case 21 : if (nv != 3) OK = Standard_False; break; + case 22 : if (nv != 3) OK = Standard_False; break; + case 23 : if (nv != 6) OK = Standard_False; break; + case 24 : if (nv != 6) OK = Standard_False; break; + case 25 : if (nv != 6) OK = Standard_False; break; + case 26 : if (nv != 6) OK = Standard_False; break; + case 27 : if (nv != 6) OK = Standard_False; break; + case 28 : if (nv != 6) OK = Standard_False; break; + case 29 : if (nv != 9) OK = Standard_False; break; + case 30 : if (nv != 9) OK = Standard_False; break; + case 31 : if (nv != 9) OK = Standard_False; break; + case 32 : if (nv != 9) OK = Standard_False; break; + case 33 : if (nv != 9) OK = Standard_False; break; + case 34 : if (nv != 9) OK = Standard_False; break; + default : theCheck->AddFail("Incorrect Form Number"); break; + } + if (!OK) theCheck->AddFail("Incorrect count of real values in array V for FEM node"); } diff --git a/src/IGESAppli/IGESAppli_NodalResults.hxx b/src/IGESAppli/IGESAppli_NodalResults.hxx index 43315cc724..9f7a2d0cfc 100644 --- a/src/IGESAppli/IGESAppli_NodalResults.hxx +++ b/src/IGESAppli/IGESAppli_NodalResults.hxx @@ -17,18 +17,11 @@ #ifndef _IGESAppli_NodalResults_HeaderFile #define _IGESAppli_NodalResults_HeaderFile -#include -#include - -#include -#include #include #include #include #include class IGESDimen_GeneralNote; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESAppli_Node; @@ -40,11 +33,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_NodalResults, IGESData_IGESEntity) //! Used to store the Analysis Data results per FEM Node class IGESAppli_NodalResults : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_NodalResults(); + IGESAppli_NodalResults() {} //! This method is used to set the fields of the class //! NodalResults @@ -65,16 +56,16 @@ public: Standard_EXPORT void SetFormNumber (const Standard_Integer form); //! returns the General Note Entity that describes the analysis case - Standard_EXPORT Handle(IGESDimen_GeneralNote) Note() const; - + const Handle(IGESDimen_GeneralNote) & Note() const { return theNote; } + //! returns zero if there is no subcase - Standard_EXPORT Standard_Integer SubCaseNumber() const; - + Standard_Integer SubCaseNumber() const { return theSubCaseNum; } + //! returns the Analysis time value for this subcase. It is the time //! at which transient analysis results occur in the mathematical //! FEM model. - Standard_EXPORT Standard_Real Time() const; - + Standard_Real Time() const { return theTime; } + //! returns number of real values in array V for a FEM node Standard_EXPORT Standard_Integer NbData() const; @@ -87,25 +78,20 @@ public: //! returns the node as specified by the Index //! raises exception if Index <= 0 or Index > NbNodes - Standard_EXPORT Handle(IGESAppli_Node) Node (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESAppli_Node) & Node (const Standard_Integer Index) const; //! returns the finite element analysis result value //! raises exception if (NodeNum <= 0 or NodeNum > NbNodes()) or //! if (DataNum <=0 or DataNum > NbData()) Standard_EXPORT Standard_Real Data (const Standard_Integer NodeNum, const Standard_Integer DataNum) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_NodalResults,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESDimen_GeneralNote) theNote; Standard_Integer theSubCaseNum; @@ -113,14 +99,6 @@ private: Handle(TColStd_HArray1OfInteger) theNodeIdentifiers; Handle(IGESAppli_HArray1OfNode) theNodes; Handle(TColStd_HArray2OfReal) theData; - - }; - - - - - - #endif // _IGESAppli_NodalResults_HeaderFile diff --git a/src/IGESAppli/IGESAppli_Node.cxx b/src/IGESAppli/IGESAppli_Node.cxx index 4ba0822c03..5f6b7b2e0d 100644 --- a/src/IGESAppli/IGESAppli_Node.cxx +++ b/src/IGESAppli/IGESAppli_Node.cxx @@ -18,19 +18,15 @@ #include #include -#include #include #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Node,IGESData_IGESEntity) -IGESAppli_Node::IGESAppli_Node () { } - - - void IGESAppli_Node::Init +void IGESAppli_Node::Init (const gp_XYZ& aCoord, const Handle(IGESGeom_TransformationMatrix)& aCoordSystem) { @@ -39,28 +35,43 @@ IGESAppli_Node::IGESAppli_Node () { } InitTypeAndForm(134,0); } - gp_Pnt IGESAppli_Node::Coord () const +gp_Pnt IGESAppli_Node::Coord () const { return gp_Pnt(theCoord); } - Handle(IGESData_TransfEntity) IGESAppli_Node::System () const +Handle(IGESData_TransfEntity) IGESAppli_Node::System () const { //if Null, Global Cartesian Coordinate System return Handle(IGESData_TransfEntity)(theSystem); } - Standard_Integer IGESAppli_Node::SystemType () const +Standard_Integer IGESAppli_Node::SystemType () const { if (theSystem.IsNull()) return 0; // 0 Global Cartesien return (theSystem->FormNumber() - 9); // 1 Cartesien, 2 Cylind. 3 Spher. } - - gp_Pnt IGESAppli_Node::TransformedNodalCoord () const +gp_Pnt IGESAppli_Node::TransformedNodalCoord () const { gp_XYZ tempCoord = Coord().XYZ(); Handle(IGESData_TransfEntity) temp = System(); if (!temp.IsNull()) temp->Value().Transforms(tempCoord); return gp_Pnt(tempCoord); } + +void IGESAppli_Node::OwnShared(Interface_EntityIterator &theIter) const +{ + theIter.GetOneItem(System()); +} + +void IGESAppli_Node::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const +{ + if (!HasSubScriptNumber()) + theCheck->AddFail("SubScript Number expected (for Node Number) not present"); + if (!HasTransf()) + theCheck->AddFail("Transformation Matrix expected, not present"); + if (!System().IsNull()) + if (System()->FormNumber() < 10) + theCheck->AddFail("System : Incorrect FormNumber (not 10-11-12)"); +} diff --git a/src/IGESAppli/IGESAppli_Node.hxx b/src/IGESAppli/IGESAppli_Node.hxx index 5cfd9a16af..1a0bf3ece7 100644 --- a/src/IGESAppli/IGESAppli_Node.hxx +++ b/src/IGESAppli/IGESAppli_Node.hxx @@ -17,14 +17,9 @@ #ifndef _IGESAppli_Node_HeaderFile #define _IGESAppli_Node_HeaderFile -#include -#include - #include #include -#include class IGESGeom_TransformationMatrix; -class gp_XYZ; class gp_Pnt; class IGESData_TransfEntity; @@ -37,11 +32,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_Node, IGESData_IGESEntity) //! Geometric point used in the definition of a finite element. class IGESAppli_Node : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_Node(); + IGESAppli_Node() {} //! This method is used to set the fields of the class Node //! - aCoord : Nodal Coordinates @@ -65,29 +58,16 @@ public: //! returns the Nodal coordinates after transformation Standard_EXPORT gp_Pnt TransformedNodalCoord() const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_Node,IGESData_IGESEntity) -protected: - - - - -private: - + private: gp_XYZ theCoord; Handle(IGESGeom_TransformationMatrix) theSystem; - - }; - - - - - - #endif // _IGESAppli_Node_HeaderFile diff --git a/src/IGESAppli/IGESAppli_PWBArtworkStackup.cxx b/src/IGESAppli/IGESAppli_PWBArtworkStackup.cxx index 3bcab5a8b0..f7b5cb6dac 100644 --- a/src/IGESAppli/IGESAppli_PWBArtworkStackup.cxx +++ b/src/IGESAppli/IGESAppli_PWBArtworkStackup.cxx @@ -19,15 +19,11 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_PWBArtworkStackup,IGESData_IGESEntity) -IGESAppli_PWBArtworkStackup::IGESAppli_PWBArtworkStackup () { } - - - void IGESAppli_PWBArtworkStackup::Init +void IGESAppli_PWBArtworkStackup::Init (const Standard_Integer nbPropVal, const Handle(TCollection_HAsciiString)& anArtIdent, const Handle(TColStd_HArray1OfInteger)& allLevelNums) @@ -40,23 +36,12 @@ IGESAppli_PWBArtworkStackup::IGESAppli_PWBArtworkStackup () { } InitTypeAndForm(406,25); } - Standard_Integer IGESAppli_PWBArtworkStackup::NbPropertyValues () const -{ - return theNbPropertyValues; -} - - Handle(TCollection_HAsciiString) IGESAppli_PWBArtworkStackup::Identification () const -{ - return theArtworkStackupIdent; -} - - Standard_Integer IGESAppli_PWBArtworkStackup::NbLevelNumbers () const +Standard_Integer IGESAppli_PWBArtworkStackup::NbLevelNumbers () const { return theLevelNumbers->Length(); } - Standard_Integer IGESAppli_PWBArtworkStackup::LevelNumber - (const Standard_Integer Index) const +Standard_Integer IGESAppli_PWBArtworkStackup::LevelNumber (const Standard_Integer Index) const { return theLevelNumbers->Value(Index); } diff --git a/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx b/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx index bc97bc7f35..7988f5a917 100644 --- a/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx +++ b/src/IGESAppli/IGESAppli_PWBArtworkStackup.hxx @@ -17,14 +17,9 @@ #ifndef _IGESAppli_PWBArtworkStackup_HeaderFile #define _IGESAppli_PWBArtworkStackup_HeaderFile -#include -#include - -#include #include #include class TCollection_HAsciiString; -class Standard_OutOfRange; class IGESAppli_PWBArtworkStackup; @@ -40,11 +35,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_PWBArtworkStackup, IGESData_IGESEntity) //! property should stand alone in the file. class IGESAppli_PWBArtworkStackup : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_PWBArtworkStackup(); + IGESAppli_PWBArtworkStackup() {} //! This method is used to set the fields of the class //! PWBArtworkStackup @@ -54,11 +47,11 @@ public: Standard_EXPORT void Init (const Standard_Integer nbPropVal, const Handle(TCollection_HAsciiString)& anArtIdent, const Handle(TColStd_HArray1OfInteger)& allLevelNums); //! returns number of property values - Standard_EXPORT Standard_Integer NbPropertyValues() const; - + Standard_Integer NbPropertyValues() const { return theNbPropertyValues; } + //! returns Artwork Stackup Identification - Standard_EXPORT Handle(TCollection_HAsciiString) Identification() const; - + const Handle(TCollection_HAsciiString) & Identification() const { return theArtworkStackupIdent; } + //! returns total number of Level Numbers Standard_EXPORT Standard_Integer NbLevelNumbers() const; @@ -66,30 +59,13 @@ public: //! raises exception if Index <= 0 or Index > NbLevelNumbers Standard_EXPORT Standard_Integer LevelNumber (const Standard_Integer Index) const; - - - DEFINE_STANDARD_RTTIEXT(IGESAppli_PWBArtworkStackup,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbPropertyValues; Handle(TCollection_HAsciiString) theArtworkStackupIdent; Handle(TColStd_HArray1OfInteger) theLevelNumbers; - - }; - - - - - - #endif // _IGESAppli_PWBArtworkStackup_HeaderFile diff --git a/src/IGESAppli/IGESAppli_PWBDrilledHole.cxx b/src/IGESAppli/IGESAppli_PWBDrilledHole.cxx index 88be618ad1..01bd038bd0 100644 --- a/src/IGESAppli/IGESAppli_PWBDrilledHole.cxx +++ b/src/IGESAppli/IGESAppli_PWBDrilledHole.cxx @@ -17,14 +17,10 @@ //-------------------------------------------------------------------- #include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_PWBDrilledHole,IGESData_IGESEntity) -IGESAppli_PWBDrilledHole::IGESAppli_PWBDrilledHole () { } - - - void IGESAppli_PWBDrilledHole::Init +void IGESAppli_PWBDrilledHole::Init (const Standard_Integer nbPropVal, const Standard_Real aDrillDia, const Standard_Real aFinishDia, const Standard_Integer aCode) @@ -36,23 +32,12 @@ IGESAppli_PWBDrilledHole::IGESAppli_PWBDrilledHole () { } InitTypeAndForm(406,26); } - - Standard_Integer IGESAppli_PWBDrilledHole::NbPropertyValues () const -{ - return theNbPropertyValues; -} - - Standard_Real IGESAppli_PWBDrilledHole::DrillDiameterSize () const -{ - return theDrillDiameter; -} - - Standard_Real IGESAppli_PWBDrilledHole::FinishDiameterSize () const -{ - return theFinishDiameter; -} - - Standard_Integer IGESAppli_PWBDrilledHole::FunctionCode () const +void IGESAppli_PWBDrilledHole::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return theFunctionCode; + if (NbPropertyValues() != 3) + theCheck->AddFail("Number of property values != 3"); + if ( (FunctionCode() < 1) || + ((FunctionCode() > 5) && (FunctionCode() < 5001)) || + (FunctionCode() > 9999)) + theCheck->AddFail("Drilled Hole Function Code != 1-5,5001-9999"); } diff --git a/src/IGESAppli/IGESAppli_PWBDrilledHole.hxx b/src/IGESAppli/IGESAppli_PWBDrilledHole.hxx index 12e74f0ad7..a307e4f124 100644 --- a/src/IGESAppli/IGESAppli_PWBDrilledHole.hxx +++ b/src/IGESAppli/IGESAppli_PWBDrilledHole.hxx @@ -17,14 +17,8 @@ #ifndef _IGESAppli_PWBDrilledHole_HeaderFile #define _IGESAppli_PWBDrilledHole_HeaderFile -#include -#include - -#include -#include #include - class IGESAppli_PWBDrilledHole; DEFINE_STANDARD_HANDLE(IGESAppli_PWBDrilledHole, IGESData_IGESEntity) @@ -34,11 +28,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_PWBDrilledHole, IGESData_IGESEntity) //! and to specify the characteristics of the drilled hole class IGESAppli_PWBDrilledHole : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_PWBDrilledHole(); + IGESAppli_PWBDrilledHole() {} //! This method is used to set the fields of the class //! PWBDrilledHole @@ -49,43 +41,28 @@ public: Standard_EXPORT void Init (const Standard_Integer nbPropVal, const Standard_Real aDrillDia, const Standard_Real aFinishDia, const Standard_Integer aCode); //! returns number of property values, always = 3 - Standard_EXPORT Standard_Integer NbPropertyValues() const; - + Standard_Integer NbPropertyValues() const { return theNbPropertyValues; } + //! returns Drill diameter size - Standard_EXPORT Standard_Real DrillDiameterSize() const; - + Standard_Real DrillDiameterSize() const { return theDrillDiameter; } + //! returns Finish diameter size - Standard_EXPORT Standard_Real FinishDiameterSize() const; - + Standard_Real FinishDiameterSize() const { return theFinishDiameter; } + //! returns Function code for drilled hole //! is 0, 1, 2, 3, 4, 5 or 5001-9999 - Standard_EXPORT Standard_Integer FunctionCode() const; - - + Standard_Integer FunctionCode() const { return theFunctionCode; } + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_PWBDrilledHole,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbPropertyValues; Standard_Real theDrillDiameter; Standard_Real theFinishDiameter; Standard_Integer theFunctionCode; - - }; - - - - - - #endif // _IGESAppli_PWBDrilledHole_HeaderFile diff --git a/src/IGESAppli/IGESAppli_PartNumber.cxx b/src/IGESAppli/IGESAppli_PartNumber.cxx index cde32148ad..8b543ecfbd 100644 --- a/src/IGESAppli/IGESAppli_PartNumber.cxx +++ b/src/IGESAppli/IGESAppli_PartNumber.cxx @@ -17,15 +17,11 @@ //-------------------------------------------------------------------- #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_PartNumber,IGESData_IGESEntity) -IGESAppli_PartNumber::IGESAppli_PartNumber () { } - - - void IGESAppli_PartNumber::Init +void IGESAppli_PartNumber::Init (const Standard_Integer nbPropVal, const Handle(TCollection_HAsciiString)& aGenName, const Handle(TCollection_HAsciiString)& aMilName, @@ -40,28 +36,8 @@ IGESAppli_PartNumber::IGESAppli_PartNumber () { } InitTypeAndForm(406,9); } - - Standard_Integer IGESAppli_PartNumber::NbPropertyValues () const -{ - return theNbPropertyValues; -} - - Handle(TCollection_HAsciiString) IGESAppli_PartNumber::GenericNumber () const -{ - return theGenericNumber; -} - - Handle(TCollection_HAsciiString) IGESAppli_PartNumber::MilitaryNumber () const -{ - return theMilitaryNumber; -} - - Handle(TCollection_HAsciiString) IGESAppli_PartNumber::VendorNumber () const -{ - return theVendorNumber; -} - - Handle(TCollection_HAsciiString) IGESAppli_PartNumber::InternalNumber () const +void IGESAppli_PartNumber::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return theInternalNumber; + if (NbPropertyValues() != 4) + theCheck->AddFail("Number of property values != 4"); } diff --git a/src/IGESAppli/IGESAppli_PartNumber.hxx b/src/IGESAppli/IGESAppli_PartNumber.hxx index b2767e3df6..c7782d1f75 100644 --- a/src/IGESAppli/IGESAppli_PartNumber.hxx +++ b/src/IGESAppli/IGESAppli_PartNumber.hxx @@ -17,10 +17,6 @@ #ifndef _IGESAppli_PartNumber_HeaderFile #define _IGESAppli_PartNumber_HeaderFile -#include -#include - -#include #include class TCollection_HAsciiString; @@ -35,11 +31,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_PartNumber, IGESData_IGESEntity) //! physical component class IGESAppli_PartNumber : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_PartNumber(); + IGESAppli_PartNumber() {} //! This method is used to set the fields of the class //! PartNumber @@ -51,46 +45,31 @@ public: Standard_EXPORT void Init (const Standard_Integer nbPropVal, const Handle(TCollection_HAsciiString)& aGenName, const Handle(TCollection_HAsciiString)& aMilName, const Handle(TCollection_HAsciiString)& aVendName, const Handle(TCollection_HAsciiString)& anIntName); //! returns number of property values, always = 4 - Standard_EXPORT Standard_Integer NbPropertyValues() const; - + Standard_Integer NbPropertyValues() const { return theNbPropertyValues; } + //! returns Generic part number or name - Standard_EXPORT Handle(TCollection_HAsciiString) GenericNumber() const; - + const Handle(TCollection_HAsciiString) & GenericNumber() const { return theGenericNumber; } + //! returns Military Standard (MIL-STD) part number - Standard_EXPORT Handle(TCollection_HAsciiString) MilitaryNumber() const; - - //! returns Vendor part number or name - Standard_EXPORT Handle(TCollection_HAsciiString) VendorNumber() const; - - //! returns Internal part number - Standard_EXPORT Handle(TCollection_HAsciiString) InternalNumber() const; + const Handle(TCollection_HAsciiString) & MilitaryNumber() const { return theMilitaryNumber; } + //! returns Vendor part number or name + const Handle(TCollection_HAsciiString) & VendorNumber() const { return theVendorNumber; } + //! returns Internal part number + const Handle(TCollection_HAsciiString) & InternalNumber() const { return theInternalNumber; } + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_PartNumber,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbPropertyValues; Handle(TCollection_HAsciiString) theGenericNumber; Handle(TCollection_HAsciiString) theMilitaryNumber; Handle(TCollection_HAsciiString) theVendorNumber; Handle(TCollection_HAsciiString) theInternalNumber; - - }; - - - - - - #endif // _IGESAppli_PartNumber_HeaderFile diff --git a/src/IGESAppli/IGESAppli_PinNumber.cxx b/src/IGESAppli/IGESAppli_PinNumber.cxx index 309640cfd5..2fe181f2e5 100644 --- a/src/IGESAppli/IGESAppli_PinNumber.cxx +++ b/src/IGESAppli/IGESAppli_PinNumber.cxx @@ -22,10 +22,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_PinNumber,IGESData_IGESEntity) -IGESAppli_PinNumber::IGESAppli_PinNumber () { } - - - void IGESAppli_PinNumber::Init +void IGESAppli_PinNumber::Init (const Standard_Integer nbPropVal, const Handle(TCollection_HAsciiString)& aValue) { @@ -34,13 +31,14 @@ IGESAppli_PinNumber::IGESAppli_PinNumber () { } InitTypeAndForm(406,8); } - - Standard_Integer IGESAppli_PinNumber::NbPropertyValues () const -{ - return theNbPropertyValues; -} - - Handle(TCollection_HAsciiString) IGESAppli_PinNumber::PinNumberVal () const +void IGESAppli_PinNumber::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return thePinNumber; + if (SubordinateStatus() != 0) + if (DefLevel() != IGESData_DefOne && + DefLevel() != IGESData_DefSeveral) + theCheck->AddFail("Level type: Incorrect"); + if (NbPropertyValues() != 1) + theCheck->AddFail("Number of Property Values != 1"); + //UNFINISHED + //Level to be ignored if the property is subordinate -- queried } diff --git a/src/IGESAppli/IGESAppli_PinNumber.hxx b/src/IGESAppli/IGESAppli_PinNumber.hxx index 3b7c5024b0..b1b5283a38 100644 --- a/src/IGESAppli/IGESAppli_PinNumber.hxx +++ b/src/IGESAppli/IGESAppli_PinNumber.hxx @@ -17,10 +17,6 @@ #ifndef _IGESAppli_PinNumber_HeaderFile #define _IGESAppli_PinNumber_HeaderFile -#include -#include - -#include #include class TCollection_HAsciiString; @@ -35,11 +31,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_PinNumber, IGESData_IGESEntity) //! electrical component's pin class IGESAppli_PinNumber : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_PinNumber(); + IGESAppli_PinNumber() {} //! This method is used to set the fields of the class //! PinNumber @@ -49,34 +43,19 @@ public: //! returns the number of property values //! is always 1 - Standard_EXPORT Standard_Integer NbPropertyValues() const; - - //! returns the pin number value - Standard_EXPORT Handle(TCollection_HAsciiString) PinNumberVal() const; - + Standard_Integer NbPropertyValues() const { return theNbPropertyValues; } + //! returns the pin number value + const Handle(TCollection_HAsciiString) & PinNumberVal() const { return thePinNumber; } + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_PinNumber,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbPropertyValues; Handle(TCollection_HAsciiString) thePinNumber; - - }; - - - - - - #endif // _IGESAppli_PinNumber_HeaderFile diff --git a/src/IGESAppli/IGESAppli_PipingFlow.cxx b/src/IGESAppli/IGESAppli_PipingFlow.cxx index 0ce3be28e1..4c4b6ca07b 100644 --- a/src/IGESAppli/IGESAppli_PipingFlow.cxx +++ b/src/IGESAppli/IGESAppli_PipingFlow.cxx @@ -22,15 +22,12 @@ #include #include #include -#include +#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_PipingFlow,IGESData_IGESEntity) -IGESAppli_PipingFlow::IGESAppli_PipingFlow () { } - - - void IGESAppli_PipingFlow::Init +void IGESAppli_PipingFlow::Init (const Standard_Integer nbContextFlags, const Standard_Integer aFlowType, const Handle(IGESData_HArray1OfIGESEntity)& allFlowAssocs, @@ -58,86 +55,92 @@ IGESAppli_PipingFlow::IGESAppli_PipingFlow () { } InitTypeAndForm(402,20); } - Standard_Boolean IGESAppli_PipingFlow::OwnCorrect () +Standard_Boolean IGESAppli_PipingFlow::OwnCorrect () { if (theNbContextFlags == 1) return Standard_False; theNbContextFlags = 1; return Standard_True; } - - Standard_Integer IGESAppli_PipingFlow::NbContextFlags () const -{ - return theNbContextFlags; -} - - Standard_Integer IGESAppli_PipingFlow::NbFlowAssociativities () const +Standard_Integer IGESAppli_PipingFlow::NbFlowAssociativities () const { return theFlowAssociativities->Length(); } - Standard_Integer IGESAppli_PipingFlow::NbConnectPoints () const +Standard_Integer IGESAppli_PipingFlow::NbConnectPoints () const { return theConnectPoints->Length(); } - Standard_Integer IGESAppli_PipingFlow::NbJoins () const +Standard_Integer IGESAppli_PipingFlow::NbJoins () const { return theJoins->Length(); } - Standard_Integer IGESAppli_PipingFlow::NbFlowNames () const +Standard_Integer IGESAppli_PipingFlow::NbFlowNames () const { return theFlowNames->Length(); } - Standard_Integer IGESAppli_PipingFlow::NbTextDisplayTemplates () const +Standard_Integer IGESAppli_PipingFlow::NbTextDisplayTemplates () const { return theTextDisplayTemplates->Length(); } - Standard_Integer IGESAppli_PipingFlow::NbContFlowAssociativities () const +Standard_Integer IGESAppli_PipingFlow::NbContFlowAssociativities () const { return theContFlowAssociativities->Length(); } - Standard_Integer IGESAppli_PipingFlow::TypeOfFlow () const -{ - return theTypeOfFlow; -} - - Handle(IGESData_IGESEntity) IGESAppli_PipingFlow::FlowAssociativity - (const Standard_Integer Index) const +const Handle(IGESData_IGESEntity) & IGESAppli_PipingFlow::FlowAssociativity (const Standard_Integer Index) const { return theFlowAssociativities->Value(Index); } - Handle(IGESDraw_ConnectPoint) IGESAppli_PipingFlow::ConnectPoint - (const Standard_Integer Index) const +const Handle(IGESDraw_ConnectPoint) & IGESAppli_PipingFlow::ConnectPoint (const Standard_Integer Index) const { return theConnectPoints->Value(Index); } - Handle(IGESData_IGESEntity) IGESAppli_PipingFlow::Join - (const Standard_Integer Index) const +const Handle(IGESData_IGESEntity) & IGESAppli_PipingFlow::Join (const Standard_Integer Index) const { return theJoins->Value(Index); } - Handle(TCollection_HAsciiString) IGESAppli_PipingFlow::FlowName - (const Standard_Integer Index) const +const Handle(TCollection_HAsciiString) & IGESAppli_PipingFlow::FlowName (const Standard_Integer Index) const { return theFlowNames->Value(Index); } - Handle(IGESGraph_TextDisplayTemplate) IGESAppli_PipingFlow::TextDisplayTemplate - (const Standard_Integer Index) const +const Handle(IGESGraph_TextDisplayTemplate) & IGESAppli_PipingFlow::TextDisplayTemplate (const Standard_Integer Index) const { return theTextDisplayTemplates->Value(Index); } - Handle(IGESData_IGESEntity) IGESAppli_PipingFlow::ContFlowAssociativity - (const Standard_Integer Index) const +const Handle(IGESData_IGESEntity) & IGESAppli_PipingFlow::ContFlowAssociativity (const Standard_Integer Index) const { return theContFlowAssociativities->Value(Index); } + +void IGESAppli_PipingFlow::OwnShared(Interface_EntityIterator &theIter) const +{ + Standard_Integer i, num; + for ( num = NbFlowAssociativities(), i = 1; i <= num; i++ ) + theIter.GetOneItem(FlowAssociativity(i)); + for ( num = NbConnectPoints(), i = 1; i <= num; i++ ) + theIter.GetOneItem(ConnectPoint(i)); + for ( num = NbJoins(), i = 1; i <= num; i++ ) + theIter.GetOneItem(Join(i)); + for ( num = NbTextDisplayTemplates(), i = 1; i <= num; i++ ) + theIter.GetOneItem(TextDisplayTemplate(i)); + for ( num = NbContFlowAssociativities(), i = 1; i <= num; i++ ) + theIter.GetOneItem(ContFlowAssociativity(i)); +} + +void IGESAppli_PipingFlow::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const +{ + if (NbContextFlags() != 1) + theCheck->AddFail("Number of Context Flags != 1"); + if ((TypeOfFlow() < 0) || (TypeOfFlow() > 2)) + theCheck->AddFail("Type of Flow != 0,1,2"); +} diff --git a/src/IGESAppli/IGESAppli_PipingFlow.hxx b/src/IGESAppli/IGESAppli_PipingFlow.hxx index 46f1f52886..137f78816e 100644 --- a/src/IGESAppli/IGESAppli_PipingFlow.hxx +++ b/src/IGESAppli/IGESAppli_PipingFlow.hxx @@ -17,17 +17,11 @@ #ifndef _IGESAppli_PipingFlow_HeaderFile #define _IGESAppli_PipingFlow_HeaderFile -#include -#include - -#include #include #include #include #include #include -#include -class Standard_OutOfRange; class IGESData_IGESEntity; class IGESDraw_ConnectPoint; class TCollection_HAsciiString; @@ -42,11 +36,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_PipingFlow, IGESData_IGESEntity) //! Represents a single fluid flow path class IGESAppli_PipingFlow : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_PipingFlow(); + IGESAppli_PipingFlow() {} //! This method is used to set the fields of the class //! PipingFlow @@ -64,8 +56,8 @@ public: Standard_EXPORT Standard_Boolean OwnCorrect(); //! returns number of Count of Context Flags, always = 1 - Standard_EXPORT Standard_Integer NbContextFlags() const; - + Standard_Integer NbContextFlags() const { return theNbContextFlags; } + //! returns number of Piping Flow Associativity Entities Standard_EXPORT Standard_Integer NbFlowAssociativities() const; @@ -87,44 +79,39 @@ public: //! returns Type of Flow = 0 : Not specified, //! 1 : Logical, //! 2 : Physical - Standard_EXPORT Standard_Integer TypeOfFlow() const; - + Standard_Integer TypeOfFlow() const { return theTypeOfFlow; } + //! returns Piping Flow Associativity Entity //! raises exception if Index <= 0 or Index > NbFlowAssociativities() - Standard_EXPORT Handle(IGESData_IGESEntity) FlowAssociativity (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESData_IGESEntity) & FlowAssociativity (const Standard_Integer Index) const; //! returns Connect Point Entity //! raises exception if Index <= 0 or Index > NbConnectPoints() - Standard_EXPORT Handle(IGESDraw_ConnectPoint) ConnectPoint (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESDraw_ConnectPoint) & ConnectPoint (const Standard_Integer Index) const; //! returns Join Entity //! raises exception if Index <= 0 or Index > NbJoins() - Standard_EXPORT Handle(IGESData_IGESEntity) Join (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESData_IGESEntity) & Join (const Standard_Integer Index) const; //! returns Flow Name //! raises exception if Index <= 0 or Index > NbFlowNames() - Standard_EXPORT Handle(TCollection_HAsciiString) FlowName (const Standard_Integer Index) const; + Standard_EXPORT const Handle(TCollection_HAsciiString) & FlowName (const Standard_Integer Index) const; //! returns Text Display Template Entity //! raises exception if Index <= 0 or Index > NbTextDisplayTemplates() - Standard_EXPORT Handle(IGESGraph_TextDisplayTemplate) TextDisplayTemplate (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESGraph_TextDisplayTemplate) & TextDisplayTemplate (const Standard_Integer Index) const; //! returns Continuation Piping Flow Associativity Entity //! raises exception if Index <= 0 or Index > NbContFlowAssociativities() - Standard_EXPORT Handle(IGESData_IGESEntity) ContFlowAssociativity (const Standard_Integer Index) const; - + Standard_EXPORT const Handle(IGESData_IGESEntity) & ContFlowAssociativity (const Standard_Integer Index) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_PipingFlow,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbContextFlags; Standard_Integer theTypeOfFlow; @@ -134,14 +121,6 @@ private: Handle(Interface_HArray1OfHAsciiString) theFlowNames; Handle(IGESGraph_HArray1OfTextDisplayTemplate) theTextDisplayTemplates; Handle(IGESData_HArray1OfIGESEntity) theContFlowAssociativities; - - }; - - - - - - #endif // _IGESAppli_PipingFlow_HeaderFile diff --git a/src/IGESAppli/IGESAppli_Protocol.cxx b/src/IGESAppli/IGESAppli_Protocol.cxx index aeab6021ab..8bffeb6306 100644 --- a/src/IGESAppli/IGESAppli_Protocol.cxx +++ b/src/IGESAppli/IGESAppli_Protocol.cxx @@ -12,6 +12,31 @@ // commercial license or contractual agreement. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include #include @@ -32,58 +57,94 @@ #include #include #include + + +#include +#include #include #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_Protocol,IGESData_Protocol) -static int deja = 0; -static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06, +/*static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06, atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14,atype15, - atype16,atype17,atype18,atype19; + atype16,atype17,atype18,atype19;*/ +static Handle(Standard_Type) gTypes[43+1]; - IGESAppli_Protocol::IGESAppli_Protocol () +IGESAppli_Protocol::IGESAppli_Protocol () { - if (deja) return; deja = 1; - atype01 = STANDARD_TYPE(IGESAppli_DrilledHole); - atype02 = STANDARD_TYPE(IGESAppli_ElementResults); - atype03 = STANDARD_TYPE(IGESAppli_FiniteElement); - atype04 = STANDARD_TYPE(IGESAppli_Flow); - atype05 = STANDARD_TYPE(IGESAppli_FlowLineSpec); - atype06 = STANDARD_TYPE(IGESAppli_LevelFunction); - atype07 = STANDARD_TYPE(IGESAppli_LevelToPWBLayerMap); - atype08 = STANDARD_TYPE(IGESAppli_LineWidening); - atype09 = STANDARD_TYPE(IGESAppli_NodalConstraint); - atype10 = STANDARD_TYPE(IGESAppli_NodalDisplAndRot); - atype11 = STANDARD_TYPE(IGESAppli_NodalResults); - atype12 = STANDARD_TYPE(IGESAppli_Node); - atype13 = STANDARD_TYPE(IGESAppli_PWBArtworkStackup); - atype14 = STANDARD_TYPE(IGESAppli_PWBDrilledHole); - atype15 = STANDARD_TYPE(IGESAppli_PartNumber); - atype16 = STANDARD_TYPE(IGESAppli_PinNumber); - atype17 = STANDARD_TYPE(IGESAppli_PipingFlow); - atype18 = STANDARD_TYPE(IGESAppli_ReferenceDesignator); - atype19 = STANDARD_TYPE(IGESAppli_RegionRestriction); + static int deja = 0; + if (!deja) { + deja = 1; + // For IGESSolid { + gTypes[ 1] = STANDARD_TYPE(IGESSolid_Block); + gTypes[ 2] = STANDARD_TYPE(IGESSolid_BooleanTree); + gTypes[ 3] = STANDARD_TYPE(IGESSolid_ConeFrustum); + gTypes[ 4] = STANDARD_TYPE(IGESSolid_ConicalSurface); + gTypes[ 5] = STANDARD_TYPE(IGESSolid_Cylinder); + gTypes[ 6] = STANDARD_TYPE(IGESSolid_CylindricalSurface); + gTypes[ 7] = STANDARD_TYPE(IGESSolid_EdgeList); + gTypes[ 8] = STANDARD_TYPE(IGESSolid_Ellipsoid); + gTypes[ 9] = STANDARD_TYPE(IGESSolid_Face); + gTypes[10] = STANDARD_TYPE(IGESSolid_Loop); + gTypes[11] = STANDARD_TYPE(IGESSolid_ManifoldSolid); + gTypes[12] = STANDARD_TYPE(IGESSolid_PlaneSurface); + gTypes[13] = STANDARD_TYPE(IGESSolid_RightAngularWedge); + gTypes[14] = STANDARD_TYPE(IGESSolid_SelectedComponent); + gTypes[15] = STANDARD_TYPE(IGESSolid_Shell); + gTypes[16] = STANDARD_TYPE(IGESSolid_SolidAssembly); + gTypes[17] = STANDARD_TYPE(IGESSolid_SolidInstance); + gTypes[18] = STANDARD_TYPE(IGESSolid_SolidOfLinearExtrusion); + gTypes[19] = STANDARD_TYPE(IGESSolid_SolidOfRevolution); + gTypes[20] = STANDARD_TYPE(IGESSolid_Sphere); + gTypes[21] = STANDARD_TYPE(IGESSolid_SphericalSurface); + gTypes[22] = STANDARD_TYPE(IGESSolid_ToroidalSurface); + gTypes[23] = STANDARD_TYPE(IGESSolid_Torus); + gTypes[24] = STANDARD_TYPE(IGESSolid_VertexList); + // } + gTypes[25] = STANDARD_TYPE(IGESAppli_DrilledHole); + gTypes[26] = STANDARD_TYPE(IGESAppli_ElementResults); + gTypes[27] = STANDARD_TYPE(IGESAppli_FiniteElement); + gTypes[28] = STANDARD_TYPE(IGESAppli_Flow); + gTypes[29] = STANDARD_TYPE(IGESAppli_FlowLineSpec); + gTypes[30] = STANDARD_TYPE(IGESAppli_LevelFunction); + gTypes[31] = STANDARD_TYPE(IGESAppli_LevelToPWBLayerMap); + gTypes[32] = STANDARD_TYPE(IGESAppli_LineWidening); + gTypes[33] = STANDARD_TYPE(IGESAppli_NodalConstraint); + gTypes[34] = STANDARD_TYPE(IGESAppli_NodalDisplAndRot); + gTypes[35] = STANDARD_TYPE(IGESAppli_NodalResults); + gTypes[36] = STANDARD_TYPE(IGESAppli_Node); + gTypes[37] = STANDARD_TYPE(IGESAppli_PWBArtworkStackup); + gTypes[38] = STANDARD_TYPE(IGESAppli_PWBDrilledHole); + gTypes[39] = STANDARD_TYPE(IGESAppli_PartNumber); + gTypes[40] = STANDARD_TYPE(IGESAppli_PinNumber); + gTypes[41] = STANDARD_TYPE(IGESAppli_PipingFlow); + gTypes[42] = STANDARD_TYPE(IGESAppli_ReferenceDesignator); + gTypes[43] = STANDARD_TYPE(IGESAppli_RegionRestriction); + } } - Standard_Integer IGESAppli_Protocol::NbResources () const - { return 2; } +Standard_Integer IGESAppli_Protocol::NbResources () const +{ return 3; } - Handle(Interface_Protocol) IGESAppli_Protocol::Resource - (const Standard_Integer num) const +Handle(Interface_Protocol) IGESAppli_Protocol::Resource (const Standard_Integer num) const { - if (num == 1) return IGESDefs::Protocol(); - if (num == 2) return IGESDraw::Protocol(); + if (num == 1) return IGESGeom::Protocol(); + if (num == 2) return IGESDefs::Protocol(); + if (num == 3) return IGESDraw::Protocol(); return NULL; } - Standard_Integer IGESAppli_Protocol::TypeNumber - (const Handle(Standard_Type)& atype) const +Standard_Integer IGESAppli_Protocol::TypeNumber (const Handle(Standard_Type)& atype) const { + for (Standard_Integer i = 1; i < sizeof(gTypes) / sizeof(Handle(Standard_Type)); i++) + { + if (atype == gTypes[i]) return i; + } + /* + // For IGESSolid { if (atype == atype01) return 1; else if (atype == atype02) return 2; else if (atype == atype03) return 3; @@ -103,5 +164,30 @@ static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06, else if (atype == atype17) return 17; else if (atype == atype18) return 18; else if (atype == atype19) return 19; + else if (atype == atype20) return 20; + else if (atype == atype21) return 21; + else if (atype == atype22) return 22; + else if (atype == atype23) return 23; + else if (atype == atype24) return 24; + // } + else if (atype == atype01) return 25; + else if (atype == atype02) return 26; + else if (atype == atype03) return 27; + else if (atype == atype04) return 28; + else if (atype == atype05) return 29; + else if (atype == atype06) return 30; + else if (atype == atype07) return 31; + else if (atype == atype08) return 32; + else if (atype == atype09) return 33; + else if (atype == atype10) return 34; + else if (atype == atype11) return 35; + else if (atype == atype12) return 36; + else if (atype == atype13) return 37; + else if (atype == atype14) return 38; + else if (atype == atype15) return 39; + else if (atype == atype16) return 40; + else if (atype == atype17) return 41; + else if (atype == atype18) return 42; + else if (atype == atype19) return 43;*/ return 0; } diff --git a/src/IGESAppli/IGESAppli_Protocol.hxx b/src/IGESAppli/IGESAppli_Protocol.hxx index 09c80a659b..c9031fbc84 100644 --- a/src/IGESAppli/IGESAppli_Protocol.hxx +++ b/src/IGESAppli/IGESAppli_Protocol.hxx @@ -17,14 +17,7 @@ #ifndef _IGESAppli_Protocol_HeaderFile #define _IGESAppli_Protocol_HeaderFile -#include -#include - #include -#include -#include -class Interface_Protocol; - class IGESAppli_Protocol; DEFINE_STANDARD_HANDLE(IGESAppli_Protocol, IGESData_Protocol) @@ -32,10 +25,8 @@ DEFINE_STANDARD_HANDLE(IGESAppli_Protocol, IGESData_Protocol) //! Description of Protocol for IGESAppli class IGESAppli_Protocol : public IGESData_Protocol { + public: -public: - - Standard_EXPORT IGESAppli_Protocol(); //! Gives the count of direct Resource Protocol. Here, two @@ -52,27 +43,7 @@ public: //! consider the same Type as the Protocol defines) Standard_EXPORT virtual Standard_Integer TypeNumber (const Handle(Standard_Type)& atype) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESAppli_Protocol,IGESData_Protocol) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESAppli_Protocol_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ReadWriteModule.cxx b/src/IGESAppli/IGESAppli_ReadWriteModule.cxx index 8a3f85a503..6660824117 100644 --- a/src/IGESAppli/IGESAppli_ReadWriteModule.cxx +++ b/src/IGESAppli/IGESAppli_ReadWriteModule.cxx @@ -61,11 +61,6 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_ReadWriteModule,IGESData_ReadWriteModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESAppli_ReadWriteModule::IGESAppli_ReadWriteModule () { } - Standard_Integer IGESAppli_ReadWriteModule::CaseIGES (const Standard_Integer typenum, const Standard_Integer formnum) const diff --git a/src/IGESAppli/IGESAppli_ReadWriteModule.hxx b/src/IGESAppli/IGESAppli_ReadWriteModule.hxx index 31a31bdd77..4dadb5690d 100644 --- a/src/IGESAppli/IGESAppli_ReadWriteModule.hxx +++ b/src/IGESAppli/IGESAppli_ReadWriteModule.hxx @@ -37,12 +37,10 @@ DEFINE_STANDARD_HANDLE(IGESAppli_ReadWriteModule, IGESData_ReadWriteModule) //! an IGESEntity. class IGESAppli_ReadWriteModule : public IGESData_ReadWriteModule { + public: -public: - - //! Creates a ReadWriteModule & puts it into ReaderLib & WriterLib - Standard_EXPORT IGESAppli_ReadWriteModule(); + IGESAppli_ReadWriteModule() {} //! Defines Case Numbers for Entities of IGESAppli Standard_EXPORT Standard_Integer CaseIGES (const Standard_Integer typenum, const Standard_Integer formnum) const Standard_OVERRIDE; @@ -53,27 +51,7 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, IGESData_IGESWriter& IW) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESAppli_ReadWriteModule,IGESData_ReadWriteModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESAppli_ReadWriteModule_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ReferenceDesignator.cxx b/src/IGESAppli/IGESAppli_ReferenceDesignator.cxx index 5bf4489e1b..8969690e23 100644 --- a/src/IGESAppli/IGESAppli_ReferenceDesignator.cxx +++ b/src/IGESAppli/IGESAppli_ReferenceDesignator.cxx @@ -23,10 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_ReferenceDesignator,IGESData_IGESEntity) -IGESAppli_ReferenceDesignator::IGESAppli_ReferenceDesignator () { } - - - void IGESAppli_ReferenceDesignator::Init +void IGESAppli_ReferenceDesignator::Init (const Standard_Integer nbPropVal, const Handle(TCollection_HAsciiString)& aText) { @@ -35,14 +32,15 @@ IGESAppli_ReferenceDesignator::IGESAppli_ReferenceDesignator () { } InitTypeAndForm(406,7); } - - Standard_Integer IGESAppli_ReferenceDesignator::NbPropertyValues () const -{ - return theNbPropertyValues; -} - - Handle(TCollection_HAsciiString) - IGESAppli_ReferenceDesignator::RefDesignatorText () const +void IGESAppli_ReferenceDesignator::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return theRefDesigText; + if (SubordinateStatus() != 0) + //the level is ignored if this property is subordinate + if (DefLevel() != IGESData_DefOne && + DefLevel() != IGESData_DefSeveral) + theCheck->AddFail("Level type: Not value/reference"); + if (NbPropertyValues() != 1) + theCheck->AddFail("Number of Property Values != 1"); + //UNFINISHED + //the level is ignored if this property is subordinate -- queried } diff --git a/src/IGESAppli/IGESAppli_ReferenceDesignator.hxx b/src/IGESAppli/IGESAppli_ReferenceDesignator.hxx index e899522362..5863d9cf95 100644 --- a/src/IGESAppli/IGESAppli_ReferenceDesignator.hxx +++ b/src/IGESAppli/IGESAppli_ReferenceDesignator.hxx @@ -17,10 +17,6 @@ #ifndef _IGESAppli_ReferenceDesignator_HeaderFile #define _IGESAppli_ReferenceDesignator_HeaderFile -#include -#include - -#include #include class TCollection_HAsciiString; @@ -35,11 +31,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_ReferenceDesignator, IGESData_IGESEntity) //! used to represent a component. class IGESAppli_ReferenceDesignator : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_ReferenceDesignator(); + IGESAppli_ReferenceDesignator() {} //! This method is used to set the fields of the class //! ReferenceDesignator @@ -49,34 +43,19 @@ public: //! returns the number of property values //! is always 1 - Standard_EXPORT Standard_Integer NbPropertyValues() const; - - //! returns the Reference designator text - Standard_EXPORT Handle(TCollection_HAsciiString) RefDesignatorText() const; - + Standard_Integer NbPropertyValues() const { return theNbPropertyValues; } + //! returns the Reference designator text + const Handle(TCollection_HAsciiString) & RefDesignatorText() const { return theRefDesigText; } + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_ReferenceDesignator,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbPropertyValues; Handle(TCollection_HAsciiString) theRefDesigText; - - }; - - - - - - #endif // _IGESAppli_ReferenceDesignator_HeaderFile diff --git a/src/IGESAppli/IGESAppli_RegionRestriction.cxx b/src/IGESAppli/IGESAppli_RegionRestriction.cxx index 9160fd0485..b591f41c81 100644 --- a/src/IGESAppli/IGESAppli_RegionRestriction.cxx +++ b/src/IGESAppli/IGESAppli_RegionRestriction.cxx @@ -17,14 +17,10 @@ //-------------------------------------------------------------------- #include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESAppli_RegionRestriction,IGESData_IGESEntity) -IGESAppli_RegionRestriction::IGESAppli_RegionRestriction () { } - - - void IGESAppli_RegionRestriction::Init +void IGESAppli_RegionRestriction::Init (const Standard_Integer nbPropVal, const Standard_Integer aViasRest, const Standard_Integer aCompoRest, const Standard_Integer aCktRest) { @@ -35,24 +31,20 @@ IGESAppli_RegionRestriction::IGESAppli_RegionRestriction () { } InitTypeAndForm(406,2); } - - Standard_Integer IGESAppli_RegionRestriction::NbPropertyValues () const -{ - return theNbPropertyValues; -} - - Standard_Integer IGESAppli_RegionRestriction::ElectricalViasRestriction () const -{ - return theElectViasRestrict; -} - - Standard_Integer IGESAppli_RegionRestriction::ElectricalComponentRestriction - () const -{ - return theElectCompRestrict; -} - - Standard_Integer IGESAppli_RegionRestriction::ElectricalCktRestriction () const +void IGESAppli_RegionRestriction::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return theElectCktRestrict; + if (SubordinateStatus() != 0) + if (DefLevel() != IGESData_DefOne && + DefLevel() != IGESData_DefSeveral) + theCheck->AddFail("Level type: Not value/reference"); + if (NbPropertyValues() != 3) + theCheck->AddFail("Number of Property Values != 3"); + if (ElectricalViasRestriction() < 0 || ElectricalViasRestriction() > 2) + theCheck->AddFail("Incorrect value for Electrical Vias Restriction"); + if (ElectricalComponentRestriction() < 0 || ElectricalComponentRestriction() > 2) + theCheck->AddFail("Incorrect value for Electrical Component Restriction"); + if (ElectricalCktRestriction() < 0 || ElectricalCktRestriction() > 2) + theCheck->AddFail("Incorrect value for Electrical Circuit Restriction"); + //UNFINISHED + //level ignored if this property is subordinate -- queried } diff --git a/src/IGESAppli/IGESAppli_RegionRestriction.hxx b/src/IGESAppli/IGESAppli_RegionRestriction.hxx index 8f952f6722..c4d31b29b9 100644 --- a/src/IGESAppli/IGESAppli_RegionRestriction.hxx +++ b/src/IGESAppli/IGESAppli_RegionRestriction.hxx @@ -17,13 +17,8 @@ #ifndef _IGESAppli_RegionRestriction_HeaderFile #define _IGESAppli_RegionRestriction_HeaderFile -#include -#include - -#include #include - class IGESAppli_RegionRestriction; DEFINE_STANDARD_HANDLE(IGESAppli_RegionRestriction, IGESData_IGESEntity) @@ -33,11 +28,9 @@ DEFINE_STANDARD_HANDLE(IGESAppli_RegionRestriction, IGESData_IGESEntity) //! over a region. class IGESAppli_RegionRestriction : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESAppli_RegionRestriction(); + IGESAppli_RegionRestriction() {} //! This method is used to set the fields of the class //! RegionRestriction @@ -48,45 +41,30 @@ public: Standard_EXPORT void Init (const Standard_Integer nbPropVal, const Standard_Integer aViasRest, const Standard_Integer aCompoRest, const Standard_Integer aCktRest); //! is always 3 - Standard_EXPORT Standard_Integer NbPropertyValues() const; - + Standard_Integer NbPropertyValues() const { return theNbPropertyValues; } + //! returns the Electrical vias restriction //! is 0, 1 or 2 - Standard_EXPORT Standard_Integer ElectricalViasRestriction() const; - + Standard_Integer ElectricalViasRestriction() const { return theElectViasRestrict; } + //! returns the Electrical components restriction //! is 0, 1 or 2 - Standard_EXPORT Standard_Integer ElectricalComponentRestriction() const; - + Standard_Integer ElectricalComponentRestriction() const { return theElectCompRestrict; } + //! returns the Electrical circuitry restriction //! is 0, 1 or 2 - Standard_EXPORT Standard_Integer ElectricalCktRestriction() const; - - + Standard_Integer ElectricalCktRestriction() const { return theElectCktRestrict; } + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESAppli_RegionRestriction,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Integer theNbPropertyValues; Standard_Integer theElectViasRestrict; Standard_Integer theElectCompRestrict; Standard_Integer theElectCktRestrict; - - }; - - - - - - #endif // _IGESAppli_RegionRestriction_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx b/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx index 373122bfad..b01f4957eb 100644 --- a/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx +++ b/src/IGESAppli/IGESAppli_ToolDrilledHole.cxx @@ -26,14 +26,11 @@ #include #include #include -#include #include #include #include #include -IGESAppli_ToolDrilledHole::IGESAppli_ToolDrilledHole () { } - void IGESAppli_ToolDrilledHole::ReadOwnParams (const Handle(IGESAppli_DrilledHole)& ent, @@ -71,21 +68,6 @@ void IGESAppli_ToolDrilledHole::WriteOwnParams IW.Send(ent->NbHigherLayer()); } -void IGESAppli_ToolDrilledHole::OwnShared - (const Handle(IGESAppli_DrilledHole)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESAppli_ToolDrilledHole::OwnCopy - (const Handle(IGESAppli_DrilledHole)& another, - const Handle(IGESAppli_DrilledHole)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init - (5,another->DrillDiaSize(),another->FinishDiaSize(), - (another->IsPlating() ? 1 : 0), - another->NbLowerLayer(),another->NbHigherLayer()); -} - Standard_Boolean IGESAppli_ToolDrilledHole::OwnCorrect (const Handle(IGESAppli_DrilledHole)& ent) const @@ -114,18 +96,6 @@ IGESData_DirChecker IGESAppli_ToolDrilledHole::DirChecker return DC; } -void IGESAppli_ToolDrilledHole::OwnCheck - (const Handle(IGESAppli_DrilledHole)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->SubordinateStatus() != 0) - if (ent->DefLevel() != IGESData_DefOne && - ent->DefLevel() != IGESData_DefSeveral) - ach->AddFail("Level type : Not value/reference"); - if (ent->NbPropertyValues() != 5) - ach->AddFail("Number of Property Values != 5"); -} - void IGESAppli_ToolDrilledHole::OwnDump (const Handle(IGESAppli_DrilledHole)& ent, const IGESData_IGESDumper& /*dumper*/, const Handle(Message_Messenger)& S, const Standard_Integer /*level*/) const diff --git a/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx b/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx index 3b46f8f90a..d2d15164c8 100644 --- a/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx +++ b/src/IGESAppli/IGESAppli_ToolDrilledHole.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolDrilledHole { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDrilledHole, ready to work - Standard_EXPORT IGESAppli_ToolDrilledHole(); + IGESAppli_ToolDrilledHole() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_DrilledHole)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a DrilledHole , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_DrilledHole)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a DrilledHole //! (NbPropertyValues forced to 5, Level cleared if Subordinate != 0) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESAppli_DrilledHole)& ent) const; @@ -67,36 +61,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_DrilledHole)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_DrilledHole)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_DrilledHole)& entfrom, const Handle(IGESAppli_DrilledHole)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_DrilledHole)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolDrilledHole_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolElementResults.cxx b/src/IGESAppli/IGESAppli_ToolElementResults.cxx index b77e84aa0f..9c9dfd5a4c 100644 --- a/src/IGESAppli/IGESAppli_ToolElementResults.cxx +++ b/src/IGESAppli/IGESAppli_ToolElementResults.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -42,7 +41,6 @@ #include #include -IGESAppli_ToolElementResults::IGESAppli_ToolElementResults () { } void IGESAppli_ToolElementResults::ReadOwnParams @@ -145,72 +143,6 @@ void IGESAppli_ToolElementResults::WriteOwnParams } } -void IGESAppli_ToolElementResults::OwnShared - (const Handle(IGESAppli_ElementResults)& ent, Interface_EntityIterator& iter) const -{ - Standard_Integer i; Standard_Integer num = ent->NbElements(); - iter.GetOneItem(ent->Note()); - for ( i = 1; i <= num; i++ ) - iter.GetOneItem(ent->Element(i)); -} - -void IGESAppli_ToolElementResults::OwnCopy - (const Handle(IGESAppli_ElementResults)& another, - const Handle(IGESAppli_ElementResults)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer i,j; - Standard_Integer num = another->NbElements(); - DeclareAndCast(IGESDimen_GeneralNote,aNote,TC.Transferred(another->Note())); - Standard_Integer aSubcaseNumber = another->SubCaseNumber(); - Standard_Real aTime = another->Time(); - Standard_Integer nv = another->NbResultValues(); - Standard_Integer aResultReportFlag = another->ResultReportFlag(); - - Handle(TColStd_HArray1OfInteger) allElementIdentifiers; - Handle(IGESAppli_HArray1OfFiniteElement) allElements; - Handle(TColStd_HArray1OfInteger) allElementTopologyType; - Handle(TColStd_HArray1OfInteger) allNbLayers; - Handle(TColStd_HArray1OfInteger) allDataLayerFlag; - Handle(TColStd_HArray1OfInteger) allNbResultDataLocs; - Handle(IGESBasic_HArray1OfHArray1OfInteger) allResultDataLoc; - Handle(IGESBasic_HArray1OfHArray1OfReal) allResultData; - if (num > 0) { - allElementIdentifiers = new TColStd_HArray1OfInteger(1, num); - allElements = new IGESAppli_HArray1OfFiniteElement(1, num); - allElementTopologyType = new TColStd_HArray1OfInteger(1, num); - allNbLayers = new TColStd_HArray1OfInteger(1, num); - allDataLayerFlag = new TColStd_HArray1OfInteger(1, num); - allNbResultDataLocs = new TColStd_HArray1OfInteger(1, num); - allResultDataLoc = new IGESBasic_HArray1OfHArray1OfInteger(1, num); - allResultData = new IGESBasic_HArray1OfHArray1OfReal(1, num); - } - for (i = 1; i <= num; i ++) { - Standard_Integer nl,nrl,numv; - allElementIdentifiers->SetValue(i,another->ElementIdentifier(i)); - allElements->SetValue - (i,GetCasted(IGESAppli_FiniteElement,TC.Transferred(another->Element(i)))); - allElementTopologyType->SetValue(i,another->ElementTopologyType(i)); - nl = another->NbLayers(i); - allNbLayers->SetValue(i,nl); - allDataLayerFlag->SetValue(i,another->DataLayerFlag(i)); - nrl = another->NbResultDataLocs(i); - allNbResultDataLocs->SetValue(i,nrl); - Handle(TColStd_HArray1OfInteger) rdrl = new TColStd_HArray1OfInteger(1,nrl); - allResultDataLoc->SetValue(i,rdrl); - for (j = 1; j <= nrl; j ++) rdrl->SetValue(j,another->ResultDataLoc(i,j)); - numv = another->NbResults(i); - Handle(TColStd_HArray1OfReal) vres = new TColStd_HArray1OfReal(1,numv); - for (j = 1; j <= numv; j ++) vres->SetValue(j,another->ResultData(i,j)); - allResultData->SetValue(i,vres); - } - ent->Init - (aNote, aSubcaseNumber, aTime, nv, aResultReportFlag, - allElementIdentifiers, allElements, allElementTopologyType, - allNbLayers, allDataLayerFlag, allNbResultDataLocs, - allResultDataLoc, allResultData); - ent->SetFormNumber(another->FormNumber()); -} - IGESData_DirChecker IGESAppli_ToolElementResults::DirChecker (const Handle(IGESAppli_ElementResults)& /* ent */) const @@ -227,80 +159,6 @@ IGESData_DirChecker IGESAppli_ToolElementResults::DirChecker return DC; } -void IGESAppli_ToolElementResults::OwnCheck - (const Handle(IGESAppli_ElementResults)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const - // UNFINISHED -{ - Standard_Integer rrf = ent->ResultReportFlag(); - if (rrf < 0 || rrf > 3) ach->AddFail("Result Report Flag not in [0-3]"); - Standard_Integer nv = ent->NbResultValues(); - Standard_Boolean OK = Standard_True; - switch (ent->FormNumber()) { - case 0 : if (nv < 0) OK = Standard_False; break; - case 1 : if (nv != 1) OK = Standard_False; break; - case 2 : if (nv != 1) OK = Standard_False; break; - case 3 : if (nv != 3) OK = Standard_False; break; - case 4 : if (nv != 6) OK = Standard_False; break; - case 5 : if (nv != 3) OK = Standard_False; break; - case 6 : if (nv != 3) OK = Standard_False; break; - case 7 : if (nv != 3) OK = Standard_False; break; - case 8 : if (nv != 3) OK = Standard_False; break; - case 9 : if (nv != 3) OK = Standard_False; break; - case 10 : if (nv != 1) OK = Standard_False; break; - case 11 : if (nv != 1) OK = Standard_False; break; - case 12 : if (nv != 3) OK = Standard_False; break; - case 13 : if (nv != 1) OK = Standard_False; break; - case 14 : if (nv != 1) OK = Standard_False; break; - case 15 : if (nv != 3) OK = Standard_False; break; - case 16 : if (nv != 1) OK = Standard_False; break; - case 17 : if (nv != 3) OK = Standard_False; break; - case 18 : if (nv != 3) OK = Standard_False; break; - case 19 : if (nv != 3) OK = Standard_False; break; - case 20 : if (nv != 3) OK = Standard_False; break; - case 21 : if (nv != 3) OK = Standard_False; break; - case 22 : if (nv != 3) OK = Standard_False; break; - case 23 : if (nv != 6) OK = Standard_False; break; - case 24 : if (nv != 6) OK = Standard_False; break; - case 25 : if (nv != 6) OK = Standard_False; break; - case 26 : if (nv != 6) OK = Standard_False; break; - case 27 : if (nv != 6) OK = Standard_False; break; - case 28 : if (nv != 6) OK = Standard_False; break; - case 29 : if (nv != 9) OK = Standard_False; break; - case 30 : if (nv != 9) OK = Standard_False; break; - case 31 : if (nv != 9) OK = Standard_False; break; - case 32 : if (nv != 9) OK = Standard_False; break; - case 33 : if (nv != 9) OK = Standard_False; break; - case 34 : if (nv != 9) OK = Standard_False; break; - default : ach->AddFail("Incorrect Form Number"); break; - } - if (!OK) ach->AddFail - ("Incorrect count of real values in array V for FEM node"); - Standard_Integer ne = ent->NbElements(); - for (Standard_Integer i = 1; i <= ne; i ++) { - char mess[100]; - Standard_Integer dlf = ent->DataLayerFlag(i); - Standard_Integer nl = ent->NbLayers(i); - Standard_Integer nrl = ent->NbResultDataLocs(i); - if (dlf < 0 || dlf > 4) - ach->AddFail("One of the Data Layer Flags not in [0-4]"); - if (dlf < 4 && ent->NbLayers(i) != 1) { - sprintf(mess,"Nb. of Layers n0.%d not ONE while Data Layer Flag is in [0-3]",i); - ach->AddFail(mess); - } - if (rrf == 1 || rrf == 2) - if (nrl != 1 || ent->ResultDataLoc(i,1) != 0) { - sprintf(mess,"Result Data Locs n0.%d incorrect for Result Report = 1 or 2",i); - ach->AddFail(mess); - } - if (ent->NbResults(i) != (nv*nl*nrl)) { - sprintf(mess,"Nb. of results for Element n0.%d incorrect, should be %d", - i,nv*nl*nrl); - ach->AddFail(mess); - } - } -} - void IGESAppli_ToolElementResults::OwnDump (const Handle(IGESAppli_ElementResults)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const // UNFINISHED diff --git a/src/IGESAppli/IGESAppli_ToolElementResults.hxx b/src/IGESAppli/IGESAppli_ToolElementResults.hxx index 02e7dad33e..7aff73f667 100644 --- a/src/IGESAppli/IGESAppli_ToolElementResults.hxx +++ b/src/IGESAppli/IGESAppli_ToolElementResults.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolElementResults { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolElementResults, ready to work - Standard_EXPORT IGESAppli_ToolElementResults(); + IGESAppli_ToolElementResults() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_ElementResults)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ElementResults , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_ElementResults)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_ElementResults)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_ElementResults)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_ElementResults)& entfrom, const Handle(IGESAppli_ElementResults)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_ElementResults)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolElementResults_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolFiniteElement.cxx b/src/IGESAppli/IGESAppli_ToolFiniteElement.cxx index 789df892e4..6df5864cfe 100644 --- a/src/IGESAppli/IGESAppli_ToolFiniteElement.cxx +++ b/src/IGESAppli/IGESAppli_ToolFiniteElement.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,8 +35,6 @@ #include #include -IGESAppli_ToolFiniteElement::IGESAppli_ToolFiniteElement () { } - void IGESAppli_ToolFiniteElement::ReadOwnParams (const Handle(IGESAppli_FiniteElement)& ent, @@ -77,32 +74,6 @@ void IGESAppli_ToolFiniteElement::WriteOwnParams IW.Send(ent->Name()); } -void IGESAppli_ToolFiniteElement::OwnShared - (const Handle(IGESAppli_FiniteElement)& ent, Interface_EntityIterator& iter) const -{ - Standard_Integer upper = ent->NbNodes(); - for (Standard_Integer i= 1; i <= upper ; i ++) - iter.GetOneItem(ent->Node(i)); -} - -void IGESAppli_ToolFiniteElement::OwnCopy - (const Handle(IGESAppli_FiniteElement)& another, - const Handle(IGESAppli_FiniteElement)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer aTopology = another->Topology(); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(another->Name()); - Standard_Integer nbval = another->NbNodes(); - Handle(IGESAppli_HArray1OfNode) aList = new - IGESAppli_HArray1OfNode(1,nbval); - for (Standard_Integer i=1;i <=nbval;i++) - { - DeclareAndCast(IGESAppli_Node,aEntity,TC.Transferred(another->Node(i))); - aList->SetValue(i,aEntity); - } - ent->Init(aTopology,aList,aName); -} - IGESData_DirChecker IGESAppli_ToolFiniteElement::DirChecker (const Handle(IGESAppli_FiniteElement)& /* ent */ ) const { @@ -118,12 +89,6 @@ IGESData_DirChecker IGESAppli_ToolFiniteElement::DirChecker return DC; } -void IGESAppli_ToolFiniteElement::OwnCheck - (const Handle(IGESAppli_FiniteElement)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESAppli_ToolFiniteElement::OwnDump (const Handle(IGESAppli_FiniteElement)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESAppli/IGESAppli_ToolFiniteElement.hxx b/src/IGESAppli/IGESAppli_ToolFiniteElement.hxx index ac0848b82e..0752463977 100644 --- a/src/IGESAppli/IGESAppli_ToolFiniteElement.hxx +++ b/src/IGESAppli/IGESAppli_ToolFiniteElement.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolFiniteElement { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolFiniteElement, ready to work - Standard_EXPORT IGESAppli_ToolFiniteElement(); + IGESAppli_ToolFiniteElement() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_FiniteElement)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a FiniteElement , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_FiniteElement)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_FiniteElement)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_FiniteElement)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_FiniteElement)& entfrom, const Handle(IGESAppli_FiniteElement)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_FiniteElement)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolFiniteElement_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolFlow.cxx b/src/IGESAppli/IGESAppli_ToolFlow.cxx index 02286efc2b..9e9ad7a119 100644 --- a/src/IGESAppli/IGESAppli_ToolFlow.cxx +++ b/src/IGESAppli/IGESAppli_ToolFlow.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -41,8 +40,6 @@ #include #include -IGESAppli_ToolFlow::IGESAppli_ToolFlow () { } - void IGESAppli_ToolFlow::ReadOwnParams (const Handle(IGESAppli_Flow)& ent, @@ -172,94 +169,6 @@ void IGESAppli_ToolFlow::WriteOwnParams IW.Send(ent->ContFlowAssociativity(i)); } -void IGESAppli_ToolFlow::OwnShared - (const Handle(IGESAppli_Flow)& ent, Interface_EntityIterator& iter) const -{ - Standard_Integer i, num; - for ( num = ent->NbFlowAssociativities(), i = 1; i <= num; i++ ) - iter.GetOneItem(ent->FlowAssociativity(i)); - for ( num = ent->NbConnectPoints(), i = 1; i <= num; i++ ) - iter.GetOneItem(ent->ConnectPoint(i)); - for ( num = ent->NbJoins(), i = 1; i <= num; i++ ) - iter.GetOneItem(ent->Join(i)); - for ( num = ent->NbTextDisplayTemplates(), i = 1; i <= num; i++ ) - iter.GetOneItem(ent->TextDisplayTemplate(i)); - for ( num = ent->NbContFlowAssociativities(), i = 1; i <= num; i++ ) - iter.GetOneItem(ent->ContFlowAssociativity(i)); -} - -void IGESAppli_ToolFlow::OwnCopy - (const Handle(IGESAppli_Flow)& another, - const Handle(IGESAppli_Flow)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer tempNbContextFlags = another->NbContextFlags(); - Standard_Integer tempTypeOfFlow = another->TypeOfFlow(); - Standard_Integer tempFunctionFlag = another->FunctionFlag(); - Standard_Integer i, num; - - num = another->NbFlowAssociativities(); - Handle(IGESData_HArray1OfIGESEntity) tempFlowAssocs; - if (num > 0) tempFlowAssocs = new IGESData_HArray1OfIGESEntity(1, num); - for ( i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESData_IGESEntity, new_item, - TC.Transferred(another->FlowAssociativity(i))); - tempFlowAssocs->SetValue(i, new_item); - } - - num = another->NbConnectPoints(); - Handle(IGESDraw_HArray1OfConnectPoint) tempConnectPoints; - if (num > 0) tempConnectPoints = new IGESDraw_HArray1OfConnectPoint(1, num); - for ( i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESDraw_ConnectPoint, new_item, - TC.Transferred(another->ConnectPoint(i))); - tempConnectPoints->SetValue(i, new_item); - } - - num = another->NbJoins(); - Handle(IGESData_HArray1OfIGESEntity) tempJoins; - if (num > 0) tempJoins = new IGESData_HArray1OfIGESEntity(1, num); - for ( i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESData_IGESEntity, new_item, - TC.Transferred(another->Join(i))); - tempJoins->SetValue(i, new_item); - } - - num = another->NbFlowNames(); - Handle(Interface_HArray1OfHAsciiString) tempFlowNames; - if (num > 0) tempFlowNames = new Interface_HArray1OfHAsciiString(1, num); - for ( i = 1; i <= num; i++ ) - tempFlowNames->SetValue - (i, new TCollection_HAsciiString(another->FlowName(i))); - - num = another->NbTextDisplayTemplates(); - Handle(IGESGraph_HArray1OfTextDisplayTemplate) tempTextDisplayTemplates; - if (num > 0) tempTextDisplayTemplates = - new IGESGraph_HArray1OfTextDisplayTemplate(1, num); - for ( i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESGraph_TextDisplayTemplate, new_item, - TC.Transferred(another->TextDisplayTemplate(i))); - tempTextDisplayTemplates->SetValue(i, new_item); - } - - num = another->NbContFlowAssociativities(); - Handle(IGESData_HArray1OfIGESEntity) tempContFlowAssocs; - if (num > 0) tempContFlowAssocs = new IGESData_HArray1OfIGESEntity(1, num); - for ( i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESData_IGESEntity, new_item, - TC.Transferred(another->ContFlowAssociativity(i))); - tempContFlowAssocs->SetValue(i, new_item); - } - - ent->Init (tempNbContextFlags, tempTypeOfFlow, tempFunctionFlag, - tempFlowAssocs, tempConnectPoints, tempJoins, tempFlowNames, - tempTextDisplayTemplates, tempContFlowAssocs); -} - Standard_Boolean IGESAppli_ToolFlow::OwnCorrect (const Handle(IGESAppli_Flow)& ent) const { @@ -281,18 +190,6 @@ IGESData_DirChecker IGESAppli_ToolFlow::DirChecker return DC; } -void IGESAppli_ToolFlow::OwnCheck - (const Handle(IGESAppli_Flow)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->NbContextFlags() != 2) - ach->AddFail("Number of Context Flags != 2"); - if ((ent->TypeOfFlow() < 0) || (ent->TypeOfFlow() > 2)) - ach->AddFail("Type of Flow != 0,1,2"); - if ((ent->FunctionFlag() < 0) || (ent->FunctionFlag() > 2)) - ach->AddFail("Function Flag != 0,1,2"); -} - void IGESAppli_ToolFlow::OwnDump (const Handle(IGESAppli_Flow)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESAppli/IGESAppli_ToolFlow.hxx b/src/IGESAppli/IGESAppli_ToolFlow.hxx index 0bc31f5015..9d92ed6b4f 100644 --- a/src/IGESAppli/IGESAppli_ToolFlow.hxx +++ b/src/IGESAppli/IGESAppli_ToolFlow.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolFlow { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolFlow, ready to work - Standard_EXPORT IGESAppli_ToolFlow(); + IGESAppli_ToolFlow() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_Flow)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Flow , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_Flow)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a Flow //! (NbContextFlags forced to 2) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESAppli_Flow)& ent) const; @@ -67,36 +61,9 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_Flow)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_Flow)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_Flow)& entfrom, const Handle(IGESAppli_Flow)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_Flow)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolFlow_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx b/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx index 2033267263..324cfaae2e 100644 --- a/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx +++ b/src/IGESAppli/IGESAppli_ToolFlowLineSpec.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -35,8 +34,6 @@ #include #include -IGESAppli_ToolFlowLineSpec::IGESAppli_ToolFlowLineSpec () { } - void IGESAppli_ToolFlowLineSpec::ReadOwnParams (const Handle(IGESAppli_FlowLineSpec)& ent, @@ -65,24 +62,6 @@ void IGESAppli_ToolFlowLineSpec::WriteOwnParams IW.Send(ent->Modifier(i)); } -void IGESAppli_ToolFlowLineSpec::OwnShared - (const Handle(IGESAppli_FlowLineSpec)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESAppli_ToolFlowLineSpec::OwnCopy - (const Handle(IGESAppli_FlowLineSpec)& another, - const Handle(IGESAppli_FlowLineSpec)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer num = another->NbPropertyValues(); - Handle(Interface_HArray1OfHAsciiString) tempNameAndModifiers = - new Interface_HArray1OfHAsciiString(1, num); - for ( Standard_Integer i = 1; i <= num; i++ ) - tempNameAndModifiers->SetValue - (i, new TCollection_HAsciiString(another->Modifier(i))); - ent->Init(tempNameAndModifiers); -} - IGESData_DirChecker IGESAppli_ToolFlowLineSpec::DirChecker (const Handle(IGESAppli_FlowLineSpec)& /* ent */ ) const { @@ -98,12 +77,6 @@ IGESData_DirChecker IGESAppli_ToolFlowLineSpec::DirChecker return DC; } -void IGESAppli_ToolFlowLineSpec::OwnCheck - (const Handle(IGESAppli_FlowLineSpec)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESAppli_ToolFlowLineSpec::OwnDump (const Handle(IGESAppli_FlowLineSpec)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESAppli/IGESAppli_ToolFlowLineSpec.hxx b/src/IGESAppli/IGESAppli_ToolFlowLineSpec.hxx index c9b101fa37..1023c44129 100644 --- a/src/IGESAppli/IGESAppli_ToolFlowLineSpec.hxx +++ b/src/IGESAppli/IGESAppli_ToolFlowLineSpec.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolFlowLineSpec { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolFlowLineSpec, ready to work - Standard_EXPORT IGESAppli_ToolFlowLineSpec(); + IGESAppli_ToolFlowLineSpec() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_FlowLineSpec)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a FlowLineSpec , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_FlowLineSpec)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_FlowLineSpec)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_FlowLineSpec)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_FlowLineSpec)& entfrom, const Handle(IGESAppli_FlowLineSpec)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_FlowLineSpec)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolFlowLineSpec_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx b/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx index bd8b9fda08..0f767d4d05 100644 --- a/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx +++ b/src/IGESAppli/IGESAppli_ToolLevelFunction.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESAppli_ToolLevelFunction::IGESAppli_ToolLevelFunction () { } - void IGESAppli_ToolLevelFunction::ReadOwnParams (const Handle(IGESAppli_LevelFunction)& ent, @@ -70,25 +67,6 @@ void IGESAppli_ToolLevelFunction::WriteOwnParams else IW.Send(ent->FuncDescription()); } -void IGESAppli_ToolLevelFunction::OwnShared - (const Handle(IGESAppli_LevelFunction)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESAppli_ToolLevelFunction::OwnCopy - (const Handle(IGESAppli_LevelFunction)& another, - const Handle(IGESAppli_LevelFunction)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer aNbPropertyValues, code; - Handle(TCollection_HAsciiString) descrip; - if (!another->FuncDescription().IsNull()) descrip = - new TCollection_HAsciiString(another->FuncDescription()); - code = another->FuncDescriptionCode(); - aNbPropertyValues = another->NbPropertyValues(); - - ent->Init(aNbPropertyValues,code,descrip); -} - Standard_Boolean IGESAppli_ToolLevelFunction::OwnCorrect (const Handle(IGESAppli_LevelFunction)& ent) const { @@ -110,14 +88,6 @@ IGESData_DirChecker IGESAppli_ToolLevelFunction::DirChecker return DC; } -void IGESAppli_ToolLevelFunction::OwnCheck - (const Handle(IGESAppli_LevelFunction)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->NbPropertyValues() != 2) - ach->AddFail("Number of Property Values != 2"); -} - void IGESAppli_ToolLevelFunction::OwnDump (const Handle(IGESAppli_LevelFunction)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer /* level */) const diff --git a/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx b/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx index ec6c801a4c..c9ae7721e8 100644 --- a/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx +++ b/src/IGESAppli/IGESAppli_ToolLevelFunction.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolLevelFunction { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolLevelFunction, ready to work - Standard_EXPORT IGESAppli_ToolLevelFunction(); + IGESAppli_ToolLevelFunction() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_LevelFunction)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a LevelFunction , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_LevelFunction)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a LevelFunction //! (NbPropertyValues forced to 2) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESAppli_LevelFunction)& ent) const; @@ -67,36 +61,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_LevelFunction)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_LevelFunction)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_LevelFunction)& entfrom, const Handle(IGESAppli_LevelFunction)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_LevelFunction)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolLevelFunction_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx b/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx index 3367fb2c4c..6d92ec7d11 100644 --- a/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx +++ b/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -36,8 +35,6 @@ #include #include -IGESAppli_ToolLevelToPWBLayerMap::IGESAppli_ToolLevelToPWBLayerMap () { } - void IGESAppli_ToolLevelToPWBLayerMap::ReadOwnParams (const Handle(IGESAppli_LevelToPWBLayerMap)& ent, @@ -102,39 +99,6 @@ void IGESAppli_ToolLevelToPWBLayerMap::WriteOwnParams } } -void IGESAppli_ToolLevelToPWBLayerMap::OwnShared - (const Handle(IGESAppli_LevelToPWBLayerMap)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESAppli_ToolLevelToPWBLayerMap::OwnCopy - (const Handle(IGESAppli_LevelToPWBLayerMap)& another, - const Handle(IGESAppli_LevelToPWBLayerMap)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer tempNbPropertyValues = another->NbPropertyValues(); - Standard_Integer num = another->NbLevelToLayerDefs(); - Handle(TColStd_HArray1OfInteger) tempExchangeFileLevelNumber = - new TColStd_HArray1OfInteger(1, num); - Handle(Interface_HArray1OfHAsciiString) tempNativeLevel = - new Interface_HArray1OfHAsciiString(1, num); - Handle(TColStd_HArray1OfInteger) tempPhysicalLayerNumber = - new TColStd_HArray1OfInteger(1, num); - Handle(Interface_HArray1OfHAsciiString) tempExchangeFileLevelIdent = - new Interface_HArray1OfHAsciiString(1, num); - for ( Standard_Integer i = 1; i <= num; i++ ) - { - tempExchangeFileLevelNumber->SetValue(i,another->ExchangeFileLevelNumber(i)); - tempNativeLevel->SetValue - (i, new TCollection_HAsciiString(another->NativeLevel(i))); - tempPhysicalLayerNumber->SetValue(i, another->PhysicalLayerNumber(i)); - tempExchangeFileLevelIdent->SetValue - (i,new TCollection_HAsciiString - (another->ExchangeFileLevelIdent(i))); - } - ent->Init (tempNbPropertyValues, tempExchangeFileLevelNumber, tempNativeLevel, - tempPhysicalLayerNumber, tempExchangeFileLevelIdent); -} - IGESData_DirChecker IGESAppli_ToolLevelToPWBLayerMap::DirChecker (const Handle(IGESAppli_LevelToPWBLayerMap)& /* ent */ ) const { @@ -150,12 +114,6 @@ IGESData_DirChecker IGESAppli_ToolLevelToPWBLayerMap::DirChecker return DC; } -void IGESAppli_ToolLevelToPWBLayerMap::OwnCheck - (const Handle(IGESAppli_LevelToPWBLayerMap)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESAppli_ToolLevelToPWBLayerMap::OwnDump (const Handle(IGESAppli_LevelToPWBLayerMap)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.hxx b/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.hxx index 055b43868e..e132973921 100644 --- a/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.hxx +++ b/src/IGESAppli/IGESAppli_ToolLevelToPWBLayerMap.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolLevelToPWBLayerMap { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolLevelToPWBLayerMap, ready to work - Standard_EXPORT IGESAppli_ToolLevelToPWBLayerMap(); + IGESAppli_ToolLevelToPWBLayerMap() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_LevelToPWBLayerMap)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a LevelToPWBLayerMap , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_LevelToPWBLayerMap)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_LevelToPWBLayerMap)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_LevelToPWBLayerMap)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_LevelToPWBLayerMap)& entfrom, const Handle(IGESAppli_LevelToPWBLayerMap)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_LevelToPWBLayerMap)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolLevelToPWBLayerMap_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolLineWidening.cxx b/src/IGESAppli/IGESAppli_ToolLineWidening.cxx index d4e9a44617..e358835a84 100644 --- a/src/IGESAppli/IGESAppli_ToolLineWidening.cxx +++ b/src/IGESAppli/IGESAppli_ToolLineWidening.cxx @@ -26,14 +26,11 @@ #include #include #include -#include #include #include #include #include -IGESAppli_ToolLineWidening::IGESAppli_ToolLineWidening () { } - void IGESAppli_ToolLineWidening::ReadOwnParams (const Handle(IGESAppli_LineWidening)& ent, @@ -74,21 +71,6 @@ void IGESAppli_ToolLineWidening::WriteOwnParams IW.Send(ent->ExtensionValue()); } -void IGESAppli_ToolLineWidening::OwnShared - (const Handle(IGESAppli_LineWidening)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESAppli_ToolLineWidening::OwnCopy - (const Handle(IGESAppli_LineWidening)& another, - const Handle(IGESAppli_LineWidening)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init - (5,another->WidthOfMetalization(),another->CorneringCode(), - another->ExtensionFlag(),another->JustificationFlag(), - another->ExtensionValue()); -} - Standard_Boolean IGESAppli_ToolLineWidening::OwnCorrect (const Handle(IGESAppli_LineWidening)& ent) const { @@ -116,24 +98,6 @@ IGESData_DirChecker IGESAppli_ToolLineWidening::DirChecker return DC; } -void IGESAppli_ToolLineWidening::OwnCheck - (const Handle(IGESAppli_LineWidening)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->SubordinateStatus() != 0) - if (ent->DefLevel() == IGESData_DefOne || - ent->DefLevel() == IGESData_DefSeveral) - ach->AddWarning("Level type: defined while ignored"); - if (ent->NbPropertyValues() != 5) - ach->AddFail("Number of Property Values != 5"); - if (ent->CorneringCode() != 0 && ent->CorneringCode() != 1) - ach->AddFail("Cornering Code incorrect"); - if (ent->ExtensionFlag() < 0 || ent->ExtensionFlag() > 2) - ach->AddFail("Extension Flag value incorrect"); - if (ent->JustificationFlag() < 0 || ent->JustificationFlag() > 2) - ach->AddFail("Justification Flag value incorrect"); -} - void IGESAppli_ToolLineWidening::OwnDump (const Handle(IGESAppli_LineWidening)& ent, const IGESData_IGESDumper& /*dumper*/, const Handle(Message_Messenger)& S, const Standard_Integer /*level*/) const diff --git a/src/IGESAppli/IGESAppli_ToolLineWidening.hxx b/src/IGESAppli/IGESAppli_ToolLineWidening.hxx index a1d37b26d6..b731e646c0 100644 --- a/src/IGESAppli/IGESAppli_ToolLineWidening.hxx +++ b/src/IGESAppli/IGESAppli_ToolLineWidening.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolLineWidening { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolLineWidening, ready to work - Standard_EXPORT IGESAppli_ToolLineWidening(); + IGESAppli_ToolLineWidening() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_LineWidening)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a LineWidening , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_LineWidening)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a LineWidening //! (NbPropertyValues forced to 5, Level cleared if Subordinate != 0) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESAppli_LineWidening)& ent) const; @@ -67,36 +61,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_LineWidening)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_LineWidening)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_LineWidening)& entfrom, const Handle(IGESAppli_LineWidening)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_LineWidening)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolLineWidening_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx b/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx index 7b4f2fbbed..7c64e00eb5 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx +++ b/src/IGESAppli/IGESAppli_ToolNodalConstraint.cxx @@ -29,15 +29,12 @@ #include #include #include -#include #include #include #include #include #include -IGESAppli_ToolNodalConstraint::IGESAppli_ToolNodalConstraint () { } - void IGESAppli_ToolNodalConstraint::ReadOwnParams (const Handle(IGESAppli_NodalConstraint)& ent, @@ -79,34 +76,6 @@ void IGESAppli_ToolNodalConstraint::WriteOwnParams IW.Send(ent->TabularData(i)); } -void IGESAppli_ToolNodalConstraint::OwnShared - (const Handle(IGESAppli_NodalConstraint)& ent, Interface_EntityIterator& iter) const -{ - Standard_Integer i, num; - iter.GetOneItem(ent->NodeEntity()); - for ( num = ent->NbCases(), i = 1; i <= num; i++ ) - iter.GetOneItem(ent->TabularData(i)); -} - -void IGESAppli_ToolNodalConstraint::OwnCopy - (const Handle(IGESAppli_NodalConstraint)& another, - const Handle(IGESAppli_NodalConstraint)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer num = another->NbCases(); - Standard_Integer tempType = another->Type(); - DeclareAndCast(IGESAppli_Node, tempNode, - TC.Transferred(another->NodeEntity())); - Handle(IGESDefs_HArray1OfTabularData) tempTabularDataProps = - new IGESDefs_HArray1OfTabularData(1, num); - for ( Standard_Integer i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESDefs_TabularData, new_item, - TC.Transferred(another->TabularData(i))); - tempTabularDataProps->SetValue(i, new_item); - } - ent->Init(tempType, tempNode, tempTabularDataProps); -} - IGESData_DirChecker IGESAppli_ToolNodalConstraint::DirChecker (const Handle(IGESAppli_NodalConstraint)& /* ent */ ) const { @@ -120,14 +89,6 @@ IGESData_DirChecker IGESAppli_ToolNodalConstraint::DirChecker return DC; } -void IGESAppli_ToolNodalConstraint::OwnCheck - (const Handle(IGESAppli_NodalConstraint)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if ((ent->Type() != 1) && (ent->Type() != 2)) - ach->AddFail("Type of Constraint != 1,2"); -} - void IGESAppli_ToolNodalConstraint::OwnDump (const Handle(IGESAppli_NodalConstraint)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESAppli/IGESAppli_ToolNodalConstraint.hxx b/src/IGESAppli/IGESAppli_ToolNodalConstraint.hxx index 33cd7e58fe..7b59359adc 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalConstraint.hxx +++ b/src/IGESAppli/IGESAppli_ToolNodalConstraint.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolNodalConstraint { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolNodalConstraint, ready to work - Standard_EXPORT IGESAppli_ToolNodalConstraint(); + IGESAppli_ToolNodalConstraint() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_NodalConstraint)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a NodalConstraint , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_NodalConstraint)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_NodalConstraint)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_NodalConstraint)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_NodalConstraint)& entfrom, const Handle(IGESAppli_NodalConstraint)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_NodalConstraint)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolNodalConstraint_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.cxx b/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.cxx index d90e1d33a9..d8a33a9969 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.cxx +++ b/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -41,8 +40,6 @@ #include #include -IGESAppli_ToolNodalDisplAndRot::IGESAppli_ToolNodalDisplAndRot () { } - void IGESAppli_ToolNodalDisplAndRot::ReadOwnParams (const Handle(IGESAppli_NodalDisplAndRot)& ent, @@ -130,65 +127,6 @@ void IGESAppli_ToolNodalDisplAndRot::WriteOwnParams } } -void IGESAppli_ToolNodalDisplAndRot::OwnShared - (const Handle(IGESAppli_NodalDisplAndRot)& ent, Interface_EntityIterator& iter) const -{ - Standard_Integer nbcases = ent->NbCases(); - Standard_Integer nbnodes = ent->NbNodes(); - - for (Standard_Integer i = 1; i <= nbcases; i ++) - iter.GetOneItem(ent->Note(i)); - for (Standard_Integer j = 1; j <= nbnodes; j ++) - iter.GetOneItem(ent->Node(j)); -} - -void IGESAppli_ToolNodalDisplAndRot::OwnCopy - (const Handle(IGESAppli_NodalDisplAndRot)& another, - const Handle(IGESAppli_NodalDisplAndRot)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer nbcases = another->NbCases(); - Standard_Integer nbnodes = another->NbNodes(); - Handle(IGESDimen_HArray1OfGeneralNote) aNotes = - new IGESDimen_HArray1OfGeneralNote(1,nbcases); - Handle(TColStd_HArray1OfInteger) aNodeIdentifiers = - new TColStd_HArray1OfInteger(1,nbnodes); - Handle(IGESAppli_HArray1OfNode) aNodes = - new IGESAppli_HArray1OfNode(1,nbnodes); - Handle(IGESBasic_HArray1OfHArray1OfXYZ) aTransParam = - new IGESBasic_HArray1OfHArray1OfXYZ(1, nbnodes); - Handle(IGESBasic_HArray1OfHArray1OfXYZ) aRotParam = - new IGESBasic_HArray1OfHArray1OfXYZ(1, nbnodes); - - for (Standard_Integer i=1 ;i <=nbnodes; i++) - { - aNodeIdentifiers->SetValue(i,(another->NodeIdentifier(i))); - DeclareAndCast(IGESAppli_Node,anitem,TC.Transferred(another->Node(i))); - aNodes->SetValue(i,anitem); - } - for (Standard_Integer j=1 ;j <=nbcases; j++) - { - DeclareAndCast - (IGESDimen_GeneralNote,anitem,TC.Transferred(another->Note(j))); - aNotes->SetValue(j,anitem); - } - for (Standard_Integer n=1 ;n <=nbnodes; n++) - { - Handle(TColgp_HArray1OfXYZ) tempArray1 = new - TColgp_HArray1OfXYZ(1,nbcases); - Handle(TColgp_HArray1OfXYZ) tempArray2 = new - TColgp_HArray1OfXYZ(1,nbcases); - for (Standard_Integer k=1;k<= nbcases;k++) - { - tempArray1->SetValue(k,another->TranslationParameter(n,k)); - tempArray2->SetValue(k,another->RotationalParameter(n,k)); - } - aTransParam->SetValue(n,tempArray1); - aRotParam->SetValue(n,tempArray2); - } - - ent->Init(aNotes,aNodeIdentifiers,aNodes,aRotParam,aTransParam); -} - IGESData_DirChecker IGESAppli_ToolNodalDisplAndRot::DirChecker (const Handle(IGESAppli_NodalDisplAndRot)& /* ent */ ) const { @@ -199,12 +137,6 @@ IGESData_DirChecker IGESAppli_ToolNodalDisplAndRot::DirChecker return DC; } -void IGESAppli_ToolNodalDisplAndRot::OwnCheck - (const Handle(IGESAppli_NodalDisplAndRot)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESAppli_ToolNodalDisplAndRot::OwnDump (const Handle(IGESAppli_NodalDisplAndRot)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.hxx b/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.hxx index 19222da1dd..0ee5c939ad 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.hxx +++ b/src/IGESAppli/IGESAppli_ToolNodalDisplAndRot.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolNodalDisplAndRot { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolNodalDisplAndRot, ready to work - Standard_EXPORT IGESAppli_ToolNodalDisplAndRot(); + IGESAppli_ToolNodalDisplAndRot() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_NodalDisplAndRot)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a NodalDisplAndRot , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_NodalDisplAndRot)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_NodalDisplAndRot)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_NodalDisplAndRot)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_NodalDisplAndRot)& entfrom, const Handle(IGESAppli_NodalDisplAndRot)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_NodalDisplAndRot)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolNodalDisplAndRot_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolNodalResults.cxx b/src/IGESAppli/IGESAppli_ToolNodalResults.cxx index 06e8159618..50ae39a96b 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalResults.cxx +++ b/src/IGESAppli/IGESAppli_ToolNodalResults.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -39,8 +38,6 @@ #include #include -IGESAppli_ToolNodalResults::IGESAppli_ToolNodalResults () { } - void IGESAppli_ToolNodalResults::ReadOwnParams (const Handle(IGESAppli_NodalResults)& ent, @@ -108,45 +105,6 @@ void IGESAppli_ToolNodalResults::WriteOwnParams } } -void IGESAppli_ToolNodalResults::OwnShared - (const Handle(IGESAppli_NodalResults)& ent, Interface_EntityIterator& iter) const -{ - Standard_Integer nbnodes = ent->NbNodes(); - iter.GetOneItem(ent->Note()); - for (Standard_Integer i = 1; i <= nbnodes; i++) - iter.GetOneItem(ent->Node(i)); -} - -void IGESAppli_ToolNodalResults::OwnCopy - (const Handle(IGESAppli_NodalResults)& another, - const Handle(IGESAppli_NodalResults)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESDimen_GeneralNote,aNote,TC.Transferred(another->Note())); - Standard_Integer aSubCaseNum = another->SubCaseNumber(); - Standard_Real aTime = another->Time(); - Standard_Integer nbnodes = another->NbNodes(); - Standard_Integer nbval = another->NbData(); - Handle(TColStd_HArray1OfInteger) aNodeIdentifiers = - new TColStd_HArray1OfInteger(1,nbnodes); - Handle(IGESAppli_HArray1OfNode) aNodes = - new IGESAppli_HArray1OfNode(1,nbnodes); - Handle(TColStd_HArray2OfReal) aData = - new TColStd_HArray2OfReal(1,nbnodes,1,nbval); - - for (Standard_Integer i=1; i <= nbnodes; i++) - { - Standard_Integer aItem = another->NodeIdentifier(i); - aNodeIdentifiers->SetValue(i,aItem); - DeclareAndCast(IGESAppli_Node,anentity,TC.Transferred(another->Node(i))); - aNodes->SetValue(i,anentity); - for (Standard_Integer j=1; j <= nbval; j++) - aData->SetValue(i,j, another->Data(i,j)); - } - - ent->Init(aNote,aSubCaseNum,aTime,aNodeIdentifiers,aNodes,aData); - ent->SetFormNumber(another->FormNumber()); -} - IGESData_DirChecker IGESAppli_ToolNodalResults::DirChecker (const Handle(IGESAppli_NodalResults)& /* ent */ ) const { @@ -161,55 +119,6 @@ IGESData_DirChecker IGESAppli_ToolNodalResults::DirChecker return DC; } -void IGESAppli_ToolNodalResults::OwnCheck - (const Handle(IGESAppli_NodalResults)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - Standard_Integer FormNum = ent->FormNumber(); - Standard_Integer nv = ent->NbData(); - Standard_Boolean OK = Standard_True; - switch (FormNum) { - case 0 : if (nv < 0) OK = Standard_False; break; - case 1 : if (nv != 1) OK = Standard_False; break; - case 2 : if (nv != 1) OK = Standard_False; break; - case 3 : if (nv != 3) OK = Standard_False; break; - case 4 : if (nv != 6) OK = Standard_False; break; - case 5 : if (nv != 3) OK = Standard_False; break; - case 6 : if (nv != 3) OK = Standard_False; break; - case 7 : if (nv != 3) OK = Standard_False; break; - case 8 : if (nv != 3) OK = Standard_False; break; - case 9 : if (nv != 3) OK = Standard_False; break; - case 10 : if (nv != 1) OK = Standard_False; break; - case 11 : if (nv != 1) OK = Standard_False; break; - case 12 : if (nv != 3) OK = Standard_False; break; - case 13 : if (nv != 1) OK = Standard_False; break; - case 14 : if (nv != 1) OK = Standard_False; break; - case 15 : if (nv != 3) OK = Standard_False; break; - case 16 : if (nv != 1) OK = Standard_False; break; - case 17 : if (nv != 3) OK = Standard_False; break; - case 18 : if (nv != 3) OK = Standard_False; break; - case 19 : if (nv != 3) OK = Standard_False; break; - case 20 : if (nv != 3) OK = Standard_False; break; - case 21 : if (nv != 3) OK = Standard_False; break; - case 22 : if (nv != 3) OK = Standard_False; break; - case 23 : if (nv != 6) OK = Standard_False; break; - case 24 : if (nv != 6) OK = Standard_False; break; - case 25 : if (nv != 6) OK = Standard_False; break; - case 26 : if (nv != 6) OK = Standard_False; break; - case 27 : if (nv != 6) OK = Standard_False; break; - case 28 : if (nv != 6) OK = Standard_False; break; - case 29 : if (nv != 9) OK = Standard_False; break; - case 30 : if (nv != 9) OK = Standard_False; break; - case 31 : if (nv != 9) OK = Standard_False; break; - case 32 : if (nv != 9) OK = Standard_False; break; - case 33 : if (nv != 9) OK = Standard_False; break; - case 34 : if (nv != 9) OK = Standard_False; break; - default : ach->AddFail("Incorrect Form Number"); break; - } - if (!OK) ach->AddFail - ("Incorrect count of real values in array V for FEM node"); -} - void IGESAppli_ToolNodalResults::OwnDump (const Handle(IGESAppli_NodalResults)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESAppli/IGESAppli_ToolNodalResults.hxx b/src/IGESAppli/IGESAppli_ToolNodalResults.hxx index 5ad236c8c6..6aa7802e99 100644 --- a/src/IGESAppli/IGESAppli_ToolNodalResults.hxx +++ b/src/IGESAppli/IGESAppli_ToolNodalResults.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolNodalResults { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolNodalResults, ready to work - Standard_EXPORT IGESAppli_ToolNodalResults(); + IGESAppli_ToolNodalResults() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_NodalResults)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a NodalResults , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_NodalResults)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_NodalResults)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_NodalResults)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_NodalResults)& entfrom, const Handle(IGESAppli_NodalResults)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_NodalResults)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolNodalResults_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolNode.cxx b/src/IGESAppli/IGESAppli_ToolNode.cxx index ef02017fe6..e3eb11ff79 100644 --- a/src/IGESAppli/IGESAppli_ToolNode.cxx +++ b/src/IGESAppli/IGESAppli_ToolNode.cxx @@ -28,15 +28,12 @@ #include #include #include -#include #include #include #include #include #include -IGESAppli_ToolNode::IGESAppli_ToolNode () { } - void IGESAppli_ToolNode::ReadOwnParams (const Handle(IGESAppli_Node)& ent, @@ -66,23 +63,6 @@ void IGESAppli_ToolNode::WriteOwnParams IW.Send(ent->System()); } -void IGESAppli_ToolNode::OwnShared - (const Handle(IGESAppli_Node)& ent, Interface_EntityIterator& iter) const -{ - iter.GetOneItem(ent->System()); -} - -void IGESAppli_ToolNode::OwnCopy - (const Handle(IGESAppli_Node)& another, - const Handle(IGESAppli_Node)& ent, Interface_CopyTool& TC) const -{ - gp_XYZ aCoord = (another->Coord()).XYZ(); - DeclareAndCast(IGESGeom_TransformationMatrix,aSystem, - TC.Transferred(another->System())); - - ent->Init(aCoord,aSystem); -} - IGESData_DirChecker IGESAppli_ToolNode::DirChecker (const Handle(IGESAppli_Node)& /*ent*/ ) const { @@ -95,19 +75,6 @@ IGESData_DirChecker IGESAppli_ToolNode::DirChecker return DC; } -void IGESAppli_ToolNode::OwnCheck - (const Handle(IGESAppli_Node)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (!ent->HasSubScriptNumber()) - ach->AddFail("SubScript Number expected (for Node Number) not present"); - if (!ent->HasTransf()) - ach->AddFail("Transformation Matrix expected, not present"); - if (!ent->System().IsNull()) - if (ent->System()->FormNumber() < 10) - ach->AddFail("System : Incorrect FormNumber (not 10-11-12)"); -} - void IGESAppli_ToolNode::OwnDump (const Handle(IGESAppli_Node)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESAppli/IGESAppli_ToolNode.hxx b/src/IGESAppli/IGESAppli_ToolNode.hxx index e31b1b9feb..91e6d8f8ef 100644 --- a/src/IGESAppli/IGESAppli_ToolNode.hxx +++ b/src/IGESAppli/IGESAppli_ToolNode.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolNode { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolNode, ready to work - Standard_EXPORT IGESAppli_ToolNode(); + IGESAppli_ToolNode() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_Node)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Node , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_Node)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_Node)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_Node)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_Node)& entfrom, const Handle(IGESAppli_Node)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_Node)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolNode_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx b/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx index 0b29ab98c7..9ad3a18789 100644 --- a/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx +++ b/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -35,8 +34,6 @@ #include #include -IGESAppli_ToolPWBArtworkStackup::IGESAppli_ToolPWBArtworkStackup () { } - void IGESAppli_ToolPWBArtworkStackup::ReadOwnParams (const Handle(IGESAppli_PWBArtworkStackup)& ent, @@ -71,26 +68,6 @@ void IGESAppli_ToolPWBArtworkStackup::WriteOwnParams IW.Send(ent->LevelNumber(i)); } -void IGESAppli_ToolPWBArtworkStackup::OwnShared - (const Handle(IGESAppli_PWBArtworkStackup)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESAppli_ToolPWBArtworkStackup::OwnCopy - (const Handle(IGESAppli_PWBArtworkStackup)& another, - const Handle(IGESAppli_PWBArtworkStackup)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer num = another->NbLevelNumbers(); - Standard_Integer tempNbPropertyValues = another->NbPropertyValues(); - Handle(TCollection_HAsciiString) tempArtworkStackupIdent = - new TCollection_HAsciiString(another->Identification()); - Handle(TColStd_HArray1OfInteger) tempLevelNumbers = - new TColStd_HArray1OfInteger(1, num); - for ( Standard_Integer i = 1; i <= num; i++ ) - tempLevelNumbers->SetValue(i, another->LevelNumber(i)); - ent->Init(tempNbPropertyValues, tempArtworkStackupIdent, tempLevelNumbers); -} - IGESData_DirChecker IGESAppli_ToolPWBArtworkStackup::DirChecker (const Handle(IGESAppli_PWBArtworkStackup)& /* ent */ ) const { @@ -106,12 +83,6 @@ IGESData_DirChecker IGESAppli_ToolPWBArtworkStackup::DirChecker return DC; } -void IGESAppli_ToolPWBArtworkStackup::OwnCheck - (const Handle(IGESAppli_PWBArtworkStackup)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESAppli_ToolPWBArtworkStackup::OwnDump (const Handle(IGESAppli_PWBArtworkStackup)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.hxx b/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.hxx index ea1bcc7f9c..3184e395a9 100644 --- a/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.hxx +++ b/src/IGESAppli/IGESAppli_ToolPWBArtworkStackup.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolPWBArtworkStackup { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPWBArtworkStackup, ready to work - Standard_EXPORT IGESAppli_ToolPWBArtworkStackup(); + IGESAppli_ToolPWBArtworkStackup() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_PWBArtworkStackup)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a PWBArtworkStackup , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_PWBArtworkStackup)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_PWBArtworkStackup)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_PWBArtworkStackup)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_PWBArtworkStackup)& entfrom, const Handle(IGESAppli_PWBArtworkStackup)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_PWBArtworkStackup)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolPWBArtworkStackup_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx index c0a40dea98..8fa90ec251 100644 --- a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx +++ b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.cxx @@ -25,14 +25,11 @@ #include #include #include -#include #include #include #include #include -IGESAppli_ToolPWBDrilledHole::IGESAppli_ToolPWBDrilledHole () { } - void IGESAppli_ToolPWBDrilledHole::ReadOwnParams (const Handle(IGESAppli_PWBDrilledHole)& ent, @@ -66,19 +63,6 @@ void IGESAppli_ToolPWBDrilledHole::WriteOwnParams IW.Send(ent->FunctionCode()); } -void IGESAppli_ToolPWBDrilledHole::OwnShared - (const Handle(IGESAppli_PWBDrilledHole)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESAppli_ToolPWBDrilledHole::OwnCopy - (const Handle(IGESAppli_PWBDrilledHole)& another, - const Handle(IGESAppli_PWBDrilledHole)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init (3,another->DrillDiameterSize(),another->FinishDiameterSize(), - another->FunctionCode()); -} - Standard_Boolean IGESAppli_ToolPWBDrilledHole::OwnCorrect (const Handle(IGESAppli_PWBDrilledHole)& ent) const { @@ -104,18 +88,6 @@ IGESData_DirChecker IGESAppli_ToolPWBDrilledHole::DirChecker return DC; } -void IGESAppli_ToolPWBDrilledHole::OwnCheck - (const Handle(IGESAppli_PWBDrilledHole)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->NbPropertyValues() != 3) - ach->AddFail("Number of property values != 3"); - if ( (ent->FunctionCode() < 1) || - ((ent->FunctionCode() > 5) && (ent->FunctionCode() < 5001)) || - (ent->FunctionCode() > 9999)) - ach->AddFail("Drilled Hole Function Code != 1-5,5001-9999"); -} - void IGESAppli_ToolPWBDrilledHole::OwnDump (const Handle(IGESAppli_PWBDrilledHole)& ent, const IGESData_IGESDumper& /*dumper*/, const Handle(Message_Messenger)& S, const Standard_Integer /*level*/) const diff --git a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx index cfcb732187..b68ace770c 100644 --- a/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx +++ b/src/IGESAppli/IGESAppli_ToolPWBDrilledHole.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolPWBDrilledHole { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPWBDrilledHole, ready to work - Standard_EXPORT IGESAppli_ToolPWBDrilledHole(); + IGESAppli_ToolPWBDrilledHole() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_PWBDrilledHole)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a PWBDrilledHole , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_PWBDrilledHole)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a PWBDrilledHole //! (NbPropertyValues forced to 3) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESAppli_PWBDrilledHole)& ent) const; @@ -67,36 +61,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_PWBDrilledHole)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_PWBDrilledHole)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_PWBDrilledHole)& entfrom, const Handle(IGESAppli_PWBDrilledHole)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_PWBDrilledHole)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolPWBDrilledHole_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolPartNumber.cxx b/src/IGESAppli/IGESAppli_ToolPartNumber.cxx index d09a4fd58e..f783e594c0 100644 --- a/src/IGESAppli/IGESAppli_ToolPartNumber.cxx +++ b/src/IGESAppli/IGESAppli_ToolPartNumber.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESAppli_ToolPartNumber::IGESAppli_ToolPartNumber () { } - void IGESAppli_ToolPartNumber::ReadOwnParams (const Handle(IGESAppli_PartNumber)& ent, @@ -73,28 +70,6 @@ void IGESAppli_ToolPartNumber::WriteOwnParams IW.Send(ent->InternalNumber()); } -void IGESAppli_ToolPartNumber::OwnShared - (const Handle(IGESAppli_PartNumber)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESAppli_ToolPartNumber::OwnCopy - (const Handle(IGESAppli_PartNumber)& another, - const Handle(IGESAppli_PartNumber)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer tempNbPropertyValues = another->NbPropertyValues(); - Handle(TCollection_HAsciiString) tempGenericNumber = - new TCollection_HAsciiString(another->GenericNumber()); - Handle(TCollection_HAsciiString) tempMilitaryNumber = - new TCollection_HAsciiString(another->MilitaryNumber()); - Handle(TCollection_HAsciiString) tempVendorNumber = - new TCollection_HAsciiString(another->VendorNumber()); - Handle(TCollection_HAsciiString) tempInternalNumber = - new TCollection_HAsciiString(another->InternalNumber()); - ent->Init(tempNbPropertyValues, tempGenericNumber, tempMilitaryNumber, - tempVendorNumber, tempInternalNumber); -} - Standard_Boolean IGESAppli_ToolPartNumber::OwnCorrect (const Handle(IGESAppli_PartNumber)& ent) const { @@ -120,14 +95,6 @@ IGESData_DirChecker IGESAppli_ToolPartNumber::DirChecker return DC; } -void IGESAppli_ToolPartNumber::OwnCheck - (const Handle(IGESAppli_PartNumber)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->NbPropertyValues() != 4) - ach->AddFail("Number of property values != 4"); -} - void IGESAppli_ToolPartNumber::OwnDump (const Handle(IGESAppli_PartNumber)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer /* level */) const diff --git a/src/IGESAppli/IGESAppli_ToolPartNumber.hxx b/src/IGESAppli/IGESAppli_ToolPartNumber.hxx index 78668b8bdc..ac3686569b 100644 --- a/src/IGESAppli/IGESAppli_ToolPartNumber.hxx +++ b/src/IGESAppli/IGESAppli_ToolPartNumber.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolPartNumber { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPartNumber, ready to work - Standard_EXPORT IGESAppli_ToolPartNumber(); + IGESAppli_ToolPartNumber() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_PartNumber)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a PartNumber , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_PartNumber)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a PartNumber //! (NbPropertyValues forced to 4) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESAppli_PartNumber)& ent) const; @@ -67,36 +61,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_PartNumber)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_PartNumber)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_PartNumber)& entfrom, const Handle(IGESAppli_PartNumber)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_PartNumber)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolPartNumber_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolPinNumber.cxx b/src/IGESAppli/IGESAppli_ToolPinNumber.cxx index 57804f396e..3307179beb 100644 --- a/src/IGESAppli/IGESAppli_ToolPinNumber.cxx +++ b/src/IGESAppli/IGESAppli_ToolPinNumber.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -35,8 +34,6 @@ #include #include -IGESAppli_ToolPinNumber::IGESAppli_ToolPinNumber () { } - void IGESAppli_ToolPinNumber::ReadOwnParams (const Handle(IGESAppli_PinNumber)& ent, @@ -61,22 +58,6 @@ void IGESAppli_ToolPinNumber::WriteOwnParams IW.Send(ent->PinNumberVal()); } -void IGESAppli_ToolPinNumber::OwnShared - (const Handle(IGESAppli_PinNumber)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESAppli_ToolPinNumber::OwnCopy - (const Handle(IGESAppli_PinNumber)& another, - const Handle(IGESAppli_PinNumber)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer aNbPropertyValues; - Handle(TCollection_HAsciiString) aPinNumber = - new TCollection_HAsciiString(another->PinNumberVal()); - aNbPropertyValues = another->NbPropertyValues(); - ent->Init(aNbPropertyValues,aPinNumber); -} - Standard_Boolean IGESAppli_ToolPinNumber::OwnCorrect (const Handle(IGESAppli_PinNumber)& ent) const { @@ -100,20 +81,6 @@ IGESData_DirChecker IGESAppli_ToolPinNumber::DirChecker return DC; } -void IGESAppli_ToolPinNumber::OwnCheck - (const Handle(IGESAppli_PinNumber)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->SubordinateStatus() != 0) - if (ent->DefLevel() != IGESData_DefOne && - ent->DefLevel() != IGESData_DefSeveral) - ach->AddFail("Level type: Incorrect"); - if (ent->NbPropertyValues() != 1) - ach->AddFail("Number of Property Values != 1"); - //UNFINISHED - //Level to be ignored if the property is subordinate -- queried -} - void IGESAppli_ToolPinNumber::OwnDump (const Handle(IGESAppli_PinNumber)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer /* level */) const diff --git a/src/IGESAppli/IGESAppli_ToolPinNumber.hxx b/src/IGESAppli/IGESAppli_ToolPinNumber.hxx index 1ef373f481..755dd42d68 100644 --- a/src/IGESAppli/IGESAppli_ToolPinNumber.hxx +++ b/src/IGESAppli/IGESAppli_ToolPinNumber.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolPinNumber { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPinNumber, ready to work - Standard_EXPORT IGESAppli_ToolPinNumber(); + IGESAppli_ToolPinNumber() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_PinNumber)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a PinNumber , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_PinNumber)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a PinNumber //! (Level cleared in D.E. if Subordinate != 0) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESAppli_PinNumber)& ent) const; @@ -67,36 +61,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_PinNumber)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_PinNumber)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_PinNumber)& entfrom, const Handle(IGESAppli_PinNumber)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_PinNumber)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolPinNumber_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolPipingFlow.cxx b/src/IGESAppli/IGESAppli_ToolPipingFlow.cxx index 35d9f0951c..187af27fac 100644 --- a/src/IGESAppli/IGESAppli_ToolPipingFlow.cxx +++ b/src/IGESAppli/IGESAppli_ToolPipingFlow.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -41,8 +40,6 @@ #include #include -IGESAppli_ToolPipingFlow::IGESAppli_ToolPipingFlow () { } - void IGESAppli_ToolPipingFlow::ReadOwnParams (const Handle(IGESAppli_PipingFlow)& ent, @@ -170,85 +167,6 @@ void IGESAppli_ToolPipingFlow::WriteOwnParams IW.Send(ent->ContFlowAssociativity(i)); } -void IGESAppli_ToolPipingFlow::OwnShared - (const Handle(IGESAppli_PipingFlow)& ent, Interface_EntityIterator& iter) const -{ - Standard_Integer i, num; - for ( num = ent->NbFlowAssociativities(), i = 1; i <= num; i++ ) - iter.GetOneItem(ent->FlowAssociativity(i)); - for ( num = ent->NbConnectPoints(), i = 1; i <= num; i++ ) - iter.GetOneItem(ent->ConnectPoint(i)); - for ( num = ent->NbJoins(), i = 1; i <= num; i++ ) - iter.GetOneItem(ent->Join(i)); - for ( num = ent->NbTextDisplayTemplates(), i = 1; i <= num; i++ ) - iter.GetOneItem(ent->TextDisplayTemplate(i)); - for ( num = ent->NbContFlowAssociativities(), i = 1; i <= num; i++ ) - iter.GetOneItem(ent->ContFlowAssociativity(i)); -} - -void IGESAppli_ToolPipingFlow::OwnCopy - (const Handle(IGESAppli_PipingFlow)& another, - const Handle(IGESAppli_PipingFlow)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer tempNbContextFlags = another->NbContextFlags(); - Standard_Integer tempTypeOfFlow = another->TypeOfFlow(); - Standard_Integer i, num; - num = another->NbFlowAssociativities(); - Handle(IGESData_HArray1OfIGESEntity) tempFlowAssocs = - new IGESData_HArray1OfIGESEntity(1, num); - for ( i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESData_IGESEntity, new_item, - TC.Transferred(another->FlowAssociativity(i))); - tempFlowAssocs->SetValue(i, new_item); - } - num = another->NbConnectPoints(); - Handle(IGESDraw_HArray1OfConnectPoint) tempConnectPoints = - new IGESDraw_HArray1OfConnectPoint(1, num); - for ( i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESDraw_ConnectPoint, new_item, - TC.Transferred(another->ConnectPoint(i))); - tempConnectPoints->SetValue(i, new_item); - } - num = another->NbJoins(); - Handle(IGESData_HArray1OfIGESEntity) tempJoins = - new IGESData_HArray1OfIGESEntity(1, num); - for ( i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESData_IGESEntity, new_item, - TC.Transferred(another->Join(i))); - tempJoins->SetValue(i, new_item); - } - num = another->NbFlowNames(); - Handle(Interface_HArray1OfHAsciiString) tempFlowNames = - new Interface_HArray1OfHAsciiString(1, num); - for ( i = 1; i <= num; i++ ) - tempFlowNames->SetValue - (i, new TCollection_HAsciiString(another->FlowName(i))); - num = another->NbTextDisplayTemplates(); - Handle(IGESGraph_HArray1OfTextDisplayTemplate) tempTextDisplayTemplates = - new IGESGraph_HArray1OfTextDisplayTemplate(1, num); - for ( i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESGraph_TextDisplayTemplate, new_item, - TC.Transferred(another->TextDisplayTemplate(i))); - tempTextDisplayTemplates->SetValue(i, new_item); - } - num = another->NbContFlowAssociativities(); - Handle(IGESData_HArray1OfIGESEntity) tempContFlowAssocs = - new IGESData_HArray1OfIGESEntity(1, num); - for ( i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESData_IGESEntity, new_item, - TC.Transferred(another->ContFlowAssociativity(i))); - tempContFlowAssocs->SetValue(i, new_item); - } - ent->Init (tempNbContextFlags, tempTypeOfFlow, tempFlowAssocs, - tempConnectPoints, tempJoins, tempFlowNames, - tempTextDisplayTemplates, tempContFlowAssocs); -} - Standard_Boolean IGESAppli_ToolPipingFlow::OwnCorrect (const Handle(IGESAppli_PipingFlow)& ent) const { @@ -270,16 +188,6 @@ IGESData_DirChecker IGESAppli_ToolPipingFlow::DirChecker return DC; } -void IGESAppli_ToolPipingFlow::OwnCheck - (const Handle(IGESAppli_PipingFlow)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->NbContextFlags() != 1) - ach->AddFail("Number of Context Flags != 1"); - if ((ent->TypeOfFlow() < 0) || (ent->TypeOfFlow() > 2)) - ach->AddFail("Type of Flow != 0,1,2"); -} - void IGESAppli_ToolPipingFlow::OwnDump (const Handle(IGESAppli_PipingFlow)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx b/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx index 3e40b4119c..de236af0ab 100644 --- a/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx +++ b/src/IGESAppli/IGESAppli_ToolPipingFlow.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolPipingFlow { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPipingFlow, ready to work - Standard_EXPORT IGESAppli_ToolPipingFlow(); + IGESAppli_ToolPipingFlow() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_PipingFlow)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a PipingFlow , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_PipingFlow)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a PipingFlow //! (NbContextFlags forced to 1) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESAppli_PipingFlow)& ent) const; @@ -67,36 +61,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_PipingFlow)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_PipingFlow)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_PipingFlow)& entfrom, const Handle(IGESAppli_PipingFlow)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_PipingFlow)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolPipingFlow_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx index a8d1aaac84..4abc29f7fd 100644 --- a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx +++ b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -35,8 +34,6 @@ #include #include -IGESAppli_ToolReferenceDesignator::IGESAppli_ToolReferenceDesignator () { } - void IGESAppli_ToolReferenceDesignator::ReadOwnParams (const Handle(IGESAppli_ReferenceDesignator)& ent, @@ -61,22 +58,6 @@ void IGESAppli_ToolReferenceDesignator::WriteOwnParams IW.Send(ent->RefDesignatorText()); } -void IGESAppli_ToolReferenceDesignator::OwnShared - (const Handle(IGESAppli_ReferenceDesignator)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESAppli_ToolReferenceDesignator::OwnCopy - (const Handle(IGESAppli_ReferenceDesignator)& another, - const Handle(IGESAppli_ReferenceDesignator)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer aNbPropertyValues; - Handle(TCollection_HAsciiString) aReferenceDesignator = - new TCollection_HAsciiString(another->RefDesignatorText()); - aNbPropertyValues = another->NbPropertyValues(); - ent->Init(aNbPropertyValues,aReferenceDesignator); -} - Standard_Boolean IGESAppli_ToolReferenceDesignator::OwnCorrect (const Handle(IGESAppli_ReferenceDesignator)& ent) const { @@ -104,21 +85,6 @@ IGESData_DirChecker IGESAppli_ToolReferenceDesignator::DirChecker return DC; } -void IGESAppli_ToolReferenceDesignator::OwnCheck - (const Handle(IGESAppli_ReferenceDesignator)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->SubordinateStatus() != 0) - //the level is ignored if this property is subordinate - if (ent->DefLevel() != IGESData_DefOne && - ent->DefLevel() != IGESData_DefSeveral) - ach->AddFail("Level type: Not value/reference"); - if (ent->NbPropertyValues() != 1) - ach->AddFail("Number of Property Values != 1"); - //UNFINISHED - //the level is ignored if this property is subordinate -- queried -} - void IGESAppli_ToolReferenceDesignator::OwnDump (const Handle(IGESAppli_ReferenceDesignator)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer /* level */) const diff --git a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx index c47b8f3b84..d6b36210b4 100644 --- a/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx +++ b/src/IGESAppli/IGESAppli_ToolReferenceDesignator.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolReferenceDesignator { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolReferenceDesignator, ready to work - Standard_EXPORT IGESAppli_ToolReferenceDesignator(); + IGESAppli_ToolReferenceDesignator() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_ReferenceDesignator)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ReferenceDesignator , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_ReferenceDesignator)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a ReferenceDesignator //! (NbPropertyValues forced to 1, Level cleared if Subordinate != 0) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESAppli_ReferenceDesignator)& ent) const; @@ -67,36 +61,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_ReferenceDesignator)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_ReferenceDesignator)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_ReferenceDesignator)& entfrom, const Handle(IGESAppli_ReferenceDesignator)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_ReferenceDesignator)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolReferenceDesignator_HeaderFile diff --git a/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx b/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx index eee4441c81..5bd1e5fe26 100644 --- a/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx +++ b/src/IGESAppli/IGESAppli_ToolRegionRestriction.cxx @@ -26,14 +26,11 @@ #include #include #include -#include #include #include #include #include -IGESAppli_ToolRegionRestriction::IGESAppli_ToolRegionRestriction () { } - void IGESAppli_ToolRegionRestriction::ReadOwnParams (const Handle(IGESAppli_RegionRestriction)& ent, @@ -62,21 +59,6 @@ void IGESAppli_ToolRegionRestriction::WriteOwnParams IW.Send(ent->ElectricalCktRestriction()); } -void IGESAppli_ToolRegionRestriction::OwnShared - (const Handle(IGESAppli_RegionRestriction)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESAppli_ToolRegionRestriction::OwnCopy - (const Handle(IGESAppli_RegionRestriction)& another, - const Handle(IGESAppli_RegionRestriction)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init - (3,another->ElectricalViasRestriction(), - another->ElectricalComponentRestriction(), - another->ElectricalCktRestriction()); // nbprops = 3 -} - Standard_Boolean IGESAppli_ToolRegionRestriction::OwnCorrect (const Handle(IGESAppli_RegionRestriction)& ent) const { @@ -104,26 +86,6 @@ IGESData_DirChecker IGESAppli_ToolRegionRestriction::DirChecker return DC; } -void IGESAppli_ToolRegionRestriction::OwnCheck - (const Handle(IGESAppli_RegionRestriction)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->SubordinateStatus() != 0) - if (ent->DefLevel() != IGESData_DefOne && - ent->DefLevel() != IGESData_DefSeveral) - ach->AddFail("Level type: Not value/reference"); - if (ent->NbPropertyValues() != 3) - ach->AddFail("Number of Property Values != 3"); - if (ent->ElectricalViasRestriction() < 0 || ent->ElectricalViasRestriction() > 2) - ach->AddFail("Incorrect value for Electrical Vias Restriction"); - if (ent->ElectricalComponentRestriction() < 0 || ent->ElectricalComponentRestriction() > 2) - ach->AddFail("Incorrect value for Electrical Component Restriction"); - if (ent->ElectricalCktRestriction() < 0 || ent->ElectricalCktRestriction() > 2) - ach->AddFail("Incorrect value for Electrical Circuit Restriction"); - //UNFINISHED - //level ignored if this property is subordinate -- queried -} - void IGESAppli_ToolRegionRestriction::OwnDump (const Handle(IGESAppli_RegionRestriction)& ent, const IGESData_IGESDumper& /*dumper*/, const Handle(Message_Messenger)& S, const Standard_Integer /*level*/) const diff --git a/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx b/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx index 0d12ed28f1..c86d2ffa36 100644 --- a/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx +++ b/src/IGESAppli/IGESAppli_ToolRegionRestriction.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESAppli_ToolRegionRestriction { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolRegionRestriction, ready to work - Standard_EXPORT IGESAppli_ToolRegionRestriction(); + IGESAppli_ToolRegionRestriction() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESAppli_RegionRestriction)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a RegionRestriction , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESAppli_RegionRestriction)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a RegionRestriction //! (NbPropertyValues forced to 3, Level cleared if Subordinate != 0) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESAppli_RegionRestriction)& ent) const; @@ -67,36 +61,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESAppli_RegionRestriction)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESAppli_RegionRestriction)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESAppli_RegionRestriction)& entfrom, const Handle(IGESAppli_RegionRestriction)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESAppli_RegionRestriction)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESAppli_ToolRegionRestriction_HeaderFile diff --git a/src/IGESBasic/IGESBasic.cxx b/src/IGESBasic/IGESBasic.cxx index 601a043cf9..d4b8fb85db 100644 --- a/src/IGESBasic/IGESBasic.cxx +++ b/src/IGESBasic/IGESBasic.cxx @@ -23,14 +23,16 @@ #include #include -// Ancillary data to work on a Package of IGES Entities with a Protocol -// (Modules are created and loaded in appropriate libraries, once by Init) -static Handle(IGESBasic_Protocol) protocol; - - void IGESBasic::Init () +/*void IGESBasic::Init () { IGESData::Init(); // usefull for Undefined Type or Erroneous Entities + IGESBasic::Protocol(); +}*/ + +const Handle(IGESBasic_Protocol) & IGESBasic::Protocol () +{ + static Handle(IGESBasic_Protocol) protocol; if (protocol.IsNull()) { protocol = new IGESBasic_Protocol; Interface_GeneralLib::SetGlobal (new IGESBasic_GeneralModule, protocol); @@ -38,9 +40,5 @@ static Handle(IGESBasic_Protocol) protocol; IGESData_WriterLib::SetGlobal (new IGESBasic_ReadWriteModule,protocol); IGESData_SpecificLib::SetGlobal (new IGESBasic_SpecificModule, protocol); } -} - - Handle(IGESBasic_Protocol) IGESBasic::Protocol () -{ return protocol; } diff --git a/src/IGESBasic/IGESBasic.hxx b/src/IGESBasic/IGESBasic.hxx index 349d64f326..e75d52083f 100644 --- a/src/IGESBasic/IGESBasic.hxx +++ b/src/IGESBasic/IGESBasic.hxx @@ -18,129 +18,21 @@ #define _IGESBasic_HeaderFile #include -#include #include class IGESBasic_Protocol; -class IGESBasic_SubfigureDef; -class IGESBasic_Group; -class IGESBasic_GroupWithoutBackP; -class IGESBasic_SingleParent; -class IGESBasic_ExternalRefFileIndex; -class IGESBasic_OrderedGroup; -class IGESBasic_OrderedGroupWithoutBackP; -class IGESBasic_Hierarchy; -class IGESBasic_ExternalReferenceFile; -class IGESBasic_Name; -class IGESBasic_AssocGroupType; -class IGESBasic_SingularSubfigure; -class IGESBasic_ExternalRefFileName; -class IGESBasic_ExternalRefFile; -class IGESBasic_ExternalRefName; -class IGESBasic_ExternalRefLibName; -class IGESBasic_ToolSubfigureDef; -class IGESBasic_ToolGroup; -class IGESBasic_ToolGroupWithoutBackP; -class IGESBasic_ToolSingleParent; -class IGESBasic_ToolExternalRefFileIndex; -class IGESBasic_ToolOrderedGroup; -class IGESBasic_ToolOrderedGroupWithoutBackP; -class IGESBasic_ToolHierarchy; -class IGESBasic_ToolExternalReferenceFile; -class IGESBasic_ToolName; -class IGESBasic_ToolAssocGroupType; -class IGESBasic_ToolSingularSubfigure; -class IGESBasic_ToolExternalRefFileName; -class IGESBasic_ToolExternalRefFile; -class IGESBasic_ToolExternalRefName; -class IGESBasic_ToolExternalRefLibName; -class IGESBasic_Protocol; -class IGESBasic_ReadWriteModule; -class IGESBasic_GeneralModule; -class IGESBasic_SpecificModule; -class IGESBasic_HArray1OfHArray1OfInteger; -class IGESBasic_HArray1OfHArray1OfReal; -class IGESBasic_HArray1OfHArray1OfXY; -class IGESBasic_HArray1OfHArray1OfXYZ; -class IGESBasic_HArray1OfHArray1OfIGESEntity; //! This package represents basic entities from IGES class IGESBasic { -public: - - DEFINE_STANDARD_ALLOC + public: - //! Prepares dynqmic data (Protocol, Modules) for this package - Standard_EXPORT static void Init(); + //Standard_EXPORT static void Init(); //! Returns the Protocol for this Package - Standard_EXPORT static Handle(IGESBasic_Protocol) Protocol(); - - - - -protected: - - - - - -private: - - - - -friend class IGESBasic_SubfigureDef; -friend class IGESBasic_Group; -friend class IGESBasic_GroupWithoutBackP; -friend class IGESBasic_SingleParent; -friend class IGESBasic_ExternalRefFileIndex; -friend class IGESBasic_OrderedGroup; -friend class IGESBasic_OrderedGroupWithoutBackP; -friend class IGESBasic_Hierarchy; -friend class IGESBasic_ExternalReferenceFile; -friend class IGESBasic_Name; -friend class IGESBasic_AssocGroupType; -friend class IGESBasic_SingularSubfigure; -friend class IGESBasic_ExternalRefFileName; -friend class IGESBasic_ExternalRefFile; -friend class IGESBasic_ExternalRefName; -friend class IGESBasic_ExternalRefLibName; -friend class IGESBasic_ToolSubfigureDef; -friend class IGESBasic_ToolGroup; -friend class IGESBasic_ToolGroupWithoutBackP; -friend class IGESBasic_ToolSingleParent; -friend class IGESBasic_ToolExternalRefFileIndex; -friend class IGESBasic_ToolOrderedGroup; -friend class IGESBasic_ToolOrderedGroupWithoutBackP; -friend class IGESBasic_ToolHierarchy; -friend class IGESBasic_ToolExternalReferenceFile; -friend class IGESBasic_ToolName; -friend class IGESBasic_ToolAssocGroupType; -friend class IGESBasic_ToolSingularSubfigure; -friend class IGESBasic_ToolExternalRefFileName; -friend class IGESBasic_ToolExternalRefFile; -friend class IGESBasic_ToolExternalRefName; -friend class IGESBasic_ToolExternalRefLibName; -friend class IGESBasic_Protocol; -friend class IGESBasic_ReadWriteModule; -friend class IGESBasic_GeneralModule; -friend class IGESBasic_SpecificModule; -friend class IGESBasic_HArray1OfHArray1OfInteger; -friend class IGESBasic_HArray1OfHArray1OfReal; -friend class IGESBasic_HArray1OfHArray1OfXY; -friend class IGESBasic_HArray1OfHArray1OfXYZ; -friend class IGESBasic_HArray1OfHArray1OfIGESEntity; - + Standard_EXPORT static const Handle(IGESBasic_Protocol) & Protocol(); }; - - - - - - #endif // _IGESBasic_HeaderFile diff --git a/src/IGESBasic/IGESBasic_GeneralModule.cxx b/src/IGESBasic/IGESBasic_GeneralModule.cxx index 8f144ddee9..d00e9be4df 100644 --- a/src/IGESBasic/IGESBasic_GeneralModule.cxx +++ b/src/IGESBasic/IGESBasic_GeneralModule.cxx @@ -49,40 +49,18 @@ #include #include #include -#include #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_GeneralModule,IGESData_GeneralModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESBasic_GeneralModule::IGESBasic_GeneralModule () { } - void IGESBasic_GeneralModule::OwnSharedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const { switch (CN) { - case 1 : { - DeclareAndCast(IGESBasic_AssocGroupType,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolAssocGroupType tool; - tool.OwnShared(anent,iter); - } - break; - case 2 : { - DeclareAndCast(IGESBasic_ExternalRefFile,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolExternalRefFile tool; - tool.OwnShared(anent,iter); - } - break; case 3 : { DeclareAndCast(IGESBasic_ExternalRefFileIndex,anent,ent); if (anent.IsNull()) return; @@ -90,34 +68,6 @@ IGESBasic_GeneralModule::IGESBasic_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 4 : { - DeclareAndCast(IGESBasic_ExternalRefFileName,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolExternalRefFileName tool; - tool.OwnShared(anent,iter); - } - break; - case 5 : { - DeclareAndCast(IGESBasic_ExternalRefLibName,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolExternalRefLibName tool; - tool.OwnShared(anent,iter); - } - break; - case 6 : { - DeclareAndCast(IGESBasic_ExternalRefName,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolExternalRefName tool; - tool.OwnShared(anent,iter); - } - break; - case 7 : { - DeclareAndCast(IGESBasic_ExternalReferenceFile,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolExternalReferenceFile tool; - tool.OwnShared(anent,iter); - } - break; case 8 : { DeclareAndCast(IGESBasic_Group,anent,ent); if (anent.IsNull()) return; @@ -132,20 +82,6 @@ IGESBasic_GeneralModule::IGESBasic_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 10 : { - DeclareAndCast(IGESBasic_Hierarchy,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolHierarchy tool; - tool.OwnShared(anent,iter); - } - break; - case 11 : { - DeclareAndCast(IGESBasic_Name,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolName tool; - tool.OwnShared(anent,iter); - } - break; case 12 : { DeclareAndCast(IGESBasic_OrderedGroup,anent,ent); if (anent.IsNull()) return; @@ -304,20 +240,6 @@ IGESBasic_GeneralModule::IGESBasic_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 2 : { - DeclareAndCast(IGESBasic_ExternalRefFile,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolExternalRefFile tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 3 : { - DeclareAndCast(IGESBasic_ExternalRefFileIndex,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolExternalRefFileIndex tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 4 : { DeclareAndCast(IGESBasic_ExternalRefFileName,anent,ent); if (anent.IsNull()) return; @@ -325,20 +247,6 @@ IGESBasic_GeneralModule::IGESBasic_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 5 : { - DeclareAndCast(IGESBasic_ExternalRefLibName,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolExternalRefLibName tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 6 : { - DeclareAndCast(IGESBasic_ExternalRefName,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolExternalRefName tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 7 : { DeclareAndCast(IGESBasic_ExternalReferenceFile,anent,ent); if (anent.IsNull()) return; @@ -395,13 +303,6 @@ IGESBasic_GeneralModule::IGESBasic_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 15 : { - DeclareAndCast(IGESBasic_SingularSubfigure,anent,ent); - if (anent.IsNull()) return; - IGESBasic_ToolSingularSubfigure tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 16 : { DeclareAndCast(IGESBasic_SubfigureDef,anent,ent); if (anent.IsNull()) return; @@ -439,130 +340,6 @@ IGESBasic_GeneralModule::IGESBasic_GeneralModule () { } return Standard_True; } - - void IGESBasic_GeneralModule::OwnCopyCase - (const Standard_Integer CN, - const Handle(IGESData_IGESEntity)& entfrom, - const Handle(IGESData_IGESEntity)& entto, - Interface_CopyTool& TC) const -{ - switch (CN) { - case 1 : { - DeclareAndCast(IGESBasic_AssocGroupType,enfr,entfrom); - DeclareAndCast(IGESBasic_AssocGroupType,ento,entto); - IGESBasic_ToolAssocGroupType tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 2 : { - DeclareAndCast(IGESBasic_ExternalRefFile,enfr,entfrom); - DeclareAndCast(IGESBasic_ExternalRefFile,ento,entto); - IGESBasic_ToolExternalRefFile tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 3 : { - DeclareAndCast(IGESBasic_ExternalRefFileIndex,enfr,entfrom); - DeclareAndCast(IGESBasic_ExternalRefFileIndex,ento,entto); - IGESBasic_ToolExternalRefFileIndex tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 4 : { - DeclareAndCast(IGESBasic_ExternalRefFileName,enfr,entfrom); - DeclareAndCast(IGESBasic_ExternalRefFileName,ento,entto); - IGESBasic_ToolExternalRefFileName tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 5 : { - DeclareAndCast(IGESBasic_ExternalRefLibName,enfr,entfrom); - DeclareAndCast(IGESBasic_ExternalRefLibName,ento,entto); - IGESBasic_ToolExternalRefLibName tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 6 : { - DeclareAndCast(IGESBasic_ExternalRefName,enfr,entfrom); - DeclareAndCast(IGESBasic_ExternalRefName,ento,entto); - IGESBasic_ToolExternalRefName tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 7 : { - DeclareAndCast(IGESBasic_ExternalReferenceFile,enfr,entfrom); - DeclareAndCast(IGESBasic_ExternalReferenceFile,ento,entto); - IGESBasic_ToolExternalReferenceFile tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 8 : { - DeclareAndCast(IGESBasic_Group,enfr,entfrom); - DeclareAndCast(IGESBasic_Group,ento,entto); - IGESBasic_ToolGroup tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 9 : { - DeclareAndCast(IGESBasic_GroupWithoutBackP,enfr,entfrom); - DeclareAndCast(IGESBasic_GroupWithoutBackP,ento,entto); - IGESBasic_ToolGroupWithoutBackP tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 10 : { - DeclareAndCast(IGESBasic_Hierarchy,enfr,entfrom); - DeclareAndCast(IGESBasic_Hierarchy,ento,entto); - IGESBasic_ToolHierarchy tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 11 : { - DeclareAndCast(IGESBasic_Name,enfr,entfrom); - DeclareAndCast(IGESBasic_Name,ento,entto); - IGESBasic_ToolName tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 12 : { - DeclareAndCast(IGESBasic_OrderedGroup,enfr,entfrom); - DeclareAndCast(IGESBasic_OrderedGroup,ento,entto); - IGESBasic_ToolOrderedGroup tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 13 : { - DeclareAndCast(IGESBasic_OrderedGroupWithoutBackP,enfr,entfrom); - DeclareAndCast(IGESBasic_OrderedGroupWithoutBackP,ento,entto); - IGESBasic_ToolOrderedGroupWithoutBackP tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 14 : { - DeclareAndCast(IGESBasic_SingleParent,enfr,entfrom); - DeclareAndCast(IGESBasic_SingleParent,ento,entto); - IGESBasic_ToolSingleParent tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 15 : { - DeclareAndCast(IGESBasic_SingularSubfigure,enfr,entfrom); - DeclareAndCast(IGESBasic_SingularSubfigure,ento,entto); - IGESBasic_ToolSingularSubfigure tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 16 : { - DeclareAndCast(IGESBasic_SubfigureDef,enfr,entfrom); - DeclareAndCast(IGESBasic_SubfigureDef,ento,entto); - IGESBasic_ToolSubfigureDef tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - default : break; - } -} - Standard_Integer IGESBasic_GeneralModule::CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& , const Interface_ShareTool& ) const diff --git a/src/IGESBasic/IGESBasic_GeneralModule.hxx b/src/IGESBasic/IGESBasic_GeneralModule.hxx index d11fe6c0fc..af0a2e79ab 100644 --- a/src/IGESBasic/IGESBasic_GeneralModule.hxx +++ b/src/IGESBasic/IGESBasic_GeneralModule.hxx @@ -17,20 +17,7 @@ #ifndef _IGESBasic_GeneralModule_HeaderFile #define _IGESBasic_GeneralModule_HeaderFile -#include -#include - #include -#include -#include -class IGESData_IGESEntity; -class Interface_EntityIterator; -class IGESData_DirChecker; -class Interface_ShareTool; -class Interface_Check; -class Standard_Transient; -class Interface_CopyTool; - class IGESBasic_GeneralModule; DEFINE_STANDARD_HANDLE(IGESBasic_GeneralModule, IGESData_GeneralModule) @@ -39,12 +26,10 @@ DEFINE_STANDARD_HANDLE(IGESBasic_GeneralModule, IGESData_GeneralModule) //! This Services comprise : Shared & Implied Lists, Copy, Check class IGESBasic_GeneralModule : public IGESData_GeneralModule { + public: -public: - - //! Creates a GeneralModule from IGESBasic and puts it into GeneralLib - Standard_EXPORT IGESBasic_GeneralModule(); + IGESBasic_GeneralModule() {} //! Lists the Entities shared by a given IGESEntity , from //! its specific parameters : specific for each type @@ -61,36 +46,13 @@ public: //! Specific creation of a new void entity Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const Standard_OVERRIDE; - //! Copies parameters which are specific of each Type of Entity - Standard_EXPORT void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - //! Returns a category number which characterizes an entity //! Structure for Groups, Figures & Co //! Description for External Refs //! Auxiliary for other Standard_EXPORT virtual Standard_Integer CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESBasic_GeneralModule,IGESData_GeneralModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESBasic_GeneralModule_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ReadWriteModule.cxx b/src/IGESBasic/IGESBasic_ReadWriteModule.cxx index eb5dfdd79c..c2c41504a0 100644 --- a/src/IGESBasic/IGESBasic_ReadWriteModule.cxx +++ b/src/IGESBasic/IGESBasic_ReadWriteModule.cxx @@ -55,11 +55,6 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_ReadWriteModule,IGESData_ReadWriteModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESBasic_ReadWriteModule::IGESBasic_ReadWriteModule () { } - Standard_Integer IGESBasic_ReadWriteModule::CaseIGES (const Standard_Integer typenum, const Standard_Integer formnum) const diff --git a/src/IGESBasic/IGESBasic_ReadWriteModule.hxx b/src/IGESBasic/IGESBasic_ReadWriteModule.hxx index 8075ff2e24..8271461227 100644 --- a/src/IGESBasic/IGESBasic_ReadWriteModule.hxx +++ b/src/IGESBasic/IGESBasic_ReadWriteModule.hxx @@ -17,12 +17,7 @@ #ifndef _IGESBasic_ReadWriteModule_HeaderFile #define _IGESBasic_ReadWriteModule_HeaderFile -#include -#include - #include -#include -class Standard_DomainError; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamReader; @@ -37,12 +32,10 @@ DEFINE_STANDARD_HANDLE(IGESBasic_ReadWriteModule, IGESData_ReadWriteModule) //! an IGESEntity. class IGESBasic_ReadWriteModule : public IGESData_ReadWriteModule { + public: -public: - - //! Creates a ReadWriteModule & puts it into ReaderLib & WriterLib - Standard_EXPORT IGESBasic_ReadWriteModule(); + IGESBasic_ReadWriteModule() {} //! Defines Case Numbers for Entities of IGESBasic Standard_EXPORT Standard_Integer CaseIGES (const Standard_Integer typenum, const Standard_Integer formnum) const Standard_OVERRIDE; @@ -53,27 +46,7 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, IGESData_IGESWriter& IW) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESBasic_ReadWriteModule,IGESData_ReadWriteModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESBasic_ReadWriteModule_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx b/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx index 559293a6a9..e5ee16a0c3 100644 --- a/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx +++ b/src/IGESBasic/IGESBasic_ToolAssocGroupType.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESBasic_ToolAssocGroupType::IGESBasic_ToolAssocGroupType () { } - void IGESBasic_ToolAssocGroupType::ReadOwnParams (const Handle(IGESBasic_AssocGroupType)& ent, @@ -63,22 +60,6 @@ void IGESBasic_ToolAssocGroupType::WriteOwnParams IW.Send(ent->Name()); } -void IGESBasic_ToolAssocGroupType::OwnShared - (const Handle(IGESBasic_AssocGroupType)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESBasic_ToolAssocGroupType::OwnCopy - (const Handle(IGESBasic_AssocGroupType)& another, - const Handle(IGESBasic_AssocGroupType)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer tempNbData = another->NbData(); - Standard_Integer tempType = another->AssocType(); - Handle(TCollection_HAsciiString) tempName = - new TCollection_HAsciiString(another->Name()); - ent->Init(tempNbData, tempType, tempName); -} - Standard_Boolean IGESBasic_ToolAssocGroupType::OwnCorrect (const Handle(IGESBasic_AssocGroupType)& ent) const { diff --git a/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx b/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx index 49072f61c1..a88f828558 100644 --- a/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx +++ b/src/IGESBasic/IGESBasic_ToolAssocGroupType.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolAssocGroupType { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolAssocGroupType, ready to work - Standard_EXPORT IGESBasic_ToolAssocGroupType(); + IGESBasic_ToolAssocGroupType() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESBasic_AssocGroupType)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a AssocGroupType , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESBasic_AssocGroupType)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a AssocGroupType //! (NbData forced to 2) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESBasic_AssocGroupType)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESBasic_AssocGroupType)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_AssocGroupType)& entfrom, const Handle(IGESBasic_AssocGroupType)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_AssocGroupType)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolAssocGroupType_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx index 7f18d5c142..e793142ddd 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFile.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESBasic_ToolExternalRefFile::IGESBasic_ToolExternalRefFile () { } - void IGESBasic_ToolExternalRefFile::ReadOwnParams (const Handle(IGESBasic_ExternalRefFile)& ent, @@ -56,20 +53,6 @@ void IGESBasic_ToolExternalRefFile::WriteOwnParams IW.Send(ent->FileId()); } -void IGESBasic_ToolExternalRefFile::OwnShared - (const Handle(IGESBasic_ExternalRefFile)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESBasic_ToolExternalRefFile::OwnCopy - (const Handle(IGESBasic_ExternalRefFile)& another, - const Handle(IGESBasic_ExternalRefFile)& ent, Interface_CopyTool& /* TC */) const -{ - Handle(TCollection_HAsciiString) tempFileId = - new TCollection_HAsciiString(another->FileId()); - ent->Init(tempFileId); -} - IGESData_DirChecker IGESBasic_ToolExternalRefFile::DirChecker (const Handle(IGESBasic_ExternalRefFile)& /* ent */ ) const { @@ -84,12 +67,6 @@ IGESData_DirChecker IGESBasic_ToolExternalRefFile::DirChecker return DC; } -void IGESBasic_ToolExternalRefFile::OwnCheck - (const Handle(IGESBasic_ExternalRefFile)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESBasic_ToolExternalRefFile::OwnDump (const Handle(IGESBasic_ExternalRefFile)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer /* level */) const diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFile.hxx b/src/IGESBasic/IGESBasic_ToolExternalRefFile.hxx index 1cfd0e815b..2be5094dcb 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFile.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFile.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolExternalRefFile { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolExternalRefFile, ready to work - Standard_EXPORT IGESBasic_ToolExternalRefFile(); + IGESBasic_ToolExternalRefFile() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESBasic_ExternalRefFile)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ExternalRefFile , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESBasic_ExternalRefFile)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESBasic_ExternalRefFile)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESBasic_ExternalRefFile)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_ExternalRefFile)& entfrom, const Handle(IGESBasic_ExternalRefFile)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_ExternalRefFile)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolExternalRefFile_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.cxx index 55228d16d0..57654437f2 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -37,8 +36,6 @@ #include #include -IGESBasic_ToolExternalRefFileIndex::IGESBasic_ToolExternalRefFileIndex () { } - void IGESBasic_ToolExternalRefFileIndex::ReadOwnParams (const Handle(IGESBasic_ExternalRefFileIndex)& ent, @@ -89,26 +86,6 @@ void IGESBasic_ToolExternalRefFileIndex::OwnShared iter.GetOneItem(ent->Entity(i)); } -void IGESBasic_ToolExternalRefFileIndex::OwnCopy - (const Handle(IGESBasic_ExternalRefFileIndex)& another, - const Handle(IGESBasic_ExternalRefFileIndex)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer num = another->NbEntries(); - Handle(Interface_HArray1OfHAsciiString) tempNames = - new Interface_HArray1OfHAsciiString(1, num); - Handle(IGESData_HArray1OfIGESEntity) tempEntities = - new IGESData_HArray1OfIGESEntity(1, num); - for ( Standard_Integer i = 1; i <= num; i++ ) - { - tempNames->SetValue(i, new TCollection_HAsciiString - (another->Name(i))); - DeclareAndCast(IGESData_IGESEntity, new_item, - TC.Transferred(another->Entity(i))); - tempEntities->SetValue(i, new_item); - } - ent->Init(tempNames, tempEntities); -} - IGESData_DirChecker IGESBasic_ToolExternalRefFileIndex::DirChecker (const Handle(IGESBasic_ExternalRefFileIndex)& /* ent */ ) const { @@ -124,12 +101,6 @@ IGESData_DirChecker IGESBasic_ToolExternalRefFileIndex::DirChecker return DC; } -void IGESBasic_ToolExternalRefFileIndex::OwnCheck - (const Handle(IGESBasic_ExternalRefFileIndex)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESBasic_ToolExternalRefFileIndex::OwnDump (const Handle(IGESBasic_ExternalRefFileIndex)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.hxx b/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.hxx index a35110182d..508f8c9a2f 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFileIndex.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolExternalRefFileIndex { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolExternalRefFileIndex, ready to work - Standard_EXPORT IGESBasic_ToolExternalRefFileIndex(); + IGESBasic_ToolExternalRefFileIndex() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESBasic_ExternalRefFileIndex)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESBasic_ExternalRefFileIndex)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_ExternalRefFileIndex)& entfrom, const Handle(IGESBasic_ExternalRefFileIndex)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_ExternalRefFileIndex)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolExternalRefFileIndex_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx index 40ccfc3e4b..62e1edd229 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFileName.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESBasic_ToolExternalRefFileName::IGESBasic_ToolExternalRefFileName () { } - void IGESBasic_ToolExternalRefFileName::ReadOwnParams (const Handle(IGESBasic_ExternalRefFileName)& ent, @@ -60,22 +57,6 @@ void IGESBasic_ToolExternalRefFileName::WriteOwnParams IW.Send(ent->ReferenceName()); } -void IGESBasic_ToolExternalRefFileName::OwnShared - (const Handle(IGESBasic_ExternalRefFileName)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESBasic_ToolExternalRefFileName::OwnCopy - (const Handle(IGESBasic_ExternalRefFileName)& another, - const Handle(IGESBasic_ExternalRefFileName)& ent, Interface_CopyTool& /* TC */) const -{ - Handle(TCollection_HAsciiString) tempFileId = - new TCollection_HAsciiString(another->FileId()); - Handle(TCollection_HAsciiString) tempRefName = - new TCollection_HAsciiString(another->ReferenceName()); - ent->Init(tempFileId, tempRefName); -} - IGESData_DirChecker IGESBasic_ToolExternalRefFileName::DirChecker (const Handle(IGESBasic_ExternalRefFileName)& /* ent */ ) const { diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefFileName.hxx b/src/IGESBasic/IGESBasic_ToolExternalRefFileName.hxx index d64c188cc0..d8406d8a9c 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefFileName.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefFileName.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolExternalRefFileName { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolExternalRefFileName, ready to work - Standard_EXPORT IGESBasic_ToolExternalRefFileName(); + IGESBasic_ToolExternalRefFileName() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,14 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESBasic_ExternalRefFileName)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ExternalRefFileName , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESBasic_ExternalRefFileName)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESBasic_ExternalRefFileName)& ent) const; //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESBasic_ExternalRefFileName)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_ExternalRefFileName)& entfrom, const Handle(IGESBasic_ExternalRefFileName)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_ExternalRefFileName)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolExternalRefFileName_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx index f36b7717ce..d3a1bd3bd2 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefLibName.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESBasic_ToolExternalRefLibName::IGESBasic_ToolExternalRefLibName () { } - void IGESBasic_ToolExternalRefLibName::ReadOwnParams (const Handle(IGESBasic_ExternalRefLibName)& ent, @@ -59,22 +56,6 @@ void IGESBasic_ToolExternalRefLibName::WriteOwnParams IW.Send(ent->ReferenceName()); } -void IGESBasic_ToolExternalRefLibName::OwnShared - (const Handle(IGESBasic_ExternalRefLibName)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESBasic_ToolExternalRefLibName::OwnCopy - (const Handle(IGESBasic_ExternalRefLibName)& another, - const Handle(IGESBasic_ExternalRefLibName)& ent, Interface_CopyTool& /* TC */) const -{ - Handle(TCollection_HAsciiString) tempLibName = - new TCollection_HAsciiString(another->LibraryName()); - Handle(TCollection_HAsciiString) tempRefName = - new TCollection_HAsciiString(another->ReferenceName()); - ent->Init(tempLibName, tempRefName); -} - IGESData_DirChecker IGESBasic_ToolExternalRefLibName::DirChecker (const Handle(IGESBasic_ExternalRefLibName)& /* ent */ ) const { @@ -89,12 +70,6 @@ IGESData_DirChecker IGESBasic_ToolExternalRefLibName::DirChecker return DC; } -void IGESBasic_ToolExternalRefLibName::OwnCheck - (const Handle(IGESBasic_ExternalRefLibName)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESBasic_ToolExternalRefLibName::OwnDump (const Handle(IGESBasic_ExternalRefLibName)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S,const Standard_Integer /* level */) const diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefLibName.hxx b/src/IGESBasic/IGESBasic_ToolExternalRefLibName.hxx index 59048e3731..3ae4c28f62 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefLibName.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefLibName.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolExternalRefLibName { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolExternalRefLibName, ready to work - Standard_EXPORT IGESBasic_ToolExternalRefLibName(); + IGESBasic_ToolExternalRefLibName() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESBasic_ExternalRefLibName)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ExternalRefLibName , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESBasic_ExternalRefLibName)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESBasic_ExternalRefLibName)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESBasic_ExternalRefLibName)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_ExternalRefLibName)& entfrom, const Handle(IGESBasic_ExternalRefLibName)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_ExternalRefLibName)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolExternalRefLibName_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx b/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx index 398e696af5..d44f8674ad 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefName.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESBasic_ToolExternalRefName::IGESBasic_ToolExternalRefName () { } - void IGESBasic_ToolExternalRefName::ReadOwnParams (const Handle(IGESBasic_ExternalRefName)& ent, @@ -56,20 +53,6 @@ void IGESBasic_ToolExternalRefName::WriteOwnParams IW.Send(ent->ReferenceName()); } -void IGESBasic_ToolExternalRefName::OwnShared - (const Handle(IGESBasic_ExternalRefName)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESBasic_ToolExternalRefName::OwnCopy - (const Handle(IGESBasic_ExternalRefName)& another, - const Handle(IGESBasic_ExternalRefName)& ent, Interface_CopyTool& /* TC */) const -{ - Handle(TCollection_HAsciiString) tempRefName = - new TCollection_HAsciiString(another->ReferenceName()); - ent->Init(tempRefName); -} - IGESData_DirChecker IGESBasic_ToolExternalRefName::DirChecker (const Handle(IGESBasic_ExternalRefName)& /* ent */ ) const { @@ -84,12 +67,6 @@ IGESData_DirChecker IGESBasic_ToolExternalRefName::DirChecker return DC; } -void IGESBasic_ToolExternalRefName::OwnCheck - (const Handle(IGESBasic_ExternalRefName)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESBasic_ToolExternalRefName::OwnDump (const Handle(IGESBasic_ExternalRefName)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer /* level */) const diff --git a/src/IGESBasic/IGESBasic_ToolExternalRefName.hxx b/src/IGESBasic/IGESBasic_ToolExternalRefName.hxx index 23aba4f052..6345f2f461 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalRefName.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalRefName.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolExternalRefName { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolExternalRefName, ready to work - Standard_EXPORT IGESBasic_ToolExternalRefName(); + IGESBasic_ToolExternalRefName() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESBasic_ExternalRefName)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ExternalRefName , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESBasic_ExternalRefName)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESBasic_ExternalRefName)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESBasic_ExternalRefName)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_ExternalRefName)& entfrom, const Handle(IGESBasic_ExternalRefName)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_ExternalRefName)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolExternalRefName_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx b/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx index 1c453e1dfa..d50844d9a9 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx +++ b/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -35,8 +34,6 @@ #include #include -IGESBasic_ToolExternalReferenceFile::IGESBasic_ToolExternalReferenceFile () { } - void IGESBasic_ToolExternalReferenceFile::ReadOwnParams (const Handle(IGESBasic_ExternalReferenceFile)& ent, @@ -64,24 +61,6 @@ void IGESBasic_ToolExternalReferenceFile::WriteOwnParams IW.Send(ent->Name(i)); } -void IGESBasic_ToolExternalReferenceFile::OwnShared - (const Handle(IGESBasic_ExternalReferenceFile)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESBasic_ToolExternalReferenceFile::OwnCopy - (const Handle(IGESBasic_ExternalReferenceFile)& another, - const Handle(IGESBasic_ExternalReferenceFile)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer num = another->NbListEntries(); - Handle(Interface_HArray1OfHAsciiString) tempNames = - new Interface_HArray1OfHAsciiString(1, num); - for ( Standard_Integer i = 1; i <= num; i++ ) - tempNames->SetValue(i, new TCollection_HAsciiString - (another->Name(i))); - ent->Init(tempNames); -} - IGESData_DirChecker IGESBasic_ToolExternalReferenceFile::DirChecker (const Handle(IGESBasic_ExternalReferenceFile)& /* ent */ ) const { diff --git a/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.hxx b/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.hxx index 7e6b423ab8..5e2caea03c 100644 --- a/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.hxx +++ b/src/IGESBasic/IGESBasic_ToolExternalReferenceFile.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolExternalReferenceFile { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolExternalReferenceFile, ready to work - Standard_EXPORT IGESBasic_ToolExternalReferenceFile(); + IGESBasic_ToolExternalReferenceFile() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,14 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESBasic_ExternalReferenceFile)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ExternalReferenceFile , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESBasic_ExternalReferenceFile)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESBasic_ExternalReferenceFile)& ent) const; //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESBasic_ExternalReferenceFile)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_ExternalReferenceFile)& entfrom, const Handle(IGESBasic_ExternalReferenceFile)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_ExternalReferenceFile)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolExternalReferenceFile_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolGroup.cxx b/src/IGESBasic/IGESBasic_ToolGroup.cxx index 70f1b5a459..1149fa979f 100644 --- a/src/IGESBasic/IGESBasic_ToolGroup.cxx +++ b/src/IGESBasic/IGESBasic_ToolGroup.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,9 +35,6 @@ #include #include -// MGE 03/08/98 -IGESBasic_ToolGroup::IGESBasic_ToolGroup () { } - void IGESBasic_ToolGroup::ReadOwnParams (const Handle(IGESBasic_Group)& ent, @@ -91,24 +87,6 @@ void IGESBasic_ToolGroup::OwnShared iter.GetOneItem(ent->Entity(i)); } -void IGESBasic_ToolGroup::OwnCopy - (const Handle(IGESBasic_Group)& another, - const Handle(IGESBasic_Group)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer lower,upper; - lower = 1; - upper = another->NbEntities(); - Handle(IGESData_HArray1OfIGESEntity) EntArray = new - IGESData_HArray1OfIGESEntity(lower,upper); - for (Standard_Integer i = lower;i <= upper;i++) - { - DeclareAndCast - (IGESData_IGESEntity,myentity,TC.Transferred(another->Entity(i))); - EntArray->SetValue(i,myentity); - } - ent->Init(EntArray); -} - Standard_Boolean IGESBasic_ToolGroup::OwnCorrect (const Handle(IGESBasic_Group)& ent ) const { diff --git a/src/IGESBasic/IGESBasic_ToolGroup.hxx b/src/IGESBasic/IGESBasic_ToolGroup.hxx index be8b364407..cc73789203 100644 --- a/src/IGESBasic/IGESBasic_ToolGroup.hxx +++ b/src/IGESBasic/IGESBasic_ToolGroup.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolGroup { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolGroup, ready to work - Standard_EXPORT IGESBasic_ToolGroup(); + IGESBasic_ToolGroup() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESBasic_Group)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_Group)& entfrom, const Handle(IGESBasic_Group)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_Group)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolGroup_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.cxx b/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.cxx index 117be5564a..ec320ce6b6 100644 --- a/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.cxx +++ b/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,9 +35,6 @@ #include #include -// MGE 03/08/98 -IGESBasic_ToolGroupWithoutBackP::IGESBasic_ToolGroupWithoutBackP () { } - void IGESBasic_ToolGroupWithoutBackP::ReadOwnParams (const Handle(IGESBasic_GroupWithoutBackP)& ent, @@ -89,24 +85,6 @@ void IGESBasic_ToolGroupWithoutBackP::OwnShared iter.GetOneItem(ent->Entity(i)); } -void IGESBasic_ToolGroupWithoutBackP::OwnCopy - (const Handle(IGESBasic_GroupWithoutBackP)& another, - const Handle(IGESBasic_GroupWithoutBackP)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer lower,upper; - lower = 1; - upper = another->NbEntities(); - Handle(IGESData_HArray1OfIGESEntity) EntArray = new - IGESData_HArray1OfIGESEntity(lower,upper); - for (Standard_Integer i = lower;i <= upper;i++) - { - DeclareAndCast - (IGESData_IGESEntity,myentity,TC.Transferred(another->Entity(i))); - EntArray->SetValue(i,myentity); - } - ent->Init(EntArray); -} - Standard_Boolean IGESBasic_ToolGroupWithoutBackP::OwnCorrect (const Handle(IGESBasic_GroupWithoutBackP)& ent ) const { diff --git a/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx b/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx index ca8dd4a1e4..07cdeaf805 100644 --- a/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx +++ b/src/IGESBasic/IGESBasic_ToolGroupWithoutBackP.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolGroupWithoutBackP { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolGroupWithoutBackP, ready to work - Standard_EXPORT IGESBasic_ToolGroupWithoutBackP(); + IGESBasic_ToolGroupWithoutBackP() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESBasic_GroupWithoutBackP)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_GroupWithoutBackP)& entfrom, const Handle(IGESBasic_GroupWithoutBackP)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_GroupWithoutBackP)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolGroupWithoutBackP_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolHierarchy.cxx b/src/IGESBasic/IGESBasic_ToolHierarchy.cxx index 03c1a7d64a..6be2369fb2 100644 --- a/src/IGESBasic/IGESBasic_ToolHierarchy.cxx +++ b/src/IGESBasic/IGESBasic_ToolHierarchy.cxx @@ -25,14 +25,11 @@ #include #include #include -#include #include #include #include #include -IGESBasic_ToolHierarchy::IGESBasic_ToolHierarchy () { } - void IGESBasic_ToolHierarchy::ReadOwnParams (const Handle(IGESBasic_Hierarchy)& ent, @@ -73,20 +70,6 @@ void IGESBasic_ToolHierarchy::WriteOwnParams IW.Send(ent->NewColorNum()); } -void IGESBasic_ToolHierarchy::OwnShared - (const Handle(IGESBasic_Hierarchy)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESBasic_ToolHierarchy::OwnCopy - (const Handle(IGESBasic_Hierarchy)& another, - const Handle(IGESBasic_Hierarchy)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init(6,another->NewLineFont(), another->NewView(), - another->NewEntityLevel(),another->NewBlankStatus(), - another->NewLineWeight(), another->NewColorNum()); -} - Standard_Boolean IGESBasic_ToolHierarchy::OwnCorrect (const Handle(IGESBasic_Hierarchy)& ent) const { diff --git a/src/IGESBasic/IGESBasic_ToolHierarchy.hxx b/src/IGESBasic/IGESBasic_ToolHierarchy.hxx index 560c9c600b..c825f48225 100644 --- a/src/IGESBasic/IGESBasic_ToolHierarchy.hxx +++ b/src/IGESBasic/IGESBasic_ToolHierarchy.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolHierarchy { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolHierarchy, ready to work - Standard_EXPORT IGESBasic_ToolHierarchy(); + IGESBasic_ToolHierarchy() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESBasic_Hierarchy)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Hierarchy , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESBasic_Hierarchy)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a Hierarchy //! (NbPropertyValues forced to 6) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESBasic_Hierarchy)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESBasic_Hierarchy)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_Hierarchy)& entfrom, const Handle(IGESBasic_Hierarchy)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_Hierarchy)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolHierarchy_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolName.cxx b/src/IGESBasic/IGESBasic_ToolName.cxx index 1c62802166..a9eeaf066a 100644 --- a/src/IGESBasic/IGESBasic_ToolName.cxx +++ b/src/IGESBasic/IGESBasic_ToolName.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESBasic_ToolName::IGESBasic_ToolName () { } - void IGESBasic_ToolName::ReadOwnParams (const Handle(IGESBasic_Name)& ent, @@ -59,22 +56,6 @@ void IGESBasic_ToolName::WriteOwnParams IW.Send(ent->Value()); } -void IGESBasic_ToolName::OwnShared - (const Handle(IGESBasic_Name)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESBasic_ToolName::OwnCopy - (const Handle(IGESBasic_Name)& another, - const Handle(IGESBasic_Name)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer aNbPropertyValues; - Handle(TCollection_HAsciiString) aName; - aName = new TCollection_HAsciiString(another->Value()); - aNbPropertyValues = another->NbPropertyValues(); - ent->Init(aNbPropertyValues,aName); -} - Standard_Boolean IGESBasic_ToolName::OwnCorrect (const Handle(IGESBasic_Name)& ent) const { diff --git a/src/IGESBasic/IGESBasic_ToolName.hxx b/src/IGESBasic/IGESBasic_ToolName.hxx index 18021c2e3c..94f9397ac8 100644 --- a/src/IGESBasic/IGESBasic_ToolName.hxx +++ b/src/IGESBasic/IGESBasic_ToolName.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolName { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolName, ready to work - Standard_EXPORT IGESBasic_ToolName(); + IGESBasic_ToolName() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESBasic_Name)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Name , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESBasic_Name)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a Name //! (NbPropertyValues forced to 1) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESBasic_Name)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESBasic_Name)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_Name)& entfrom, const Handle(IGESBasic_Name)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_Name)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolName_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolOrderedGroup.cxx b/src/IGESBasic/IGESBasic_ToolOrderedGroup.cxx index 276e3b8fe9..bc96253b51 100644 --- a/src/IGESBasic/IGESBasic_ToolOrderedGroup.cxx +++ b/src/IGESBasic/IGESBasic_ToolOrderedGroup.cxx @@ -28,15 +28,12 @@ #include #include #include -#include #include #include #include #include #include -IGESBasic_ToolOrderedGroup::IGESBasic_ToolOrderedGroup () { } - void IGESBasic_ToolOrderedGroup::ReadOwnParams (const Handle(IGESBasic_OrderedGroup)& ent, @@ -79,24 +76,6 @@ void IGESBasic_ToolOrderedGroup::OwnShared iter.GetOneItem(ent->Entity(i)); } -void IGESBasic_ToolOrderedGroup::OwnCopy - (const Handle(IGESBasic_OrderedGroup)& another, - const Handle(IGESBasic_OrderedGroup)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer lower,upper; - lower = 1; - upper = another->NbEntities(); - Handle(IGESData_HArray1OfIGESEntity) EntArray = new - IGESData_HArray1OfIGESEntity(lower,upper); - for (Standard_Integer i = lower;i <= upper;i++) - { - DeclareAndCast - (IGESData_IGESEntity,myentity,TC.Transferred(another->Entity(i))); - EntArray->SetValue(i,myentity); - } - ent->Init(EntArray); -} - Standard_Boolean IGESBasic_ToolOrderedGroup::OwnCorrect (const Handle(IGESBasic_OrderedGroup)& ent ) const { diff --git a/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx b/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx index 1a3a7bc5c0..99702d3eaa 100644 --- a/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx +++ b/src/IGESBasic/IGESBasic_ToolOrderedGroup.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolOrderedGroup { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolOrderedGroup, ready to work - Standard_EXPORT IGESBasic_ToolOrderedGroup(); + IGESBasic_ToolOrderedGroup() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESBasic_OrderedGroup)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_OrderedGroup)& entfrom, const Handle(IGESBasic_OrderedGroup)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_OrderedGroup)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolOrderedGroup_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.cxx b/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.cxx index ac8373a7c7..b92280a941 100644 --- a/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.cxx +++ b/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.cxx @@ -28,16 +28,12 @@ #include #include #include -#include #include #include #include #include #include -IGESBasic_ToolOrderedGroupWithoutBackP::IGESBasic_ToolOrderedGroupWithoutBackP() - { } - void IGESBasic_ToolOrderedGroupWithoutBackP::ReadOwnParams (const Handle(IGESBasic_OrderedGroupWithoutBackP)& ent, @@ -80,24 +76,6 @@ void IGESBasic_ToolOrderedGroupWithoutBackP::OwnShared iter.GetOneItem(ent->Entity(i)); } -void IGESBasic_ToolOrderedGroupWithoutBackP::OwnCopy - (const Handle(IGESBasic_OrderedGroupWithoutBackP)& another, - const Handle(IGESBasic_OrderedGroupWithoutBackP)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer lower,upper; - lower = 1; - upper = another->NbEntities(); - Handle(IGESData_HArray1OfIGESEntity) EntArray = new - IGESData_HArray1OfIGESEntity(lower,upper); - for (Standard_Integer i = lower;i <= upper;i++) - { - DeclareAndCast - (IGESData_IGESEntity,myentity,TC.Transferred(another->Entity(i))); - EntArray->SetValue(i,myentity); - } - ent->Init(EntArray); -} - Standard_Boolean IGESBasic_ToolOrderedGroupWithoutBackP::OwnCorrect (const Handle(IGESBasic_OrderedGroupWithoutBackP)& ent ) const { diff --git a/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx b/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx index ccc9c4d4a0..a920c27998 100644 --- a/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx +++ b/src/IGESBasic/IGESBasic_ToolOrderedGroupWithoutBackP.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolOrderedGroupWithoutBackP { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolOrderedGroupWithoutBackP, ready to work - Standard_EXPORT IGESBasic_ToolOrderedGroupWithoutBackP(); + IGESBasic_ToolOrderedGroupWithoutBackP() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESBasic_OrderedGroupWithoutBackP)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_OrderedGroupWithoutBackP)& entfrom, const Handle(IGESBasic_OrderedGroupWithoutBackP)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_OrderedGroupWithoutBackP)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolOrderedGroupWithoutBackP_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolSingleParent.cxx b/src/IGESBasic/IGESBasic_ToolSingleParent.cxx index 0d724d13cf..314e9b768a 100644 --- a/src/IGESBasic/IGESBasic_ToolSingleParent.cxx +++ b/src/IGESBasic/IGESBasic_ToolSingleParent.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -37,9 +36,6 @@ #include #include -// MGE 03/08/98 -IGESBasic_ToolSingleParent::IGESBasic_ToolSingleParent () { } - void IGESBasic_ToolSingleParent::ReadOwnParams (const Handle(IGESBasic_SingleParent)& ent, @@ -116,25 +112,6 @@ void IGESBasic_ToolSingleParent::OwnShared iter.GetOneItem(ent->Child(i)); } -void IGESBasic_ToolSingleParent::OwnCopy - (const Handle(IGESBasic_SingleParent)& another, - const Handle(IGESBasic_SingleParent)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer aNbParentEntities = another->NbParentEntities(); - DeclareAndCast(IGESData_IGESEntity,aparent, - TC.Transferred(another->SingleParent())); - Standard_Integer upper = another->NbChildren(); - Handle(IGESData_HArray1OfIGESEntity) EntArray = new - IGESData_HArray1OfIGESEntity(1,upper); - for (Standard_Integer i = 1; i <= upper; i ++) - { - DeclareAndCast - (IGESData_IGESEntity,myentity,TC.Transferred(another->Child(i))); - EntArray->SetValue(i,myentity); - } - ent->Init(aNbParentEntities,aparent,EntArray); -} - Standard_Boolean IGESBasic_ToolSingleParent::OwnCorrect (const Handle(IGESBasic_SingleParent)& ent) const { diff --git a/src/IGESBasic/IGESBasic_ToolSingleParent.hxx b/src/IGESBasic/IGESBasic_ToolSingleParent.hxx index 852dfb4306..6dd009f42b 100644 --- a/src/IGESBasic/IGESBasic_ToolSingleParent.hxx +++ b/src/IGESBasic/IGESBasic_ToolSingleParent.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolSingleParent { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSingleParent, ready to work - Standard_EXPORT IGESBasic_ToolSingleParent(); + IGESBasic_ToolSingleParent() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESBasic_SingleParent)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_SingleParent)& entfrom, const Handle(IGESBasic_SingleParent)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_SingleParent)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolSingleParent_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx b/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx index 3987156134..2697e101c4 100644 --- a/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx +++ b/src/IGESBasic/IGESBasic_ToolSingularSubfigure.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -38,9 +37,6 @@ #include #include -// MGE 03/08/98 -IGESBasic_ToolSingularSubfigure::IGESBasic_ToolSingularSubfigure () { } - void IGESBasic_ToolSingularSubfigure::ReadOwnParams (const Handle(IGESBasic_SingularSubfigure)& ent, @@ -124,23 +120,6 @@ void IGESBasic_ToolSingularSubfigure::OwnShared iter.GetOneItem(ent->Subfigure()); } -void IGESBasic_ToolSingularSubfigure::OwnCopy - (const Handle(IGESBasic_SingularSubfigure)& another, - const Handle(IGESBasic_SingularSubfigure)& ent, Interface_CopyTool& TC) const -{ - gp_XYZ aTranslation; - Standard_Boolean ahasScale; - Standard_Real aScale; - - DeclareAndCast - (IGESBasic_SubfigureDef,aSubfigureDef,TC.Transferred(another->Subfigure())); - aTranslation = another->Translation(); - ahasScale = another->HasScaleFactor(); - aScale = another->ScaleFactor(); - - ent->Init(aSubfigureDef,aTranslation,ahasScale,aScale); -} - IGESData_DirChecker IGESBasic_ToolSingularSubfigure::DirChecker (const Handle(IGESBasic_SingularSubfigure)& ent ) const { @@ -151,12 +130,6 @@ IGESData_DirChecker IGESBasic_ToolSingularSubfigure::DirChecker return DC; } -void IGESBasic_ToolSingularSubfigure::OwnCheck - (const Handle(IGESBasic_SingularSubfigure)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESBasic_ToolSingularSubfigure::OwnDump (const Handle(IGESBasic_SingularSubfigure)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESBasic/IGESBasic_ToolSingularSubfigure.hxx b/src/IGESBasic/IGESBasic_ToolSingularSubfigure.hxx index 4f2e5962a3..2c37044fef 100644 --- a/src/IGESBasic/IGESBasic_ToolSingularSubfigure.hxx +++ b/src/IGESBasic/IGESBasic_ToolSingularSubfigure.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolSingularSubfigure { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSingularSubfigure, ready to work - Standard_EXPORT IGESBasic_ToolSingularSubfigure(); + IGESBasic_ToolSingularSubfigure() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESBasic_SingularSubfigure)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESBasic_SingularSubfigure)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_SingularSubfigure)& entfrom, const Handle(IGESBasic_SingularSubfigure)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_SingularSubfigure)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolSingularSubfigure_HeaderFile diff --git a/src/IGESBasic/IGESBasic_ToolSubfigureDef.cxx b/src/IGESBasic/IGESBasic_ToolSubfigureDef.cxx index 98ac5b025a..db097a2aba 100644 --- a/src/IGESBasic/IGESBasic_ToolSubfigureDef.cxx +++ b/src/IGESBasic/IGESBasic_ToolSubfigureDef.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -37,9 +36,6 @@ #include #include -// MGE 03/08/98 -IGESBasic_ToolSubfigureDef::IGESBasic_ToolSubfigureDef () { } - void IGESBasic_ToolSubfigureDef::ReadOwnParams (const Handle(IGESBasic_SubfigureDef)& ent, @@ -97,28 +93,6 @@ void IGESBasic_ToolSubfigureDef::OwnShared iter.GetOneItem(ent->AssociatedEntity(i)); } -void IGESBasic_ToolSubfigureDef::OwnCopy - (const Handle(IGESBasic_SubfigureDef)& another, - const Handle(IGESBasic_SubfigureDef)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer lower,upper; - Standard_Integer aDepth = another->Depth(); - Handle(TCollection_HAsciiString) aName = - new TCollection_HAsciiString(another->Name()); - - lower = 1; - upper = another->NbEntities(); - Handle(IGESData_HArray1OfIGESEntity) EntArray = new - IGESData_HArray1OfIGESEntity(lower,upper); - for (Standard_Integer i = lower;i <= upper;i++) - { - DeclareAndCast(IGESData_IGESEntity,myentity, - TC.Transferred(another->AssociatedEntity(i))); - EntArray->SetValue(i,myentity); - } - ent->Init(aDepth,aName,EntArray); -} - IGESData_DirChecker IGESBasic_ToolSubfigureDef::DirChecker (const Handle(IGESBasic_SubfigureDef)& ent ) const { diff --git a/src/IGESBasic/IGESBasic_ToolSubfigureDef.hxx b/src/IGESBasic/IGESBasic_ToolSubfigureDef.hxx index b1356b2179..049583e31e 100644 --- a/src/IGESBasic/IGESBasic_ToolSubfigureDef.hxx +++ b/src/IGESBasic/IGESBasic_ToolSubfigureDef.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESBasic_ToolSubfigureDef { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSubfigureDef, ready to work - Standard_EXPORT IGESBasic_ToolSubfigureDef(); + IGESBasic_ToolSubfigureDef() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESBasic_SubfigureDef)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESBasic_SubfigureDef)& entfrom, const Handle(IGESBasic_SubfigureDef)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESBasic_SubfigureDef)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESBasic_ToolSubfigureDef_HeaderFile diff --git a/src/IGESControl/IGESControl_Controller.cxx b/src/IGESControl/IGESControl_Controller.cxx index e626a50ab3..27c9f17838 100644 --- a/src/IGESControl/IGESControl_Controller.cxx +++ b/src/IGESControl/IGESControl_Controller.cxx @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -316,9 +315,8 @@ void IGESControl_Controller::Init () gInitMutex.Lock(); if (!gInitDone) { - IGESSolid::Init(); + //szv_c1:IGESSolid::Init(); IGESAppli::Init(); - IGESDefs::Init(); Handle(IGESControl_Controller) aController = new IGESControl_Controller(Standard_False); aController->AutoRecord(); @@ -334,7 +332,7 @@ void IGESControl_Controller::Init () } //======================================================================= -//function : Init +//function : DefineProtocol //purpose : //======================================================================= @@ -342,10 +340,10 @@ const Handle(IGESData_Protocol) & IGESControl_Controller::DefineProtocol () { static Handle(IGESData_FileProtocol) gIGESProto; if (gIGESProto.IsNull()) { - Handle(IGESData_Protocol) aIGESProto1 = IGESSolid::Protocol(); - Handle(IGESData_Protocol) aIGESProto2 = IGESAppli::Protocol(); - gIGESProto = new IGESData_FileProtocol; - gIGESProto->Add(aIGESProto1); + //const Handle(IGESData_Protocol) &aIGESProto1 = IGESSolid::Protocol(); + const Handle(IGESData_Protocol) &aIGESProto2 = IGESAppli::Protocol(); + gIGESProto = new IGESData_FileProtocol; + //gIGESProto->Add(aIGESProto1); gIGESProto->Add(aIGESProto2); } return gIGESProto; diff --git a/src/IGESControl/IGESControl_Reader.cxx b/src/IGESControl/IGESControl_Reader.cxx index 305c363a7e..ddd97e6b20 100644 --- a/src/IGESControl/IGESControl_Reader.cxx +++ b/src/IGESControl/IGESControl_Reader.cxx @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/src/IGESData/FILES b/src/IGESData/FILES index 3bf406b44d..eebb70e74b 100755 --- a/src/IGESData/FILES +++ b/src/IGESData/FILES @@ -19,8 +19,6 @@ IGESData_DirPart.hxx IGESData_Dump.hxx IGESData_FileProtocol.cxx IGESData_FileProtocol.hxx -IGESData_FileRecognizer.hxx -IGESData_FileRecognizer_0.cxx IGESData_FreeFormatEntity.cxx IGESData_FreeFormatEntity.hxx IGESData_GeneralModule.cxx diff --git a/src/IGESData/IGESData_DefaultGeneral.cxx b/src/IGESData/IGESData_DefaultGeneral.cxx index 4576785537..c9aac2aeca 100644 --- a/src/IGESData/IGESData_DefaultGeneral.cxx +++ b/src/IGESData/IGESData_DefaultGeneral.cxx @@ -20,14 +20,11 @@ #include #include #include -#include #include #include #include #include #include -#include -#include #include IMPLEMENT_STANDARD_RTTIEXT(IGESData_DefaultGeneral,IGESData_GeneralModule) @@ -70,26 +67,3 @@ IGESData_DefaultGeneral::IGESData_DefaultGeneral () if (CN == 2) entto = new IGESData_FreeFormatEntity; return (!entto.IsNull()); } - - void IGESData_DefaultGeneral::OwnCopyCase - (const Standard_Integer CN, - const Handle(IGESData_IGESEntity)& entfrom, - const Handle(IGESData_IGESEntity)& entto, - Interface_CopyTool& TC) const -{ - if (CN == 0) return; - DeclareAndCast(IGESData_UndefinedEntity,enfr,entfrom); - DeclareAndCast(IGESData_UndefinedEntity,ento,entto); -// ShallowCopy aura passe DirStatus -// transmettre les contenus des UndefinedContents - Handle(Interface_UndefinedContent) cont = new Interface_UndefinedContent; - cont->GetFromAnother(enfr->UndefinedContent(),TC); - ento->SetNewContent (cont); -// FreeFormat, encore des choses - if (enfr->IsKind(STANDARD_TYPE(IGESData_FreeFormatEntity))) { - DeclareAndCast(IGESData_FreeFormatEntity,enf,entfrom); - DeclareAndCast(IGESData_FreeFormatEntity,ent,entto); - ent->ClearNegativePointers(); - ent->AddNegativePointers(enf->NegativePointers()); - } -} diff --git a/src/IGESData/IGESData_DefaultGeneral.hxx b/src/IGESData/IGESData_DefaultGeneral.hxx index 2621a84862..0e224cadc1 100644 --- a/src/IGESData/IGESData_DefaultGeneral.hxx +++ b/src/IGESData/IGESData_DefaultGeneral.hxx @@ -17,19 +17,7 @@ #ifndef _IGESData_DefaultGeneral_HeaderFile #define _IGESData_DefaultGeneral_HeaderFile -#include -#include - #include -#include -#include -class IGESData_IGESEntity; -class Interface_EntityIterator; -class IGESData_DirChecker; -class Interface_ShareTool; -class Interface_Check; -class Standard_Transient; -class Interface_CopyTool; class IGESData_DefaultGeneral; @@ -39,10 +27,8 @@ DEFINE_STANDARD_HANDLE(IGESData_DefaultGeneral, IGESData_GeneralModule) //! (Case Number 1) class IGESData_DefaultGeneral : public IGESData_GeneralModule { + public: -public: - - //! Creates a DefaultGeneral and puts it into GeneralLib, //! bound with a Protocol from IGESData Standard_EXPORT IGESData_DefaultGeneral(); @@ -61,31 +47,8 @@ public: //! Specific creation of a new void entity (UndefinedEntity only) Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const Standard_OVERRIDE; - - //! Copies parameters which are specific of each Type of Entity - Standard_EXPORT void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESData_DefaultGeneral,IGESData_GeneralModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESData_DefaultGeneral_HeaderFile diff --git a/src/IGESData/IGESData_FileProtocol.cxx b/src/IGESData/IGESData_FileProtocol.cxx index f5cc6afca9..510260c116 100644 --- a/src/IGESData/IGESData_FileProtocol.cxx +++ b/src/IGESData/IGESData_FileProtocol.cxx @@ -13,37 +13,25 @@ #include -#include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESData_FileProtocol,IGESData_Protocol) -IGESData_FileProtocol::IGESData_FileProtocol () { } - - void IGESData_FileProtocol::Add (const Handle(IGESData_Protocol)& protocol) +void IGESData_FileProtocol::Add (const Handle(IGESData_Protocol)& theProtocol) { - if (theresource.IsNull()) theresource = protocol; - else if (theresource->IsInstance(protocol->DynamicType())) return; // passer - else if (!thenext.IsNull()) thenext->Add(protocol); - else { - thenext = new IGESData_FileProtocol; - thenext->Add(protocol); + NCollection_Vector::Iterator itr(myResources); + for (; itr.More(); itr.Next()) + { + if (itr.Value()->IsInstance(theProtocol->DynamicType())) return; // passer } + myResources.Append(theProtocol); } - Standard_Integer IGESData_FileProtocol::NbResources () const +Standard_Integer IGESData_FileProtocol::NbResources () const { - Standard_Integer nb = (theresource.IsNull() ? 0 : 1); - if (!thenext.IsNull()) nb += thenext->NbResources(); - return nb; + return myResources.Length(); } - Handle(Interface_Protocol) IGESData_FileProtocol::Resource - (const Standard_Integer num) const +Handle(Interface_Protocol) IGESData_FileProtocol::Resource (const Standard_Integer num) const { - Handle(IGESData_Protocol) res; - if (num == 1) return Handle(Interface_Protocol) (theresource); - else if (!thenext.IsNull()) return thenext->Resource(num-1); - return res; // Null + return (num > 0 && num <= myResources.Length())? myResources(num-1) : NULL; } diff --git a/src/IGESData/IGESData_FileProtocol.hxx b/src/IGESData/IGESData_FileProtocol.hxx index c1eaf7481d..dbbd5ef6eb 100644 --- a/src/IGESData/IGESData_FileProtocol.hxx +++ b/src/IGESData/IGESData_FileProtocol.hxx @@ -17,14 +17,8 @@ #ifndef _IGESData_FileProtocol_HeaderFile #define _IGESData_FileProtocol_HeaderFile -#include -#include - #include -#include -class IGESData_Protocol; -class Interface_Protocol; - +#include class IGESData_FileProtocol; DEFINE_STANDARD_HANDLE(IGESData_FileProtocol, IGESData_Protocol) @@ -36,45 +30,25 @@ DEFINE_STANDARD_HANDLE(IGESData_FileProtocol, IGESData_Protocol) //! UndefinedEntity too class IGESData_FileProtocol : public IGESData_Protocol { + public: -public: - - //! Returns an empty FileProtocol - Standard_EXPORT IGESData_FileProtocol(); + IGESData_FileProtocol() {} //! Adds a resource - Standard_EXPORT void Add (const Handle(IGESData_Protocol)& protocol); + Standard_EXPORT void Add (const Handle(IGESData_Protocol)& theProtocol); //! Gives the count of Resources : the count of Added Protocols Standard_EXPORT virtual Standard_Integer NbResources() const Standard_OVERRIDE; //! Returns a Resource, given a rank (rank of call to Add) - Standard_EXPORT virtual Handle(Interface_Protocol) Resource (const Standard_Integer num) const Standard_OVERRIDE; - - - + Standard_EXPORT virtual Handle(Interface_Protocol) Resource (const Standard_Integer theIndex) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESData_FileProtocol,IGESData_Protocol) -protected: - - - - -private: - - - Handle(IGESData_Protocol) theresource; - Handle(IGESData_FileProtocol) thenext; - + private: + NCollection_Vector myResources; }; - - - - - - #endif // _IGESData_FileProtocol_HeaderFile diff --git a/src/IGESData/IGESData_FileRecognizer.hxx b/src/IGESData/IGESData_FileRecognizer.hxx deleted file mode 100644 index fcd84bd119..0000000000 --- a/src/IGESData/IGESData_FileRecognizer.hxx +++ /dev/null @@ -1,100 +0,0 @@ -// Created on: 1992-04-06 -// Created by: Christian CAILLET -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _IGESData_FileRecognizer_HeaderFile -#define _IGESData_FileRecognizer_HeaderFile - -#include -#include - -#include -#include -class IGESData_IGESEntity; -class Standard_NoSuchObject; -class IGESData_IGESType; - - -class IGESData_FileRecognizer; -DEFINE_STANDARD_HANDLE(IGESData_FileRecognizer, Standard_Transient) - - -class IGESData_FileRecognizer : public Standard_Transient -{ - -public: - - - //! Evaluates if recognition has a result, returns it if yes - //! In case of success, Returns True and puts result in "res" - //! In case of Failure, simply Returns False - //! Works by calling deferred method Eval, and in case of failure, - //! looks for Added Recognizers to work - Standard_EXPORT Standard_Boolean Evaluate (const IGESData_IGESType& akey, Handle(IGESData_IGESEntity)& res); - - //! Returns result of last recognition (call of Evaluate) - Standard_EXPORT Handle(IGESData_IGESEntity) Result() const; - - //! Adds a new Recognizer to the Compound, at the end - //! Several calls to Add work by adding in the order of calls : - //! Hence, when Eval has failed to recognize, Evaluate will call - //! Evaluate from the first added Recognizer if there is one, - //! and to the second if there is still no result, and so on - Standard_EXPORT void Add (const Handle(IGESData_FileRecognizer)& reco); - - - - - DEFINE_STANDARD_RTTI_INLINE(IGESData_FileRecognizer,Standard_Transient) - -protected: - - - //! Assumes that no result has yet been recognized - Standard_EXPORT IGESData_FileRecognizer(); - - //! Records the result of the recognition. Called by specific - //! method Eval to record a result : after calling it, Eval has - //! finished and can return - Standard_EXPORT void SetOK (const Handle(IGESData_IGESEntity)& aresult); - - //! Records that recognition gives no result - Standard_EXPORT void SetKO(); - - //! THIS METHOD DEFINES THE RECOGNITION PROTOCOL, it is proper to - //! each precise type of Recognizer - //! For a suitable type of akey, it calls SetOK(result) where - //! result is an empty result of appropriate type, then returns - Standard_EXPORT virtual void Eval (const IGESData_IGESType& akey) = 0; - - - -private: - - - Handle(IGESData_IGESEntity) theres; - Standard_Boolean hasnext; - Handle(IGESData_FileRecognizer) thenext; - - -}; - - - - - - - -#endif // _IGESData_FileRecognizer_HeaderFile diff --git a/src/IGESData/IGESData_FileRecognizer_0.cxx b/src/IGESData/IGESData_FileRecognizer_0.cxx deleted file mode 100644 index 5a87d0dd63..0000000000 --- a/src/IGESData/IGESData_FileRecognizer_0.cxx +++ /dev/null @@ -1,44 +0,0 @@ -// Created on: 1992-04-06 -// Created by: Christian CAILLET -// Copyright (c) 1992-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#include - -#include - -#include -#include -#include -#include - - - - - - - - - - -#define TheKey IGESData_IGESType -#define TheKey_hxx -#define Handle_TheResul Handle(IGESData_IGESEntity) -#define TheResul IGESData_IGESEntity -#define TheResul_hxx -#define Interface_Recognizer IGESData_FileRecognizer -#define Interface_Recognizer_hxx -#define Handle_Interface_Recognizer Handle(IGESData_FileRecognizer) -#include - diff --git a/src/IGESData/IGESData_GeneralModule.cxx b/src/IGESData/IGESData_GeneralModule.cxx index e480f669bb..81e126dd08 100644 --- a/src/IGESData/IGESData_GeneralModule.cxx +++ b/src/IGESData/IGESData_GeneralModule.cxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -89,115 +88,6 @@ void IGESData_GeneralModule::FillSharedCase } - Standard_Boolean IGESData_GeneralModule::CanCopy - (const Standard_Integer /*CN*/, const Handle(Standard_Transient)& /*ent*/) const - { return Standard_True; } - - void IGESData_GeneralModule::CopyCase - (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, - const Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity,ento,entto); - DeclareAndCast(IGESData_IGESEntity,enfr,entfrom); -//// ento->Clear(); - -// ... Reprendre entete ... -//? ento->InitTypeAndForm (enfr->TypeNumber(), enfr->FormNumber());ShallowCopy - - if (enfr->DefLineFont() == IGESData_DefReference) ento->InitLineFont - (GetCasted(IGESData_LineFontEntity, TC.Transferred(enfr->LineFont()))); - else ento->InitLineFont (enfr->LineFont() , enfr->RankLineFont()); - - if (enfr->DefLevel() == IGESData_DefSeveral) ento->InitLevel - (GetCasted(IGESData_LevelListEntity,TC.Transferred(enfr->LevelList())),-1); - else ento->InitLevel (enfr->LevelList() , enfr->Level()); - - if (enfr->DefView() != IGESData_DefNone) ento->InitView - (GetCasted(IGESData_ViewKindEntity, TC.Transferred(enfr->View()))); - - if (enfr->HasTransf()) ento->InitTransf - (GetCasted(IGESData_TransfEntity, TC.Transferred(enfr->Transf()))); - - ento->InitStatus (enfr->BlankStatus() , - enfr->SubordinateStatus() , - enfr->UseFlag() , - enfr->HierarchyStatus() ); - - if (enfr->DefColor() == IGESData_DefReference) ento->InitColor - (GetCasted(IGESData_ColorEntity,TC.Transferred(enfr->Color()))); - else ento->InitColor (enfr->Color() , enfr->RankColor()); - - if (enfr->HasShortLabel()) ento->SetLabel - (new TCollection_HAsciiString(enfr->ShortLabel()), - enfr->SubScriptNumber()); - else ento->SetLabel (enfr->ShortLabel() , enfr->SubScriptNumber()); - -// Directory Part : Miscellaneous - Handle(IGESData_IGESEntity) Structure; - if (enfr->HasStructure()) Structure = - GetCasted(IGESData_IGESEntity, TC.Transferred(enfr->Structure())); - if (enfr->HasLabelDisplay()) ento->InitMisc - (Structure, - GetCasted(IGESData_LabelDisplayEntity,TC.Transferred(enfr->LabelDisplay())), - enfr->LineWeightNumber()); - else ento->InitMisc - (Structure , enfr->LabelDisplay() , enfr->LineWeightNumber()); - -// LineWeightValue, Res1, Res2 : through action of ShallowCopy ? - - OwnCopyCase (CN,enfr,ento,TC); - -// .. Properties - if (enfr->NbProperties() != 0) { - for (Interface_EntityIterator iter = enfr->Properties(); - iter.More(); iter.Next()) { - ento->AddProperty - (GetCasted(IGESData_IGESEntity,TC.Transferred(iter.Value()))); - } - } -} - - void IGESData_GeneralModule::RenewImpliedCase - (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, - const Handle(Standard_Transient)& entto, const Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity,ento,entto); - DeclareAndCast(IGESData_IGESEntity,enfr,entfrom); - - OwnRenewCase (CN,enfr,ento,TC); - -// .. Associativities - if (enfr->NbAssociativities() != 0) { - for (Interface_EntityIterator iter = enfr->Associativities(); - iter.More(); iter.Next()) { - Handle(Standard_Transient) anent = iter.Value(); - Handle(Standard_Transient) newent; - if (TC.Search(anent,newent)) ento->AddAssociativity - (GetCasted(IGESData_IGESEntity,newent)); - } - } -} - - void IGESData_GeneralModule::OwnRenewCase - (const Standard_Integer , const Handle(IGESData_IGESEntity)& , - const Handle(IGESData_IGESEntity)& , const Interface_CopyTool& ) const - { } - - void IGESData_GeneralModule::WhenDeleteCase - (const Standard_Integer CN, const Handle(Standard_Transient)& ent, - const Standard_Boolean ) const // dispatched : ignored -{ - DeclareAndCast(IGESData_IGESEntity,anent,ent); - if (anent.IsNull()) return; - anent->Clear(); - OwnDeleteCase (CN,anent); -} - - void IGESData_GeneralModule::OwnDeleteCase - (const Standard_Integer , const Handle(IGESData_IGESEntity)& ) const - { } // par defaut, rien (redefinissable) - - Handle(TCollection_HAsciiString) IGESData_GeneralModule::Name (const Standard_Integer , const Handle(Standard_Transient)& ent, const Interface_ShareTool& ) const diff --git a/src/IGESData/IGESData_GeneralModule.hxx b/src/IGESData/IGESData_GeneralModule.hxx index fcf88a2fd1..c9389ee9d8 100644 --- a/src/IGESData/IGESData_GeneralModule.hxx +++ b/src/IGESData/IGESData_GeneralModule.hxx @@ -29,7 +29,6 @@ class IGESData_IGESEntity; class Interface_ShareTool; class Interface_Check; class IGESData_DirChecker; -class Interface_CopyTool; class TCollection_HAsciiString; @@ -79,42 +78,9 @@ public: //! Performs Specific Semantic Check for each type of Entity Standard_EXPORT virtual void OwnCheckCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const = 0; - //! Specific answer to the question "is Copy properly implemented" - //! For IGES, answer is always True - Standard_EXPORT virtual Standard_Boolean CanCopy (const Standard_Integer CN, const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; - //! Specific creation of a new void entity Standard_EXPORT virtual Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const Standard_OVERRIDE = 0; - //! Copy ("Deep") from to (same type) - //! by using a CopyTool which provides its working Map. - //! For IGESEntities, Copies general data (Directory Part, List of - //! Properties) and call OwnCopyCase - Standard_EXPORT void CopyCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - - //! Copies parameters which are specific of each Type of Entity - Standard_EXPORT virtual void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const = 0; - - //! Renewing of Implied References. - //! For IGESEntities, Copies general data(List of Associativities) - //! and calls OwnRenewCase - Standard_EXPORT virtual void RenewImpliedCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, const Interface_CopyTool& TC) const Standard_OVERRIDE; - - //! Renews parameters which are specific of each Type of Entity : - //! the provided default does nothing, but this method may be - //! redefined as required - Standard_EXPORT virtual void OwnRenewCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, const Interface_CopyTool& TC) const; - - //! Prepares an IGES Entity for delete : works on directory part - //! then calls OwnDeleteCase - //! While dispatch requires to copy the entities, is - //! ignored, entities are cleared in any case - Standard_EXPORT virtual void WhenDeleteCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Standard_Boolean dispatched) const Standard_OVERRIDE; - - //! Specific preparation for delete, acts on own parameters - //! Default does nothing, to be redefined as required - Standard_EXPORT virtual void OwnDeleteCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const; - //! Returns the name of an IGES Entity (its NameValue) //! Can be redefined for an even more specific case ... Standard_EXPORT virtual Handle(TCollection_HAsciiString) Name (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE; diff --git a/src/IGESData/IGESData_IGESEntity.cxx b/src/IGESData/IGESData_IGESEntity.cxx index c60e0f5e23..e2b43da7d9 100644 --- a/src/IGESData/IGESData_IGESEntity.cxx +++ b/src/IGESData/IGESData_IGESEntity.cxx @@ -15,9 +15,7 @@ #include #include #include -#include #include -#include #include #include #include diff --git a/src/IGESData/IGESData_IGESEntity.hxx b/src/IGESData/IGESData_IGESEntity.hxx index 663451668d..6d19c31175 100644 --- a/src/IGESData/IGESData_IGESEntity.hxx +++ b/src/IGESData/IGESData_IGESEntity.hxx @@ -20,17 +20,13 @@ #include #include -#include -#include -#include -#include -#include #include -#include +#include +#include +#include #include #include -#include -#include +#include class TCollection_HAsciiString; class Interface_InterfaceError; class IGESData_ReadWriteModule; @@ -56,9 +52,7 @@ DEFINE_STANDARD_HANDLE(IGESData_IGESEntity, MMgt_TShared) //! Part, lists of (optionnal) Properties and Associativities class IGESData_IGESEntity : public MMgt_TShared { - -public: - + public: //! gives IGES typing info (includes "Type" and "Form" data) Standard_EXPORT IGESData_IGESType IGESType() const; @@ -323,18 +317,21 @@ public: //! or sets it to defw (Default) if LineWeightNumber is null Standard_EXPORT void SetLineWeight (const Standard_Real defw, const Standard_Real maxw, const Standard_Integer gradw); - friend class IGESData_ReadWriteModule; friend class IGESData_GeneralModule; friend class IGESData_IGESReaderTool; friend class IGESData_DirChecker; + //! Lists the Entities shared by , from its specific (own) parameters + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &) const {} + + //! Performs Specific Semantic Check + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const {} DEFINE_STANDARD_RTTIEXT(IGESData_IGESEntity,MMgt_TShared) -protected: + protected: - //! prepares lists of optionnal data, set values to defaults Standard_EXPORT IGESData_IGESEntity(); @@ -353,11 +350,8 @@ protected: //! Removes all properties in once Standard_EXPORT void ClearProperties(); + private: - -private: - - //! Clears specific IGES data Standard_EXPORT void Clear(); @@ -391,14 +385,6 @@ private: Standard_Integer theSubScriptN; Interface_EntityList theAssocs; Interface_EntityList theProps; - - }; - - - - - - #endif // _IGESData_IGESEntity_HeaderFile diff --git a/src/IGESData/IGESData_IGESReaderTool.cxx b/src/IGESData/IGESData_IGESReaderTool.cxx index b0d5a2715c..c60a480efc 100644 --- a/src/IGESData/IGESData_IGESReaderTool.cxx +++ b/src/IGESData/IGESData_IGESReaderTool.cxx @@ -14,7 +14,6 @@ #include #include -#include #include #include #include @@ -45,39 +44,27 @@ IGESData_IGESReaderTool::IGESData_IGESReaderTool (const Handle(IGESData_IGESReaderData)& reader, const Handle(IGESData_Protocol)& protocol) - : theglib(protocol) , therlib(protocol) - { SetData (reader,protocol); } +: Interface_FileReaderTool(protocol) +{ SetData (reader,protocol); } // ########################################################################### // ######## PREPARATION ######## - void IGESData_IGESReaderTool::Prepare - (const Handle(IGESData_FileRecognizer)& reco) +void IGESData_IGESReaderTool::Prepare () { DeclareAndCast(IGESData_IGESReaderData,igesdat,Data()); igesdat->SetEntityNumbers(); - thereco = reco; SetEntities(); thelist = igesdat->Params(0); } - Standard_Boolean IGESData_IGESReaderTool::Recognize - (const Standard_Integer num, Handle(Interface_Check)& ach, - Handle(Standard_Transient)& ent) +Standard_Boolean IGESData_IGESReaderTool::Recognize (const Standard_Integer num, Handle(Standard_Transient)& ent) { DeclareAndCast(IGESData_IGESReaderData,igesdat,Data()); thecnum = num; thectyp = igesdat->DirType(num); - Handle(IGESData_IGESEntity) anent; - Standard_Boolean res = Standard_False; - -// Recognizer -> Liste limitative - if (!thereco.IsNull()) res = thereco->Evaluate(thectyp,anent); - if (res) ent = anent; -// Sinon, Library - else res = RecognizeByLib (num,theglib,therlib,ach,ent); - return res; + return RecognizeByLib (num,ent); } @@ -86,8 +73,7 @@ IGESData_IGESReaderTool::IGESData_IGESReaderTool // (Elements enchaines par la classe de base Interface_FileReaderTool) - void IGESData_IGESReaderTool::BeginRead - (const Handle(Interface_InterfaceModel)& amodel) +void IGESData_IGESReaderTool::BeginRead (const Handle(Interface_InterfaceModel)& amodel) { DeclareAndCast(IGESData_IGESModel,amod,amodel); DeclareAndCast(IGESData_IGESReaderData,igesdat,Data()); @@ -106,11 +92,8 @@ IGESData_IGESReaderTool::IGESData_IGESReaderTool // Manquent les procedures de reprise sur erreur en cours de route ... - Standard_Boolean IGESData_IGESReaderTool::AnalyseRecord - (const Standard_Integer num, const Handle(Standard_Transient)& anent, - Handle(Interface_Check)& ach) +Standard_Boolean IGESData_IGESReaderTool::AnalyseRecord (const Standard_Integer num, const Handle(Standard_Transient)& anent, Handle(Interface_Check)& ach) { - Handle(TCollection_HAsciiString) lab; DeclareAndCast(IGESData_IGESEntity,ent,anent); @@ -173,11 +156,6 @@ IGESData_IGESReaderTool::IGESData_IGESReaderTool return (!ach->HasFailed()); } - void IGESData_IGESReaderTool::EndRead - (const Handle(Interface_InterfaceModel)& /* amodel */) -{ -} - // ########################################################################### diff --git a/src/IGESData/IGESData_IGESReaderTool.hxx b/src/IGESData/IGESData_IGESReaderTool.hxx index 4cf6f1718a..99558bbb5b 100644 --- a/src/IGESData/IGESData_IGESReaderTool.hxx +++ b/src/IGESData/IGESData_IGESReaderTool.hxx @@ -21,16 +21,10 @@ #include #include -#include -#include -#include #include #include -#include #include -#include class Interface_ParamList; -class IGESData_FileRecognizer; class Interface_Check; class IGESData_IGESReaderData; class IGESData_Protocol; @@ -58,12 +52,12 @@ class IGESData_IGESReaderTool : public Interface_FileReaderTool //! (from IGESData) stored and later used //! RQ : Actually, sets DNum into IGES Entities //! Also loads the list of parameters for ParamReader - Standard_EXPORT void Prepare (const Handle(IGESData_FileRecognizer)& reco); + Standard_EXPORT void Prepare (); private: //! recognizes records by asking Protocol (on data of DirType) - Standard_EXPORT virtual Standard_Boolean Recognize (const Standard_Integer num, Handle(Interface_Check)& ach, Handle(Standard_Transient)& ent) Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean Recognize (const Standard_Integer num, Handle(Standard_Transient)& ent) Standard_OVERRIDE; //! fills model's header, that is, its GlobalSection Standard_EXPORT virtual void BeginRead (const Handle(Interface_InterfaceModel)& amodel) Standard_OVERRIDE; @@ -74,9 +68,6 @@ class IGESData_IGESReaderTool : public Interface_FileReaderTool //! Returns True if no fail has been recorded Standard_EXPORT virtual Standard_Boolean AnalyseRecord (const Standard_Integer num, const Handle(Standard_Transient)& anent, Handle(Interface_Check)& acheck) Standard_OVERRIDE; - //! after reading entities, true line weights can be computed - Standard_EXPORT virtual void EndRead (const Handle(Interface_InterfaceModel)& amodel) Standard_OVERRIDE; - //! Reads directory part componants from file; DP is the litteral //! directory part, IR detains entities referenced by DP Standard_EXPORT void ReadDir (const Handle(IGESData_IGESEntity)& ent, const Handle(IGESData_IGESReaderData)& IR, const IGESData_DirPart& DP, Handle(Interface_Check)& ach) const; @@ -103,9 +94,6 @@ class IGESData_IGESReaderTool : public Interface_FileReaderTool Standard_EXPORT void ReadAssocs (const Handle(IGESData_IGESEntity)& ent, const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const; Handle(Interface_ParamList) thelist; - Handle(IGESData_FileRecognizer) thereco; - Interface_GeneralLib theglib; - Interface_ReaderLib therlib; Standard_Integer thecnum; IGESData_IGESType thectyp; IGESData_ReadStage thestep; diff --git a/src/IGESData/IGESData_Protocol.cxx b/src/IGESData/IGESData_Protocol.cxx index 7817001251..fc8a5e11f1 100644 --- a/src/IGESData/IGESData_Protocol.cxx +++ b/src/IGESData/IGESData_Protocol.cxx @@ -36,10 +36,6 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESData_Protocol,Interface_Protocol) Handle(Interface_InterfaceModel) IGESData_Protocol::NewModel () const { return new IGESData_IGESModel; } - Standard_Boolean IGESData_Protocol::IsSuitableModel - (const Handle(Interface_InterfaceModel)& model) const - { return model->IsKind(STANDARD_TYPE(IGESData_IGESModel)); } - Handle(Standard_Transient) IGESData_Protocol::UnknownEntity () const { return new IGESData_UndefinedEntity; } diff --git a/src/IGESData/IGESData_Protocol.hxx b/src/IGESData/IGESData_Protocol.hxx index 9d9e59b10e..88e7c5706e 100644 --- a/src/IGESData/IGESData_Protocol.hxx +++ b/src/IGESData/IGESData_Protocol.hxx @@ -21,12 +21,7 @@ #include #include -#include -#include -#include -class Interface_Protocol; class Interface_InterfaceModel; -class Standard_Transient; class IGESData_Protocol; @@ -48,9 +43,6 @@ class IGESData_Protocol : public Interface_Protocol //! Creates an empty Model for IGES Norm Standard_EXPORT Handle(Interface_InterfaceModel) NewModel() const Standard_OVERRIDE; - //! Returns True if is a Model of IGES Norm - Standard_EXPORT Standard_Boolean IsSuitableModel (const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE; - //! Creates a new Unknown Entity for IGES (UndefinedEntity) Standard_EXPORT Handle(Standard_Transient) UnknownEntity() const Standard_OVERRIDE; @@ -58,27 +50,7 @@ class IGESData_Protocol : public Interface_Protocol //! Type UndefinedEntity, status Unknown Standard_EXPORT Standard_Boolean IsUnknownEntity (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESData_Protocol,Interface_Protocol) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESData_Protocol_HeaderFile diff --git a/src/IGESData/IGESData_ReadWriteModule.cxx b/src/IGESData/IGESData_ReadWriteModule.cxx index a4a0154e71..becf33c547 100644 --- a/src/IGESData/IGESData_ReadWriteModule.cxx +++ b/src/IGESData/IGESData_ReadWriteModule.cxx @@ -22,8 +22,6 @@ #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESData_ReadWriteModule,Interface_ReaderModule) @@ -36,13 +34,10 @@ Standard_Integer IGESData_ReadWriteModule::CaseNum } -void IGESData_ReadWriteModule::Read +void IGESData_ReadWriteModule::Read (const Standard_Integer , const Handle(Interface_FileReaderData)& , const Standard_Integer , Handle(Interface_Check)& , const Handle(Standard_Transient)& ) const { -#ifdef OCCT_DEBUG - cout<<"IGESData_ReadWriteModule, Read called"< -#include - #include -#include -class Standard_DomainError; class Interface_FileReaderData; class Interface_Check; -class Standard_Transient; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamReader; @@ -55,10 +49,8 @@ DEFINE_STANDARD_HANDLE(IGESData_ReadWriteModule, Interface_ReaderModule) //! Warning : Works with an IGESReaderData which stores "DE parts" of Items class IGESData_ReadWriteModule : public Interface_ReaderModule { + public: -public: - - //! Translates the Type of record in to a positive //! Case Number, or 0 if failed. //! Works with IGESReaderData which provides Type & Form Numbers, @@ -90,27 +82,7 @@ public: //! WriteIGES, must not be sent by this method Standard_EXPORT virtual void WriteOwnParams (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, IGESData_IGESWriter& IW) const = 0; - - - DEFINE_STANDARD_RTTIEXT(IGESData_ReadWriteModule,Interface_ReaderModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESData_ReadWriteModule_HeaderFile diff --git a/src/IGESData/IGESData_SpecificModule.hxx b/src/IGESData/IGESData_SpecificModule.hxx index 8eb81a33cc..03ebfc8ea3 100644 --- a/src/IGESData/IGESData_SpecificModule.hxx +++ b/src/IGESData/IGESData_SpecificModule.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include class IGESData_IGESEntity; class IGESData_IGESDumper; class Message_Messenger; @@ -35,10 +33,8 @@ DEFINE_STANDARD_HANDLE(IGESData_SpecificModule, Standard_Transient) //! attached to IGES Entities : Dump class IGESData_SpecificModule : public Standard_Transient { + public: -public: - - //! Specific Dump for each type of IGES Entity : it concerns only //! own parameters, the general data (Directory Part, Lists) are //! taken into account by the IGESDumper @@ -65,27 +61,7 @@ public: //! procedure attached, this method can be redefined Standard_EXPORT virtual Standard_Boolean OwnCorrect (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const; - - - DEFINE_STANDARD_RTTIEXT(IGESData_SpecificModule,Standard_Transient) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESData_SpecificModule_HeaderFile diff --git a/src/IGESDefs/IGESDefs.cxx b/src/IGESDefs/IGESDefs.cxx index f065366ea0..3910d5f3ae 100644 --- a/src/IGESDefs/IGESDefs.cxx +++ b/src/IGESDefs/IGESDefs.cxx @@ -23,14 +23,16 @@ #include #include -// Ancillary data to work on a Package of IGES Entities with a Protocol -// (Modules are created and loaded in appropriate libraries, once by Init) -static Handle(IGESDefs_Protocol) protocol; - - void IGESDefs::Init () +/*void IGESDefs::Init () { IGESGraph::Init(); + IGESDefs::Protocol(); +}*/ + +const Handle(IGESDefs_Protocol) & IGESDefs::Protocol () +{ + static Handle(IGESDefs_Protocol) protocol; if (protocol.IsNull()) { protocol = new IGESDefs_Protocol; Interface_GeneralLib::SetGlobal (new IGESDefs_GeneralModule, protocol); @@ -38,9 +40,5 @@ static Handle(IGESDefs_Protocol) protocol; IGESData_WriterLib::SetGlobal (new IGESDefs_ReadWriteModule,protocol); IGESData_SpecificLib::SetGlobal (new IGESDefs_SpecificModule, protocol); } -} - - Handle(IGESDefs_Protocol) IGESDefs::Protocol () -{ return protocol; } diff --git a/src/IGESDefs/IGESDefs.hxx b/src/IGESDefs/IGESDefs.hxx index 6490014167..4c54abf6b6 100644 --- a/src/IGESDefs/IGESDefs.hxx +++ b/src/IGESDefs/IGESDefs.hxx @@ -18,86 +18,22 @@ #define _IGESDefs_HeaderFile #include -#include #include class IGESDefs_Protocol; -class IGESDefs_AssociativityDef; -class IGESDefs_MacroDef; -class IGESDefs_UnitsData; -class IGESDefs_AttributeDef; -class IGESDefs_TabularData; -class IGESDefs_GenericData; -class IGESDefs_AttributeTable; -class IGESDefs_ToolAssociativityDef; -class IGESDefs_ToolMacroDef; -class IGESDefs_ToolUnitsData; -class IGESDefs_ToolAttributeDef; -class IGESDefs_ToolTabularData; -class IGESDefs_ToolGenericData; -class IGESDefs_ToolAttributeTable; -class IGESDefs_Protocol; -class IGESDefs_ReadWriteModule; -class IGESDefs_GeneralModule; -class IGESDefs_SpecificModule; -class IGESDefs_HArray1OfHArray1OfTextDisplayTemplate; //! To embody general definitions of Entities //! (Parameters, Tables ...) class IGESDefs { -public: - - DEFINE_STANDARD_ALLOC + public: - //! Prepares dynamic data (Protocol, Modules) for this package - Standard_EXPORT static void Init(); + //Standard_EXPORT static void Init(); //! Returns the Protocol for this Package - Standard_EXPORT static Handle(IGESDefs_Protocol) Protocol(); - - - - -protected: - - - - - -private: - - - - -friend class IGESDefs_AssociativityDef; -friend class IGESDefs_MacroDef; -friend class IGESDefs_UnitsData; -friend class IGESDefs_AttributeDef; -friend class IGESDefs_TabularData; -friend class IGESDefs_GenericData; -friend class IGESDefs_AttributeTable; -friend class IGESDefs_ToolAssociativityDef; -friend class IGESDefs_ToolMacroDef; -friend class IGESDefs_ToolUnitsData; -friend class IGESDefs_ToolAttributeDef; -friend class IGESDefs_ToolTabularData; -friend class IGESDefs_ToolGenericData; -friend class IGESDefs_ToolAttributeTable; -friend class IGESDefs_Protocol; -friend class IGESDefs_ReadWriteModule; -friend class IGESDefs_GeneralModule; -friend class IGESDefs_SpecificModule; -friend class IGESDefs_HArray1OfHArray1OfTextDisplayTemplate; - + Standard_EXPORT static const Handle(IGESDefs_Protocol) & Protocol(); }; - - - - - - #endif // _IGESDefs_HeaderFile diff --git a/src/IGESDefs/IGESDefs_GeneralModule.cxx b/src/IGESDefs/IGESDefs_GeneralModule.cxx index f87e672e95..2f053e01cc 100644 --- a/src/IGESDefs/IGESDefs_GeneralModule.cxx +++ b/src/IGESDefs/IGESDefs_GeneralModule.cxx @@ -31,33 +31,18 @@ #include #include #include -#include #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESDefs_GeneralModule,IGESData_GeneralModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESDefs_GeneralModule::IGESDefs_GeneralModule () { } - void IGESDefs_GeneralModule::OwnSharedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const { switch (CN) { - case 1 : { - DeclareAndCast(IGESDefs_AssociativityDef,anent,ent); - if (anent.IsNull()) return; - IGESDefs_ToolAssociativityDef tool; - tool.OwnShared(anent,iter); - } - break; case 2 : { DeclareAndCast(IGESDefs_AttributeDef,anent,ent); if (anent.IsNull()) return; @@ -79,27 +64,6 @@ IGESDefs_GeneralModule::IGESDefs_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 5 : { - DeclareAndCast(IGESDefs_MacroDef,anent,ent); - if (anent.IsNull()) return; - IGESDefs_ToolMacroDef tool; - tool.OwnShared(anent,iter); - } - break; - case 6 : { - DeclareAndCast(IGESDefs_TabularData,anent,ent); - if (anent.IsNull()) return; - IGESDefs_ToolTabularData tool; - tool.OwnShared(anent,iter); - } - break; - case 7 : { - DeclareAndCast(IGESDefs_UnitsData,anent,ent); - if (anent.IsNull()) return; - IGESDefs_ToolUnitsData tool; - tool.OwnShared(anent,iter); - } - break; default : break; } } @@ -162,13 +126,6 @@ IGESDefs_GeneralModule::IGESDefs_GeneralModule () { } const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const { switch (CN) { - case 1 : { - DeclareAndCast(IGESDefs_AssociativityDef,anent,ent); - if (anent.IsNull()) return; - IGESDefs_ToolAssociativityDef tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 2 : { DeclareAndCast(IGESDefs_AttributeDef,anent,ent); if (anent.IsNull()) return; @@ -190,27 +147,6 @@ IGESDefs_GeneralModule::IGESDefs_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 5 : { - DeclareAndCast(IGESDefs_MacroDef,anent,ent); - if (anent.IsNull()) return; - IGESDefs_ToolMacroDef tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 6 : { - DeclareAndCast(IGESDefs_TabularData,anent,ent); - if (anent.IsNull()) return; - IGESDefs_ToolTabularData tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 7 : { - DeclareAndCast(IGESDefs_UnitsData,anent,ent); - if (anent.IsNull()) return; - IGESDefs_ToolUnitsData tool; - tool.OwnCheck(anent,shares,ach); - } - break; default : break; } } @@ -233,67 +169,6 @@ IGESDefs_GeneralModule::IGESDefs_GeneralModule () { } } - void IGESDefs_GeneralModule::OwnCopyCase - (const Standard_Integer CN, - const Handle(IGESData_IGESEntity)& entfrom, - const Handle(IGESData_IGESEntity)& entto, - Interface_CopyTool& TC) const -{ - switch (CN) { - case 1 : { - DeclareAndCast(IGESDefs_AssociativityDef,enfr,entfrom); - DeclareAndCast(IGESDefs_AssociativityDef,ento,entto); - IGESDefs_ToolAssociativityDef tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 2 : { - DeclareAndCast(IGESDefs_AttributeDef,enfr,entfrom); - DeclareAndCast(IGESDefs_AttributeDef,ento,entto); - IGESDefs_ToolAttributeDef tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 3 : { - DeclareAndCast(IGESDefs_AttributeTable,enfr,entfrom); - DeclareAndCast(IGESDefs_AttributeTable,ento,entto); - IGESDefs_ToolAttributeTable tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 4 : { - DeclareAndCast(IGESDefs_GenericData,enfr,entfrom); - DeclareAndCast(IGESDefs_GenericData,ento,entto); - IGESDefs_ToolGenericData tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 5 : { - DeclareAndCast(IGESDefs_MacroDef,enfr,entfrom); - DeclareAndCast(IGESDefs_MacroDef,ento,entto); - IGESDefs_ToolMacroDef tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 6 : { - DeclareAndCast(IGESDefs_TabularData,enfr,entfrom); - DeclareAndCast(IGESDefs_TabularData,ento,entto); - IGESDefs_ToolTabularData tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 7 : { - DeclareAndCast(IGESDefs_UnitsData,enfr,entfrom); - DeclareAndCast(IGESDefs_UnitsData,ento,entto); - IGESDefs_ToolUnitsData tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - default : break; - } -} - - Standard_Integer IGESDefs_GeneralModule::CategoryNumber (const Standard_Integer /*CN*/, const Handle(Standard_Transient)& /*ent*/, const Interface_ShareTool& ) const diff --git a/src/IGESDefs/IGESDefs_GeneralModule.hxx b/src/IGESDefs/IGESDefs_GeneralModule.hxx index bcc00c72de..6506314ef0 100644 --- a/src/IGESDefs/IGESDefs_GeneralModule.hxx +++ b/src/IGESDefs/IGESDefs_GeneralModule.hxx @@ -17,19 +17,7 @@ #ifndef _IGESDefs_GeneralModule_HeaderFile #define _IGESDefs_GeneralModule_HeaderFile -#include -#include - #include -#include -#include -class IGESData_IGESEntity; -class Interface_EntityIterator; -class IGESData_DirChecker; -class Interface_ShareTool; -class Interface_Check; -class Standard_Transient; -class Interface_CopyTool; class IGESDefs_GeneralModule; @@ -39,12 +27,10 @@ DEFINE_STANDARD_HANDLE(IGESDefs_GeneralModule, IGESData_GeneralModule) //! This Services comprise : Shared & Implied Lists, Copy, Check class IGESDefs_GeneralModule : public IGESData_GeneralModule { + public: -public: - - //! Creates a GeneralModule from IGESDefs and puts it into GeneralLib - Standard_EXPORT IGESDefs_GeneralModule(); + IGESDefs_GeneralModule() {} //! Lists the Entities shared by a given IGESEntity , from //! its specific parameters : specific for each type @@ -61,34 +47,11 @@ public: //! Specific creation of a new void entity Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const Standard_OVERRIDE; - //! Copies parameters which are specific of each Type of Entity - Standard_EXPORT void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - //! Returns a category number which characterizes an entity //! Auxiliary for all Standard_EXPORT virtual Standard_Integer CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESDefs_GeneralModule,IGESData_GeneralModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESDefs_GeneralModule_HeaderFile diff --git a/src/IGESDefs/IGESDefs_ReadWriteModule.cxx b/src/IGESDefs/IGESDefs_ReadWriteModule.cxx index 845fa9715b..744bce0a8e 100644 --- a/src/IGESDefs/IGESDefs_ReadWriteModule.cxx +++ b/src/IGESDefs/IGESDefs_ReadWriteModule.cxx @@ -37,11 +37,6 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESDefs_ReadWriteModule,IGESData_ReadWriteModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESDefs_ReadWriteModule::IGESDefs_ReadWriteModule () { } - Standard_Integer IGESDefs_ReadWriteModule::CaseIGES (const Standard_Integer typenum, const Standard_Integer formnum) const diff --git a/src/IGESDefs/IGESDefs_ReadWriteModule.hxx b/src/IGESDefs/IGESDefs_ReadWriteModule.hxx index 6e1617e5a8..455faae6e3 100644 --- a/src/IGESDefs/IGESDefs_ReadWriteModule.hxx +++ b/src/IGESDefs/IGESDefs_ReadWriteModule.hxx @@ -17,12 +17,7 @@ #ifndef _IGESDefs_ReadWriteModule_HeaderFile #define _IGESDefs_ReadWriteModule_HeaderFile -#include -#include - #include -#include -class Standard_DomainError; class IGESData_IGESEntity; class IGESData_IGESReaderData; class IGESData_ParamReader; @@ -37,12 +32,10 @@ DEFINE_STANDARD_HANDLE(IGESDefs_ReadWriteModule, IGESData_ReadWriteModule) //! an IGESEntity. class IGESDefs_ReadWriteModule : public IGESData_ReadWriteModule { + public: -public: - - //! Creates a ReadWriteModule & puts it into ReaderLib & WriterLib - Standard_EXPORT IGESDefs_ReadWriteModule(); + IGESDefs_ReadWriteModule() {} //! Defines Case Numbers for Entities of IGESDefs Standard_EXPORT Standard_Integer CaseIGES (const Standard_Integer typenum, const Standard_Integer formnum) const Standard_OVERRIDE; @@ -53,27 +46,7 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, IGESData_IGESWriter& IW) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESDefs_ReadWriteModule,IGESData_ReadWriteModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESDefs_ReadWriteModule_HeaderFile diff --git a/src/IGESDefs/IGESDefs_ToolAssociativityDef.cxx b/src/IGESDefs/IGESDefs_ToolAssociativityDef.cxx index 56fd0977f8..5c02092029 100644 --- a/src/IGESDefs/IGESDefs_ToolAssociativityDef.cxx +++ b/src/IGESDefs/IGESDefs_ToolAssociativityDef.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -35,8 +34,6 @@ #include #include -IGESDefs_ToolAssociativityDef::IGESDefs_ToolAssociativityDef () { } - void IGESDefs_ToolAssociativityDef::ReadOwnParams (const Handle(IGESDefs_AssociativityDef)& ent, @@ -110,50 +107,6 @@ void IGESDefs_ToolAssociativityDef::WriteOwnParams } } -void IGESDefs_ToolAssociativityDef::OwnShared - (const Handle(IGESDefs_AssociativityDef)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESDefs_ToolAssociativityDef::OwnCopy - (const Handle(IGESDefs_AssociativityDef)& another, - const Handle(IGESDefs_AssociativityDef)& ent, Interface_CopyTool& /* TC */) const -{ - - Handle(TColStd_HArray1OfInteger) requirements; - Handle(TColStd_HArray1OfInteger) orders; - Handle(TColStd_HArray1OfInteger) numItems; - Handle(IGESBasic_HArray1OfHArray1OfInteger) items; - - Standard_Integer nbval = another->NbClassDefs(); - - requirements = new TColStd_HArray1OfInteger(1, nbval); - orders = new TColStd_HArray1OfInteger(1, nbval); - numItems = new TColStd_HArray1OfInteger(1, nbval); - items = new IGESBasic_HArray1OfHArray1OfInteger(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - Standard_Integer requirement = another->BackPointerReq(i); - requirements->SetValue(i, requirement); - Standard_Integer order = another->ClassOrder(i); - orders->SetValue(i, order); - Standard_Integer numItem = another->NbItemsPerClass(i); - numItems->SetValue(i, numItem); - Handle(TColStd_HArray1OfInteger) item; - item = new TColStd_HArray1OfInteger(1, numItem); - - for (Standard_Integer j = 1; j <= numItem; j++) - { - Standard_Integer temp = another->Item(i, j); - item->SetValue(j, temp); - } - items->SetValue(i, item); - } - ent->Init(requirements, orders, numItems, items); - ent->SetFormNumber (another->FormNumber()); -} - IGESData_DirChecker IGESDefs_ToolAssociativityDef::DirChecker (const Handle(IGESDefs_AssociativityDef)& /* ent */ ) const { @@ -169,12 +122,6 @@ IGESData_DirChecker IGESDefs_ToolAssociativityDef::DirChecker return DC; } -void IGESDefs_ToolAssociativityDef::OwnCheck - (const Handle(IGESDefs_AssociativityDef)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESDefs_ToolAssociativityDef::OwnDump (const Handle(IGESDefs_AssociativityDef)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDefs/IGESDefs_ToolAssociativityDef.hxx b/src/IGESDefs/IGESDefs_ToolAssociativityDef.hxx index 27b93e0e2e..b729d9f077 100644 --- a/src/IGESDefs/IGESDefs_ToolAssociativityDef.hxx +++ b/src/IGESDefs/IGESDefs_ToolAssociativityDef.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDefs_ToolAssociativityDef { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolAssociativityDef, ready to work - Standard_EXPORT IGESDefs_ToolAssociativityDef(); + IGESDefs_ToolAssociativityDef() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDefs_AssociativityDef)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a AssociativityDef , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDefs_AssociativityDef)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDefs_AssociativityDef)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDefs_AssociativityDef)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDefs_AssociativityDef)& entfrom, const Handle(IGESDefs_AssociativityDef)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDefs_AssociativityDef)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDefs_ToolAssociativityDef_HeaderFile diff --git a/src/IGESDefs/IGESDefs_ToolAttributeDef.cxx b/src/IGESDefs/IGESDefs_ToolAttributeDef.cxx index 6464087915..d10b01dce0 100644 --- a/src/IGESDefs/IGESDefs_ToolAttributeDef.cxx +++ b/src/IGESDefs/IGESDefs_ToolAttributeDef.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -44,8 +43,6 @@ #include #include -IGESDefs_ToolAttributeDef::IGESDefs_ToolAttributeDef () { } - void IGESDefs_ToolAttributeDef::ReadOwnParams (const Handle(IGESDefs_AttributeDef)& ent, @@ -258,105 +255,6 @@ void IGESDefs_ToolAttributeDef::OwnShared } } - -void IGESDefs_ToolAttributeDef::OwnCopy - (const Handle(IGESDefs_AttributeDef)& another, - const Handle(IGESDefs_AttributeDef)& ent, Interface_CopyTool& TC) const -{ - Handle(TCollection_HAsciiString) aName; - if (!another->TableName().IsNull()) aName = - new TCollection_HAsciiString(another->TableName()); - Standard_Integer aListType = another->ListType(); - - Handle(TColStd_HArray1OfInteger) attrTypes; - Handle(TColStd_HArray1OfInteger) attrValueDataTypes; - Handle(TColStd_HArray1OfInteger) attrValueCounts; - Handle(TColStd_HArray1OfTransient) attrValues; - Handle(IGESDefs_HArray1OfHArray1OfTextDisplayTemplate) attrValuePointers; - Standard_Integer nbval = another->NbAttributes(); - - attrTypes = new TColStd_HArray1OfInteger(1, nbval); - attrValueDataTypes = new TColStd_HArray1OfInteger(1, nbval); - attrValueCounts = new TColStd_HArray1OfInteger(1, nbval); - if (another->HasValues()) attrValues = - new TColStd_HArray1OfTransient(1, nbval); - if (another->HasTextDisplay()) attrValuePointers = - new IGESDefs_HArray1OfHArray1OfTextDisplayTemplate(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - Standard_Integer attrType = another->AttributeType(i); - attrTypes->SetValue(i, attrType); - Standard_Integer attrValueDataType = another->AttributeValueDataType(i); - attrValueDataTypes->SetValue(i, attrValueDataType); - Standard_Integer avc = another->AttributeValueCount(i); - attrValueCounts->SetValue(i, avc); - Handle(IGESGraph_HArray1OfTextDisplayTemplate) attrValuePointer; - - if (another->HasTextDisplay()) attrValuePointer = - new IGESGraph_HArray1OfTextDisplayTemplate(1, avc); - - if (another->HasValues()) - { - Handle(TColStd_HArray1OfInteger) attrInt; - Handle(TColStd_HArray1OfReal) attrReal; - Handle(Interface_HArray1OfHAsciiString) attrStr; - Handle(IGESData_HArray1OfIGESEntity) attrEnt; - switch (attrValueDataType) { - case 1 : attrInt = new TColStd_HArray1OfInteger (1,avc); - attrValues->SetValue(i,attrInt); break; - case 2 : attrReal = new TColStd_HArray1OfReal (1,avc); - attrValues->SetValue(i,attrReal); break; - case 3 : attrStr = new Interface_HArray1OfHAsciiString(1,avc); - attrValues->SetValue(i,attrStr); break; - case 4 : attrEnt = new IGESData_HArray1OfIGESEntity (1,avc); - attrValues->SetValue(i,attrEnt); break; - case 6 : attrInt = new TColStd_HArray1OfInteger (1,avc); - attrValues->SetValue(i,attrInt); break; - default : break; - } - for (Standard_Integer j = 1; j <= avc; j ++) - { - switch(attrValueDataType) - { - case 0: - break; - case 1: attrInt->SetValue(j,another->AttributeAsInteger(i,j)); - break; - case 2: attrReal->SetValue(j,another->AttributeAsReal(i,j)); - break; - case 3: attrStr->SetValue(j,new TCollection_HAsciiString - (another->AttributeAsString(i,j))); - break; - case 4: { - DeclareAndCast(IGESData_IGESEntity,Ent,TC.Transferred - (another->AttributeAsEntity(i,j))); - attrEnt->SetValue(j,Ent); - } - break; - case 5: - break; - case 6: attrInt->SetValue - (j,(another->AttributeAsLogical(i,j) ? 1 : 0)); - break; - default : break; - } - if (another->HasTextDisplay()) - { - DeclareAndCast(IGESGraph_TextDisplayTemplate, temptext, - TC.Transferred(another->AttributeTextDisplay(i,j))); - attrValuePointer->SetValue (j, temptext); - } - } - if (another->HasTextDisplay()) - attrValuePointers->SetValue(i, attrValuePointer); - } - } - ent->Init - (aName, aListType, attrTypes, attrValueDataTypes, attrValueCounts, - attrValues, attrValuePointers); -} - IGESData_DirChecker IGESDefs_ToolAttributeDef::DirChecker (const Handle(IGESDefs_AttributeDef)& /* ent */ ) const { diff --git a/src/IGESDefs/IGESDefs_ToolAttributeDef.hxx b/src/IGESDefs/IGESDefs_ToolAttributeDef.hxx index b0eea36f09..a40a145be9 100644 --- a/src/IGESDefs/IGESDefs_ToolAttributeDef.hxx +++ b/src/IGESDefs/IGESDefs_ToolAttributeDef.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDefs_ToolAttributeDef { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolAttributeDef, ready to work - Standard_EXPORT IGESDefs_ToolAttributeDef(); + IGESDefs_ToolAttributeDef() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDefs_AttributeDef)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDefs_AttributeDef)& entfrom, const Handle(IGESDefs_AttributeDef)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDefs_AttributeDef)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDefs_ToolAttributeDef_HeaderFile diff --git a/src/IGESDefs/IGESDefs_ToolAttributeTable.cxx b/src/IGESDefs/IGESDefs_ToolAttributeTable.cxx index a8840d5ac1..1bd3bf92fc 100644 --- a/src/IGESDefs/IGESDefs_ToolAttributeTable.cxx +++ b/src/IGESDefs/IGESDefs_ToolAttributeTable.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -40,8 +39,6 @@ #include #include -IGESDefs_ToolAttributeTable::IGESDefs_ToolAttributeTable () { } - void IGESDefs_ToolAttributeTable::ReadOwnParams (const Handle(IGESDefs_AttributeTable)& ent, @@ -192,87 +189,6 @@ void IGESDefs_ToolAttributeTable::OwnShared } } -void IGESDefs_ToolAttributeTable::OwnCopy - (const Handle(IGESDefs_AttributeTable)& another, - const Handle(IGESDefs_AttributeTable)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer j = 1; - Handle(IGESDefs_AttributeDef) ab = another->Definition(); - Standard_Integer na = another->NbAttributes(); - Standard_Integer nr = another->NbRows(); - Handle(TColStd_HArray2OfTransient) list2 = - new TColStd_HArray2OfTransient(1,na,1,nr); - for (Standard_Integer k = 1; k <= nr; k ++) - { - for (Standard_Integer i = 1; i <= na; i ++) - { - Standard_Integer avc = ab->AttributeValueCount(i); - Standard_Integer atype = ab->AttributeValueDataType(i); - switch (atype) - { - case 0 : //// list2->SetValue(i,k,NULL); par defaut - break; - case 1 : { - DeclareAndCast(TColStd_HArray1OfInteger,otherInt, - another->AttributeList(i,k)); - Handle(TColStd_HArray1OfInteger) attrInt = - new TColStd_HArray1OfInteger (1,avc); - list2->SetValue(i,k,attrInt); - for (j = 1; j <= avc; j++) - attrInt->SetValue(j,otherInt->Value(j)); - } - break; - case 2 : { - DeclareAndCast(TColStd_HArray1OfReal,otherReal, - another->AttributeList(i,k)); - Handle(TColStd_HArray1OfReal) attrReal = - new TColStd_HArray1OfReal (1,avc); - list2->SetValue(i,k,attrReal); - for (j = 1; j <= avc; j++) - attrReal->SetValue(j,otherReal->Value(j)); - } - break; - case 3 : { - DeclareAndCast(Interface_HArray1OfHAsciiString,otherStr, - another->AttributeList(i,k)); - Handle(Interface_HArray1OfHAsciiString) attrStr = - new Interface_HArray1OfHAsciiString (1,avc); - list2->SetValue(i,k,attrStr); - for (j = 1; j <= avc; j++) - attrStr->SetValue - (j,new TCollection_HAsciiString(otherStr->Value(j))); - } - break; - case 4 : { - DeclareAndCast(IGESData_HArray1OfIGESEntity,otherEnt, - another->AttributeList(i,k)); - Handle(IGESData_HArray1OfIGESEntity) attrEnt = - new IGESData_HArray1OfIGESEntity (1,avc); - list2->SetValue(i,k,attrEnt); - for (j = 1; j <= avc; j++) - attrEnt->SetValue(j,GetCasted(IGESData_IGESEntity, - TC.Transferred(otherEnt->Value(j)))); - } - break; - case 5 : ///// list2->SetValue(i,k,NULL); par defaut - break; - case 6 :{ // Here item takes value 0 or 1 - DeclareAndCast(TColStd_HArray1OfInteger,otherInt, - another->AttributeList(i,k)); - Handle(TColStd_HArray1OfInteger) attrInt = - new TColStd_HArray1OfInteger (1,avc); - list2->SetValue(i,k,attrInt); - for (j = 1; j <= avc; j++) - attrInt->SetValue(j,otherInt->Value(j)); - } - break; - default : break; - } - } - } - ent->Init(list2); -} - IGESData_DirChecker IGESDefs_ToolAttributeTable::DirChecker (const Handle(IGESDefs_AttributeTable)& /* ent */ ) const { diff --git a/src/IGESDefs/IGESDefs_ToolAttributeTable.hxx b/src/IGESDefs/IGESDefs_ToolAttributeTable.hxx index de2a371855..8533362e97 100644 --- a/src/IGESDefs/IGESDefs_ToolAttributeTable.hxx +++ b/src/IGESDefs/IGESDefs_ToolAttributeTable.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDefs_ToolAttributeTable { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolAttributeTable, ready to work - Standard_EXPORT IGESDefs_ToolAttributeTable(); + IGESDefs_ToolAttributeTable() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDefs_AttributeTable)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDefs_AttributeTable)& entfrom, const Handle(IGESDefs_AttributeTable)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDefs_AttributeTable)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDefs_ToolAttributeTable_HeaderFile diff --git a/src/IGESDefs/IGESDefs_ToolGenericData.cxx b/src/IGESDefs/IGESDefs_ToolGenericData.cxx index ecd88badda..0c2007ba1c 100644 --- a/src/IGESDefs/IGESDefs_ToolGenericData.cxx +++ b/src/IGESDefs/IGESDefs_ToolGenericData.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -40,8 +39,6 @@ #include #include -IGESDefs_ToolGenericData::IGESDefs_ToolGenericData () { } - void IGESDefs_ToolGenericData::ReadOwnParams (const Handle(IGESDefs_GenericData)& ent, @@ -165,70 +162,6 @@ void IGESDefs_ToolGenericData::OwnShared } } -void IGESDefs_ToolGenericData::OwnCopy - (const Handle(IGESDefs_GenericData)& another, - const Handle(IGESDefs_GenericData)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer num = another->NbTypeValuePairs(); - Standard_Integer tempNbPropVal = another->NbPropertyValues(); - Handle(TCollection_HAsciiString) tempName = - new TCollection_HAsciiString(another->Name()); - Handle(TColStd_HArray1OfInteger) tempTypes = - new TColStd_HArray1OfInteger(1, num); - Handle(TColStd_HArray1OfTransient) tempValues = - new TColStd_HArray1OfTransient(1, num); - - for (Standard_Integer i = 1; i <= num; i++) - { - tempTypes->SetValue(i, another->Type(i)); - switch (another->Type(i)) - { - case 0: // No value - break; - case 1: // Integer - { - Handle(TColStd_HArray1OfInteger) tempObj = - new TColStd_HArray1OfInteger(1,1); - tempObj->SetValue(1,another->ValueAsInteger(i)); - tempValues->SetValue(i, tempObj); - } - break; - case 2: // Real - { - Handle(TColStd_HArray1OfReal) tempObj = - new TColStd_HArray1OfReal(1,1); - tempObj->SetValue(1,another->ValueAsReal(i)); - tempValues->SetValue(i, tempObj); - } - break; - case 3: // Character string - { - tempValues->SetValue - (i, new TCollection_HAsciiString(another->ValueAsString(i))); - } - break; - case 4: // Pointer - { - DeclareAndCast(IGESData_IGESEntity, tempObj, - TC.Transferred(another->ValueAsEntity(i))); - tempValues->SetValue(i, tempObj); - } - break; - case 5: // Not used - break; - case 6: // Logical - { - Handle(TColStd_HArray1OfInteger) tempObj = - new TColStd_HArray1OfInteger(1,1); - tempObj->SetValue(1, (another->ValueAsLogical(i) ? 1 : 0) ); - tempValues->SetValue(i, tempObj); - } - break; - } - } - ent->Init (tempNbPropVal, tempName, tempTypes, tempValues); -} - IGESData_DirChecker IGESDefs_ToolGenericData::DirChecker (const Handle(IGESDefs_GenericData)& /* ent */ ) const { diff --git a/src/IGESDefs/IGESDefs_ToolGenericData.hxx b/src/IGESDefs/IGESDefs_ToolGenericData.hxx index abfd855102..f8c68d99ea 100644 --- a/src/IGESDefs/IGESDefs_ToolGenericData.hxx +++ b/src/IGESDefs/IGESDefs_ToolGenericData.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDefs_ToolGenericData { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolGenericData, ready to work - Standard_EXPORT IGESDefs_ToolGenericData(); + IGESDefs_ToolGenericData() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDefs_GenericData)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDefs_GenericData)& entfrom, const Handle(IGESDefs_GenericData)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDefs_GenericData)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDefs_ToolGenericData_HeaderFile diff --git a/src/IGESDefs/IGESDefs_ToolMacroDef.cxx b/src/IGESDefs/IGESDefs_ToolMacroDef.cxx index 34cb319fa1..f4e254238b 100644 --- a/src/IGESDefs/IGESDefs_ToolMacroDef.cxx +++ b/src/IGESDefs/IGESDefs_ToolMacroDef.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -35,8 +34,6 @@ #include #include -IGESDefs_ToolMacroDef::IGESDefs_ToolMacroDef () { } - void IGESDefs_ToolMacroDef::ReadOwnParams (const Handle(IGESDefs_MacroDef)& ent, @@ -92,34 +89,6 @@ void IGESDefs_ToolMacroDef::WriteOwnParams IW.Send(ent->ENDMACRO()); } -void IGESDefs_ToolMacroDef::OwnShared - (const Handle(IGESDefs_MacroDef)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESDefs_ToolMacroDef::OwnCopy - (const Handle(IGESDefs_MacroDef)& another, - const Handle(IGESDefs_MacroDef)& ent, Interface_CopyTool& /* TC */) const -{ - - Handle(TCollection_HAsciiString) macro = - new TCollection_HAsciiString(another->MACRO()); - Standard_Integer entityTypeID = another->EntityTypeID(); - Handle(TCollection_HAsciiString) endMacro = - new TCollection_HAsciiString(another->ENDMACRO()); - Handle(Interface_HArray1OfHAsciiString) langStatements; - Standard_Integer nbval = another->NbStatements(); - langStatements = new Interface_HArray1OfHAsciiString(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - Handle(TCollection_HAsciiString) langStat = - new TCollection_HAsciiString(another->LanguageStatement(i)); - langStatements->SetValue(i, langStat); - } - ent->Init(macro, entityTypeID, langStatements, endMacro); -} - IGESData_DirChecker IGESDefs_ToolMacroDef::DirChecker (const Handle(IGESDefs_MacroDef)& /* ent */ ) const { @@ -135,12 +104,6 @@ IGESData_DirChecker IGESDefs_ToolMacroDef::DirChecker return DC; } -void IGESDefs_ToolMacroDef::OwnCheck - (const Handle(IGESDefs_MacroDef)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESDefs_ToolMacroDef::OwnDump (const Handle(IGESDefs_MacroDef)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDefs/IGESDefs_ToolMacroDef.hxx b/src/IGESDefs/IGESDefs_ToolMacroDef.hxx index ccb552865a..d0576c6404 100644 --- a/src/IGESDefs/IGESDefs_ToolMacroDef.hxx +++ b/src/IGESDefs/IGESDefs_ToolMacroDef.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDefs_ToolMacroDef { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolMacroDef, ready to work - Standard_EXPORT IGESDefs_ToolMacroDef(); + IGESDefs_ToolMacroDef() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDefs_MacroDef)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a MacroDef , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDefs_MacroDef)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDefs_MacroDef)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDefs_MacroDef)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDefs_MacroDef)& entfrom, const Handle(IGESDefs_MacroDef)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDefs_MacroDef)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDefs_ToolMacroDef_HeaderFile diff --git a/src/IGESDefs/IGESDefs_ToolTabularData.cxx b/src/IGESDefs/IGESDefs_ToolTabularData.cxx index b36ac44d0e..4bb9f07a1d 100644 --- a/src/IGESDefs/IGESDefs_ToolTabularData.cxx +++ b/src/IGESDefs/IGESDefs_ToolTabularData.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -38,8 +37,6 @@ #include #include -IGESDefs_ToolTabularData::IGESDefs_ToolTabularData () { } - void IGESDefs_ToolTabularData::ReadOwnParams (const Handle(IGESDefs_TabularData)& ent, @@ -156,50 +153,6 @@ void IGESDefs_ToolTabularData::WriteOwnParams */ } -void IGESDefs_ToolTabularData::OwnShared - (const Handle(IGESDefs_TabularData)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESDefs_ToolTabularData::OwnCopy - (const Handle(IGESDefs_TabularData)& another, - const Handle(IGESDefs_TabularData)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer nbProps = another->NbPropertyValues(); - Standard_Integer propType = another->PropertyType(); - Standard_Integer nbDeps = another->NbDependents(); - Standard_Integer nbIndeps = another->NbIndependents(); - Handle(TColStd_HArray1OfInteger) typesInd = new - TColStd_HArray1OfInteger(1, nbIndeps); - Handle(TColStd_HArray1OfInteger) nbValuesInd = new - TColStd_HArray1OfInteger(1, nbIndeps); - Handle(IGESBasic_HArray1OfHArray1OfReal) valuesInd = new - IGESBasic_HArray1OfHArray1OfReal(1, nbIndeps); - Handle(IGESBasic_HArray1OfHArray1OfReal) valuesDep = new - IGESBasic_HArray1OfHArray1OfReal(1, nbDeps); - Standard_Integer i; - for (i=1; i<=nbIndeps; i++) - { - Standard_Integer j, nval; - typesInd->SetValue(i, another->TypeOfIndependents(i)); - nval = another->NbValues(i); - nbValuesInd->SetValue(i, nval); - Handle(TColStd_HArray1OfReal) tmparr = new - TColStd_HArray1OfReal(1, nval); - for (j=1; j<=nval; j++) - tmparr->SetValue(j, another->IndependentValue(i, j)); - valuesInd->SetValue(i, tmparr); - } - // UNFINISHED - /* - for (i=1; i<=nbDeps; i++) - { - } - */ - ent->Init(nbProps, propType, typesInd, nbValuesInd, - valuesInd, valuesDep); -} - IGESData_DirChecker IGESDefs_ToolTabularData::DirChecker (const Handle(IGESDefs_TabularData)& /* ent */ ) const { @@ -215,12 +168,6 @@ IGESData_DirChecker IGESDefs_ToolTabularData::DirChecker return DC; } -void IGESDefs_ToolTabularData::OwnCheck - (const Handle(IGESDefs_TabularData)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESDefs_ToolTabularData::OwnDump (const Handle(IGESDefs_TabularData)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDefs/IGESDefs_ToolTabularData.hxx b/src/IGESDefs/IGESDefs_ToolTabularData.hxx index 5b156e2706..e511e2cee8 100644 --- a/src/IGESDefs/IGESDefs_ToolTabularData.hxx +++ b/src/IGESDefs/IGESDefs_ToolTabularData.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDefs_ToolTabularData { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolTabularData, ready to work - Standard_EXPORT IGESDefs_ToolTabularData(); + IGESDefs_ToolTabularData() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDefs_TabularData)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a TabularData , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDefs_TabularData)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDefs_TabularData)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDefs_TabularData)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDefs_TabularData)& entfrom, const Handle(IGESDefs_TabularData)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDefs_TabularData)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDefs_ToolTabularData_HeaderFile diff --git a/src/IGESDefs/IGESDefs_ToolUnitsData.cxx b/src/IGESDefs/IGESDefs_ToolUnitsData.cxx index 70ee924f77..d619fe3832 100644 --- a/src/IGESDefs/IGESDefs_ToolUnitsData.cxx +++ b/src/IGESDefs/IGESDefs_ToolUnitsData.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -36,8 +35,6 @@ #include #include -IGESDefs_ToolUnitsData::IGESDefs_ToolUnitsData () { } - void IGESDefs_ToolUnitsData::ReadOwnParams (const Handle(IGESDefs_UnitsData)& ent, @@ -97,39 +94,6 @@ void IGESDefs_ToolUnitsData::WriteOwnParams } } -void IGESDefs_ToolUnitsData::OwnShared - (const Handle(IGESDefs_UnitsData)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESDefs_ToolUnitsData::OwnCopy - (const Handle(IGESDefs_UnitsData)& another, - const Handle(IGESDefs_UnitsData)& ent, Interface_CopyTool& /* TC */) const -{ - Handle(Interface_HArray1OfHAsciiString) unitTypes; - Handle(Interface_HArray1OfHAsciiString) unitValues; - Handle(TColStd_HArray1OfReal) unitScales; - - Standard_Integer nbval = another->NbUnits(); - - unitTypes = new Interface_HArray1OfHAsciiString(1, nbval); - unitValues = new Interface_HArray1OfHAsciiString(1, nbval); - unitScales = new TColStd_HArray1OfReal(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - Handle(TCollection_HAsciiString) unitType = - new TCollection_HAsciiString(another->UnitType(i)); - unitTypes->SetValue(i, unitType); - Handle(TCollection_HAsciiString) unitValue = - new TCollection_HAsciiString(another->UnitValue(i)); - unitValues->SetValue(i, unitValue); - Standard_Real unitScale = another->ScaleFactor(i); - unitScales->SetValue(i, unitScale); - } - ent->Init(unitTypes, unitValues, unitScales); -} - IGESData_DirChecker IGESDefs_ToolUnitsData::DirChecker (const Handle(IGESDefs_UnitsData)& /* ent */ ) const { @@ -145,12 +109,6 @@ IGESData_DirChecker IGESDefs_ToolUnitsData::DirChecker return DC; } -void IGESDefs_ToolUnitsData::OwnCheck - (const Handle(IGESDefs_UnitsData)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESDefs_ToolUnitsData::OwnDump (const Handle(IGESDefs_UnitsData)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDefs/IGESDefs_ToolUnitsData.hxx b/src/IGESDefs/IGESDefs_ToolUnitsData.hxx index ea5a62992d..a9dd157bc8 100644 --- a/src/IGESDefs/IGESDefs_ToolUnitsData.hxx +++ b/src/IGESDefs/IGESDefs_ToolUnitsData.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDefs_ToolUnitsData { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolUnitsData, ready to work - Standard_EXPORT IGESDefs_ToolUnitsData(); + IGESDefs_ToolUnitsData() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDefs_UnitsData)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a UnitsData , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDefs_UnitsData)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDefs_UnitsData)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDefs_UnitsData)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDefs_UnitsData)& entfrom, const Handle(IGESDefs_UnitsData)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDefs_UnitsData)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDefs_ToolUnitsData_HeaderFile diff --git a/src/IGESDimen/IGESDimen.cxx b/src/IGESDimen/IGESDimen.cxx index 5227c96910..39109099e3 100644 --- a/src/IGESDimen/IGESDimen.cxx +++ b/src/IGESDimen/IGESDimen.cxx @@ -24,15 +24,17 @@ #include #include -// Ancillary data to work on a Package of IGES Entities with a Protocol -// (Modules are created and loaded in appropriate libraries, once by Init) -static Handle(IGESDimen_Protocol) protocol; - - void IGESDimen::Init () +/*void IGESDimen::Init () { IGESGeom::Init(); IGESGraph::Init(); + IGESDimen::Protocol(); +}*/ + +const Handle(IGESDimen_Protocol) & IGESDimen::Protocol () +{ + static Handle(IGESDimen_Protocol) protocol; if (protocol.IsNull()) { protocol = new IGESDimen_Protocol; Interface_GeneralLib::SetGlobal (new IGESDimen_GeneralModule, protocol); @@ -40,9 +42,5 @@ static Handle(IGESDimen_Protocol) protocol; IGESData_WriterLib::SetGlobal (new IGESDimen_ReadWriteModule,protocol); IGESData_SpecificLib::SetGlobal (new IGESDimen_SpecificModule, protocol); } -} - - Handle(IGESDimen_Protocol) IGESDimen::Protocol () -{ return protocol; } diff --git a/src/IGESDimen/IGESDimen.hxx b/src/IGESDimen/IGESDimen.hxx index e53069100a..b3fa53b866 100644 --- a/src/IGESDimen/IGESDimen.hxx +++ b/src/IGESDimen/IGESDimen.hxx @@ -18,60 +18,9 @@ #define _IGESDimen_HeaderFile #include -#include #include class IGESDimen_Protocol; -class IGESDimen_CenterLine; -class IGESDimen_Section; -class IGESDimen_WitnessLine; -class IGESDimen_AngularDimension; -class IGESDimen_CurveDimension; -class IGESDimen_DiameterDimension; -class IGESDimen_FlagNote; -class IGESDimen_GeneralLabel; -class IGESDimen_GeneralNote; -class IGESDimen_NewGeneralNote; -class IGESDimen_LeaderArrow; -class IGESDimen_LinearDimension; -class IGESDimen_OrdinateDimension; -class IGESDimen_PointDimension; -class IGESDimen_RadiusDimension; -class IGESDimen_GeneralSymbol; -class IGESDimen_SectionedArea; -class IGESDimen_DimensionedGeometry; -class IGESDimen_NewDimensionedGeometry; -class IGESDimen_DimensionUnits; -class IGESDimen_DimensionTolerance; -class IGESDimen_DimensionDisplayData; -class IGESDimen_BasicDimension; -class IGESDimen_ToolCenterLine; -class IGESDimen_ToolSection; -class IGESDimen_ToolWitnessLine; -class IGESDimen_ToolAngularDimension; -class IGESDimen_ToolCurveDimension; -class IGESDimen_ToolDiameterDimension; -class IGESDimen_ToolFlagNote; -class IGESDimen_ToolGeneralLabel; -class IGESDimen_ToolGeneralNote; -class IGESDimen_ToolNewGeneralNote; -class IGESDimen_ToolLeaderArrow; -class IGESDimen_ToolLinearDimension; -class IGESDimen_ToolOrdinateDimension; -class IGESDimen_ToolPointDimension; -class IGESDimen_ToolRadiusDimension; -class IGESDimen_ToolGeneralSymbol; -class IGESDimen_ToolSectionedArea; -class IGESDimen_ToolDimensionedGeometry; -class IGESDimen_ToolNewDimensionedGeometry; -class IGESDimen_ToolDimensionUnits; -class IGESDimen_ToolDimensionTolerance; -class IGESDimen_ToolDimensionDisplayData; -class IGESDimen_ToolBasicDimension; -class IGESDimen_Protocol; -class IGESDimen_ReadWriteModule; -class IGESDimen_GeneralModule; -class IGESDimen_SpecificModule; //! This package represents Entities applied to Dimensions @@ -79,88 +28,13 @@ class IGESDimen_SpecificModule; //! Associativities. class IGESDimen { -public: - - DEFINE_STANDARD_ALLOC + public: - //! Prepares dynamic data (Protocol, Modules) for this package - Standard_EXPORT static void Init(); + //Standard_EXPORT static void Init(); //! Returns the Protocol for this Package - Standard_EXPORT static Handle(IGESDimen_Protocol) Protocol(); - - - - -protected: - - - - - -private: - - - - -friend class IGESDimen_CenterLine; -friend class IGESDimen_Section; -friend class IGESDimen_WitnessLine; -friend class IGESDimen_AngularDimension; -friend class IGESDimen_CurveDimension; -friend class IGESDimen_DiameterDimension; -friend class IGESDimen_FlagNote; -friend class IGESDimen_GeneralLabel; -friend class IGESDimen_GeneralNote; -friend class IGESDimen_NewGeneralNote; -friend class IGESDimen_LeaderArrow; -friend class IGESDimen_LinearDimension; -friend class IGESDimen_OrdinateDimension; -friend class IGESDimen_PointDimension; -friend class IGESDimen_RadiusDimension; -friend class IGESDimen_GeneralSymbol; -friend class IGESDimen_SectionedArea; -friend class IGESDimen_DimensionedGeometry; -friend class IGESDimen_NewDimensionedGeometry; -friend class IGESDimen_DimensionUnits; -friend class IGESDimen_DimensionTolerance; -friend class IGESDimen_DimensionDisplayData; -friend class IGESDimen_BasicDimension; -friend class IGESDimen_ToolCenterLine; -friend class IGESDimen_ToolSection; -friend class IGESDimen_ToolWitnessLine; -friend class IGESDimen_ToolAngularDimension; -friend class IGESDimen_ToolCurveDimension; -friend class IGESDimen_ToolDiameterDimension; -friend class IGESDimen_ToolFlagNote; -friend class IGESDimen_ToolGeneralLabel; -friend class IGESDimen_ToolGeneralNote; -friend class IGESDimen_ToolNewGeneralNote; -friend class IGESDimen_ToolLeaderArrow; -friend class IGESDimen_ToolLinearDimension; -friend class IGESDimen_ToolOrdinateDimension; -friend class IGESDimen_ToolPointDimension; -friend class IGESDimen_ToolRadiusDimension; -friend class IGESDimen_ToolGeneralSymbol; -friend class IGESDimen_ToolSectionedArea; -friend class IGESDimen_ToolDimensionedGeometry; -friend class IGESDimen_ToolNewDimensionedGeometry; -friend class IGESDimen_ToolDimensionUnits; -friend class IGESDimen_ToolDimensionTolerance; -friend class IGESDimen_ToolDimensionDisplayData; -friend class IGESDimen_ToolBasicDimension; -friend class IGESDimen_Protocol; -friend class IGESDimen_ReadWriteModule; -friend class IGESDimen_GeneralModule; -friend class IGESDimen_SpecificModule; - + Standard_EXPORT static const Handle(IGESDimen_Protocol) & Protocol(); }; - - - - - - #endif // _IGESDimen_HeaderFile diff --git a/src/IGESDimen/IGESDimen_GeneralModule.cxx b/src/IGESDimen/IGESDimen_GeneralModule.cxx index 493c9f9c06..a796c9e397 100644 --- a/src/IGESDimen/IGESDimen_GeneralModule.cxx +++ b/src/IGESDimen/IGESDimen_GeneralModule.cxx @@ -63,20 +63,12 @@ #include #include #include -#include #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESDimen_GeneralModule,IGESData_GeneralModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } - void IGESDimen_GeneralModule::OwnSharedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, @@ -90,20 +82,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 2 : { - DeclareAndCast(IGESDimen_BasicDimension,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolBasicDimension tool; - tool.OwnShared(anent,iter); - } - break; - case 3 : { - DeclareAndCast(IGESDimen_CenterLine,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolCenterLine tool; - tool.OwnShared(anent,iter); - } - break; case 4 : { DeclareAndCast(IGESDimen_CurveDimension,anent,ent); if (anent.IsNull()) return; @@ -118,27 +96,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 6 : { - DeclareAndCast(IGESDimen_DimensionDisplayData,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolDimensionDisplayData tool; - tool.OwnShared(anent,iter); - } - break; - case 7 : { - DeclareAndCast(IGESDimen_DimensionTolerance,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolDimensionTolerance tool; - tool.OwnShared(anent,iter); - } - break; - case 8 : { - DeclareAndCast(IGESDimen_DimensionUnits,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolDimensionUnits tool; - tool.OwnShared(anent,iter); - } - break; case 9 : { DeclareAndCast(IGESDimen_DimensionedGeometry,anent,ent); if (anent.IsNull()) return; @@ -174,13 +131,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 14 : { - DeclareAndCast(IGESDimen_LeaderArrow,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolLeaderArrow tool; - tool.OwnShared(anent,iter); - } - break; case 15 : { DeclareAndCast(IGESDimen_LinearDimension,anent,ent); if (anent.IsNull()) return; @@ -223,13 +173,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 21 : { - DeclareAndCast(IGESDimen_Section,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolSection tool; - tool.OwnShared(anent,iter); - } - break; case 22 : { DeclareAndCast(IGESDimen_SectionedArea,anent,ent); if (anent.IsNull()) return; @@ -237,13 +180,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 23 : { - DeclareAndCast(IGESDimen_WitnessLine,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolWitnessLine tool; - tool.OwnShared(anent,iter); - } - break; default : break; } } @@ -402,13 +338,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const { switch (CN) { - case 1 : { - DeclareAndCast(IGESDimen_AngularDimension,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolAngularDimension tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 2 : { DeclareAndCast(IGESDimen_BasicDimension,anent,ent); if (anent.IsNull()) return; @@ -430,13 +359,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 5 : { - DeclareAndCast(IGESDimen_DiameterDimension,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolDiameterDimension tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 6 : { DeclareAndCast(IGESDimen_DimensionDisplayData,anent,ent); if (anent.IsNull()) return; @@ -465,13 +387,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 10 : { - DeclareAndCast(IGESDimen_FlagNote,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolFlagNote tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 11 : { DeclareAndCast(IGESDimen_GeneralLabel,anent,ent); if (anent.IsNull()) return; @@ -493,20 +408,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 14 : { - DeclareAndCast(IGESDimen_LeaderArrow,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolLeaderArrow tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 15 : { - DeclareAndCast(IGESDimen_LinearDimension,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolLinearDimension tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 16 : { DeclareAndCast(IGESDimen_NewDimensionedGeometry,anent,ent); if (anent.IsNull()) return; @@ -528,13 +429,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 19 : { - DeclareAndCast(IGESDimen_PointDimension,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolPointDimension tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 20 : { DeclareAndCast(IGESDimen_RadiusDimension,anent,ent); if (anent.IsNull()) return; @@ -549,13 +443,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 22 : { - DeclareAndCast(IGESDimen_SectionedArea,anent,ent); - if (anent.IsNull()) return; - IGESDimen_ToolSectionedArea tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 23 : { DeclareAndCast(IGESDimen_WitnessLine,anent,ent); if (anent.IsNull()) return; @@ -601,177 +488,6 @@ IGESDimen_GeneralModule::IGESDimen_GeneralModule () { } } - void IGESDimen_GeneralModule::OwnCopyCase - (const Standard_Integer CN, - const Handle(IGESData_IGESEntity)& entfrom, - const Handle(IGESData_IGESEntity)& entto, - Interface_CopyTool& TC) const -{ - switch (CN) { - case 1 : { - DeclareAndCast(IGESDimen_AngularDimension,enfr,entfrom); - DeclareAndCast(IGESDimen_AngularDimension,ento,entto); - IGESDimen_ToolAngularDimension tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 2 : { - DeclareAndCast(IGESDimen_BasicDimension,enfr,entfrom); - DeclareAndCast(IGESDimen_BasicDimension,ento,entto); - IGESDimen_ToolBasicDimension tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 3 : { - DeclareAndCast(IGESDimen_CenterLine,enfr,entfrom); - DeclareAndCast(IGESDimen_CenterLine,ento,entto); - IGESDimen_ToolCenterLine tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 4 : { - DeclareAndCast(IGESDimen_CurveDimension,enfr,entfrom); - DeclareAndCast(IGESDimen_CurveDimension,ento,entto); - IGESDimen_ToolCurveDimension tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 5 : { - DeclareAndCast(IGESDimen_DiameterDimension,enfr,entfrom); - DeclareAndCast(IGESDimen_DiameterDimension,ento,entto); - IGESDimen_ToolDiameterDimension tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 6 : { - DeclareAndCast(IGESDimen_DimensionDisplayData,enfr,entfrom); - DeclareAndCast(IGESDimen_DimensionDisplayData,ento,entto); - IGESDimen_ToolDimensionDisplayData tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 7 : { - DeclareAndCast(IGESDimen_DimensionTolerance,enfr,entfrom); - DeclareAndCast(IGESDimen_DimensionTolerance,ento,entto); - IGESDimen_ToolDimensionTolerance tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 8 : { - DeclareAndCast(IGESDimen_DimensionUnits,enfr,entfrom); - DeclareAndCast(IGESDimen_DimensionUnits,ento,entto); - IGESDimen_ToolDimensionUnits tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 9 : { - DeclareAndCast(IGESDimen_DimensionedGeometry,enfr,entfrom); - DeclareAndCast(IGESDimen_DimensionedGeometry,ento,entto); - IGESDimen_ToolDimensionedGeometry tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 10 : { - DeclareAndCast(IGESDimen_FlagNote,enfr,entfrom); - DeclareAndCast(IGESDimen_FlagNote,ento,entto); - IGESDimen_ToolFlagNote tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 11 : { - DeclareAndCast(IGESDimen_GeneralLabel,enfr,entfrom); - DeclareAndCast(IGESDimen_GeneralLabel,ento,entto); - IGESDimen_ToolGeneralLabel tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 12 : { - DeclareAndCast(IGESDimen_GeneralNote,enfr,entfrom); - DeclareAndCast(IGESDimen_GeneralNote,ento,entto); - IGESDimen_ToolGeneralNote tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 13 : { - DeclareAndCast(IGESDimen_GeneralSymbol,enfr,entfrom); - DeclareAndCast(IGESDimen_GeneralSymbol,ento,entto); - IGESDimen_ToolGeneralSymbol tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 14 : { - DeclareAndCast(IGESDimen_LeaderArrow,enfr,entfrom); - DeclareAndCast(IGESDimen_LeaderArrow,ento,entto); - IGESDimen_ToolLeaderArrow tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 15 : { - DeclareAndCast(IGESDimen_LinearDimension,enfr,entfrom); - DeclareAndCast(IGESDimen_LinearDimension,ento,entto); - IGESDimen_ToolLinearDimension tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 16 : { - DeclareAndCast(IGESDimen_NewDimensionedGeometry,enfr,entfrom); - DeclareAndCast(IGESDimen_NewDimensionedGeometry,ento,entto); - IGESDimen_ToolNewDimensionedGeometry tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 17 : { - DeclareAndCast(IGESDimen_NewGeneralNote,enfr,entfrom); - DeclareAndCast(IGESDimen_NewGeneralNote,ento,entto); - IGESDimen_ToolNewGeneralNote tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 18 : { - DeclareAndCast(IGESDimen_OrdinateDimension,enfr,entfrom); - DeclareAndCast(IGESDimen_OrdinateDimension,ento,entto); - IGESDimen_ToolOrdinateDimension tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 19 : { - DeclareAndCast(IGESDimen_PointDimension,enfr,entfrom); - DeclareAndCast(IGESDimen_PointDimension,ento,entto); - IGESDimen_ToolPointDimension tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 20 : { - DeclareAndCast(IGESDimen_RadiusDimension,enfr,entfrom); - DeclareAndCast(IGESDimen_RadiusDimension,ento,entto); - IGESDimen_ToolRadiusDimension tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 21 : { - DeclareAndCast(IGESDimen_Section,enfr,entfrom); - DeclareAndCast(IGESDimen_Section,ento,entto); - IGESDimen_ToolSection tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 22 : { - DeclareAndCast(IGESDimen_SectionedArea,enfr,entfrom); - DeclareAndCast(IGESDimen_SectionedArea,ento,entto); - IGESDimen_ToolSectionedArea tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 23 : { - DeclareAndCast(IGESDimen_WitnessLine,enfr,entfrom); - DeclareAndCast(IGESDimen_WitnessLine,ento,entto); - IGESDimen_ToolWitnessLine tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - default : break; - } -} Standard_Integer IGESDimen_GeneralModule::CategoryNumber diff --git a/src/IGESDimen/IGESDimen_GeneralModule.hxx b/src/IGESDimen/IGESDimen_GeneralModule.hxx index 389c749b6e..f4f1e8277b 100644 --- a/src/IGESDimen/IGESDimen_GeneralModule.hxx +++ b/src/IGESDimen/IGESDimen_GeneralModule.hxx @@ -17,19 +17,7 @@ #ifndef _IGESDimen_GeneralModule_HeaderFile #define _IGESDimen_GeneralModule_HeaderFile -#include -#include - #include -#include -#include -class IGESData_IGESEntity; -class Interface_EntityIterator; -class IGESData_DirChecker; -class Interface_ShareTool; -class Interface_Check; -class Standard_Transient; -class Interface_CopyTool; class IGESDimen_GeneralModule; @@ -39,12 +27,10 @@ DEFINE_STANDARD_HANDLE(IGESDimen_GeneralModule, IGESData_GeneralModule) //! This Services comprise : Shared & Implied Lists, Copy, Check class IGESDimen_GeneralModule : public IGESData_GeneralModule { + public: -public: - - //! Creates a GeneralModule from IGESDimen and puts it into GeneralLib - Standard_EXPORT IGESDimen_GeneralModule(); + IGESDimen_GeneralModule() {} //! Lists the Entities shared by a given IGESEntity , from //! its specific parameters : specific for each type @@ -61,34 +47,11 @@ public: //! Specific creation of a new void entity Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const Standard_OVERRIDE; - //! Copies parameters which are specific of each Type of Entity - Standard_EXPORT void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - //! Returns a category number which characterizes an entity //! Drawing for all Standard_EXPORT virtual Standard_Integer CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESDimen_GeneralModule,IGESData_GeneralModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESDimen_GeneralModule_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolAngularDimension.cxx b/src/IGESDimen/IGESDimen_ToolAngularDimension.cxx index be3a30a880..906b11394f 100644 --- a/src/IGESDimen/IGESDimen_ToolAngularDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolAngularDimension.cxx @@ -31,15 +31,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolAngularDimension::IGESDimen_ToolAngularDimension () { } - void IGESDimen_ToolAngularDimension::ReadOwnParams (const Handle(IGESDimen_AngularDimension)& ent, @@ -103,27 +100,6 @@ void IGESDimen_ToolAngularDimension::OwnShared iter.GetOneItem(ent->SecondLeader()); } -void IGESDimen_ToolAngularDimension::OwnCopy - (const Handle(IGESDimen_AngularDimension)& another, - const Handle(IGESDimen_AngularDimension)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESDimen_GeneralNote, note, - TC.Transferred(another->Note())); - DeclareAndCast(IGESDimen_WitnessLine, firstWitness, - TC.Transferred(another->FirstWitnessLine())); - DeclareAndCast(IGESDimen_WitnessLine, secondWitness, - TC.Transferred(another->SecondWitnessLine())); - gp_XY vertex = (another->Vertex()).XY(); - Standard_Real radius = another->Radius(); - DeclareAndCast(IGESDimen_LeaderArrow, firstLeader, - TC.Transferred(another->FirstLeader())); - DeclareAndCast(IGESDimen_LeaderArrow, secondLeader, - TC.Transferred(another->SecondLeader())); - - ent->Init(note, firstWitness, secondWitness, vertex, radius, - firstLeader, secondLeader); -} - IGESData_DirChecker IGESDimen_ToolAngularDimension::DirChecker (const Handle(IGESDimen_AngularDimension)& /* ent */ ) const { @@ -136,11 +112,6 @@ IGESData_DirChecker IGESDimen_ToolAngularDimension::DirChecker return DC; } -void IGESDimen_ToolAngularDimension::OwnCheck - (const Handle(IGESDimen_AngularDimension)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ } - void IGESDimen_ToolAngularDimension::OwnDump (const Handle(IGESDimen_AngularDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDimen/IGESDimen_ToolAngularDimension.hxx b/src/IGESDimen/IGESDimen_ToolAngularDimension.hxx index 3894a253e9..bd61976fa4 100644 --- a/src/IGESDimen/IGESDimen_ToolAngularDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolAngularDimension.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolAngularDimension { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolAngularDimension, ready to work - Standard_EXPORT IGESDimen_ToolAngularDimension(); + IGESDimen_ToolAngularDimension() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDimen_AngularDimension)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDimen_AngularDimension)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_AngularDimension)& entfrom, const Handle(IGESDimen_AngularDimension)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_AngularDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolAngularDimension_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolBasicDimension.cxx b/src/IGESDimen/IGESDimen_ToolBasicDimension.cxx index b68411309e..a6188a31c0 100644 --- a/src/IGESDimen/IGESDimen_ToolBasicDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolBasicDimension.cxx @@ -28,14 +28,11 @@ #include #include #include -#include #include #include #include #include -IGESDimen_ToolBasicDimension::IGESDimen_ToolBasicDimension () { } - void IGESDimen_ToolBasicDimension::ReadOwnParams (const Handle(IGESDimen_BasicDimension)& ent, @@ -72,20 +69,6 @@ void IGESDimen_ToolBasicDimension::WriteOwnParams IW.Send(ent->UpperLeft().Y()); } -void IGESDimen_ToolBasicDimension::OwnShared - (const Handle(IGESDimen_BasicDimension)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESDimen_ToolBasicDimension::OwnCopy - (const Handle(IGESDimen_BasicDimension)& another, - const Handle(IGESDimen_BasicDimension)& ent, Interface_CopyTool& /* TC */) const -{ - ent->Init - (8,another->LowerLeft().XY(),another->LowerRight().XY(), - another->UpperRight().XY(),another->UpperLeft().XY()); -} - Standard_Boolean IGESDimen_ToolBasicDimension::OwnCorrect (const Handle(IGESDimen_BasicDimension)& ent) const { diff --git a/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx b/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx index a7ea6531cc..730224f8eb 100644 --- a/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolBasicDimension.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolBasicDimension { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolBasicDimension, ready to work - Standard_EXPORT IGESDimen_ToolBasicDimension(); + IGESDimen_ToolBasicDimension() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDimen_BasicDimension)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a BasicDimension , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDimen_BasicDimension)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a BasicDimension //! (NbPropertyValues forced to 8) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESDimen_BasicDimension)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_BasicDimension)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_BasicDimension)& entfrom, const Handle(IGESDimen_BasicDimension)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_BasicDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolBasicDimension_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolCenterLine.cxx b/src/IGESDimen/IGESDimen_ToolCenterLine.cxx index 8741ecff3a..88af0f39bf 100644 --- a/src/IGESDimen/IGESDimen_ToolCenterLine.cxx +++ b/src/IGESDimen/IGESDimen_ToolCenterLine.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -37,8 +36,6 @@ #include #include -IGESDimen_ToolCenterLine::IGESDimen_ToolCenterLine () { } - void IGESDimen_ToolCenterLine::ReadOwnParams (const Handle(IGESDimen_CenterLine)& ent, @@ -86,31 +83,6 @@ void IGESDimen_ToolCenterLine::WriteOwnParams } } -void IGESDimen_ToolCenterLine::OwnShared - (const Handle(IGESDimen_CenterLine)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESDimen_ToolCenterLine::OwnCopy - (const Handle(IGESDimen_CenterLine)& another, - const Handle(IGESDimen_CenterLine)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer datatype = another->Datatype(); - Standard_Integer nbval = another->NbPoints(); - Standard_Real zDisplacement = another->ZDisplacement(); - - Handle(TColgp_HArray1OfXY) dataPoints = new TColgp_HArray1OfXY(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - gp_Pnt tempPnt = (another->Point(i)); - gp_XY tempPnt2d(tempPnt.X(), tempPnt.Y()); - dataPoints->SetValue(i, tempPnt2d); - } - ent->Init(datatype, zDisplacement, dataPoints); - ent->SetCrossHair (another->IsCrossHair()); -} - Standard_Boolean IGESDimen_ToolCenterLine::OwnCorrect (const Handle(IGESDimen_CenterLine)& ent) const { diff --git a/src/IGESDimen/IGESDimen_ToolCenterLine.hxx b/src/IGESDimen/IGESDimen_ToolCenterLine.hxx index 7211c31004..0003540d44 100644 --- a/src/IGESDimen/IGESDimen_ToolCenterLine.hxx +++ b/src/IGESDimen/IGESDimen_ToolCenterLine.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolCenterLine { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolCenterLine, ready to work - Standard_EXPORT IGESDimen_ToolCenterLine(); + IGESDimen_ToolCenterLine() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDimen_CenterLine)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a CenterLine , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDimen_CenterLine)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a CenterLine //! (LineFont forced to Rank = 1, DataType forced to 1) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESDimen_CenterLine)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_CenterLine)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_CenterLine)& entfrom, const Handle(IGESDimen_CenterLine)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_CenterLine)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolCenterLine_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolCurveDimension.cxx b/src/IGESDimen/IGESDimen_ToolCurveDimension.cxx index ec285b584a..097f6fb57e 100644 --- a/src/IGESDimen/IGESDimen_ToolCurveDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolCurveDimension.cxx @@ -30,15 +30,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolCurveDimension::IGESDimen_ToolCurveDimension () { } - void IGESDimen_ToolCurveDimension::ReadOwnParams (const Handle(IGESDimen_CurveDimension)& ent, @@ -104,29 +101,6 @@ void IGESDimen_ToolCurveDimension::OwnShared iter.GetOneItem(ent->SecondWitnessLine()); } -void IGESDimen_ToolCurveDimension::OwnCopy - (const Handle(IGESDimen_CurveDimension)& another, - const Handle(IGESDimen_CurveDimension)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESDimen_GeneralNote, note, - TC.Transferred(another->Note())); - DeclareAndCast(IGESData_IGESEntity, firstCurve, - TC.Transferred(another->FirstCurve())); - DeclareAndCast(IGESData_IGESEntity, secondCurve, - TC.Transferred(another->SecondCurve())); - DeclareAndCast(IGESDimen_LeaderArrow, firstLeader, - TC.Transferred(another->FirstLeader())); - DeclareAndCast(IGESDimen_LeaderArrow, secondLeader, - TC.Transferred(another->SecondLeader())); - DeclareAndCast(IGESDimen_WitnessLine, firstWitness, - TC.Transferred(another->FirstWitnessLine())); - DeclareAndCast(IGESDimen_WitnessLine, secondWitness, - TC.Transferred(another->SecondWitnessLine())); - - ent->Init(note, firstCurve, secondCurve, firstLeader, secondLeader, - firstWitness, secondWitness); -} - IGESData_DirChecker IGESDimen_ToolCurveDimension::DirChecker (const Handle(IGESDimen_CurveDimension)& /*ent*/) const { diff --git a/src/IGESDimen/IGESDimen_ToolCurveDimension.hxx b/src/IGESDimen/IGESDimen_ToolCurveDimension.hxx index 66a9d1b530..bb7e753209 100644 --- a/src/IGESDimen/IGESDimen_ToolCurveDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolCurveDimension.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolCurveDimension { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolCurveDimension, ready to work - Standard_EXPORT IGESDimen_ToolCurveDimension(); + IGESDimen_ToolCurveDimension() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_CurveDimension)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_CurveDimension)& entfrom, const Handle(IGESDimen_CurveDimension)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_CurveDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolCurveDimension_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolDiameterDimension.cxx b/src/IGESDimen/IGESDimen_ToolDiameterDimension.cxx index 7d9e4c1b7b..640b534d3f 100644 --- a/src/IGESDimen/IGESDimen_ToolDiameterDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolDiameterDimension.cxx @@ -30,22 +30,17 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolDiameterDimension::IGESDimen_ToolDiameterDimension () { } - void IGESDimen_ToolDiameterDimension::ReadOwnParams (const Handle(IGESDimen_DiameterDimension)& ent, const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const { - //Standard_Boolean st; //szv#4:S4163:12Mar99 not needed - Handle(IGESDimen_GeneralNote) note; Handle(IGESDimen_LeaderArrow) firstLeader; Handle(IGESDimen_LeaderArrow) secondLeader; @@ -84,21 +79,6 @@ void IGESDimen_ToolDiameterDimension::OwnShared iter.GetOneItem(ent->SecondLeader()); } -void IGESDimen_ToolDiameterDimension::OwnCopy - (const Handle(IGESDimen_DiameterDimension)& another, - const Handle(IGESDimen_DiameterDimension)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESDimen_GeneralNote, note, - TC.Transferred(another->Note())); - DeclareAndCast(IGESDimen_LeaderArrow, firstLeader, - TC.Transferred(another->FirstLeader())); - DeclareAndCast(IGESDimen_LeaderArrow, secondLeader, - TC.Transferred(another->SecondLeader())); - gp_XY center = (another->Center()).XY(); - - ent->Init(note, firstLeader, secondLeader, center); -} - IGESData_DirChecker IGESDimen_ToolDiameterDimension::DirChecker (const Handle(IGESDimen_DiameterDimension)& /* ent */) const { @@ -111,12 +91,6 @@ IGESData_DirChecker IGESDimen_ToolDiameterDimension::DirChecker return DC; } -void IGESDimen_ToolDiameterDimension::OwnCheck - (const Handle(IGESDimen_DiameterDimension)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESDimen_ToolDiameterDimension::OwnDump (const Handle(IGESDimen_DiameterDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDimen/IGESDimen_ToolDiameterDimension.hxx b/src/IGESDimen/IGESDimen_ToolDiameterDimension.hxx index 14489ee319..963db125ba 100644 --- a/src/IGESDimen/IGESDimen_ToolDiameterDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolDiameterDimension.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolDiameterDimension { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDiameterDimension, ready to work - Standard_EXPORT IGESDimen_ToolDiameterDimension(); + IGESDimen_ToolDiameterDimension() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDimen_DiameterDimension)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDimen_DiameterDimension)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_DiameterDimension)& entfrom, const Handle(IGESDimen_DiameterDimension)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_DiameterDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolDiameterDimension_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.cxx b/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.cxx index 9c0d46e240..a1b54266a6 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.cxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -35,8 +34,6 @@ #include #include -IGESDimen_ToolDimensionDisplayData::IGESDimen_ToolDimensionDisplayData () { } - void IGESDimen_ToolDimensionDisplayData::ReadOwnParams (const Handle(IGESDimen_DimensionDisplayData)& ent, @@ -147,51 +144,6 @@ const } } -void IGESDimen_ToolDimensionDisplayData::OwnShared - (const Handle(IGESDimen_DimensionDisplayData)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESDimen_ToolDimensionDisplayData::OwnCopy - (const Handle(IGESDimen_DimensionDisplayData)& another, - const Handle(IGESDimen_DimensionDisplayData)& ent, Interface_CopyTool& /* TC */) const -{ - Handle(TColStd_HArray1OfInteger) EndList; - Handle(TColStd_HArray1OfInteger) StartList; - Handle(TColStd_HArray1OfInteger) NotesList; - - Standard_Integer upper = another->NbSupplementaryNotes(); - if (upper > 0) - { - EndList = new TColStd_HArray1OfInteger(1,upper); - StartList = new TColStd_HArray1OfInteger(1,upper); - NotesList = new TColStd_HArray1OfInteger(1,upper); - for (Standard_Integer i = 1;i <= upper;i++) - { - EndList->SetValue(i,another->EndIndex(i)); - StartList->SetValue(i,another->StartIndex(i)); - NotesList->SetValue(i,another->SupplementaryNote(i)); - } - } - Standard_Integer tempNbPropertyValues = another->NbPropertyValues(); - Standard_Integer tempDimensionType = another->DimensionType(); - Standard_Integer tempLabelPos = another->LabelPosition(); - Standard_Integer tempCharSet = another->CharacterSet(); - Handle(TCollection_HAsciiString) tempLS = - new TCollection_HAsciiString(another->LString()); - Standard_Integer tempSymbol = another->DecimalSymbol(); - Standard_Real tempAngle = another->WitnessLineAngle(); - Standard_Integer tempAlign = another->TextAlignment(); - Standard_Integer tempLevel = another->TextLevel(); - Standard_Integer tempPlacement = another->TextPlacement(); - Standard_Integer tempArrowHead = another->ArrowHeadOrientation(); - Standard_Real tempInitial = another->InitialValue(); - - ent->Init(tempNbPropertyValues, tempDimensionType,tempLabelPos,tempCharSet, - tempLS,tempSymbol,tempAngle,tempAlign,tempLevel,tempPlacement, - tempArrowHead,tempInitial,NotesList,StartList,EndList); -} - Standard_Boolean IGESDimen_ToolDimensionDisplayData::OwnCorrect (const Handle(IGESDimen_DimensionDisplayData)& ent) const { diff --git a/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx b/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx index 4da8605a02..245065ac0d 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionDisplayData.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolDimensionDisplayData { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDimensionDisplayData, ready to work - Standard_EXPORT IGESDimen_ToolDimensionDisplayData(); + IGESDimen_ToolDimensionDisplayData() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDimen_DimensionDisplayData)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a DimensionDisplayData , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDimen_DimensionDisplayData)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a DimensionDisplayData //! (NbPropertyValues forced to 14) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESDimen_DimensionDisplayData)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_DimensionDisplayData)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_DimensionDisplayData)& entfrom, const Handle(IGESDimen_DimensionDisplayData)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_DimensionDisplayData)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolDimensionDisplayData_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolDimensionTolerance.cxx b/src/IGESDimen/IGESDimen_ToolDimensionTolerance.cxx index 24887e16ad..24a9499a40 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionTolerance.cxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionTolerance.cxx @@ -25,14 +25,11 @@ #include #include #include -#include #include #include #include #include -IGESDimen_ToolDimensionTolerance::IGESDimen_ToolDimensionTolerance () { } - void IGESDimen_ToolDimensionTolerance::ReadOwnParams (const Handle(IGESDimen_DimensionTolerance)& ent, @@ -90,23 +87,6 @@ void IGESDimen_ToolDimensionTolerance::WriteOwnParams IW.Send(ent->Precision()); } -void IGESDimen_ToolDimensionTolerance::OwnShared - (const Handle(IGESDimen_DimensionTolerance)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESDimen_ToolDimensionTolerance::OwnCopy - (const Handle(IGESDimen_DimensionTolerance)& another, - const Handle(IGESDimen_DimensionTolerance)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init - (8,another->SecondaryToleranceFlag(),another->ToleranceType(), - another->TolerancePlacementFlag(), - another->UpperTolerance(),another->LowerTolerance(), - (another->SignSuppressionFlag() ? 1 : 0), - another->FractionFlag(),another->Precision()); -} - Standard_Boolean IGESDimen_ToolDimensionTolerance::OwnCorrect (const Handle(IGESDimen_DimensionTolerance)& ent) const { diff --git a/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx b/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx index 32f0ffe889..9734f3291a 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionTolerance.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolDimensionTolerance { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDimensionTolerance, ready to work - Standard_EXPORT IGESDimen_ToolDimensionTolerance(); + IGESDimen_ToolDimensionTolerance() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDimen_DimensionTolerance)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a DimensionTolerance , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDimen_DimensionTolerance)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a DimensionTolerance //! (NbPropertyValues forced to 8) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESDimen_DimensionTolerance)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_DimensionTolerance)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_DimensionTolerance)& entfrom, const Handle(IGESDimen_DimensionTolerance)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_DimensionTolerance)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolDimensionTolerance_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolDimensionUnits.cxx b/src/IGESDimen/IGESDimen_ToolDimensionUnits.cxx index 13f2db3b0b..bdc0afc434 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionUnits.cxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionUnits.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESDimen_ToolDimensionUnits::IGESDimen_ToolDimensionUnits () { } - void IGESDimen_ToolDimensionUnits::ReadOwnParams (const Handle(IGESDimen_DimensionUnits)& ent, @@ -85,27 +82,6 @@ void IGESDimen_ToolDimensionUnits::WriteOwnParams IW.Send(ent->PrecisionOrDenominator()); } -void IGESDimen_ToolDimensionUnits::OwnShared - (const Handle(IGESDimen_DimensionUnits)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESDimen_ToolDimensionUnits::OwnCopy - (const Handle(IGESDimen_DimensionUnits)& another, - const Handle(IGESDimen_DimensionUnits)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer tempNbProps = another->NbPropertyValues(); - Standard_Integer tempSecondDimenPos = another->SecondaryDimenPosition(); - Standard_Integer tempUnitsIndic = another->UnitsIndicator(); - Standard_Integer tempCharSet = another->CharacterSet(); - Handle(TCollection_HAsciiString) tempFormatString = - new TCollection_HAsciiString(another->FormatString()); - Standard_Integer tempFracFlag = another->FractionFlag(); - Standard_Integer tempPrecision = another->PrecisionOrDenominator(); - ent->Init (tempNbProps, tempSecondDimenPos, tempUnitsIndic, tempCharSet, - tempFormatString, tempFracFlag, tempPrecision); -} - Standard_Boolean IGESDimen_ToolDimensionUnits::OwnCorrect (const Handle(IGESDimen_DimensionUnits)& ent) const { diff --git a/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx b/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx index 3ea10e7c5e..2af0abbf50 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionUnits.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolDimensionUnits { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDimensionUnits, ready to work - Standard_EXPORT IGESDimen_ToolDimensionUnits(); + IGESDimen_ToolDimensionUnits() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDimen_DimensionUnits)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a DimensionUnits , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDimen_DimensionUnits)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a DimensionUnits //! (NbPropertyValues forced to 6) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESDimen_DimensionUnits)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_DimensionUnits)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_DimensionUnits)& entfrom, const Handle(IGESDimen_DimensionUnits)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_DimensionUnits)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolDimensionUnits_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.cxx b/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.cxx index 70a0266e14..fd44edd537 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.cxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.cxx @@ -28,15 +28,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolDimensionedGeometry::IGESDimen_ToolDimensionedGeometry () { } - void IGESDimen_ToolDimensionedGeometry::ReadOwnParams (const Handle(IGESDimen_DimensionedGeometry)& ent, @@ -93,25 +90,6 @@ void IGESDimen_ToolDimensionedGeometry::OwnShared iter.GetOneItem(ent->GeometryEntity(i)); } -void IGESDimen_ToolDimensionedGeometry::OwnCopy - (const Handle(IGESDimen_DimensionedGeometry)& another, - const Handle(IGESDimen_DimensionedGeometry)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer nbDim = another->NbDimensions(); - DeclareAndCast(IGESData_IGESEntity,anentity, - TC.Transferred(another->DimensionEntity())); - Standard_Integer upper = another->NbGeometryEntities(); - Handle(IGESData_HArray1OfIGESEntity) EntArray = - new IGESData_HArray1OfIGESEntity(1,upper); - for (Standard_Integer i = 1;i <= upper; i ++) - { - DeclareAndCast(IGESData_IGESEntity,myentity, - TC.Transferred(another->GeometryEntity(i))); - EntArray->SetValue(i,myentity); - } - ent->Init(nbDim,anentity,EntArray); -} - Standard_Boolean IGESDimen_ToolDimensionedGeometry::OwnCorrect (const Handle(IGESDimen_DimensionedGeometry)& ent) const { diff --git a/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx b/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx index 5908793944..afe1a9f95b 100644 --- a/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx +++ b/src/IGESDimen/IGESDimen_ToolDimensionedGeometry.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolDimensionedGeometry { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDimensionedGeometry, ready to work - Standard_EXPORT IGESDimen_ToolDimensionedGeometry(); + IGESDimen_ToolDimensionedGeometry() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_DimensionedGeometry)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_DimensionedGeometry)& entfrom, const Handle(IGESDimen_DimensionedGeometry)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_DimensionedGeometry)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolDimensionedGeometry_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolFlagNote.cxx b/src/IGESDimen/IGESDimen_ToolFlagNote.cxx index 39fe4bdda5..aafddc2d56 100644 --- a/src/IGESDimen/IGESDimen_ToolFlagNote.cxx +++ b/src/IGESDimen/IGESDimen_ToolFlagNote.cxx @@ -30,22 +30,17 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolFlagNote::IGESDimen_ToolFlagNote () { } - void IGESDimen_ToolFlagNote::ReadOwnParams (const Handle(IGESDimen_FlagNote)& ent, const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const { - //Standard_Boolean st; //szv#4:S4163:12Mar99 moved down - gp_XYZ lowerLeft; Standard_Real angle; Handle(IGESDimen_GeneralNote) note; @@ -103,31 +98,6 @@ void IGESDimen_ToolFlagNote::OwnShared iter.GetOneItem(ent->Leader(i)); } -void IGESDimen_ToolFlagNote::OwnCopy - (const Handle(IGESDimen_FlagNote)& another, - const Handle(IGESDimen_FlagNote)& ent, Interface_CopyTool& TC) const -{ - gp_XYZ lowerLeft = (another->LowerLeftCorner()).XYZ(); - Standard_Real angle = another->Angle(); - DeclareAndCast(IGESDimen_GeneralNote, note, - TC.Transferred(another->Note())); - Standard_Integer nbval = another->NbLeaders(); - - Handle(IGESDimen_HArray1OfLeaderArrow) leaders; - - if ( nbval > 0 ) - { - leaders = new IGESDimen_HArray1OfLeaderArrow(1, nbval); - for (Standard_Integer i = 1; i <= nbval; i++) - { - DeclareAndCast(IGESDimen_LeaderArrow, new_ent, - TC.Transferred(another->Leader(i))); - leaders->SetValue(i, new_ent); - } - } - ent->Init(lowerLeft, angle, note, leaders); -} - IGESData_DirChecker IGESDimen_ToolFlagNote::DirChecker (const Handle(IGESDimen_FlagNote)& /* ent */ ) const { @@ -140,12 +110,6 @@ IGESData_DirChecker IGESDimen_ToolFlagNote::DirChecker return DC; } -void IGESDimen_ToolFlagNote::OwnCheck - (const Handle(IGESDimen_FlagNote)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESDimen_ToolFlagNote::OwnDump (const Handle(IGESDimen_FlagNote)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDimen/IGESDimen_ToolFlagNote.hxx b/src/IGESDimen/IGESDimen_ToolFlagNote.hxx index 1e9f41ec4b..beeef650d2 100644 --- a/src/IGESDimen/IGESDimen_ToolFlagNote.hxx +++ b/src/IGESDimen/IGESDimen_ToolFlagNote.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolFlagNote { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolFlagNote, ready to work - Standard_EXPORT IGESDimen_ToolFlagNote(); + IGESDimen_ToolFlagNote() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDimen_FlagNote)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDimen_FlagNote)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_FlagNote)& entfrom, const Handle(IGESDimen_FlagNote)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_FlagNote)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolFlagNote_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolGeneralLabel.cxx b/src/IGESDimen/IGESDimen_ToolGeneralLabel.cxx index a61b6078e4..7c580dd6f1 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralLabel.cxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralLabel.cxx @@ -29,15 +29,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolGeneralLabel::IGESDimen_ToolGeneralLabel () { } - void IGESDimen_ToolGeneralLabel::ReadOwnParams (const Handle(IGESDimen_GeneralLabel)& ent, @@ -90,25 +87,6 @@ void IGESDimen_ToolGeneralLabel::OwnShared iter.GetOneItem(ent->Leader(i)); } -void IGESDimen_ToolGeneralLabel::OwnCopy - (const Handle(IGESDimen_GeneralLabel)& another, - const Handle(IGESDimen_GeneralLabel)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESDimen_GeneralNote, note, - TC.Transferred(another->Note())); - Standard_Integer nbval = another->NbLeaders(); - - Handle(IGESDimen_HArray1OfLeaderArrow) leaders = - new IGESDimen_HArray1OfLeaderArrow(1, nbval); - for (Standard_Integer i = 1; i <= nbval; i++) - { - DeclareAndCast(IGESDimen_LeaderArrow, new_ent, - TC.Transferred(another->Leader(i))); - leaders->SetValue(i, new_ent); - } - ent->Init(note, leaders); -} - IGESData_DirChecker IGESDimen_ToolGeneralLabel::DirChecker (const Handle(IGESDimen_GeneralLabel)& /* ent */ ) const { diff --git a/src/IGESDimen/IGESDimen_ToolGeneralLabel.hxx b/src/IGESDimen/IGESDimen_ToolGeneralLabel.hxx index f841d074e2..a00ca33fdc 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralLabel.hxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralLabel.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolGeneralLabel { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolGeneralLabel, ready to work - Standard_EXPORT IGESDimen_ToolGeneralLabel(); + IGESDimen_ToolGeneralLabel() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_GeneralLabel)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_GeneralLabel)& entfrom, const Handle(IGESDimen_GeneralLabel)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_GeneralLabel)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolGeneralLabel_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolGeneralNote.cxx b/src/IGESDimen/IGESDimen_ToolGeneralNote.cxx index 08cf60d5a0..ebb4f8ac05 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralNote.cxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralNote.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -43,8 +42,6 @@ #include #include -IGESDimen_ToolGeneralNote::IGESDimen_ToolGeneralNote () { } - void IGESDimen_ToolGeneralNote::ReadOwnParams (const Handle(IGESDimen_GeneralNote)& ent, @@ -208,80 +205,6 @@ void IGESDimen_ToolGeneralNote::OwnShared } } -void IGESDimen_ToolGeneralNote::OwnCopy - (const Handle(IGESDimen_GeneralNote)& another, - const Handle(IGESDimen_GeneralNote)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer nbval = another->NbStrings(); - - Handle(TColStd_HArray1OfInteger) nbChars; - Handle(TColStd_HArray1OfReal) boxWidths; - Handle(TColStd_HArray1OfReal) boxHeights; - Handle(TColStd_HArray1OfInteger) fontCodes; - Handle(IGESGraph_HArray1OfTextFontDef) fontEntities; - Handle(TColStd_HArray1OfReal) slantAngles; - Handle(TColStd_HArray1OfReal) rotationAngles; - Handle(TColStd_HArray1OfInteger) mirrorFlags; - Handle(TColStd_HArray1OfInteger) rotateFlags; - Handle(TColgp_HArray1OfXYZ) startPoints; - Handle(Interface_HArray1OfHAsciiString) texts; - - nbChars = new TColStd_HArray1OfInteger(1, nbval); - boxWidths = new TColStd_HArray1OfReal (1, nbval); - boxHeights = new TColStd_HArray1OfReal (1, nbval); - fontCodes = new TColStd_HArray1OfInteger(1, nbval); - fontEntities = new IGESGraph_HArray1OfTextFontDef(1, nbval); - slantAngles = new TColStd_HArray1OfReal (1, nbval); - rotationAngles = new TColStd_HArray1OfReal (1, nbval); - mirrorFlags = new TColStd_HArray1OfInteger(1, nbval); - rotateFlags = new TColStd_HArray1OfInteger(1, nbval); - startPoints = new TColgp_HArray1OfXYZ (1, nbval); - texts = new Interface_HArray1OfHAsciiString(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - Standard_Integer nbChar = another->NbCharacters(i); - nbChars->SetValue(i, nbChar); - Standard_Real boxWidth = another->BoxWidth(i); - boxWidths->SetValue(i, boxWidth); - Standard_Real boxHeight = another->BoxHeight(i); - boxHeights->SetValue(i, boxHeight); - - if (another->IsFontEntity(i)) - { - DeclareAndCast(IGESGraph_TextFontDef, fontEntity, - TC.Transferred(another->FontEntity(i))); - fontEntities->SetValue(i, fontEntity); - fontCodes->SetValue(i, -1); - } - else - { - Standard_Integer fontCode = another->FontCode(i); - fontCodes->SetValue(i, fontCode); -//// fontEntities->SetValue(i, NULL); par defaut - } - - Standard_Real slantAngle = another->SlantAngle(i); - slantAngles->SetValue(i, slantAngle); - Standard_Real rotationAngle = another->RotationAngle(i); - rotationAngles->SetValue(i, rotationAngle); - Standard_Integer mirrorFlag = another->MirrorFlag(i); - mirrorFlags->SetValue(i, mirrorFlag); - Standard_Integer rotateFlag = another->RotateFlag(i); - rotateFlags->SetValue(i, rotateFlag); - gp_XYZ startPoint = (another->StartPoint(i)).XYZ(); - startPoints->SetValue(i, startPoint); - Handle(TCollection_HAsciiString) text = - new TCollection_HAsciiString(another->Text(i)); - texts->SetValue(i, text); - } - - ent->Init(nbChars, boxWidths, boxHeights, fontCodes, fontEntities, - slantAngles, rotationAngles, mirrorFlags, rotateFlags, - startPoints, texts); - ent->SetFormNumber(another->FormNumber()); -} - IGESData_DirChecker IGESDimen_ToolGeneralNote::DirChecker (const Handle(IGESDimen_GeneralNote)& /* ent */ ) const { diff --git a/src/IGESDimen/IGESDimen_ToolGeneralNote.hxx b/src/IGESDimen/IGESDimen_ToolGeneralNote.hxx index c1c0debc71..f94a600a33 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralNote.hxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralNote.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolGeneralNote { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolGeneralNote, ready to work - Standard_EXPORT IGESDimen_ToolGeneralNote(); + IGESDimen_ToolGeneralNote() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_GeneralNote)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_GeneralNote)& entfrom, const Handle(IGESDimen_GeneralNote)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_GeneralNote)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolGeneralNote_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolGeneralSymbol.cxx b/src/IGESDimen/IGESDimen_ToolGeneralSymbol.cxx index 83806c59aa..8c6f963d12 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralSymbol.cxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralSymbol.cxx @@ -31,15 +31,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolGeneralSymbol::IGESDimen_ToolGeneralSymbol () { } - void IGESDimen_ToolGeneralSymbol::ReadOwnParams (const Handle(IGESDimen_GeneralSymbol)& ent, @@ -115,38 +112,6 @@ void IGESDimen_ToolGeneralSymbol::OwnShared iter.GetOneItem(ent->LeaderArrow(i)); } -void IGESDimen_ToolGeneralSymbol::OwnCopy - (const Handle(IGESDimen_GeneralSymbol)& another, - const Handle(IGESDimen_GeneralSymbol)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESDimen_GeneralNote, tempNote, - TC.Transferred(another->Note())); - Standard_Integer num = another->NbGeomEntities(); - Handle(IGESData_HArray1OfIGESEntity) tempGeoms = - new IGESData_HArray1OfIGESEntity(1, num); - Standard_Integer i; - for (i = 1; i <= num; i++) - { - DeclareAndCast(IGESData_IGESEntity, new_item, - TC.Transferred(another->GeomEntity(i))); - tempGeoms->SetValue(i, new_item); - } - Handle(IGESDimen_HArray1OfLeaderArrow) tempLeaders; - num = another->NbLeaders(); - if (num > 0) - { - tempLeaders = new IGESDimen_HArray1OfLeaderArrow(1, num); - for (i = 1; i <= num; i++) - { - DeclareAndCast(IGESDimen_LeaderArrow, new_item, - TC.Transferred(another->LeaderArrow(i))); - tempLeaders->SetValue(i, new_item); - } - } - ent->Init (tempNote, tempGeoms, tempLeaders); - ent->SetFormNumber (another->FormNumber()); -} - IGESData_DirChecker IGESDimen_ToolGeneralSymbol::DirChecker (const Handle(IGESDimen_GeneralSymbol)& /* ent */ ) const { diff --git a/src/IGESDimen/IGESDimen_ToolGeneralSymbol.hxx b/src/IGESDimen/IGESDimen_ToolGeneralSymbol.hxx index 5c890de71e..61f0583c17 100644 --- a/src/IGESDimen/IGESDimen_ToolGeneralSymbol.hxx +++ b/src/IGESDimen/IGESDimen_ToolGeneralSymbol.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolGeneralSymbol { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolGeneralSymbol, ready to work - Standard_EXPORT IGESDimen_ToolGeneralSymbol(); + IGESDimen_ToolGeneralSymbol() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_GeneralSymbol)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_GeneralSymbol)& entfrom, const Handle(IGESDimen_GeneralSymbol)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_GeneralSymbol)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolGeneralSymbol_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolLeaderArrow.cxx b/src/IGESDimen/IGESDimen_ToolLeaderArrow.cxx index b50373fac7..2890d8d631 100644 --- a/src/IGESDimen/IGESDimen_ToolLeaderArrow.cxx +++ b/src/IGESDimen/IGESDimen_ToolLeaderArrow.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,8 +35,6 @@ #include #include -IGESDimen_ToolLeaderArrow::IGESDimen_ToolLeaderArrow () { } - void IGESDimen_ToolLeaderArrow::ReadOwnParams (const Handle(IGESDimen_LeaderArrow)& ent, @@ -95,32 +92,6 @@ void IGESDimen_ToolLeaderArrow::WriteOwnParams } } -void IGESDimen_ToolLeaderArrow::OwnShared - (const Handle(IGESDimen_LeaderArrow)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESDimen_ToolLeaderArrow::OwnCopy - (const Handle(IGESDimen_LeaderArrow)& another, - const Handle(IGESDimen_LeaderArrow)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer nbval = another->NbSegments(); - Standard_Real arrowHeadHeight = another->ArrowHeadHeight(); - Standard_Real arrowHeadWidth = another->ArrowHeadWidth(); - Standard_Real zDepth = another->ZDepth(); - gp_XY arrowHead = another->ArrowHead().XY(); - - Handle(TColgp_HArray1OfXY) segmentTails = new TColgp_HArray1OfXY(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - segmentTails->SetValue(i, (another->SegmentTail(i)).XY()); - } - - ent->Init(arrowHeadHeight, arrowHeadWidth, zDepth, arrowHead, segmentTails); - ent->SetFormNumber (another->FormNumber()); -} - IGESData_DirChecker IGESDimen_ToolLeaderArrow::DirChecker (const Handle(IGESDimen_LeaderArrow)& /* ent */ ) const { @@ -134,12 +105,6 @@ IGESData_DirChecker IGESDimen_ToolLeaderArrow::DirChecker return DC; } -void IGESDimen_ToolLeaderArrow::OwnCheck - (const Handle(IGESDimen_LeaderArrow)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESDimen_ToolLeaderArrow::OwnDump (const Handle(IGESDimen_LeaderArrow)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDimen/IGESDimen_ToolLeaderArrow.hxx b/src/IGESDimen/IGESDimen_ToolLeaderArrow.hxx index 56dc806a84..cac3d9e7cc 100644 --- a/src/IGESDimen/IGESDimen_ToolLeaderArrow.hxx +++ b/src/IGESDimen/IGESDimen_ToolLeaderArrow.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolLeaderArrow { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolLeaderArrow, ready to work - Standard_EXPORT IGESDimen_ToolLeaderArrow(); + IGESDimen_ToolLeaderArrow() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDimen_LeaderArrow)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a LeaderArrow , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDimen_LeaderArrow)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDimen_LeaderArrow)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDimen_LeaderArrow)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_LeaderArrow)& entfrom, const Handle(IGESDimen_LeaderArrow)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_LeaderArrow)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolLeaderArrow_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolLinearDimension.cxx b/src/IGESDimen/IGESDimen_ToolLinearDimension.cxx index d8cd1bcb5f..87f1643b35 100644 --- a/src/IGESDimen/IGESDimen_ToolLinearDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolLinearDimension.cxx @@ -28,15 +28,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolLinearDimension::IGESDimen_ToolLinearDimension () { } - void IGESDimen_ToolLinearDimension::ReadOwnParams (const Handle(IGESDimen_LinearDimension)& ent, @@ -91,25 +88,6 @@ void IGESDimen_ToolLinearDimension::OwnShared iter.GetOneItem(ent->SecondWitness()); } -void IGESDimen_ToolLinearDimension::OwnCopy - (const Handle(IGESDimen_LinearDimension)& another, - const Handle(IGESDimen_LinearDimension)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESDimen_GeneralNote, note, - TC.Transferred(another->Note())); - DeclareAndCast(IGESDimen_LeaderArrow, firstLeader, - TC.Transferred(another->FirstLeader())); - DeclareAndCast(IGESDimen_LeaderArrow, secondLeader, - TC.Transferred(another->SecondLeader())); - DeclareAndCast(IGESDimen_WitnessLine, firstWitness, - TC.Transferred(another->FirstWitness())); - DeclareAndCast(IGESDimen_WitnessLine, secondWitness, - TC.Transferred(another->SecondWitness())); - - ent->Init(note, firstLeader, secondLeader, firstWitness, secondWitness); - ent->SetFormNumber (another->FormNumber()); -} - IGESData_DirChecker IGESDimen_ToolLinearDimension::DirChecker (const Handle(IGESDimen_LinearDimension)& /*ent*/) const { @@ -122,12 +100,6 @@ IGESData_DirChecker IGESDimen_ToolLinearDimension::DirChecker return DC; } -void IGESDimen_ToolLinearDimension::OwnCheck - (const Handle(IGESDimen_LinearDimension)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -} - void IGESDimen_ToolLinearDimension::OwnDump (const Handle(IGESDimen_LinearDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDimen/IGESDimen_ToolLinearDimension.hxx b/src/IGESDimen/IGESDimen_ToolLinearDimension.hxx index 0f33ccede4..e3bb85f1e7 100644 --- a/src/IGESDimen/IGESDimen_ToolLinearDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolLinearDimension.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolLinearDimension { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolLinearDimension, ready to work - Standard_EXPORT IGESDimen_ToolLinearDimension(); + IGESDimen_ToolLinearDimension() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDimen_LinearDimension)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDimen_LinearDimension)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_LinearDimension)& entfrom, const Handle(IGESDimen_LinearDimension)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_LinearDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolLinearDimension_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.cxx b/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.cxx index 3a0763be9b..d3ef3b8d4d 100644 --- a/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.cxx +++ b/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -40,9 +39,6 @@ #include #include -IGESDimen_ToolNewDimensionedGeometry::IGESDimen_ToolNewDimensionedGeometry () - { } - void IGESDimen_ToolNewDimensionedGeometry::ReadOwnParams (const Handle(IGESDimen_NewDimensionedGeometry)& ent, @@ -128,35 +124,6 @@ void IGESDimen_ToolNewDimensionedGeometry::OwnShared iter.GetOneItem(ent->GeometryEntity(i)); } -void IGESDimen_ToolNewDimensionedGeometry::OwnCopy - (const Handle(IGESDimen_NewDimensionedGeometry)& another, - const Handle(IGESDimen_NewDimensionedGeometry)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer num = another->NbGeometries(); - Standard_Integer tempNbDimens = another->NbDimensions(); - Standard_Integer tempDimOrientFlag = another->DimensionOrientationFlag(); - Standard_Real tempAngle = another->AngleValue(); - DeclareAndCast(IGESData_IGESEntity, tempDimen, - TC.Transferred(another->DimensionEntity())); - - Handle(IGESData_HArray1OfIGESEntity) tempGeomEnts = - new IGESData_HArray1OfIGESEntity(1, num); - Handle(TColStd_HArray1OfInteger) tempDimLocFlags = - new TColStd_HArray1OfInteger(1, num); - Handle(TColgp_HArray1OfXYZ) tempPoints = new TColgp_HArray1OfXYZ(1, num); - - for (Standard_Integer i = 1; i <= num; i++) - { - DeclareAndCast(IGESData_IGESEntity, tempEnt, - TC.Transferred(another->GeometryEntity(i))); - tempGeomEnts->SetValue(i, tempEnt); - tempDimLocFlags->SetValue(i, another->DimensionLocationFlag(i)); - tempPoints->SetValue(i, another->Point(i).XYZ()); - } - ent->Init (tempNbDimens, tempDimen, tempDimOrientFlag, tempAngle, - tempGeomEnts, tempDimLocFlags, tempPoints); -} - Standard_Boolean IGESDimen_ToolNewDimensionedGeometry::OwnCorrect (const Handle(IGESDimen_NewDimensionedGeometry)& ent) const { diff --git a/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx b/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx index 3095fc81a5..73678dc372 100644 --- a/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx +++ b/src/IGESDimen/IGESDimen_ToolNewDimensionedGeometry.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolNewDimensionedGeometry { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolNewDimensionedGeometry, ready to work - Standard_EXPORT IGESDimen_ToolNewDimensionedGeometry(); + IGESDimen_ToolNewDimensionedGeometry() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_NewDimensionedGeometry)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_NewDimensionedGeometry)& entfrom, const Handle(IGESDimen_NewDimensionedGeometry)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_NewDimensionedGeometry)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolNewDimensionedGeometry_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx b/src/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx index d6c2ba2e88..da16711eec 100644 --- a/src/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx +++ b/src/IGESDimen/IGESDimen_ToolNewGeneralNote.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -42,8 +41,6 @@ #include #include -IGESDimen_ToolNewGeneralNote::IGESDimen_ToolNewGeneralNote () { } - void IGESDimen_ToolNewGeneralNote::ReadOwnParams (const Handle(IGESDimen_NewGeneralNote)& ent, @@ -297,99 +294,6 @@ void IGESDimen_ToolNewGeneralNote::OwnShared } } -void IGESDimen_ToolNewGeneralNote::OwnCopy - (const Handle(IGESDimen_NewGeneralNote)& another, - const Handle(IGESDimen_NewGeneralNote)& ent, Interface_CopyTool& TC) const -{ - Standard_Real width = another->TextWidth(); - Standard_Real height = another->TextHeight(); - Standard_Integer justifyCode = another->JustifyCode(); - gp_XYZ areaLoc = (another->AreaLocation()).XYZ(); - Standard_Real areaRotationAngle = another->AreaRotationAngle(); - gp_XYZ baseLinePos = (another->BaseLinePosition()).XYZ(); - Standard_Real normalInterlineSpace = another->NormalInterlineSpace(); - Standard_Integer nbval = another->NbStrings(); - - Handle(TColStd_HArray1OfInteger) charDisplays; - Handle(TColStd_HArray1OfReal) charWidths; - Handle(TColStd_HArray1OfReal) charHeights; - Handle(TColStd_HArray1OfReal) interCharSpaces; - Handle(TColStd_HArray1OfReal) interlineSpaces; - Handle(TColStd_HArray1OfInteger) fontStyles; - Handle(TColStd_HArray1OfReal) charAngles; - Handle(Interface_HArray1OfHAsciiString) controlCodeStrings; - Handle(TColStd_HArray1OfInteger) nbChars; - Handle(TColStd_HArray1OfReal) boxWidths; - Handle(TColStd_HArray1OfReal) boxHeights; - Handle(TColStd_HArray1OfInteger) charSetCodes; - Handle(IGESData_HArray1OfIGESEntity) charSetEntities; - Handle(TColStd_HArray1OfReal) slantAngles; - Handle(TColStd_HArray1OfReal) rotationAngles; - Handle(TColStd_HArray1OfInteger) mirrorFlags; - Handle(TColStd_HArray1OfInteger) rotateFlags; - Handle(TColgp_HArray1OfXYZ) startPoints; - Handle(Interface_HArray1OfHAsciiString) texts; - - charDisplays = new TColStd_HArray1OfInteger(1, nbval); - charWidths = new TColStd_HArray1OfReal (1, nbval); - charHeights = new TColStd_HArray1OfReal (1, nbval); - interCharSpaces = new TColStd_HArray1OfReal (1, nbval); - interlineSpaces = new TColStd_HArray1OfReal (1, nbval); - fontStyles = new TColStd_HArray1OfInteger(1, nbval); - charAngles = new TColStd_HArray1OfReal (1, nbval); - controlCodeStrings = new Interface_HArray1OfHAsciiString(1, nbval); - nbChars = new TColStd_HArray1OfInteger(1, nbval); - boxWidths = new TColStd_HArray1OfReal (1, nbval); - boxHeights = new TColStd_HArray1OfReal (1, nbval); - charSetCodes = new TColStd_HArray1OfInteger(1, nbval); - charSetEntities = new IGESData_HArray1OfIGESEntity(1, nbval); - slantAngles = new TColStd_HArray1OfReal (1, nbval); - rotationAngles = new TColStd_HArray1OfReal (1, nbval); - mirrorFlags = new TColStd_HArray1OfInteger(1, nbval); - rotateFlags = new TColStd_HArray1OfInteger(1, nbval); - startPoints = new TColgp_HArray1OfXYZ (1, nbval); - texts = new Interface_HArray1OfHAsciiString(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - charDisplays->SetValue (i, another->CharacterDisplay(i)); - charWidths->SetValue (i, another->CharacterWidth(i)); - charHeights->SetValue (i, another->CharacterHeight(i)); - interCharSpaces->SetValue (i, another->InterCharacterSpace(i)); - interlineSpaces->SetValue (i, another->InterlineSpace(i)); - fontStyles->SetValue (i, another->FontStyle(i)); - charAngles->SetValue (i, another->CharacterAngle(i)); - controlCodeStrings->SetValue - (i, new TCollection_HAsciiString(another->ControlCodeString(i))); - nbChars->SetValue (i, another->NbCharacters(i)); - boxWidths->SetValue (i, another->BoxWidth(i)); - boxHeights->SetValue (i, another->BoxHeight(i)); - - if (another->IsCharSetEntity(i)) { - DeclareAndCast(IGESData_IGESEntity, charSetEntity, - TC.Transferred(another->CharSetEntity(i))); - charSetEntities->SetValue(i, charSetEntity); - } - else charSetCodes->SetValue(i, another->CharSetCode(i)); - - slantAngles->SetValue (i, another->SlantAngle(i)); - rotationAngles->SetValue (i, another->RotationAngle(i)); - mirrorFlags->SetValue (i, another->MirrorFlag(i)); - rotateFlags->SetValue (i, another->RotateFlag(i)); - startPoints->SetValue (i, another->StartPoint(i).XYZ()); - texts->SetValue - (i, new TCollection_HAsciiString(another->Text(i))); - } - - ent->Init (width, height, justifyCode, areaLoc, areaRotationAngle, baseLinePos, - normalInterlineSpace, charDisplays, charWidths, charHeights, - interCharSpaces, interlineSpaces, fontStyles, charAngles, - controlCodeStrings,nbChars, boxWidths, boxHeights, charSetCodes, - charSetEntities, slantAngles, rotationAngles, mirrorFlags, - rotateFlags, startPoints, texts); - -} - IGESData_DirChecker IGESDimen_ToolNewGeneralNote::DirChecker (const Handle(IGESDimen_NewGeneralNote)& /* ent */ ) const { diff --git a/src/IGESDimen/IGESDimen_ToolNewGeneralNote.hxx b/src/IGESDimen/IGESDimen_ToolNewGeneralNote.hxx index 5ac4ce34da..49f2e3bb03 100644 --- a/src/IGESDimen/IGESDimen_ToolNewGeneralNote.hxx +++ b/src/IGESDimen/IGESDimen_ToolNewGeneralNote.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolNewGeneralNote { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolNewGeneralNote, ready to work - Standard_EXPORT IGESDimen_ToolNewGeneralNote(); + IGESDimen_ToolNewGeneralNote() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_NewGeneralNote)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_NewGeneralNote)& entfrom, const Handle(IGESDimen_NewGeneralNote)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_NewGeneralNote)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolNewGeneralNote_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolOrdinateDimension.cxx b/src/IGESDimen/IGESDimen_ToolOrdinateDimension.cxx index 8b9d2c8766..4b475950a8 100644 --- a/src/IGESDimen/IGESDimen_ToolOrdinateDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolOrdinateDimension.cxx @@ -28,15 +28,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolOrdinateDimension::IGESDimen_ToolOrdinateDimension () { } - void IGESDimen_ToolOrdinateDimension::ReadOwnParams (const Handle(IGESDimen_OrdinateDimension)& theEnt, @@ -104,19 +101,6 @@ void IGESDimen_ToolOrdinateDimension::OwnShared iter.GetOneItem(ent->Leader()); } -void IGESDimen_ToolOrdinateDimension::OwnCopy - (const Handle(IGESDimen_OrdinateDimension)& another, - const Handle(IGESDimen_OrdinateDimension)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESDimen_GeneralNote, tempNote, - TC.Transferred(another->Note())); - DeclareAndCast(IGESDimen_WitnessLine, witLine, - TC.Transferred(another->WitnessLine())); - DeclareAndCast(IGESDimen_LeaderArrow, leadArr, - TC.Transferred(another->Leader())); - ent->Init(tempNote, another->IsLine(), witLine, leadArr); -} - IGESData_DirChecker IGESDimen_ToolOrdinateDimension::DirChecker (const Handle(IGESDimen_OrdinateDimension)& /*ent*/) const { diff --git a/src/IGESDimen/IGESDimen_ToolOrdinateDimension.hxx b/src/IGESDimen/IGESDimen_ToolOrdinateDimension.hxx index fbc8914d70..81c9d2442d 100644 --- a/src/IGESDimen/IGESDimen_ToolOrdinateDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolOrdinateDimension.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolOrdinateDimension { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolOrdinateDimension, ready to work - Standard_EXPORT IGESDimen_ToolOrdinateDimension(); + IGESDimen_ToolOrdinateDimension() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_OrdinateDimension)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_OrdinateDimension)& entfrom, const Handle(IGESDimen_OrdinateDimension)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_OrdinateDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolOrdinateDimension_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolPointDimension.cxx b/src/IGESDimen/IGESDimen_ToolPointDimension.cxx index 99aff1ab1b..b07f744c1d 100644 --- a/src/IGESDimen/IGESDimen_ToolPointDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolPointDimension.cxx @@ -28,15 +28,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolPointDimension::IGESDimen_ToolPointDimension () { } - void IGESDimen_ToolPointDimension::ReadOwnParams (const Handle(IGESDimen_PointDimension)& ent, @@ -76,19 +73,6 @@ void IGESDimen_ToolPointDimension::OwnShared iter.GetOneItem(ent->Geom()); } -void IGESDimen_ToolPointDimension::OwnCopy - (const Handle(IGESDimen_PointDimension)& another, - const Handle(IGESDimen_PointDimension)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESDimen_GeneralNote, tempNote, - TC.Transferred(another->Note())); - DeclareAndCast(IGESDimen_LeaderArrow, tempArrow, - TC.Transferred(another->LeaderArrow())); - DeclareAndCast(IGESData_IGESEntity, tempGeom, - TC.Transferred(another->Geom())); - ent->Init(tempNote, tempArrow, tempGeom); -} - IGESData_DirChecker IGESDimen_ToolPointDimension::DirChecker (const Handle(IGESDimen_PointDimension)& /*ent*/) const { @@ -103,12 +87,6 @@ IGESData_DirChecker IGESDimen_ToolPointDimension::DirChecker return DC; } -void IGESDimen_ToolPointDimension::OwnCheck - (const Handle(IGESDimen_PointDimension)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -} - void IGESDimen_ToolPointDimension::OwnDump (const Handle(IGESDimen_PointDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDimen/IGESDimen_ToolPointDimension.hxx b/src/IGESDimen/IGESDimen_ToolPointDimension.hxx index 77d6f6d6b2..97377c84ce 100644 --- a/src/IGESDimen/IGESDimen_ToolPointDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolPointDimension.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolPointDimension { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPointDimension, ready to work - Standard_EXPORT IGESDimen_ToolPointDimension(); + IGESDimen_ToolPointDimension() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDimen_PointDimension)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDimen_PointDimension)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_PointDimension)& entfrom, const Handle(IGESDimen_PointDimension)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_PointDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolPointDimension_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolRadiusDimension.cxx b/src/IGESDimen/IGESDimen_ToolRadiusDimension.cxx index 507266cf91..90db73774d 100644 --- a/src/IGESDimen/IGESDimen_ToolRadiusDimension.cxx +++ b/src/IGESDimen/IGESDimen_ToolRadiusDimension.cxx @@ -30,15 +30,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolRadiusDimension::IGESDimen_ToolRadiusDimension () { } - void IGESDimen_ToolRadiusDimension::ReadOwnParams (const Handle(IGESDimen_RadiusDimension)& ent, @@ -85,22 +82,6 @@ void IGESDimen_ToolRadiusDimension::OwnShared iter.GetOneItem(ent->Leader2()); } -void IGESDimen_ToolRadiusDimension::OwnCopy - (const Handle(IGESDimen_RadiusDimension)& another, - const Handle(IGESDimen_RadiusDimension)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESDimen_GeneralNote, tempNote, - TC.Transferred(another->Note())); - DeclareAndCast(IGESDimen_LeaderArrow, leadArr, - TC.Transferred(another->Leader())); - gp_XY arcCenter = another->Center().XY(); - Handle(IGESDimen_LeaderArrow) leadArr2; - if (another->HasLeader2()) leadArr2 = - GetCasted(IGESDimen_LeaderArrow,TC.Transferred(another->Leader2())); - ent->Init(tempNote, leadArr, arcCenter, leadArr2); - ent->InitForm (another->FormNumber()); -} - IGESData_DirChecker IGESDimen_ToolRadiusDimension::DirChecker (const Handle(IGESDimen_RadiusDimension)& /* ent */ ) const { diff --git a/src/IGESDimen/IGESDimen_ToolRadiusDimension.hxx b/src/IGESDimen/IGESDimen_ToolRadiusDimension.hxx index 9f5817808d..cb6482136b 100644 --- a/src/IGESDimen/IGESDimen_ToolRadiusDimension.hxx +++ b/src/IGESDimen/IGESDimen_ToolRadiusDimension.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolRadiusDimension { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolRadiusDimension, ready to work - Standard_EXPORT IGESDimen_ToolRadiusDimension(); + IGESDimen_ToolRadiusDimension() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_RadiusDimension)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_RadiusDimension)& entfrom, const Handle(IGESDimen_RadiusDimension)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_RadiusDimension)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolRadiusDimension_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolSection.cxx b/src/IGESDimen/IGESDimen_ToolSection.cxx index f97842969f..f0099a3a36 100644 --- a/src/IGESDimen/IGESDimen_ToolSection.cxx +++ b/src/IGESDimen/IGESDimen_ToolSection.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -37,8 +36,6 @@ #include #include -IGESDimen_ToolSection::IGESDimen_ToolSection () { } - void IGESDimen_ToolSection::ReadOwnParams (const Handle(IGESDimen_Section)& ent, @@ -86,31 +83,6 @@ void IGESDimen_ToolSection::WriteOwnParams } } -void IGESDimen_ToolSection::OwnShared - (const Handle(IGESDimen_Section)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESDimen_ToolSection::OwnCopy - (const Handle(IGESDimen_Section)& another, - const Handle(IGESDimen_Section)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer datatype = another->Datatype(); - Standard_Integer nbval = another->NbPoints(); - Standard_Real zDisplacement = another->ZDisplacement(); - - Handle(TColgp_HArray1OfXY) dataPoints = new TColgp_HArray1OfXY(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - gp_Pnt tempPnt = (another->Point(i)); - gp_XY tempPnt2d(tempPnt.X(), tempPnt.Y()); - dataPoints->SetValue(i, tempPnt2d); - } - ent->Init(datatype, zDisplacement, dataPoints); - ent->SetFormNumber (another->FormNumber()); -} - Standard_Boolean IGESDimen_ToolSection::OwnCorrect (const Handle(IGESDimen_Section)& ent) const { diff --git a/src/IGESDimen/IGESDimen_ToolSection.hxx b/src/IGESDimen/IGESDimen_ToolSection.hxx index 04fa88b7de..59c40d2a3f 100644 --- a/src/IGESDimen/IGESDimen_ToolSection.hxx +++ b/src/IGESDimen/IGESDimen_ToolSection.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolSection { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSection, ready to work - Standard_EXPORT IGESDimen_ToolSection(); + IGESDimen_ToolSection() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDimen_Section)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Section , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDimen_Section)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a Section //! (LineFont forced to Rank = 1, DataType forced to 1) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESDimen_Section)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_Section)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_Section)& entfrom, const Handle(IGESDimen_Section)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_Section)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolSection_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolSectionedArea.cxx b/src/IGESDimen/IGESDimen_ToolSectionedArea.cxx index addac05d20..0b64ae9799 100644 --- a/src/IGESDimen/IGESDimen_ToolSectionedArea.cxx +++ b/src/IGESDimen/IGESDimen_ToolSectionedArea.cxx @@ -30,15 +30,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDimen_ToolSectionedArea::IGESDimen_ToolSectionedArea () { } - void IGESDimen_ToolSectionedArea::ReadOwnParams (const Handle(IGESDimen_SectionedArea)& ent, @@ -107,33 +104,6 @@ void IGESDimen_ToolSectionedArea::OwnShared iter.GetOneItem(ent->IslandCurve(i)); } -void IGESDimen_ToolSectionedArea::OwnCopy - (const Handle(IGESDimen_SectionedArea)& another, - const Handle(IGESDimen_SectionedArea)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity, extCurve, - TC.Transferred(another->ExteriorCurve())); - Standard_Integer tempPattern = another->Pattern(); - gp_XYZ passPnt = (another->PassingPoint()).XYZ(); - Standard_Real tempDistance = another->Distance(); - Standard_Real tempAngle = another->Angle(); - Handle(IGESData_HArray1OfIGESEntity) tempIslands; - Standard_Integer nbislands = another->NbIslands(); - if (nbislands > 0) - { - tempIslands = new IGESData_HArray1OfIGESEntity(1, nbislands); - for (Standard_Integer i=1; i<=nbislands; i++) - { - DeclareAndCast(IGESData_IGESEntity, anent, - TC.Transferred(another->IslandCurve(i))); - tempIslands->SetValue(i, anent); - } - } - ent->Init(extCurve, tempPattern, passPnt, - tempDistance, tempAngle, tempIslands); - ent->SetInverted (another->IsInverted()); -} - IGESData_DirChecker IGESDimen_ToolSectionedArea::DirChecker (const Handle(IGESDimen_SectionedArea)& /* ent */ ) const { @@ -148,12 +118,6 @@ IGESData_DirChecker IGESDimen_ToolSectionedArea::DirChecker return DC; } -void IGESDimen_ToolSectionedArea::OwnCheck - (const Handle(IGESDimen_SectionedArea)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESDimen_ToolSectionedArea::OwnDump (const Handle(IGESDimen_SectionedArea)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDimen/IGESDimen_ToolSectionedArea.hxx b/src/IGESDimen/IGESDimen_ToolSectionedArea.hxx index dfe6437c73..f97769950b 100644 --- a/src/IGESDimen/IGESDimen_ToolSectionedArea.hxx +++ b/src/IGESDimen/IGESDimen_ToolSectionedArea.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolSectionedArea { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSectionedArea, ready to work - Standard_EXPORT IGESDimen_ToolSectionedArea(); + IGESDimen_ToolSectionedArea() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDimen_SectionedArea)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDimen_SectionedArea)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_SectionedArea)& entfrom, const Handle(IGESDimen_SectionedArea)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_SectionedArea)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolSectionedArea_HeaderFile diff --git a/src/IGESDimen/IGESDimen_ToolWitnessLine.cxx b/src/IGESDimen/IGESDimen_ToolWitnessLine.cxx index 84f0527df4..c68e76b203 100644 --- a/src/IGESDimen/IGESDimen_ToolWitnessLine.cxx +++ b/src/IGESDimen/IGESDimen_ToolWitnessLine.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -37,8 +36,6 @@ #include #include -IGESDimen_ToolWitnessLine::IGESDimen_ToolWitnessLine () { } - void IGESDimen_ToolWitnessLine::ReadOwnParams (const Handle(IGESDimen_WitnessLine)& ent, @@ -86,30 +83,6 @@ void IGESDimen_ToolWitnessLine::WriteOwnParams } } -void IGESDimen_ToolWitnessLine::OwnShared - (const Handle(IGESDimen_WitnessLine)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESDimen_ToolWitnessLine::OwnCopy - (const Handle(IGESDimen_WitnessLine)& another, - const Handle(IGESDimen_WitnessLine)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer datatype = another->Datatype(); - Standard_Integer nbval = another->NbPoints(); - Standard_Real zDisplacement = another->ZDisplacement(); - - Handle(TColgp_HArray1OfXY) dataPoints = new TColgp_HArray1OfXY(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - gp_Pnt tempPnt = (another->Point(i)); - gp_XY tempPnt2d(tempPnt.X(), tempPnt.Y()); - dataPoints->SetValue(i, tempPnt2d); - } - ent->Init(datatype, zDisplacement, dataPoints); -} - Standard_Boolean IGESDimen_ToolWitnessLine::OwnCorrect (const Handle(IGESDimen_WitnessLine)& ent) const { diff --git a/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx b/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx index e7edf191a8..2af848c34b 100644 --- a/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx +++ b/src/IGESDimen/IGESDimen_ToolWitnessLine.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDimen_ToolWitnessLine { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolWitnessLine, ready to work - Standard_EXPORT IGESDimen_ToolWitnessLine(); + IGESDimen_ToolWitnessLine() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDimen_WitnessLine)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a WitnessLine , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDimen_WitnessLine)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a WitnessLine //! (LineFont forced to Rank = 1, DataType forced to 1) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESDimen_WitnessLine)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDimen_WitnessLine)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDimen_WitnessLine)& entfrom, const Handle(IGESDimen_WitnessLine)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDimen_WitnessLine)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDimen_ToolWitnessLine_HeaderFile diff --git a/src/IGESDraw/IGESDraw.cxx b/src/IGESDraw/IGESDraw.cxx index bc64534ece..9e2bb6b93e 100644 --- a/src/IGESDraw/IGESDraw.cxx +++ b/src/IGESDraw/IGESDraw.cxx @@ -23,14 +23,16 @@ #include #include -// Ancillary data to work on a Package of IGES Entities with a Protocol -// (Modules are created and loaded in appropriate libraries, once by Init) -static Handle(IGESDraw_Protocol) protocol; - - void IGESDraw::Init () +/*void IGESDraw::Init () { IGESDimen::Init(); + IGESDraw::Protocol(); +}*/ + +const Handle(IGESDraw_Protocol) & IGESDraw::Protocol () +{ + static Handle(IGESDraw_Protocol) protocol; if (protocol.IsNull()) { protocol = new IGESDraw_Protocol; Interface_GeneralLib::SetGlobal (new IGESDraw_GeneralModule, protocol); @@ -38,9 +40,5 @@ static Handle(IGESDraw_Protocol) protocol; IGESData_WriterLib::SetGlobal (new IGESDraw_ReadWriteModule,protocol); IGESData_SpecificLib::SetGlobal (new IGESDraw_SpecificModule, protocol); } -} - - Handle(IGESDraw_Protocol) IGESDraw::Protocol () -{ return protocol; } diff --git a/src/IGESDraw/IGESDraw.hxx b/src/IGESDraw/IGESDraw.hxx index ad94d2fccf..b72b963e50 100644 --- a/src/IGESDraw/IGESDraw.hxx +++ b/src/IGESDraw/IGESDraw.hxx @@ -18,42 +18,9 @@ #define _IGESDraw_HeaderFile #include -#include #include class IGESDraw_Protocol; -class IGESDraw_ConnectPoint; -class IGESDraw_NetworkSubfigureDef; -class IGESDraw_ViewsVisible; -class IGESDraw_ViewsVisibleWithAttr; -class IGESDraw_LabelDisplay; -class IGESDraw_Planar; -class IGESDraw_SegmentedViewsVisible; -class IGESDraw_Drawing; -class IGESDraw_DrawingWithRotation; -class IGESDraw_View; -class IGESDraw_RectArraySubfigure; -class IGESDraw_CircArraySubfigure; -class IGESDraw_NetworkSubfigure; -class IGESDraw_PerspectiveView; -class IGESDraw_ToolConnectPoint; -class IGESDraw_ToolNetworkSubfigureDef; -class IGESDraw_ToolViewsVisible; -class IGESDraw_ToolViewsVisibleWithAttr; -class IGESDraw_ToolLabelDisplay; -class IGESDraw_ToolPlanar; -class IGESDraw_ToolSegmentedViewsVisible; -class IGESDraw_ToolDrawing; -class IGESDraw_ToolDrawingWithRotation; -class IGESDraw_ToolView; -class IGESDraw_ToolRectArraySubfigure; -class IGESDraw_ToolCircArraySubfigure; -class IGESDraw_ToolNetworkSubfigure; -class IGESDraw_ToolPerspectiveView; -class IGESDraw_Protocol; -class IGESDraw_ReadWriteModule; -class IGESDraw_GeneralModule; -class IGESDraw_SpecificModule; //! This package contains the group of classes necessary for @@ -61,70 +28,13 @@ class IGESDraw_SpecificModule; //! Graphics (Sets for drawing, Drawings and Views). class IGESDraw { -public: - - DEFINE_STANDARD_ALLOC + public: - //! Prepares dynamic data (Protocol, Modules) for this package - Standard_EXPORT static void Init(); + //Standard_EXPORT static void Init(); //! Returns the Protocol for this Package - Standard_EXPORT static Handle(IGESDraw_Protocol) Protocol(); - - - - -protected: - - - - - -private: - - - - -friend class IGESDraw_ConnectPoint; -friend class IGESDraw_NetworkSubfigureDef; -friend class IGESDraw_ViewsVisible; -friend class IGESDraw_ViewsVisibleWithAttr; -friend class IGESDraw_LabelDisplay; -friend class IGESDraw_Planar; -friend class IGESDraw_SegmentedViewsVisible; -friend class IGESDraw_Drawing; -friend class IGESDraw_DrawingWithRotation; -friend class IGESDraw_View; -friend class IGESDraw_RectArraySubfigure; -friend class IGESDraw_CircArraySubfigure; -friend class IGESDraw_NetworkSubfigure; -friend class IGESDraw_PerspectiveView; -friend class IGESDraw_ToolConnectPoint; -friend class IGESDraw_ToolNetworkSubfigureDef; -friend class IGESDraw_ToolViewsVisible; -friend class IGESDraw_ToolViewsVisibleWithAttr; -friend class IGESDraw_ToolLabelDisplay; -friend class IGESDraw_ToolPlanar; -friend class IGESDraw_ToolSegmentedViewsVisible; -friend class IGESDraw_ToolDrawing; -friend class IGESDraw_ToolDrawingWithRotation; -friend class IGESDraw_ToolView; -friend class IGESDraw_ToolRectArraySubfigure; -friend class IGESDraw_ToolCircArraySubfigure; -friend class IGESDraw_ToolNetworkSubfigure; -friend class IGESDraw_ToolPerspectiveView; -friend class IGESDraw_Protocol; -friend class IGESDraw_ReadWriteModule; -friend class IGESDraw_GeneralModule; -friend class IGESDraw_SpecificModule; - + Standard_EXPORT static const Handle(IGESDraw_Protocol) & Protocol(); }; - - - - - - #endif // _IGESDraw_HeaderFile diff --git a/src/IGESDraw/IGESDraw_GeneralModule.cxx b/src/IGESDraw/IGESDraw_GeneralModule.cxx index 8cf2742d50..85fc57a468 100644 --- a/src/IGESDraw/IGESDraw_GeneralModule.cxx +++ b/src/IGESDraw/IGESDraw_GeneralModule.cxx @@ -45,33 +45,18 @@ #include #include #include -#include #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_GeneralModule,IGESData_GeneralModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESDraw_GeneralModule::IGESDraw_GeneralModule () { } - void IGESDraw_GeneralModule::OwnSharedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const { switch (CN) { - case 1 : { - DeclareAndCast(IGESDraw_CircArraySubfigure,anent,ent); - if (anent.IsNull()) return; - IGESDraw_ToolCircArraySubfigure tool; - tool.OwnShared(anent,iter); - } - break; case 2 : { DeclareAndCast(IGESDraw_ConnectPoint,anent,ent); if (anent.IsNull()) return; @@ -114,13 +99,6 @@ IGESDraw_GeneralModule::IGESDraw_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 8 : { - DeclareAndCast(IGESDraw_PerspectiveView,anent,ent); - if (anent.IsNull()) return; - IGESDraw_ToolPerspectiveView tool; - tool.OwnShared(anent,iter); - } - break; case 9 : { DeclareAndCast(IGESDraw_Planar,anent,ent); if (anent.IsNull()) return; @@ -289,13 +267,6 @@ IGESDraw_GeneralModule::IGESDraw_GeneralModule () { } const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const { switch (CN) { - case 1 : { - DeclareAndCast(IGESDraw_CircArraySubfigure,anent,ent); - if (anent.IsNull()) return; - IGESDraw_ToolCircArraySubfigure tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 2 : { DeclareAndCast(IGESDraw_ConnectPoint,anent,ent); if (anent.IsNull()) return; @@ -317,13 +288,6 @@ IGESDraw_GeneralModule::IGESDraw_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 5 : { - DeclareAndCast(IGESDraw_LabelDisplay,anent,ent); - if (anent.IsNull()) return; - IGESDraw_ToolLabelDisplay tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 6 : { DeclareAndCast(IGESDraw_NetworkSubfigure,anent,ent); if (anent.IsNull()) return; @@ -352,20 +316,6 @@ IGESDraw_GeneralModule::IGESDraw_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 10 : { - DeclareAndCast(IGESDraw_RectArraySubfigure,anent,ent); - if (anent.IsNull()) return; - IGESDraw_ToolRectArraySubfigure tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 11 : { - DeclareAndCast(IGESDraw_SegmentedViewsVisible,anent,ent); - if (anent.IsNull()) return; - IGESDraw_ToolSegmentedViewsVisible tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 12 : { DeclareAndCast(IGESDraw_View,anent,ent); if (anent.IsNull()) return; @@ -416,163 +366,6 @@ IGESDraw_GeneralModule::IGESDraw_GeneralModule () { } } - void IGESDraw_GeneralModule::OwnCopyCase - (const Standard_Integer CN, - const Handle(IGESData_IGESEntity)& entfrom, - const Handle(IGESData_IGESEntity)& entto, - Interface_CopyTool& TC) const -{ - switch (CN) { - case 1 : { - DeclareAndCast(IGESDraw_CircArraySubfigure,enfr,entfrom); - DeclareAndCast(IGESDraw_CircArraySubfigure,ento,entto); - IGESDraw_ToolCircArraySubfigure tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 2 : { - DeclareAndCast(IGESDraw_ConnectPoint,enfr,entfrom); - DeclareAndCast(IGESDraw_ConnectPoint,ento,entto); - IGESDraw_ToolConnectPoint tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 3 : { - DeclareAndCast(IGESDraw_Drawing,enfr,entfrom); - DeclareAndCast(IGESDraw_Drawing,ento,entto); - IGESDraw_ToolDrawing tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 4 : { - DeclareAndCast(IGESDraw_DrawingWithRotation,enfr,entfrom); - DeclareAndCast(IGESDraw_DrawingWithRotation,ento,entto); - IGESDraw_ToolDrawingWithRotation tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 5 : { - DeclareAndCast(IGESDraw_LabelDisplay,enfr,entfrom); - DeclareAndCast(IGESDraw_LabelDisplay,ento,entto); - IGESDraw_ToolLabelDisplay tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 6 : { - DeclareAndCast(IGESDraw_NetworkSubfigure,enfr,entfrom); - DeclareAndCast(IGESDraw_NetworkSubfigure,ento,entto); - IGESDraw_ToolNetworkSubfigure tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 7 : { - DeclareAndCast(IGESDraw_NetworkSubfigureDef,enfr,entfrom); - DeclareAndCast(IGESDraw_NetworkSubfigureDef,ento,entto); - IGESDraw_ToolNetworkSubfigureDef tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 8 : { - DeclareAndCast(IGESDraw_PerspectiveView,enfr,entfrom); - DeclareAndCast(IGESDraw_PerspectiveView,ento,entto); - IGESDraw_ToolPerspectiveView tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 9 : { - DeclareAndCast(IGESDraw_Planar,enfr,entfrom); - DeclareAndCast(IGESDraw_Planar,ento,entto); - IGESDraw_ToolPlanar tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 10 : { - DeclareAndCast(IGESDraw_RectArraySubfigure,enfr,entfrom); - DeclareAndCast(IGESDraw_RectArraySubfigure,ento,entto); - IGESDraw_ToolRectArraySubfigure tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 11 : { - DeclareAndCast(IGESDraw_SegmentedViewsVisible,enfr,entfrom); - DeclareAndCast(IGESDraw_SegmentedViewsVisible,ento,entto); - IGESDraw_ToolSegmentedViewsVisible tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 12 : { - DeclareAndCast(IGESDraw_View,enfr,entfrom); - DeclareAndCast(IGESDraw_View,ento,entto); - IGESDraw_ToolView tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 13 : { - DeclareAndCast(IGESDraw_ViewsVisible,enfr,entfrom); - DeclareAndCast(IGESDraw_ViewsVisible,ento,entto); - IGESDraw_ToolViewsVisible tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 14 : { - DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,enfr,entfrom); - DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,ento,entto); - IGESDraw_ToolViewsVisibleWithAttr tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - default : break; - } -} - - - void IGESDraw_GeneralModule::OwnRenewCase - (const Standard_Integer CN, - const Handle(IGESData_IGESEntity)& entfrom, - const Handle(IGESData_IGESEntity)& entto, - const Interface_CopyTool& TC) const -{ - switch (CN) { - case 13 : { - DeclareAndCast(IGESDraw_ViewsVisible,enfr,entfrom); - DeclareAndCast(IGESDraw_ViewsVisible,ento,entto); - IGESDraw_ToolViewsVisible tool; - tool.OwnRenew(enfr,ento,TC); - } - break; - case 14 : { - DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,enfr,entfrom); - DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,ento,entto); - IGESDraw_ToolViewsVisibleWithAttr tool; - tool.OwnRenew(enfr,ento,TC); - } - break; - default : break; - } -} - - - void IGESDraw_GeneralModule::OwnDeleteCase - (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const -{ - switch (CN) { - case 13 : { - DeclareAndCast(IGESDraw_ViewsVisible,anent,ent); - IGESDraw_ToolViewsVisible tool; - tool.OwnWhenDelete(anent); - } - break; - case 14 : { - DeclareAndCast(IGESDraw_ViewsVisibleWithAttr,anent,ent); - IGESDraw_ToolViewsVisibleWithAttr tool; - tool.OwnWhenDelete(anent); - } - break; - default : break; - } -} - - Standard_Integer IGESDraw_GeneralModule::CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& , const Interface_ShareTool& ) const diff --git a/src/IGESDraw/IGESDraw_GeneralModule.hxx b/src/IGESDraw/IGESDraw_GeneralModule.hxx index a3d3fe800d..0e0ea16c2d 100644 --- a/src/IGESDraw/IGESDraw_GeneralModule.hxx +++ b/src/IGESDraw/IGESDraw_GeneralModule.hxx @@ -17,19 +17,7 @@ #ifndef _IGESDraw_GeneralModule_HeaderFile #define _IGESDraw_GeneralModule_HeaderFile -#include -#include - #include -#include -#include -class IGESData_IGESEntity; -class Interface_EntityIterator; -class IGESData_DirChecker; -class Interface_ShareTool; -class Interface_Check; -class Standard_Transient; -class Interface_CopyTool; class IGESDraw_GeneralModule; @@ -39,12 +27,10 @@ DEFINE_STANDARD_HANDLE(IGESDraw_GeneralModule, IGESData_GeneralModule) //! This Services comprise : Shared & Implied Lists, Copy, Check class IGESDraw_GeneralModule : public IGESData_GeneralModule { + public: -public: - - //! Creates a GeneralModule from IGESDraw and puts it into GeneralLib - Standard_EXPORT IGESDraw_GeneralModule(); + IGESDraw_GeneralModule() {} //! Lists the Entities shared by a given IGESEntity , from //! its specific parameters : specific for each type @@ -65,45 +51,13 @@ public: //! Specific creation of a new void entity Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const Standard_OVERRIDE; - //! Copies parameters which are specific of each Type of Entity - Standard_EXPORT void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - - //! Renews parameters which are specific of each Type of Entity : - //! redefined for ViewsVisible ... (takes only the implied ref.s - //! which have also been copied) - Standard_EXPORT virtual void OwnRenewCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, const Interface_CopyTool& TC) const Standard_OVERRIDE; - - //! Clears parameters with can cause looping structures : - //! redefined for ViewsVisible ... (clears the implied ref.s) - Standard_EXPORT virtual void OwnDeleteCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const Standard_OVERRIDE; - //! Returns a category number which characterizes an entity //! Planar : Auxiliary //! Subfigures and ConnectPoint : Structure //! others : Drawing Standard_EXPORT virtual Standard_Integer CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESDraw_GeneralModule,IGESData_GeneralModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESDraw_GeneralModule_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.cxx b/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.cxx index 5822fa68e7..99cb324999 100644 --- a/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.cxx +++ b/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,8 +35,6 @@ #include #include -IGESDraw_ToolCircArraySubfigure::IGESDraw_ToolCircArraySubfigure () { } - void IGESDraw_ToolCircArraySubfigure::ReadOwnParams (const Handle(IGESDraw_CircArraySubfigure)& ent, @@ -108,38 +105,6 @@ void IGESDraw_ToolCircArraySubfigure::WriteOwnParams IW.Send(ent->ListPosition(I)); } -void IGESDraw_ToolCircArraySubfigure::OwnShared - (const Handle(IGESDraw_CircArraySubfigure)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESDraw_ToolCircArraySubfigure::OwnCopy - (const Handle(IGESDraw_CircArraySubfigure)& another, - const Handle(IGESDraw_CircArraySubfigure)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity, tempBase, - TC.Transferred(another->BaseEntity())); - Standard_Integer tempNumLocs = another->NbLocations(); - gp_XYZ tempCenter = (another->CenterPoint()).XYZ(); - Standard_Real tempRadius = another->CircleRadius(); - Standard_Real tempStAngle = another->StartAngle(); - Standard_Real tempDelAngle = another->DeltaAngle(); - Standard_Integer tempListCount = another->ListCount(); - Standard_Integer tempFlag = another->DoDontFlag(); - Handle(TColStd_HArray1OfInteger) tempNumPos; - if (! another->DisplayFlag()) { - tempNumPos = new TColStd_HArray1OfInteger(1, tempListCount); - Standard_Integer I; - for (I = 1; I <= tempListCount; I++) { - Standard_Integer tempPosition = another->ListPosition(I); - tempNumPos->SetValue(I, tempPosition); - } - } - - ent->Init(tempBase, tempNumLocs, tempCenter, tempRadius, - tempStAngle, tempDelAngle, tempFlag, tempNumPos); -} - IGESData_DirChecker IGESDraw_ToolCircArraySubfigure::DirChecker (const Handle(IGESDraw_CircArraySubfigure)& /*ent*/) const { @@ -153,12 +118,6 @@ IGESData_DirChecker IGESDraw_ToolCircArraySubfigure::DirChecker return DC; } -void IGESDraw_ToolCircArraySubfigure::OwnCheck - (const Handle(IGESDraw_CircArraySubfigure)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -} - void IGESDraw_ToolCircArraySubfigure::OwnDump (const Handle(IGESDraw_CircArraySubfigure)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.hxx b/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.hxx index 1c5c1fd482..b63eda7eb5 100644 --- a/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.hxx +++ b/src/IGESDraw/IGESDraw_ToolCircArraySubfigure.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolCircArraySubfigure { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolCircArraySubfigure, ready to work - Standard_EXPORT IGESDraw_ToolCircArraySubfigure(); + IGESDraw_ToolCircArraySubfigure() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDraw_CircArraySubfigure)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a CircArraySubfigure , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDraw_CircArraySubfigure)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDraw_CircArraySubfigure)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDraw_CircArraySubfigure)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_CircArraySubfigure)& entfrom, const Handle(IGESDraw_CircArraySubfigure)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_CircArraySubfigure)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolCircArraySubfigure_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolConnectPoint.cxx b/src/IGESDraw/IGESDraw_ToolConnectPoint.cxx index 4e6d7e2fe5..df95b0459d 100644 --- a/src/IGESDraw/IGESDraw_ToolConnectPoint.cxx +++ b/src/IGESDraw/IGESDraw_ToolConnectPoint.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -38,8 +37,6 @@ #include #include -IGESDraw_ToolConnectPoint::IGESDraw_ToolConnectPoint () { } - void IGESDraw_ToolConnectPoint::ReadOwnParams (const Handle(IGESDraw_ConnectPoint)& ent, @@ -127,35 +124,6 @@ void IGESDraw_ToolConnectPoint::OwnShared iter.GetOneItem(ent->OwnerSubfigure()); } -void IGESDraw_ToolConnectPoint::OwnCopy - (const Handle(IGESDraw_ConnectPoint)& another, - const Handle(IGESDraw_ConnectPoint)& ent, Interface_CopyTool& TC) const -{ - gp_XYZ tempPoint = (another->Point()).XYZ(); - DeclareAndCast(IGESData_IGESEntity, tempDisplaySymbol, - TC.Transferred(another->DisplaySymbol())); - Standard_Integer tempTypeFlag = another->TypeFlag(); - Standard_Integer tempFunctionFlag = another->FunctionFlag(); - Handle(TCollection_HAsciiString) tempFunctionIdentifier = - new TCollection_HAsciiString(another->FunctionIdentifier()); - DeclareAndCast(IGESGraph_TextDisplayTemplate, tempIdentifierTemplate, - TC.Transferred(another->FunctionTemplate())); - Handle(TCollection_HAsciiString) tempFunctionName = - new TCollection_HAsciiString(another->FunctionName()); - DeclareAndCast(IGESGraph_TextDisplayTemplate, tempFunctionTemplate, - TC.Transferred(another->FunctionTemplate())); - Standard_Integer tempPointIdentifier = another->PointIdentifier(); - Standard_Integer tempFunctionCode = another->FunctionCode(); - Standard_Integer tempSwapFlag = (another->SwapFlag() ? 1 : 0); - DeclareAndCast(IGESData_IGESEntity, tempOwnerSubfigure, - TC.Transferred(another->OwnerSubfigure())); - - ent->Init(tempPoint, tempDisplaySymbol, tempTypeFlag, tempFunctionFlag, - tempFunctionIdentifier, tempIdentifierTemplate, tempFunctionName, - tempFunctionTemplate, tempPointIdentifier, tempFunctionCode, - tempSwapFlag, tempOwnerSubfigure); -} - IGESData_DirChecker IGESDraw_ToolConnectPoint::DirChecker (const Handle(IGESDraw_ConnectPoint)& ent ) const { diff --git a/src/IGESDraw/IGESDraw_ToolConnectPoint.hxx b/src/IGESDraw/IGESDraw_ToolConnectPoint.hxx index b009c35eea..934ca4eaa3 100644 --- a/src/IGESDraw/IGESDraw_ToolConnectPoint.hxx +++ b/src/IGESDraw/IGESDraw_ToolConnectPoint.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolConnectPoint { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolConnectPoint, ready to work - Standard_EXPORT IGESDraw_ToolConnectPoint(); + IGESDraw_ToolConnectPoint() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDraw_ConnectPoint)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_ConnectPoint)& entfrom, const Handle(IGESDraw_ConnectPoint)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_ConnectPoint)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolConnectPoint_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolDrawing.cxx b/src/IGESDraw/IGESDraw_ToolDrawing.cxx index dfe1cff3c8..9463346ed9 100644 --- a/src/IGESDraw/IGESDraw_ToolDrawing.cxx +++ b/src/IGESDraw/IGESDraw_ToolDrawing.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -42,8 +41,6 @@ #include #include -IGESDraw_ToolDrawing::IGESDraw_ToolDrawing () { } - void IGESDraw_ToolDrawing::ReadOwnParams (const Handle(IGESDraw_Drawing)& ent, @@ -141,45 +138,6 @@ void IGESDraw_ToolDrawing::OwnShared iter.GetOneItem( ent->Annotation(i) ); } -void IGESDraw_ToolDrawing::OwnCopy - (const Handle(IGESDraw_Drawing)& another, - const Handle(IGESDraw_Drawing)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer nbanot; - Standard_Integer nbval; - Handle(IGESDraw_HArray1OfViewKindEntity) views; - Handle(TColgp_HArray1OfXY) viewOrigins; - Handle(IGESData_HArray1OfIGESEntity) annotations; - - nbanot = another->NbAnnotations(); - nbval = another->NbViews(); - if (nbval > 0) { - views = new IGESDraw_HArray1OfViewKindEntity(1, nbval); - viewOrigins = new TColgp_HArray1OfXY(1, nbval); - } - if ( nbanot > 0 ) - { - annotations = new IGESData_HArray1OfIGESEntity(1, nbanot); - for (Standard_Integer i = 1; i <= nbanot; i++) - { - DeclareAndCast(IGESData_IGESEntity, tempAnnotation, - TC.Transferred(another->Annotation(i))); - annotations->SetValue( i, tempAnnotation ); - } - } - - for (Standard_Integer i = 1; i <= nbval; i++) - { - DeclareAndCast(IGESData_ViewKindEntity, tempView, - TC.Transferred(another->ViewItem(i)) ); - views->SetValue( i, tempView ); - - viewOrigins->SetValue( i, (another->ViewOrigin(i)).XY() ); - } - - ent->Init(views, viewOrigins, annotations); -} - Standard_Boolean IGESDraw_ToolDrawing::OwnCorrect (const Handle(IGESDraw_Drawing)& ent ) const { diff --git a/src/IGESDraw/IGESDraw_ToolDrawing.hxx b/src/IGESDraw/IGESDraw_ToolDrawing.hxx index 14fc0d0de4..e28b0cc573 100644 --- a/src/IGESDraw/IGESDraw_ToolDrawing.hxx +++ b/src/IGESDraw/IGESDraw_ToolDrawing.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolDrawing { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDrawing, ready to work - Standard_EXPORT IGESDraw_ToolDrawing(); + IGESDraw_ToolDrawing() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDraw_Drawing)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_Drawing)& entfrom, const Handle(IGESDraw_Drawing)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_Drawing)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolDrawing_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.cxx b/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.cxx index 5c281f90b3..06d4611ea6 100644 --- a/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.cxx +++ b/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -43,8 +42,6 @@ #include #include -IGESDraw_ToolDrawingWithRotation::IGESDraw_ToolDrawingWithRotation () { } - void IGESDraw_ToolDrawingWithRotation::ReadOwnParams (const Handle(IGESDraw_DrawingWithRotation)& ent, @@ -155,48 +152,6 @@ void IGESDraw_ToolDrawingWithRotation::OwnShared iter.GetOneItem( ent->Annotation(i) ); } -void IGESDraw_ToolDrawingWithRotation::OwnCopy - (const Handle(IGESDraw_DrawingWithRotation)& another, - const Handle(IGESDraw_DrawingWithRotation)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer nbanot; - Standard_Integer nbval; - Handle(IGESDraw_HArray1OfViewKindEntity) views; - Handle(TColgp_HArray1OfXY) viewOrigins; - Handle(TColStd_HArray1OfReal) orientationAngles; - Handle(IGESData_HArray1OfIGESEntity) annotations; - - nbanot = another->NbAnnotations(); - nbval = another->NbViews(); - views = new IGESDraw_HArray1OfViewKindEntity(1, nbval); - viewOrigins = new TColgp_HArray1OfXY(1, nbval); - orientationAngles = new TColStd_HArray1OfReal(1, nbval); - - if ( nbanot > 0 ) - { - annotations = new IGESData_HArray1OfIGESEntity(1, nbanot); - for (Standard_Integer i = 1; i <= nbanot; i++) - { - DeclareAndCast(IGESData_IGESEntity, tempAnnotation, - TC.Transferred(another->Annotation(i))); - annotations->SetValue( i, tempAnnotation ); - } - } - - for (Standard_Integer i = 1; i <= nbval; i++) - { - DeclareAndCast(IGESData_ViewKindEntity, tempView, - TC.Transferred(another->ViewItem(i))); - views->SetValue( i, tempView ); - - viewOrigins->SetValue( i, (another->ViewOrigin(i)).XY() ); - - orientationAngles->SetValue( i, another->OrientationAngle(i) ); - } - - ent->Init(views, viewOrigins,orientationAngles, annotations); -} - Standard_Boolean IGESDraw_ToolDrawingWithRotation::OwnCorrect (const Handle(IGESDraw_DrawingWithRotation)& ent ) const { diff --git a/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx b/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx index 2b1bdab8ab..71f7b6251d 100644 --- a/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx +++ b/src/IGESDraw/IGESDraw_ToolDrawingWithRotation.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolDrawingWithRotation { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDrawingWithRotation, ready to work - Standard_EXPORT IGESDraw_ToolDrawingWithRotation(); + IGESDraw_ToolDrawingWithRotation() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDraw_DrawingWithRotation)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_DrawingWithRotation)& entfrom, const Handle(IGESDraw_DrawingWithRotation)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_DrawingWithRotation)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolDrawingWithRotation_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolLabelDisplay.cxx b/src/IGESDraw/IGESDraw_ToolLabelDisplay.cxx index a0c749249a..ecfc406d48 100644 --- a/src/IGESDraw/IGESDraw_ToolLabelDisplay.cxx +++ b/src/IGESDraw/IGESDraw_ToolLabelDisplay.cxx @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -44,8 +43,6 @@ #include #include -IGESDraw_ToolLabelDisplay::IGESDraw_ToolLabelDisplay () { } - void IGESDraw_ToolLabelDisplay::ReadOwnParams (const Handle(IGESDraw_LabelDisplay)& ent, @@ -145,47 +142,6 @@ void IGESDraw_ToolLabelDisplay::OwnShared } } -void IGESDraw_ToolLabelDisplay::OwnCopy - (const Handle(IGESDraw_LabelDisplay)& another, - const Handle(IGESDraw_LabelDisplay)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer nbval; - Handle(IGESDraw_HArray1OfViewKindEntity) views; - Handle(TColgp_HArray1OfXYZ) textLocations; - Handle(IGESDimen_HArray1OfLeaderArrow) leaderEntities; - Handle(TColStd_HArray1OfInteger) labelLevels; - Handle(IGESData_HArray1OfIGESEntity) displayedEntities; - - nbval = another->NbLabels(); - views = new IGESDraw_HArray1OfViewKindEntity(1, nbval); - textLocations = new TColgp_HArray1OfXYZ(1, nbval); - leaderEntities = new IGESDimen_HArray1OfLeaderArrow(1, nbval); - labelLevels = new TColStd_HArray1OfInteger(1, nbval); - displayedEntities = new IGESData_HArray1OfIGESEntity(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - DeclareAndCast(IGESData_ViewKindEntity, tempView, - TC.Transferred(another->ViewItem(i))); - views->SetValue( i, tempView ); - - textLocations->SetValue( i, (another->TextLocation(i)).XYZ() ); - - DeclareAndCast(IGESDimen_LeaderArrow, tempArrow, - TC.Transferred(another->LeaderEntity(i))); - leaderEntities->SetValue( i, tempArrow ); - - labelLevels->SetValue( i, another->LabelLevel(i) ); - - DeclareAndCast(IGESData_IGESEntity, tempEntity, - TC.Transferred(another->DisplayedEntity(i))); - displayedEntities->SetValue( i, tempEntity ); - } - - ent->Init(views, textLocations, leaderEntities, - labelLevels, displayedEntities); -} - IGESData_DirChecker IGESDraw_ToolLabelDisplay::DirChecker (const Handle(IGESDraw_LabelDisplay)& /*ent*/) const { @@ -196,12 +152,6 @@ IGESData_DirChecker IGESDraw_ToolLabelDisplay::DirChecker return DC; } -void IGESDraw_ToolLabelDisplay::OwnCheck - (const Handle(IGESDraw_LabelDisplay)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -} - void IGESDraw_ToolLabelDisplay::OwnDump (const Handle(IGESDraw_LabelDisplay)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDraw/IGESDraw_ToolLabelDisplay.hxx b/src/IGESDraw/IGESDraw_ToolLabelDisplay.hxx index 768dc1e540..06bee03f72 100644 --- a/src/IGESDraw/IGESDraw_ToolLabelDisplay.hxx +++ b/src/IGESDraw/IGESDraw_ToolLabelDisplay.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolLabelDisplay { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolLabelDisplay, ready to work - Standard_EXPORT IGESDraw_ToolLabelDisplay(); + IGESDraw_ToolLabelDisplay() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDraw_LabelDisplay)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDraw_LabelDisplay)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_LabelDisplay)& entfrom, const Handle(IGESDraw_LabelDisplay)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_LabelDisplay)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolLabelDisplay_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.cxx b/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.cxx index 3bab598682..6bc4f6c1ee 100644 --- a/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.cxx +++ b/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -39,8 +38,6 @@ #include #include -IGESDraw_ToolNetworkSubfigure::IGESDraw_ToolNetworkSubfigure () { } - void IGESDraw_ToolNetworkSubfigure::ReadOwnParams (const Handle(IGESDraw_NetworkSubfigure)& ent, @@ -161,44 +158,6 @@ void IGESDraw_ToolNetworkSubfigure::OwnShared iter.GetOneItem( ent->ConnectPoint(i) ); } -void IGESDraw_ToolNetworkSubfigure::OwnCopy - (const Handle(IGESDraw_NetworkSubfigure)& another, - const Handle(IGESDraw_NetworkSubfigure)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer nbval; - gp_XYZ translation; - gp_XYZ scale; - Standard_Integer typeflag; - Handle(TCollection_HAsciiString) designator; - Handle(IGESDraw_HArray1OfConnectPoint) connectPoints; - - nbval = another->NbConnectPoints(); - - DeclareAndCast(IGESDraw_NetworkSubfigureDef, definition, - TC.Transferred(another->SubfigureDefinition())); - - translation = another->Translation(); - scale = another->ScaleFactors(); - typeflag = another->TypeFlag(); - if (!another->ReferenceDesignator().IsNull()) - designator = new TCollection_HAsciiString - (another->ReferenceDesignator()); - - DeclareAndCast(IGESGraph_TextDisplayTemplate, textTemplate, - TC.Transferred(another->DesignatorTemplate())); - - if (nbval > 0) connectPoints = new IGESDraw_HArray1OfConnectPoint(1, nbval); - for (Standard_Integer i = 1; i <= nbval; i++) - { - DeclareAndCast(IGESDraw_ConnectPoint, tempconnectPoint, - TC.Transferred(another->ConnectPoint(i)) ); - connectPoints->SetValue( i, tempconnectPoint ); - } - - ent->Init(definition, translation, scale, typeflag, - designator, textTemplate, connectPoints); -} - IGESData_DirChecker IGESDraw_ToolNetworkSubfigure::DirChecker (const Handle(IGESDraw_NetworkSubfigure)& /*ent*/) const { diff --git a/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.hxx b/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.hxx index 77d22695d9..a00a81497e 100644 --- a/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.hxx +++ b/src/IGESDraw/IGESDraw_ToolNetworkSubfigure.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolNetworkSubfigure { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolNetworkSubfigure, ready to work - Standard_EXPORT IGESDraw_ToolNetworkSubfigure(); + IGESDraw_ToolNetworkSubfigure() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDraw_NetworkSubfigure)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_NetworkSubfigure)& entfrom, const Handle(IGESDraw_NetworkSubfigure)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_NetworkSubfigure)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolNetworkSubfigure_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.cxx b/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.cxx index 5911613bc8..f41d856fda 100644 --- a/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.cxx +++ b/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -39,8 +38,6 @@ #include #include -IGESDraw_ToolNetworkSubfigureDef::IGESDraw_ToolNetworkSubfigureDef () { } - void IGESDraw_ToolNetworkSubfigureDef::ReadOwnParams (const Handle(IGESDraw_NetworkSubfigureDef)& ent, @@ -152,51 +149,6 @@ void IGESDraw_ToolNetworkSubfigureDef::OwnShared iter.GetOneItem(ent->PointEntity(I)); } -void IGESDraw_ToolNetworkSubfigureDef::OwnCopy - (const Handle(IGESDraw_NetworkSubfigureDef)& another, - const Handle(IGESDraw_NetworkSubfigureDef)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer tempDepth = another->Depth(); - Handle(TCollection_HAsciiString) tempName = - new TCollection_HAsciiString(another->Name()); - Handle(IGESData_HArray1OfIGESEntity) tempEntities; - Standard_Integer up = another->NbEntities(); - if (up > 0) tempEntities = new IGESData_HArray1OfIGESEntity (1,up); - Standard_Integer I; - for (I = 1; I <= up; I++) { - DeclareAndCast(IGESData_IGESEntity, tempEntity, - TC.Transferred(another->Entity(I))); - tempEntities->SetValue(I, tempEntity); - } - Standard_Integer tempTypeFlag = another->TypeFlag(); - Handle(TCollection_HAsciiString) tempDesignator; - if (!another->Designator().IsNull()) tempDesignator = - new TCollection_HAsciiString(another->Designator()); - up = another->NbPointEntities(); - Handle(IGESDraw_HArray1OfConnectPoint) tempPointEntities; - if (up > 0) tempPointEntities = new IGESDraw_HArray1OfConnectPoint (1,up); - for (I = 1; I <= up; I++) { - if (another->HasPointEntity(I)) { - DeclareAndCast(IGESDraw_ConnectPoint, tempPointEntity, - TC.Transferred(another->PointEntity(I))); - tempPointEntities->SetValue(I, tempPointEntity); - } - } - if (another->HasDesignatorTemplate()) { - DeclareAndCast(IGESGraph_TextDisplayTemplate, tempDesignatorTemplate, - TC.Transferred(another->DesignatorTemplate())); - - ent->Init(tempDepth, tempName, tempEntities, tempTypeFlag, - tempDesignator, tempDesignatorTemplate, tempPointEntities); - } - else { - Handle(IGESGraph_TextDisplayTemplate) tempDesignatorTemplate; - - ent->Init(tempDepth, tempName, tempEntities, tempTypeFlag, - tempDesignator, tempDesignatorTemplate, tempPointEntities); - } -} - IGESData_DirChecker IGESDraw_ToolNetworkSubfigureDef::DirChecker (const Handle(IGESDraw_NetworkSubfigureDef)& /*ent*/) const { diff --git a/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.hxx b/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.hxx index f27a626a8f..ea8d0bcded 100644 --- a/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.hxx +++ b/src/IGESDraw/IGESDraw_ToolNetworkSubfigureDef.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolNetworkSubfigureDef { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolNetworkSubfigureDef, ready to work - Standard_EXPORT IGESDraw_ToolNetworkSubfigureDef(); + IGESDraw_ToolNetworkSubfigureDef() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDraw_NetworkSubfigureDef)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_NetworkSubfigureDef)& entfrom, const Handle(IGESDraw_NetworkSubfigureDef)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_NetworkSubfigureDef)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolNetworkSubfigureDef_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolPerspectiveView.cxx b/src/IGESDraw/IGESDraw_ToolPerspectiveView.cxx index 70cde2317f..7f6732d541 100644 --- a/src/IGESDraw/IGESDraw_ToolPerspectiveView.cxx +++ b/src/IGESDraw/IGESDraw_ToolPerspectiveView.cxx @@ -31,15 +31,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDraw_ToolPerspectiveView::IGESDraw_ToolPerspectiveView () { } - void IGESDraw_ToolPerspectiveView::ReadOwnParams (const Handle(IGESDraw_PerspectiveView)& ent, @@ -120,24 +117,6 @@ void IGESDraw_ToolPerspectiveView::WriteOwnParams IW.Send(ent->FrontPlaneDistance()); } -void IGESDraw_ToolPerspectiveView::OwnShared - (const Handle(IGESDraw_PerspectiveView)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESDraw_ToolPerspectiveView::OwnCopy - (const Handle(IGESDraw_PerspectiveView)& another, - const Handle(IGESDraw_PerspectiveView)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init - (another->ViewNumber(), another->ScaleFactor(), - another->ViewNormalVector().XYZ(), another->ViewReferencePoint().XYZ(), - another->CenterOfProjection().XYZ(), another->ViewUpVector().XYZ(), - another->ViewPlaneDistance(), - another->TopLeft().XY(),another->BottomRight().XY(), another->DepthClip(), - another->BackPlaneDistance(), another->FrontPlaneDistance()); -} - IGESData_DirChecker IGESDraw_ToolPerspectiveView::DirChecker (const Handle(IGESDraw_PerspectiveView)& /*ent*/) const diff --git a/src/IGESDraw/IGESDraw_ToolPerspectiveView.hxx b/src/IGESDraw/IGESDraw_ToolPerspectiveView.hxx index cc6b137e5f..b3cc0663f2 100644 --- a/src/IGESDraw/IGESDraw_ToolPerspectiveView.hxx +++ b/src/IGESDraw/IGESDraw_ToolPerspectiveView.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolPerspectiveView { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPerspectiveView, ready to work - Standard_EXPORT IGESDraw_ToolPerspectiveView(); + IGESDraw_ToolPerspectiveView() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,14 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESDraw_PerspectiveView)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a PerspectiveView , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESDraw_PerspectiveView)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDraw_PerspectiveView)& ent) const; //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDraw_PerspectiveView)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_PerspectiveView)& entfrom, const Handle(IGESDraw_PerspectiveView)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_PerspectiveView)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolPerspectiveView_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolPlanar.cxx b/src/IGESDraw/IGESDraw_ToolPlanar.cxx index 020662978f..c8e626c232 100644 --- a/src/IGESDraw/IGESDraw_ToolPlanar.cxx +++ b/src/IGESDraw/IGESDraw_ToolPlanar.cxx @@ -29,15 +29,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDraw_ToolPlanar::IGESDraw_ToolPlanar () { } - void IGESDraw_ToolPlanar::ReadOwnParams (const Handle(IGESDraw_Planar)& ent, @@ -106,30 +103,6 @@ void IGESDraw_ToolPlanar::OwnShared iter.GetOneItem( ent->Entity(i) ); } -void IGESDraw_ToolPlanar::OwnCopy - (const Handle(IGESDraw_Planar)& another, - const Handle(IGESDraw_Planar)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer nbval; - Standard_Integer nbMatrices; - Handle(IGESData_HArray1OfIGESEntity) entities; - - nbval = another->NbEntities(); - nbMatrices = another->NbMatrices(); - DeclareAndCast(IGESGeom_TransformationMatrix, transformationMatrix, - TC.Transferred(another->TransformMatrix())); - - entities = new IGESData_HArray1OfIGESEntity(1, nbval); - for (Standard_Integer i = 1; i <= nbval; i++) - { - DeclareAndCast(IGESData_IGESEntity, tempEntity, - TC.Transferred(another->Entity(i))); - entities->SetValue( i, tempEntity ); - } - - ent->Init(nbMatrices, transformationMatrix, entities); -} - Standard_Boolean IGESDraw_ToolPlanar::OwnCorrect (const Handle(IGESDraw_Planar)& ent) const { diff --git a/src/IGESDraw/IGESDraw_ToolPlanar.hxx b/src/IGESDraw/IGESDraw_ToolPlanar.hxx index 4696120d12..1db1b7f87c 100644 --- a/src/IGESDraw/IGESDraw_ToolPlanar.hxx +++ b/src/IGESDraw/IGESDraw_ToolPlanar.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolPlanar { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPlanar, ready to work - Standard_EXPORT IGESDraw_ToolPlanar(); + IGESDraw_ToolPlanar() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDraw_Planar)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_Planar)& entfrom, const Handle(IGESDraw_Planar)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_Planar)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolPlanar_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.cxx b/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.cxx index bcb821a4e6..4325b912b7 100644 --- a/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.cxx +++ b/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -37,8 +36,6 @@ #include #include -IGESDraw_ToolRectArraySubfigure::IGESDraw_ToolRectArraySubfigure () { } - void IGESDraw_ToolRectArraySubfigure::ReadOwnParams (const Handle(IGESDraw_RectArraySubfigure)& ent, @@ -125,34 +122,6 @@ void IGESDraw_ToolRectArraySubfigure::OwnShared iter.GetOneItem(ent->BaseEntity()); } -void IGESDraw_ToolRectArraySubfigure::OwnCopy - (const Handle(IGESDraw_RectArraySubfigure)& another, - const Handle(IGESDraw_RectArraySubfigure)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity, tempBaseEntity, - TC.Transferred(another->BaseEntity())); - Standard_Real tempScaleFactor = another->ScaleFactor(); - gp_XYZ tempLowerLeftCorner = (another->LowerLeftCorner()).XYZ(); - Standard_Integer tempNbColumns = another->NbColumns(); - Standard_Integer tempNbRows = another->NbRows(); - Standard_Real tempColumnSeparation = another->ColumnSeparation(); - Standard_Real tempRowSeparation = another->RowSeparation(); - Standard_Real tempRotationAngle = another->RotationAngle(); - Standard_Integer tempListCount = another->ListCount(); - Standard_Integer tempDoDontFlag = (another->DoDontFlag() ? 1 : 0); - Handle(TColStd_HArray1OfInteger) tempPositions; - if (tempListCount != 0) { - tempPositions = new TColStd_HArray1OfInteger (1,tempListCount); - Standard_Integer I; - for (I = 1; I <= tempListCount; I++) - tempPositions->SetValue(I, another->ListPosition(I)); - } - - ent->Init(tempBaseEntity, tempScaleFactor, tempLowerLeftCorner, - tempNbColumns, tempNbRows, tempColumnSeparation, tempRowSeparation, - tempRotationAngle, tempDoDontFlag, tempPositions); -} - IGESData_DirChecker IGESDraw_ToolRectArraySubfigure::DirChecker (const Handle(IGESDraw_RectArraySubfigure)& /*ent*/) const { @@ -166,12 +135,6 @@ IGESData_DirChecker IGESDraw_ToolRectArraySubfigure::DirChecker return DC; } -void IGESDraw_ToolRectArraySubfigure::OwnCheck - (const Handle(IGESDraw_RectArraySubfigure)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -} - void IGESDraw_ToolRectArraySubfigure::OwnDump (const Handle(IGESDraw_RectArraySubfigure)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.hxx b/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.hxx index 13e077640b..ec3c111080 100644 --- a/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.hxx +++ b/src/IGESDraw/IGESDraw_ToolRectArraySubfigure.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolRectArraySubfigure { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolRectArraySubfigure, ready to work - Standard_EXPORT IGESDraw_ToolRectArraySubfigure(); + IGESDraw_ToolRectArraySubfigure() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDraw_RectArraySubfigure)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDraw_RectArraySubfigure)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_RectArraySubfigure)& entfrom, const Handle(IGESDraw_RectArraySubfigure)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_RectArraySubfigure)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolRectArraySubfigure_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.cxx b/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.cxx index 76715a18bb..05f2bef04c 100644 --- a/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.cxx +++ b/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -40,8 +39,6 @@ #include #include -IGESDraw_ToolSegmentedViewsVisible::IGESDraw_ToolSegmentedViewsVisible () { } - void IGESDraw_ToolSegmentedViewsVisible::ReadOwnParams (const Handle(IGESDraw_SegmentedViewsVisible)& ent, @@ -181,79 +178,6 @@ void IGESDraw_ToolSegmentedViewsVisible::OwnShared } } -void IGESDraw_ToolSegmentedViewsVisible::OwnCopy - (const Handle(IGESDraw_SegmentedViewsVisible)& another, - const Handle(IGESDraw_SegmentedViewsVisible)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer nbval; - Handle(IGESDraw_HArray1OfViewKindEntity) views; - Handle(TColStd_HArray1OfReal) breakpointParameters; - Handle(TColStd_HArray1OfInteger) displayFlags; - Handle(TColStd_HArray1OfInteger) colorValues; - Handle(IGESGraph_HArray1OfColor) colorDefinitions; - Handle(TColStd_HArray1OfInteger) lineFontValues; - Handle(IGESBasic_HArray1OfLineFontEntity) lineFontDefinitions; - Handle(TColStd_HArray1OfInteger) lineWeights; - - Handle(IGESData_ViewKindEntity) retView; - Handle(IGESGraph_Color) retColorDef; - Handle(IGESData_LineFontEntity) retLineFontDef; - - nbval = another->NbSegmentBlocks(); - views = new IGESDraw_HArray1OfViewKindEntity(1, nbval); - breakpointParameters = new TColStd_HArray1OfReal(1, nbval); - displayFlags = new TColStd_HArray1OfInteger(1, nbval); - colorValues = new TColStd_HArray1OfInteger(1, nbval); - lineFontValues = new TColStd_HArray1OfInteger(1, nbval); - colorDefinitions = new IGESGraph_HArray1OfColor(1, nbval); - lineFontDefinitions = new IGESBasic_HArray1OfLineFontEntity(1, nbval); - lineWeights = new TColStd_HArray1OfInteger(1, nbval); - - for (Standard_Integer i = 1; i <= nbval; i++) - { - retView = another->ViewItem(i); - DeclareAndCast(IGESData_ViewKindEntity, - tempView, TC.Transferred(retView)); - views->SetValue( i, tempView ); - - breakpointParameters->SetValue( i, another->BreakpointParameter(i) ); - - displayFlags->SetValue( i, another->DisplayFlag(i) ); - - if ( another->IsColorDefinition(i) ) - { - retColorDef = another->ColorDefinition(i); - DeclareAndCast(IGESGraph_Color, tempColorDef, - TC.Transferred(retColorDef)); - colorDefinitions->SetValue( i, tempColorDef ); - } - else - { - colorValues->SetValue( i, another->ColorValue(i) ); -//// colorDefinitions->SetValue( i, NULL ); par defaut - } - - if ( another->IsFontDefinition(i) ) - { - retLineFontDef = another->LineFontDefinition(i); - DeclareAndCast(IGESData_LineFontEntity, tempLineFontDef, - TC.Transferred(retLineFontDef)); - lineFontDefinitions->SetValue( i, tempLineFontDef ); - } - else - { - lineFontValues->SetValue( i, another->LineFontValue(i) ); -//// lineFontDefinitions->SetValue( i, NULL ); par defaut - } - - lineWeights->SetValue( i, another->LineWeightItem(i) ); - } - - ent->Init(views, breakpointParameters, displayFlags, - colorValues, colorDefinitions, - lineFontValues, lineFontDefinitions, lineWeights); -} - IGESData_DirChecker IGESDraw_ToolSegmentedViewsVisible::DirChecker (const Handle(IGESDraw_SegmentedViewsVisible)& /*ent*/) const { @@ -269,12 +193,6 @@ IGESData_DirChecker IGESDraw_ToolSegmentedViewsVisible::DirChecker return DC; } -void IGESDraw_ToolSegmentedViewsVisible::OwnCheck - (const Handle(IGESDraw_SegmentedViewsVisible)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -} - void IGESDraw_ToolSegmentedViewsVisible::OwnDump (const Handle(IGESDraw_SegmentedViewsVisible)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.hxx b/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.hxx index 09980452f4..7942978f65 100644 --- a/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.hxx +++ b/src/IGESDraw/IGESDraw_ToolSegmentedViewsVisible.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolSegmentedViewsVisible { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSegmentedViewsVisible, ready to work - Standard_EXPORT IGESDraw_ToolSegmentedViewsVisible(); + IGESDraw_ToolSegmentedViewsVisible() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESDraw_SegmentedViewsVisible)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESDraw_SegmentedViewsVisible)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_SegmentedViewsVisible)& entfrom, const Handle(IGESDraw_SegmentedViewsVisible)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_SegmentedViewsVisible)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolSegmentedViewsVisible_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolView.cxx b/src/IGESDraw/IGESDraw_ToolView.cxx index 9e63ceba89..fce2fd67ce 100644 --- a/src/IGESDraw/IGESDraw_ToolView.cxx +++ b/src/IGESDraw/IGESDraw_ToolView.cxx @@ -27,15 +27,12 @@ #include #include #include -#include #include #include #include #include #include -IGESDraw_ToolView::IGESDraw_ToolView () { } - void IGESDraw_ToolView::ReadOwnParams (const Handle(IGESDraw_View)& ent, @@ -103,29 +100,6 @@ void IGESDraw_ToolView::OwnShared iter.GetOneItem(ent->FrontPlane()); } -void IGESDraw_ToolView::OwnCopy - (const Handle(IGESDraw_View)& another, - const Handle(IGESDraw_View)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer tempViewNumber = another->ViewNumber(); - Standard_Real tempScaleFactor = another->ScaleFactor(); - DeclareAndCast(IGESGeom_Plane, tempLeftPlane, - TC.Transferred(another->LeftPlane())); - DeclareAndCast(IGESGeom_Plane, tempTopPlane, - TC.Transferred(another->TopPlane())); - DeclareAndCast(IGESGeom_Plane, tempRightPlane, - TC.Transferred(another->RightPlane())); - DeclareAndCast(IGESGeom_Plane, tempBottomPlane, - TC.Transferred(another->BottomPlane())); - DeclareAndCast(IGESGeom_Plane, tempBackPlane, - TC.Transferred(another->BackPlane())); - DeclareAndCast(IGESGeom_Plane, tempFrontPlane, - TC.Transferred(another->FrontPlane())); - - ent->Init(tempViewNumber, tempScaleFactor, tempLeftPlane, tempTopPlane, - tempRightPlane, tempBottomPlane, tempBackPlane, tempFrontPlane); -} - IGESData_DirChecker IGESDraw_ToolView::DirChecker (const Handle(IGESDraw_View)& /*ent*/) const { diff --git a/src/IGESDraw/IGESDraw_ToolView.hxx b/src/IGESDraw/IGESDraw_ToolView.hxx index 79b3e378f3..f5112cc7fe 100644 --- a/src/IGESDraw/IGESDraw_ToolView.hxx +++ b/src/IGESDraw/IGESDraw_ToolView.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolView { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolView, ready to work - Standard_EXPORT IGESDraw_ToolView(); + IGESDraw_ToolView() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDraw_View)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_View)& entfrom, const Handle(IGESDraw_View)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_View)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolView_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx b/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx index 19ae99752a..c88744f93f 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisible.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -38,8 +37,6 @@ #include #include -IGESDraw_ToolViewsVisible::IGESDraw_ToolViewsVisible () { } - void IGESDraw_ToolViewsVisible::ReadOwnParams (const Handle(IGESDraw_ViewsVisible)& ent, @@ -142,49 +139,6 @@ void IGESDraw_ToolViewsVisible::OwnImplied } -void IGESDraw_ToolViewsVisible::OwnCopy - (const Handle(IGESDraw_ViewsVisible)& another, - const Handle(IGESDraw_ViewsVisible)& ent, Interface_CopyTool& TC) const -{ - Handle(IGESDraw_HArray1OfViewKindEntity) tempViewEntities = - new IGESDraw_HArray1OfViewKindEntity(1, another->NbViews()); - Standard_Integer I, up; - up = another->NbViews(); - for (I = 1; I <= up; I++) { - DeclareAndCast(IGESData_ViewKindEntity, tempView, - TC.Transferred(another->ViewItem(I))); - tempViewEntities->SetValue(I, tempView); - } -// Displayed -> Implied : mettre une liste vide par defaut - Handle(IGESData_HArray1OfIGESEntity) tempDisplayEntities; - ent->Init(tempViewEntities, tempDisplayEntities); -} - -void IGESDraw_ToolViewsVisible::OwnRenew - (const Handle(IGESDraw_ViewsVisible)& another, - const Handle(IGESDraw_ViewsVisible)& ent, const Interface_CopyTool& TC) const -{ - Interface_EntityIterator newdisp; - Standard_Integer I, up; - up = another->NbDisplayedEntities(); - if (up == 0) return; - Handle(IGESData_HArray1OfIGESEntity) tempDisplayEntities; - Handle(Standard_Transient) anew; - for (I = 1; I <= up; I++) { - if (TC.Search (another->DisplayedEntity(I),anew)) newdisp.GetOneItem(anew); - } - - up = newdisp.NbEntities(); I = 0; - if (up > 0) tempDisplayEntities = new IGESData_HArray1OfIGESEntity(1,up); - for (newdisp.Start(); newdisp.More(); newdisp.Next()) { - I ++; - DeclareAndCast(IGESData_IGESEntity, tempEntity,newdisp.Value()); - tempDisplayEntities->SetValue(I, tempEntity); - } - ent->InitImplied (tempDisplayEntities); -} - - IGESData_DirChecker IGESDraw_ToolViewsVisible::DirChecker (const Handle(IGESDraw_ViewsVisible)& /*ent*/) const { @@ -218,13 +172,6 @@ void IGESDraw_ToolViewsVisible::OwnCheck ach->AddFail(mess,"Mismatch for %d Entities displayed"); } -void IGESDraw_ToolViewsVisible::OwnWhenDelete - (const Handle(IGESDraw_ViewsVisible)& ent) const -{ - Handle(IGESData_HArray1OfIGESEntity) tempDisplayEntities; - ent->InitImplied (tempDisplayEntities); -} - void IGESDraw_ToolViewsVisible::OwnDump (const Handle(IGESDraw_ViewsVisible)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx b/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx index 4ae6139f04..eb1255bd9a 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisible.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolViewsVisible { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolViewsVisible, ready to work - Standard_EXPORT IGESDraw_ToolViewsVisible(); + IGESDraw_ToolViewsVisible() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,18 +68,6 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDraw_ViewsVisible)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters shared not implied, i.e. all but - //! the Displayed Entities - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_ViewsVisible)& entfrom, const Handle(IGESDraw_ViewsVisible)& entto, Interface_CopyTool& TC) const; - - //! Copies Specific implied Parameters : the Displayed Entities - //! which have already been copied - Standard_EXPORT void OwnRenew (const Handle(IGESDraw_ViewsVisible)& entfrom, const Handle(IGESDraw_ViewsVisible)& entto, const Interface_CopyTool& TC) const; - - //! Clears specific implied parameters, which cause looping - //! structures; required for deletion - Standard_EXPORT void OwnWhenDelete (const Handle(IGESDraw_ViewsVisible)& ent) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_ViewsVisible)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; @@ -89,28 +75,6 @@ public: //! (all displayed entities must refer to in directory part, //! else the list is cleared) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESDraw_ViewsVisible)& ent) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolViewsVisible_HeaderFile diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx index 213216427d..f63e6d8931 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -43,8 +42,6 @@ #include #include -IGESDraw_ToolViewsVisibleWithAttr::IGESDraw_ToolViewsVisibleWithAttr () { } - void IGESDraw_ToolViewsVisibleWithAttr::ReadOwnParams (const Handle(IGESDraw_ViewsVisibleWithAttr)& ent, @@ -214,80 +211,6 @@ void IGESDraw_ToolViewsVisibleWithAttr::OwnImplied } -void IGESDraw_ToolViewsVisibleWithAttr::OwnCopy - (const Handle(IGESDraw_ViewsVisibleWithAttr)& another, - const Handle(IGESDraw_ViewsVisibleWithAttr)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer I; - Standard_Integer up = another->NbViews(); - Handle(IGESDraw_HArray1OfViewKindEntity) tempViewEntities = - new IGESDraw_HArray1OfViewKindEntity(1, up); - Handle(TColStd_HArray1OfInteger) tempLineFonts = - new TColStd_HArray1OfInteger(1, up); - Handle(IGESBasic_HArray1OfLineFontEntity) tempLineDefinitions = - new IGESBasic_HArray1OfLineFontEntity(1, up); - Handle(TColStd_HArray1OfInteger) tempColorValues = - new TColStd_HArray1OfInteger(1, up); - Handle(IGESGraph_HArray1OfColor) tempColorDefinitions = - new IGESGraph_HArray1OfColor(1, up); - Handle(TColStd_HArray1OfInteger) tempLineWeights = - new TColStd_HArray1OfInteger(1, up); - - for (I = 1; I <= up; I ++) { - DeclareAndCast(IGESData_ViewKindEntity, tempView, - TC.Transferred(another->ViewItem(I))); - tempViewEntities->SetValue(I,tempView); - Standard_Integer tempLineFont = another->LineFontValue(I); - tempLineFonts->SetValue(I,tempLineFont); - if (another->IsFontDefinition(I)) { - DeclareAndCast(IGESData_LineFontEntity, tempEntity1, - TC.Transferred(another->FontDefinition(I))); - tempLineDefinitions->SetValue(I,tempEntity1); - } - if (another->IsColorDefinition(I)) { - DeclareAndCast(IGESGraph_Color, tempEntity2, - TC.Transferred(another->ColorDefinition(I))); - tempColorDefinitions->SetValue(I,tempEntity2); - } - else { - Standard_Integer tempColorValue = another->ColorValue(I); - tempColorValues->SetValue(I,tempColorValue); - } - Standard_Integer tempLineWeight = another->LineWeightItem(I); - tempLineWeights->SetValue(I, tempLineWeight); - } -// Displayed -> Implied : mettre une liste vide par defaut - Handle(IGESData_HArray1OfIGESEntity) tempDisplayEntities; - ent->Init(tempViewEntities, tempLineFonts, tempLineDefinitions, - tempColorValues, tempColorDefinitions, tempLineWeights, - tempDisplayEntities); -} - -void IGESDraw_ToolViewsVisibleWithAttr::OwnRenew - (const Handle(IGESDraw_ViewsVisibleWithAttr)& another, - const Handle(IGESDraw_ViewsVisibleWithAttr)& ent, const Interface_CopyTool& TC) const -{ - Interface_EntityIterator newdisp; - Standard_Integer I, up; - up = another->NbDisplayedEntities(); - if (up == 0) return; - Handle(IGESData_HArray1OfIGESEntity) tempDisplayEntities; - Handle(Standard_Transient) anew; - for (I = 1; I <= up; I++) { - if (TC.Search (another->DisplayedEntity(I),anew)) newdisp.GetOneItem(anew); - } - - up = newdisp.NbEntities(); I = 0; - if (up > 0) tempDisplayEntities = new IGESData_HArray1OfIGESEntity(1,up); - for (newdisp.Start(); newdisp.More(); newdisp.Next()) { - I ++; - DeclareAndCast(IGESData_IGESEntity, tempEntity,newdisp.Value()); - tempDisplayEntities->SetValue(I, tempEntity); - } - ent->InitImplied (tempDisplayEntities); -} - - IGESData_DirChecker IGESDraw_ToolViewsVisibleWithAttr::DirChecker (const Handle(IGESDraw_ViewsVisibleWithAttr)& /*ent*/) const { @@ -327,13 +250,6 @@ void IGESDraw_ToolViewsVisibleWithAttr::OwnCheck ach->AddFail(mess,"Mismatch for %d Entities displayed"); } -void IGESDraw_ToolViewsVisibleWithAttr::OwnWhenDelete - (const Handle(IGESDraw_ViewsVisibleWithAttr)& ent) const -{ - Handle(IGESData_HArray1OfIGESEntity) tempDisplayEntities; - ent->InitImplied (tempDisplayEntities); -} - void IGESDraw_ToolViewsVisibleWithAttr::OwnDump (const Handle(IGESDraw_ViewsVisibleWithAttr)& ent, const IGESData_IGESDumper& dumper, diff --git a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx index cd3437d493..07a2caf1fc 100644 --- a/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx +++ b/src/IGESDraw/IGESDraw_ToolViewsVisibleWithAttr.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESDraw_ToolViewsVisibleWithAttr { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolViewsVisibleWithAttr, ready to work - Standard_EXPORT IGESDraw_ToolViewsVisibleWithAttr(); + IGESDraw_ToolViewsVisibleWithAttr() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -71,18 +69,6 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESDraw_ViewsVisibleWithAttr)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters shared not implied, i.e. all but - //! the Displayed Entities - Standard_EXPORT void OwnCopy (const Handle(IGESDraw_ViewsVisibleWithAttr)& entfrom, const Handle(IGESDraw_ViewsVisibleWithAttr)& entto, Interface_CopyTool& TC) const; - - //! Copies Specific implied Parameters : the Displayed Entities - //! which have already been copied - Standard_EXPORT void OwnRenew (const Handle(IGESDraw_ViewsVisibleWithAttr)& entfrom, const Handle(IGESDraw_ViewsVisibleWithAttr)& entto, const Interface_CopyTool& TC) const; - - //! Clears specific implied parameters, which cause looping - //! structures; required for deletion - Standard_EXPORT void OwnWhenDelete (const Handle(IGESDraw_ViewsVisibleWithAttr)& ent) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESDraw_ViewsVisibleWithAttr)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; @@ -90,28 +76,6 @@ public: //! (all displayed entities must refer to in directory part, //! else the list is cleared) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESDraw_ViewsVisibleWithAttr)& ent) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESDraw_ToolViewsVisibleWithAttr_HeaderFile diff --git a/src/IGESFile/IGESFile_Read.cxx b/src/IGESFile/IGESFile_Read.cxx index e59d52a90f..750354e483 100644 --- a/src/IGESFile/IGESFile_Read.cxx +++ b/src/IGESFile/IGESFile_Read.cxx @@ -49,41 +49,14 @@ static Handle(Interface_Check)& checkread() static void IGESFile_ReadHeader (const Handle(IGESData_IGESReaderData)& IR); static void IGESFile_ReadContent (const Handle(IGESData_IGESReaderData)& IR); void IGESFile_Check (int mode,Message_Msg& amsg); -// void IGESFile_Check2 (int mode,char * code, int num, char * str); -// void IGESFile_Check3 (int mode,char * code); // Correspondance entre types igesread et types Interface_ParamFile ... static Interface_ParamType LesTypes[10]; - -// Nouvelle maniere : Protocol suffit - -Standard_Integer IGESFile_Read - (char* nomfic, - const Handle(IGESData_IGESModel)& amodel, - const Handle(IGESData_Protocol)& protocol) -{ - Handle(IGESData_FileRecognizer) nulreco; - return IGESFile_Read(nomfic,amodel,protocol,nulreco,Standard_False); -} - -Standard_Integer IGESFile_ReadFNES - (char* nomfic, - const Handle(IGESData_IGESModel)& amodel, - const Handle(IGESData_Protocol)& protocol) -{ - Handle(IGESData_FileRecognizer) nulreco; - return IGESFile_Read(nomfic,amodel,protocol,nulreco,Standard_True); -} - - -// Ancienne maniere : avec Recognizer - Standard_Integer IGESFile_Read (char* nomfic, const Handle(IGESData_IGESModel)& amodel, const Handle(IGESData_Protocol)& protocol, - const Handle(IGESData_FileRecognizer)& reco, const Standard_Boolean modefnes) { //==================================== @@ -163,7 +136,7 @@ Standard_Integer IGESFile_Read IGESFile_Check(2, Msg15); iges_finfile(1); IGESData_IGESReaderTool IT (IR,protocol); - IT.Prepare(reco); + IT.Prepare(); // Sending of message : Loading of Model : Beginning IT.LoadModel(amodel); diff --git a/src/IGESFile/IGESFile_Read.hxx b/src/IGESFile/IGESFile_Read.hxx index 5226b73d62..b5478e7540 100644 --- a/src/IGESFile/IGESFile_Read.hxx +++ b/src/IGESFile/IGESFile_Read.hxx @@ -19,24 +19,11 @@ #include #include -#include - - -Standard_EXPORT Standard_Integer IGESFile_Read - (char* nomfic, - const Handle(IGESData_IGESModel)& amodel, - const Handle(IGESData_Protocol)& protocol); - -Standard_EXPORT Standard_Integer IGESFile_ReadFNES - (char* nomfic, - const Handle(IGESData_IGESModel)& amodel, - const Handle(IGESData_Protocol)& protocol); Standard_EXPORT Standard_Integer IGESFile_Read (char* nomfic, const Handle(IGESData_IGESModel)& amodel, const Handle(IGESData_Protocol)& protocol, - const Handle(IGESData_FileRecognizer)& reco, const Standard_Boolean modefnes = Standard_False); #endif diff --git a/src/IGESGeom/IGESGeom.cxx b/src/IGESGeom/IGESGeom.cxx index 7624bb6e54..e764a6a94a 100644 --- a/src/IGESGeom/IGESGeom.cxx +++ b/src/IGESGeom/IGESGeom.cxx @@ -23,14 +23,16 @@ #include #include -// Ancillary data to work on a Package of IGES Entities with a Protocol -// (Modules are created and loaded in appropriate libraries, once by Init) -static Handle(IGESGeom_Protocol) protocol; - - void IGESGeom::Init () +/*void IGESGeom::Init () { IGESBasic::Init(); + IGESGeom::Protocol(); +}*/ + +const Handle(IGESGeom_Protocol) & IGESGeom::Protocol () +{ + static Handle(IGESGeom_Protocol) protocol; if (protocol.IsNull()) { protocol = new IGESGeom_Protocol; Interface_GeneralLib::SetGlobal (new IGESGeom_GeneralModule, protocol); @@ -38,9 +40,5 @@ static Handle(IGESGeom_Protocol) protocol; IGESData_WriterLib::SetGlobal (new IGESGeom_ReadWriteModule,protocol); IGESData_SpecificLib::SetGlobal (new IGESGeom_SpecificModule, protocol); } -} - - Handle(IGESGeom_Protocol) IGESGeom::Protocol () -{ return protocol; } diff --git a/src/IGESGeom/IGESGeom.hxx b/src/IGESGeom/IGESGeom.hxx index 22c060b272..9cba489ee1 100644 --- a/src/IGESGeom/IGESGeom.hxx +++ b/src/IGESGeom/IGESGeom.hxx @@ -18,147 +18,21 @@ #define _IGESGeom_HeaderFile #include -#include #include class IGESGeom_Protocol; -class IGESGeom_CircularArc; -class IGESGeom_CompositeCurve; -class IGESGeom_ConicArc; -class IGESGeom_CopiousData; -class IGESGeom_Plane; -class IGESGeom_Line; -class IGESGeom_SplineCurve; -class IGESGeom_SplineSurface; -class IGESGeom_Point; -class IGESGeom_RuledSurface; -class IGESGeom_SurfaceOfRevolution; -class IGESGeom_TabulatedCylinder; -class IGESGeom_Direction; -class IGESGeom_TransformationMatrix; -class IGESGeom_Flash; -class IGESGeom_BSplineCurve; -class IGESGeom_BSplineSurface; -class IGESGeom_OffsetCurve; -class IGESGeom_OffsetSurface; -class IGESGeom_Boundary; -class IGESGeom_CurveOnSurface; -class IGESGeom_BoundedSurface; -class IGESGeom_TrimmedSurface; -class IGESGeom_ToolCircularArc; -class IGESGeom_ToolCompositeCurve; -class IGESGeom_ToolConicArc; -class IGESGeom_ToolCopiousData; -class IGESGeom_ToolPlane; -class IGESGeom_ToolLine; -class IGESGeom_ToolSplineCurve; -class IGESGeom_ToolSplineSurface; -class IGESGeom_ToolPoint; -class IGESGeom_ToolRuledSurface; -class IGESGeom_ToolSurfaceOfRevolution; -class IGESGeom_ToolTabulatedCylinder; -class IGESGeom_ToolDirection; -class IGESGeom_ToolTransformationMatrix; -class IGESGeom_ToolFlash; -class IGESGeom_ToolBSplineCurve; -class IGESGeom_ToolBSplineSurface; -class IGESGeom_ToolOffsetCurve; -class IGESGeom_ToolOffsetSurface; -class IGESGeom_ToolBoundary; -class IGESGeom_ToolCurveOnSurface; -class IGESGeom_ToolBoundedSurface; -class IGESGeom_ToolTrimmedSurface; -class IGESGeom_Protocol; -class IGESGeom_ReadWriteModule; -class IGESGeom_GeneralModule; -class IGESGeom_SpecificModule; //! This package consists of B-Rep and CSG Solid entities class IGESGeom { -public: - - DEFINE_STANDARD_ALLOC + public: - //! Prepares dymanic data (Protocol, Modules) for this package - Standard_EXPORT static void Init(); + //Standard_EXPORT static void Init(); //! Returns the Protocol for this Package - Standard_EXPORT static Handle(IGESGeom_Protocol) Protocol(); - - - - -protected: - - - - - -private: - - - - -friend class IGESGeom_CircularArc; -friend class IGESGeom_CompositeCurve; -friend class IGESGeom_ConicArc; -friend class IGESGeom_CopiousData; -friend class IGESGeom_Plane; -friend class IGESGeom_Line; -friend class IGESGeom_SplineCurve; -friend class IGESGeom_SplineSurface; -friend class IGESGeom_Point; -friend class IGESGeom_RuledSurface; -friend class IGESGeom_SurfaceOfRevolution; -friend class IGESGeom_TabulatedCylinder; -friend class IGESGeom_Direction; -friend class IGESGeom_TransformationMatrix; -friend class IGESGeom_Flash; -friend class IGESGeom_BSplineCurve; -friend class IGESGeom_BSplineSurface; -friend class IGESGeom_OffsetCurve; -friend class IGESGeom_OffsetSurface; -friend class IGESGeom_Boundary; -friend class IGESGeom_CurveOnSurface; -friend class IGESGeom_BoundedSurface; -friend class IGESGeom_TrimmedSurface; -friend class IGESGeom_ToolCircularArc; -friend class IGESGeom_ToolCompositeCurve; -friend class IGESGeom_ToolConicArc; -friend class IGESGeom_ToolCopiousData; -friend class IGESGeom_ToolPlane; -friend class IGESGeom_ToolLine; -friend class IGESGeom_ToolSplineCurve; -friend class IGESGeom_ToolSplineSurface; -friend class IGESGeom_ToolPoint; -friend class IGESGeom_ToolRuledSurface; -friend class IGESGeom_ToolSurfaceOfRevolution; -friend class IGESGeom_ToolTabulatedCylinder; -friend class IGESGeom_ToolDirection; -friend class IGESGeom_ToolTransformationMatrix; -friend class IGESGeom_ToolFlash; -friend class IGESGeom_ToolBSplineCurve; -friend class IGESGeom_ToolBSplineSurface; -friend class IGESGeom_ToolOffsetCurve; -friend class IGESGeom_ToolOffsetSurface; -friend class IGESGeom_ToolBoundary; -friend class IGESGeom_ToolCurveOnSurface; -friend class IGESGeom_ToolBoundedSurface; -friend class IGESGeom_ToolTrimmedSurface; -friend class IGESGeom_Protocol; -friend class IGESGeom_ReadWriteModule; -friend class IGESGeom_GeneralModule; -friend class IGESGeom_SpecificModule; - + Standard_EXPORT static const Handle(IGESGeom_Protocol) & Protocol(); }; - - - - - - #endif // _IGESGeom_HeaderFile diff --git a/src/IGESGeom/IGESGeom_GeneralModule.cxx b/src/IGESGeom/IGESGeom_GeneralModule.cxx index e6b95ef829..abd008d5f7 100644 --- a/src/IGESGeom/IGESGeom_GeneralModule.cxx +++ b/src/IGESGeom/IGESGeom_GeneralModule.cxx @@ -63,40 +63,18 @@ #include #include #include -#include #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_GeneralModule,IGESData_GeneralModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } - void IGESGeom_GeneralModule::OwnSharedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const { switch (CN) { - case 1 : { - DeclareAndCast(IGESGeom_BSplineCurve,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolBSplineCurve tool; - tool.OwnShared(anent,iter); - } - break; - case 2 : { - DeclareAndCast(IGESGeom_BSplineSurface,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolBSplineSurface tool; - tool.OwnShared(anent,iter); - } - break; case 3 : { DeclareAndCast(IGESGeom_Boundary,anent,ent); if (anent.IsNull()) return; @@ -111,13 +89,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 5 : { - DeclareAndCast(IGESGeom_CircularArc,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolCircularArc tool; - tool.OwnShared(anent,iter); - } - break; case 6 : { DeclareAndCast(IGESGeom_CompositeCurve,anent,ent); if (anent.IsNull()) return; @@ -125,20 +96,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 7 : { - DeclareAndCast(IGESGeom_ConicArc,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolConicArc tool; - tool.OwnShared(anent,iter); - } - break; - case 8 : { - DeclareAndCast(IGESGeom_CopiousData,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolCopiousData tool; - tool.OwnShared(anent,iter); - } - break; case 9 : { DeclareAndCast(IGESGeom_CurveOnSurface,anent,ent); if (anent.IsNull()) return; @@ -146,13 +103,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 10 : { - DeclareAndCast(IGESGeom_Direction,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolDirection tool; - tool.OwnShared(anent,iter); - } - break; case 11 : { DeclareAndCast(IGESGeom_Flash,anent,ent); if (anent.IsNull()) return; @@ -160,13 +110,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 12 : { - DeclareAndCast(IGESGeom_Line,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolLine tool; - tool.OwnShared(anent,iter); - } - break; case 13 : { DeclareAndCast(IGESGeom_OffsetCurve,anent,ent); if (anent.IsNull()) return; @@ -202,20 +145,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 18 : { - DeclareAndCast(IGESGeom_SplineCurve,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolSplineCurve tool; - tool.OwnShared(anent,iter); - } - break; - case 19 : { - DeclareAndCast(IGESGeom_SplineSurface,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolSplineSurface tool; - tool.OwnShared(anent,iter); - } - break; case 20 : { DeclareAndCast(IGESGeom_SurfaceOfRevolution,anent,ent); if (anent.IsNull()) return; @@ -230,13 +159,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 22 : { - DeclareAndCast(IGESGeom_TransformationMatrix,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolTransformationMatrix tool; - tool.OwnShared(anent,iter); - } - break; case 23 : { DeclareAndCast(IGESGeom_TrimmedSurface,anent,ent); if (anent.IsNull()) return; @@ -430,20 +352,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 5 : { - DeclareAndCast(IGESGeom_CircularArc,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolCircularArc tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 6 : { - DeclareAndCast(IGESGeom_CompositeCurve,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolCompositeCurve tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 7 : { DeclareAndCast(IGESGeom_ConicArc,anent,ent); if (anent.IsNull()) return; @@ -479,13 +387,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 12 : { - DeclareAndCast(IGESGeom_Line,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolLine tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 13 : { DeclareAndCast(IGESGeom_OffsetCurve,anent,ent); if (anent.IsNull()) return; @@ -493,13 +394,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 14 : { - DeclareAndCast(IGESGeom_OffsetSurface,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolOffsetSurface tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 15 : { DeclareAndCast(IGESGeom_Plane,anent,ent); if (anent.IsNull()) return; @@ -507,20 +401,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 16 : { - DeclareAndCast(IGESGeom_Point,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolPoint tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 17 : { - DeclareAndCast(IGESGeom_RuledSurface,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolRuledSurface tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 18 : { DeclareAndCast(IGESGeom_SplineCurve,anent,ent); if (anent.IsNull()) return; @@ -535,20 +415,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 20 : { - DeclareAndCast(IGESGeom_SurfaceOfRevolution,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolSurfaceOfRevolution tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 21 : { - DeclareAndCast(IGESGeom_TabulatedCylinder,anent,ent); - if (anent.IsNull()) return; - IGESGeom_ToolTabulatedCylinder tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 22 : { DeclareAndCast(IGESGeom_TransformationMatrix,anent,ent); if (anent.IsNull()) return; @@ -601,179 +467,6 @@ IGESGeom_GeneralModule::IGESGeom_GeneralModule () { } } - void IGESGeom_GeneralModule::OwnCopyCase - (const Standard_Integer CN, - const Handle(IGESData_IGESEntity)& entfrom, - const Handle(IGESData_IGESEntity)& entto, - Interface_CopyTool& TC) const -{ - switch (CN) { - case 1 : { - DeclareAndCast(IGESGeom_BSplineCurve,enfr,entfrom); - DeclareAndCast(IGESGeom_BSplineCurve,ento,entto); - IGESGeom_ToolBSplineCurve tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 2 : { - DeclareAndCast(IGESGeom_BSplineSurface,enfr,entfrom); - DeclareAndCast(IGESGeom_BSplineSurface,ento,entto); - IGESGeom_ToolBSplineSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 3 : { - DeclareAndCast(IGESGeom_Boundary,enfr,entfrom); - DeclareAndCast(IGESGeom_Boundary,ento,entto); - IGESGeom_ToolBoundary tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 4 : { - DeclareAndCast(IGESGeom_BoundedSurface,enfr,entfrom); - DeclareAndCast(IGESGeom_BoundedSurface,ento,entto); - IGESGeom_ToolBoundedSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 5 : { - DeclareAndCast(IGESGeom_CircularArc,enfr,entfrom); - DeclareAndCast(IGESGeom_CircularArc,ento,entto); - IGESGeom_ToolCircularArc tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 6 : { - DeclareAndCast(IGESGeom_CompositeCurve,enfr,entfrom); - DeclareAndCast(IGESGeom_CompositeCurve,ento,entto); - IGESGeom_ToolCompositeCurve tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 7 : { - DeclareAndCast(IGESGeom_ConicArc,enfr,entfrom); - DeclareAndCast(IGESGeom_ConicArc,ento,entto); - IGESGeom_ToolConicArc tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 8 : { - DeclareAndCast(IGESGeom_CopiousData,enfr,entfrom); - DeclareAndCast(IGESGeom_CopiousData,ento,entto); - IGESGeom_ToolCopiousData tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 9 : { - DeclareAndCast(IGESGeom_CurveOnSurface,enfr,entfrom); - DeclareAndCast(IGESGeom_CurveOnSurface,ento,entto); - IGESGeom_ToolCurveOnSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 10 : { - DeclareAndCast(IGESGeom_Direction,enfr,entfrom); - DeclareAndCast(IGESGeom_Direction,ento,entto); - IGESGeom_ToolDirection tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 11 : { - DeclareAndCast(IGESGeom_Flash,enfr,entfrom); - DeclareAndCast(IGESGeom_Flash,ento,entto); - IGESGeom_ToolFlash tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 12 : { - DeclareAndCast(IGESGeom_Line,enfr,entfrom); - DeclareAndCast(IGESGeom_Line,ento,entto); - IGESGeom_ToolLine tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 13 : { - DeclareAndCast(IGESGeom_OffsetCurve,enfr,entfrom); - DeclareAndCast(IGESGeom_OffsetCurve,ento,entto); - IGESGeom_ToolOffsetCurve tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 14 : { - DeclareAndCast(IGESGeom_OffsetSurface,enfr,entfrom); - DeclareAndCast(IGESGeom_OffsetSurface,ento,entto); - IGESGeom_ToolOffsetSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 15 : { - DeclareAndCast(IGESGeom_Plane,enfr,entfrom); - DeclareAndCast(IGESGeom_Plane,ento,entto); - IGESGeom_ToolPlane tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 16 : { - DeclareAndCast(IGESGeom_Point,enfr,entfrom); - DeclareAndCast(IGESGeom_Point,ento,entto); - IGESGeom_ToolPoint tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 17 : { - DeclareAndCast(IGESGeom_RuledSurface,enfr,entfrom); - DeclareAndCast(IGESGeom_RuledSurface,ento,entto); - IGESGeom_ToolRuledSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 18 : { - DeclareAndCast(IGESGeom_SplineCurve,enfr,entfrom); - DeclareAndCast(IGESGeom_SplineCurve,ento,entto); - IGESGeom_ToolSplineCurve tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 19 : { - DeclareAndCast(IGESGeom_SplineSurface,enfr,entfrom); - DeclareAndCast(IGESGeom_SplineSurface,ento,entto); - IGESGeom_ToolSplineSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 20 : { - DeclareAndCast(IGESGeom_SurfaceOfRevolution,enfr,entfrom); - DeclareAndCast(IGESGeom_SurfaceOfRevolution,ento,entto); - IGESGeom_ToolSurfaceOfRevolution tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 21 : { - DeclareAndCast(IGESGeom_TabulatedCylinder,enfr,entfrom); - DeclareAndCast(IGESGeom_TabulatedCylinder,ento,entto); - IGESGeom_ToolTabulatedCylinder tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 22 : { - DeclareAndCast(IGESGeom_TransformationMatrix,enfr,entfrom); - DeclareAndCast(IGESGeom_TransformationMatrix,ento,entto); - IGESGeom_ToolTransformationMatrix tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 23 : { - DeclareAndCast(IGESGeom_TrimmedSurface,enfr,entfrom); - DeclareAndCast(IGESGeom_TrimmedSurface,ento,entto); - IGESGeom_ToolTrimmedSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - default : break; - } -} - - Standard_Integer IGESGeom_GeneralModule::CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& ) const diff --git a/src/IGESGeom/IGESGeom_GeneralModule.hxx b/src/IGESGeom/IGESGeom_GeneralModule.hxx index 9bdeba647f..7bb109c356 100644 --- a/src/IGESGeom/IGESGeom_GeneralModule.hxx +++ b/src/IGESGeom/IGESGeom_GeneralModule.hxx @@ -17,19 +17,7 @@ #ifndef _IGESGeom_GeneralModule_HeaderFile #define _IGESGeom_GeneralModule_HeaderFile -#include -#include - #include -#include -#include -class IGESData_IGESEntity; -class Interface_EntityIterator; -class IGESData_DirChecker; -class Interface_ShareTool; -class Interface_Check; -class Standard_Transient; -class Interface_CopyTool; class IGESGeom_GeneralModule; @@ -39,12 +27,10 @@ DEFINE_STANDARD_HANDLE(IGESGeom_GeneralModule, IGESData_GeneralModule) //! This Services comprise : Shared & Implied Lists, Copy, Check class IGESGeom_GeneralModule : public IGESData_GeneralModule { + public: -public: - - //! Creates a GeneralModule from IGESGeom and puts it into GeneralLib - Standard_EXPORT IGESGeom_GeneralModule(); + IGESGeom_GeneralModule() {} //! Lists the Entities shared by a given IGESEntity , from //! its specific parameters : specific for each type @@ -61,35 +47,12 @@ public: //! Specific creation of a new void entity Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const Standard_OVERRIDE; - //! Copies parameters which are specific of each Type of Entity - Standard_EXPORT void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - //! Returns a category number which characterizes an entity //! Shape for all, but Drawing for : //! Flash; Point with a symbol; Plane with a symbol Standard_EXPORT virtual Standard_Integer CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESGeom_GeneralModule,IGESData_GeneralModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESGeom_GeneralModule_HeaderFile diff --git a/src/IGESGeom/IGESGeom_SpecificModule.cxx b/src/IGESGeom/IGESGeom_SpecificModule.cxx index 316d22ffae..33657da16c 100644 --- a/src/IGESGeom/IGESGeom_SpecificModule.cxx +++ b/src/IGESGeom/IGESGeom_SpecificModule.cxx @@ -67,11 +67,6 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_SpecificModule,IGESData_SpecificModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESGeom_SpecificModule::IGESGeom_SpecificModule() { } - void IGESGeom_SpecificModule::OwnDump (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, diff --git a/src/IGESGeom/IGESGeom_SpecificModule.hxx b/src/IGESGeom/IGESGeom_SpecificModule.hxx index 76d1b6e800..7e1d261b7f 100644 --- a/src/IGESGeom/IGESGeom_SpecificModule.hxx +++ b/src/IGESGeom/IGESGeom_SpecificModule.hxx @@ -35,12 +35,10 @@ DEFINE_STANDARD_HANDLE(IGESGeom_SpecificModule, IGESData_SpecificModule) //! Dump & OwnCorrect, for IGESGeom class IGESGeom_SpecificModule : public IGESData_SpecificModule { + public: -public: - - //! Creates a SpecificModule from IGESGeom & puts it into SpecificLib - Standard_EXPORT IGESGeom_SpecificModule(); + IGESGeom_SpecificModule() {} //! Specific Dump (own parameters) for IGESGeom Standard_EXPORT void OwnDump (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const Standard_OVERRIDE; @@ -49,27 +47,7 @@ public: //! them (Boundary,ConicArc,Flash,OffsetCurve,TransformationMatrix) Standard_EXPORT virtual Standard_Boolean OwnCorrect (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESGeom_SpecificModule,IGESData_SpecificModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESGeom_SpecificModule_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx b/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx index 98caa6b375..72aafcd5c6 100644 --- a/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx +++ b/src/IGESGeom/IGESGeom_ToolBSplineCurve.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -38,15 +37,6 @@ #include #include -// MGE 29/07/98 -//======================================================================= -//function : IGESGeom_ToolBSplineCurve -//purpose : -//======================================================================= -IGESGeom_ToolBSplineCurve::IGESGeom_ToolBSplineCurve () -{ -} - //======================================================================= //function : ReadOwnParams @@ -241,70 +231,6 @@ void IGESGeom_ToolBSplineCurve::WriteOwnParams } -//======================================================================= -//function : OwnShared -//purpose : -//======================================================================= - -void IGESGeom_ToolBSplineCurve::OwnShared(const Handle(IGESGeom_BSplineCurve)& /* ent */, - Interface_EntityIterator& /* iter */) const -{ -} - - -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESGeom_ToolBSplineCurve::OwnCopy - (const Handle(IGESGeom_BSplineCurve)& another, - const Handle(IGESGeom_BSplineCurve)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer I; - Standard_Integer low, up; - Standard_Integer anIndex, aDegree; - Standard_Boolean aPlanar, aClosed, aPolynomial, aPeriodic; - Handle(TColStd_HArray1OfReal) allKnots, allWeights; - Handle(TColgp_HArray1OfXYZ) allPoles; - Standard_Real aUmin, aUmax; - gp_XYZ aNorm; - - anIndex = another->UpperIndex(); - aDegree = another->Degree(); - aPlanar = another->IsPlanar(); - aClosed = another->IsClosed(); - aPolynomial = another->IsPolynomial(); - aPeriodic = another->IsPeriodic(); - - allKnots = new TColStd_HArray1OfReal(-aDegree, anIndex+1); - - low = -aDegree; - up = anIndex + 1; - for (I = low; I <= up; I++) - allKnots->SetValue(I, another->Knot(I)); - - allWeights = new TColStd_HArray1OfReal(0, anIndex); - - low = 0; - up = anIndex; - for (I = low; I <= up; I++) - allWeights->SetValue(I, another->Weight(I)); - - allPoles = new TColgp_HArray1OfXYZ(0, anIndex); - - for (I = low; I <= up; I++) - allPoles->SetValue(I, (another->Pole(I)).XYZ()); - - aUmin = another->UMin(); - aUmax = another->UMax(); - aNorm = another->Normal(); - - ent->Init (anIndex,aDegree, aPlanar, aClosed, aPolynomial, aPeriodic, - allKnots, allWeights, allPoles, aUmin, aUmax, aNorm); -} - - //======================================================================= //function : DirChecker //purpose : diff --git a/src/IGESGeom/IGESGeom_ToolBSplineCurve.hxx b/src/IGESGeom/IGESGeom_ToolBSplineCurve.hxx index 2c0aa0ffbc..1246e9a902 100644 --- a/src/IGESGeom/IGESGeom_ToolBSplineCurve.hxx +++ b/src/IGESGeom/IGESGeom_ToolBSplineCurve.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolBSplineCurve { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolBSplineCurve, ready to work - Standard_EXPORT IGESGeom_ToolBSplineCurve(); + IGESGeom_ToolBSplineCurve() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,14 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGeom_BSplineCurve)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a BSplineCurve , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGeom_BSplineCurve)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_BSplineCurve)& ent) const; //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_BSplineCurve)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_BSplineCurve)& entfrom, const Handle(IGESGeom_BSplineCurve)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_BSplineCurve)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolBSplineCurve_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx b/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx index 8a9b11f006..d01d961201 100644 --- a/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolBSplineSurface.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -38,15 +37,6 @@ #include #include -// MGE 31/07/98 -//======================================================================= -//function : IGESGeom_ToolBSplineSurface -//purpose : -//======================================================================= -IGESGeom_ToolBSplineSurface::IGESGeom_ToolBSplineSurface () -{ -} - //======================================================================= //function : ReadOwnParams @@ -276,78 +266,6 @@ void IGESGeom_ToolBSplineSurface::WriteOwnParams } -//======================================================================= -//function : OwnShared -//purpose : -//======================================================================= - -void IGESGeom_ToolBSplineSurface::OwnShared(const Handle(IGESGeom_BSplineSurface)& /* ent */, - Interface_EntityIterator& /* iter */) const -{ -} - - -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESGeom_ToolBSplineSurface::OwnCopy(const Handle(IGESGeom_BSplineSurface)& another, - const Handle(IGESGeom_BSplineSurface)& ent, - Interface_CopyTool& /* TC */) const -{ - Standard_Integer I, J; - Standard_Integer anIndexU, anIndexV, aDegU, aDegV; - Standard_Boolean aCloseU, aCloseV, aPolynom; - Standard_Boolean aPeriodU, aPeriodV; - Standard_Real aUmin, aUmax, aVmin, aVmax; - - anIndexU = another->UpperIndexU(); - anIndexV = another->UpperIndexV(); - aDegU = another->DegreeU(); - aDegV = another->DegreeV(); - aCloseU = another->IsClosedU(); - aCloseV = another->IsClosedV(); - aPolynom = another->IsPolynomial(); - aPeriodU = another->IsPeriodicU(); - aPeriodV = another->IsPeriodicV(); - - Handle(TColStd_HArray1OfReal) allKnotsU = - new TColStd_HArray1OfReal(-aDegU, anIndexU+1); - Handle(TColStd_HArray1OfReal) allKnotsV = - new TColStd_HArray1OfReal(-aDegV, anIndexV+1); - - for (I = -aDegU; I <= anIndexU + 1; I ++) - allKnotsU->SetValue(I, another->KnotU(I)); - - for (I = -aDegV; I <= anIndexV + 1; I ++) - allKnotsV->SetValue(I, another->KnotV(I)); - - Handle(TColStd_HArray2OfReal) allWeights = - new TColStd_HArray2OfReal (0, anIndexU, 0, anIndexV); - Handle(TColgp_HArray2OfXYZ) allPoles = - new TColgp_HArray2OfXYZ (0, anIndexU, 0, anIndexV); - - for (J = 0; J <= anIndexV; J ++) - for (I = 0; I <= anIndexU; I ++) - allWeights->SetValue(I, J, another->Weight(I,J)); - - for (J = 0; J <= anIndexV; J ++) - for (I = 0; I <= anIndexU; I ++) - allPoles->SetValue(I, J, another->Pole(I, J).XYZ()); - - aUmin = another->UMin(); - aUmax = another->UMax(); - aVmin = another->VMin(); - aVmax = another->VMax(); - - ent->Init (anIndexU, anIndexV, aDegU, aDegV, aCloseU, aCloseV, - aPolynom, aPeriodU, aPeriodV, allKnotsU, allKnotsV, - allWeights, allPoles, aUmin, aUmax, aVmin, aVmax); - ent->SetFormNumber(another->FormNumber()); -} - - //======================================================================= //function : DirChecker //purpose : diff --git a/src/IGESGeom/IGESGeom_ToolBSplineSurface.hxx b/src/IGESGeom/IGESGeom_ToolBSplineSurface.hxx index 7ad8e0bea8..f47c1f723a 100644 --- a/src/IGESGeom/IGESGeom_ToolBSplineSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolBSplineSurface.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolBSplineSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolBSplineSurface, ready to work - Standard_EXPORT IGESGeom_ToolBSplineSurface(); + IGESGeom_ToolBSplineSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,14 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGeom_BSplineSurface)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a BSplineSurface , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGeom_BSplineSurface)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_BSplineSurface)& ent) const; //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_BSplineSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_BSplineSurface)& entfrom, const Handle(IGESGeom_BSplineSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_BSplineSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolBSplineSurface_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolBoundary.cxx b/src/IGESGeom/IGESGeom_ToolBoundary.cxx index f256fe8a3d..0b5b42c018 100644 --- a/src/IGESGeom/IGESGeom_ToolBoundary.cxx +++ b/src/IGESGeom/IGESGeom_ToolBoundary.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -40,15 +39,6 @@ #include #include -// MGE 30/07/98 -//======================================================================= -//function : IGESGeom_ToolBoundary -//purpose : -//======================================================================= -IGESGeom_ToolBoundary::IGESGeom_ToolBoundary () -{ -} - //======================================================================= //function : ReadOwnParams @@ -249,54 +239,6 @@ void IGESGeom_ToolBoundary::OwnShared(const Handle(IGESGeom_Boundary)& ent, } -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESGeom_ToolBoundary::OwnCopy(const Handle(IGESGeom_Boundary)& another, - const Handle(IGESGeom_Boundary)& ent, - Interface_CopyTool& TC) const -{ - Standard_Integer i, j; - Standard_Integer tempType = another->BoundaryType(); - Standard_Integer tempPreference = another->PreferenceType(); - Standard_Integer num1 = another->NbModelSpaceCurves(); - - DeclareAndCast(IGESData_IGESEntity, tempSurface, - TC.Transferred(another->Surface()) ); - - Handle(TColStd_HArray1OfInteger) tempSenses = - new TColStd_HArray1OfInteger(1, num1); - Handle(IGESData_HArray1OfIGESEntity) tempModelCurves = - new IGESData_HArray1OfIGESEntity(1, num1); - Handle(IGESBasic_HArray1OfHArray1OfIGESEntity) tempParameterCurves = - new IGESBasic_HArray1OfHArray1OfIGESEntity(1, num1); - - for ( i = 1; i <= num1; i++ ) - { - DeclareAndCast(IGESData_IGESEntity, tempEnt, - TC.Transferred(another->ModelSpaceCurve(i)) ); - tempModelCurves->SetValue(i, tempEnt); - tempSenses->SetValue(i, another->Sense(i)); - Standard_Integer num2 = another->NbParameterCurves(i); - Handle(IGESData_HArray1OfIGESEntity) ParCurves = - another->ParameterCurves(i); - Handle(IGESData_HArray1OfIGESEntity) tempParCurves; - if (num2 > 0) tempParCurves = new IGESData_HArray1OfIGESEntity(1, num2); - for ( j = 1; j <= num2; j++ ) - { - DeclareAndCast(IGESData_IGESEntity, tempEnt1, - TC.Transferred(ParCurves->Value(j)) ); - tempParCurves->SetValue(j, tempEnt1); - } - tempParameterCurves->SetValue(i, tempParCurves); - } - ent->Init(tempType, tempPreference, tempSurface, tempModelCurves, - tempSenses, tempParameterCurves); -} - - //======================================================================= //function : OwnCorrect //purpose : diff --git a/src/IGESGeom/IGESGeom_ToolBoundary.hxx b/src/IGESGeom/IGESGeom_ToolBoundary.hxx index 8eee7e1e9d..47c68deefc 100644 --- a/src/IGESGeom/IGESGeom_ToolBoundary.hxx +++ b/src/IGESGeom/IGESGeom_ToolBoundary.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolBoundary { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolBoundary, ready to work - Standard_EXPORT IGESGeom_ToolBoundary(); + IGESGeom_ToolBoundary() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_Boundary)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_Boundary)& entfrom, const Handle(IGESGeom_Boundary)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_Boundary)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolBoundary_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolBoundedSurface.cxx b/src/IGESGeom/IGESGeom_ToolBoundedSurface.cxx index d8da8c5020..a22b63e52c 100644 --- a/src/IGESGeom/IGESGeom_ToolBoundedSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolBoundedSurface.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -38,15 +37,6 @@ #include #include -// MGE 31/07/98 -//======================================================================= -//function : IGESGeom_ToolBoundedSurface -//purpose : -//======================================================================= -IGESGeom_ToolBoundedSurface::IGESGeom_ToolBoundedSurface () -{ -} - //======================================================================= //function : ReadOwnParams @@ -174,33 +164,6 @@ void IGESGeom_ToolBoundedSurface::OwnShared(const Handle(IGESGeom_BoundedSurface } -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESGeom_ToolBoundedSurface::OwnCopy(const Handle(IGESGeom_BoundedSurface)& another, - const Handle(IGESGeom_BoundedSurface)& ent, - Interface_CopyTool& TC) const -{ - Standard_Integer i, num; - - Standard_Integer tempType = another->RepresentationType(); - DeclareAndCast(IGESData_IGESEntity, tempSurface, - TC.Transferred(another->Surface())); - num = another->NbBoundaries(); - Handle(IGESGeom_HArray1OfBoundary) tempBounds; - if (num > 0) tempBounds = new IGESGeom_HArray1OfBoundary(1, num); - for (i = 1; i <= num; i++) - { - DeclareAndCast(IGESGeom_Boundary, tempBoundary, - TC.Transferred(another->Boundary(i))); - tempBounds->SetValue(i, tempBoundary); - } - ent->Init(tempType, tempSurface, tempBounds); -} - - //======================================================================= //function : DirChecker //purpose : diff --git a/src/IGESGeom/IGESGeom_ToolBoundedSurface.hxx b/src/IGESGeom/IGESGeom_ToolBoundedSurface.hxx index 61c6d716c3..ef46976c40 100644 --- a/src/IGESGeom/IGESGeom_ToolBoundedSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolBoundedSurface.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolBoundedSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolBoundedSurface, ready to work - Standard_EXPORT IGESGeom_ToolBoundedSurface(); + IGESGeom_ToolBoundedSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_BoundedSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_BoundedSurface)& entfrom, const Handle(IGESGeom_BoundedSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_BoundedSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolBoundedSurface_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolCircularArc.cxx b/src/IGESGeom/IGESGeom_ToolCircularArc.cxx index 5255da1e41..3f73c038dc 100644 --- a/src/IGESGeom/IGESGeom_ToolCircularArc.cxx +++ b/src/IGESGeom/IGESGeom_ToolCircularArc.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -38,9 +37,6 @@ #include #include -// MGE 28/07/98 -IGESGeom_ToolCircularArc::IGESGeom_ToolCircularArc () { } - void IGESGeom_ToolCircularArc::ReadOwnParams (const Handle(IGESGeom_CircularArc)& ent, @@ -91,19 +87,6 @@ void IGESGeom_ToolCircularArc::WriteOwnParams IW.Send(ent->EndPoint().Y()); } -void IGESGeom_ToolCircularArc::OwnShared - (const Handle(IGESGeom_CircularArc)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESGeom_ToolCircularArc::OwnCopy - (const Handle(IGESGeom_CircularArc)& another, - const Handle(IGESGeom_CircularArc)& ent, Interface_CopyTool& /* TC */) const -{ - ent->Init(another->ZPlane(), another->Center().XY(), - another->StartPoint().XY(), another->EndPoint().XY()); -} - IGESData_DirChecker IGESGeom_ToolCircularArc::DirChecker (const Handle(IGESGeom_CircularArc)& /* ent */ ) const @@ -117,28 +100,6 @@ IGESData_DirChecker IGESGeom_ToolCircularArc::DirChecker return DC; } -void IGESGeom_ToolCircularArc::OwnCheck - (const Handle(IGESGeom_CircularArc)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -/* - //Standard_Real eps = 1.E-04; // Tolerance des tests ?? //szv#4:S4163:12Mar99 not needed - - Standard_Real Rad1 = Sqrt(Square(ent->StartPoint().X() - ent->Center().X()) + - Square(ent->StartPoint().Y() - ent->Center().Y())); - Standard_Real Rad2 = Sqrt(Square(ent->EndPoint().X() - ent->Center().X()) + - Square(ent->EndPoint().Y() - ent->Center().Y())); - - Standard_Real ratio = Abs(Rad1 - Rad2) / (Rad1+Rad2); - if (ratio > eps) { - char mess[80]; - Sprintf(mess,"Radius at Start & End Points, relative gap over %f", - Interface_MSG::Intervalled (ratio)); - ach.AddFail(mess,"Radius at Start & End Points, relative gap over %f"); - } -*/ -} - void IGESGeom_ToolCircularArc::OwnDump (const Handle(IGESGeom_CircularArc)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESGeom/IGESGeom_ToolCircularArc.hxx b/src/IGESGeom/IGESGeom_ToolCircularArc.hxx index f0676fef0e..0f8a3ab0d1 100644 --- a/src/IGESGeom/IGESGeom_ToolCircularArc.hxx +++ b/src/IGESGeom/IGESGeom_ToolCircularArc.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolCircularArc { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolCircularArc, ready to work - Standard_EXPORT IGESGeom_ToolCircularArc(); + IGESGeom_ToolCircularArc() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGeom_CircularArc)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a CircularArc , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGeom_CircularArc)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_CircularArc)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGeom_CircularArc)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_CircularArc)& entfrom, const Handle(IGESGeom_CircularArc)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_CircularArc)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolCircularArc_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolCompositeCurve.cxx b/src/IGESGeom/IGESGeom_ToolCompositeCurve.cxx index 09960fc30f..edf84f5c24 100644 --- a/src/IGESGeom/IGESGeom_ToolCompositeCurve.cxx +++ b/src/IGESGeom/IGESGeom_ToolCompositeCurve.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,9 +35,6 @@ #include #include -// MGE 28/07/98 -IGESGeom_ToolCompositeCurve::IGESGeom_ToolCompositeCurve () { } - void IGESGeom_ToolCompositeCurve::ReadOwnParams (const Handle(IGESGeom_CompositeCurve)& ent, @@ -85,22 +81,6 @@ void IGESGeom_ToolCompositeCurve::OwnShared iter.GetOneItem(ent->Curve(i)); } -void IGESGeom_ToolCompositeCurve::OwnCopy - (const Handle(IGESGeom_CompositeCurve)& another, - const Handle(IGESGeom_CompositeCurve)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer i, num = another->NbCurves(); - Handle(IGESData_HArray1OfIGESEntity) tempEntities = - new IGESData_HArray1OfIGESEntity(1, num); - for ( i = 1; i <= num; i++ ) - { - DeclareAndCast(IGESData_IGESEntity, new_ent, - TC.Transferred(another->Curve(i))); - tempEntities->SetValue(i, new_ent); - } - ent->Init(tempEntities); -} - IGESData_DirChecker IGESGeom_ToolCompositeCurve::DirChecker (const Handle(IGESGeom_CompositeCurve)& /* ent */ ) const { @@ -113,12 +93,6 @@ IGESData_DirChecker IGESGeom_ToolCompositeCurve::DirChecker return DC; } -void IGESGeom_ToolCompositeCurve::OwnCheck - (const Handle(IGESGeom_CompositeCurve)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESGeom_ToolCompositeCurve::OwnDump (const Handle(IGESGeom_CompositeCurve)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESGeom/IGESGeom_ToolCompositeCurve.hxx b/src/IGESGeom/IGESGeom_ToolCompositeCurve.hxx index 501bc232f0..fa620a390d 100644 --- a/src/IGESGeom/IGESGeom_ToolCompositeCurve.hxx +++ b/src/IGESGeom/IGESGeom_ToolCompositeCurve.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolCompositeCurve { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolCompositeCurve, ready to work - Standard_EXPORT IGESGeom_ToolCompositeCurve(); + IGESGeom_ToolCompositeCurve() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_CompositeCurve)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGeom_CompositeCurve)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_CompositeCurve)& entfrom, const Handle(IGESGeom_CompositeCurve)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_CompositeCurve)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolCompositeCurve_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolConicArc.cxx b/src/IGESGeom/IGESGeom_ToolConicArc.cxx index 150ef66e63..7a8e12d71a 100644 --- a/src/IGESGeom/IGESGeom_ToolConicArc.cxx +++ b/src/IGESGeom/IGESGeom_ToolConicArc.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -39,15 +38,6 @@ #include #include -// MGE 28/07/98 -//======================================================================= -//function : IGESGeom_ToolConicArc -//purpose : -//======================================================================= -IGESGeom_ToolConicArc::IGESGeom_ToolConicArc () -{ -} - //======================================================================= //function : ReadOwnParams @@ -130,33 +120,6 @@ void IGESGeom_ToolConicArc::WriteOwnParams(const Handle(IGESGeom_ConicArc)& ent, } -//======================================================================= -//function : OwnShared -//purpose : -//======================================================================= - -void IGESGeom_ToolConicArc::OwnShared(const Handle(IGESGeom_ConicArc)& /* ent */, - Interface_EntityIterator& /* iter */) const -{ -} - - -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESGeom_ToolConicArc::OwnCopy(const Handle(IGESGeom_ConicArc)& another, - const Handle(IGESGeom_ConicArc)& ent, - Interface_CopyTool& /* TC */) const -{ - Standard_Real A,B,C,D,E,F; - another->Equation(A,B,C,D,E,F); - ent->Init(A, B, C, D, E, F, another->ZPlane(), - another->StartPoint().XY(), another->EndPoint().XY()); -} - - //======================================================================= //function : OwnCorrect //purpose : diff --git a/src/IGESGeom/IGESGeom_ToolConicArc.hxx b/src/IGESGeom/IGESGeom_ToolConicArc.hxx index df65fa70b7..3ed8de5880 100644 --- a/src/IGESGeom/IGESGeom_ToolConicArc.hxx +++ b/src/IGESGeom/IGESGeom_ToolConicArc.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolConicArc { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolConicArc, ready to work - Standard_EXPORT IGESGeom_ToolConicArc(); + IGESGeom_ToolConicArc() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGeom_ConicArc)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ConicArc , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGeom_ConicArc)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a ConicArc //! (FormNumber recomputed according case Ellips-Parab-Hyperb) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESGeom_ConicArc)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_ConicArc)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_ConicArc)& entfrom, const Handle(IGESGeom_ConicArc)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_ConicArc)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolConicArc_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolCopiousData.cxx b/src/IGESGeom/IGESGeom_ToolCopiousData.cxx index d1428976ec..0005aa8438 100644 --- a/src/IGESGeom/IGESGeom_ToolCopiousData.cxx +++ b/src/IGESGeom/IGESGeom_ToolCopiousData.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -36,15 +35,6 @@ #include #include -// MGE 28/07/98 -//======================================================================= -//function : IGESGeom_ToolCopiousData -//purpose : -//======================================================================= -IGESGeom_ToolCopiousData::IGESGeom_ToolCopiousData () -{ -} - //======================================================================= //function : ReadOwnParams @@ -132,69 +122,6 @@ void IGESGeom_ToolCopiousData::WriteOwnParams(const Handle(IGESGeom_CopiousData) } -//======================================================================= -//function : OwnShared -//purpose : -//======================================================================= - -void IGESGeom_ToolCopiousData::OwnShared(const Handle(IGESGeom_CopiousData)& /* ent */, - Interface_EntityIterator& /* iter */) const -{ -} - - -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESGeom_ToolCopiousData::OwnCopy(const Handle(IGESGeom_CopiousData)& another, - const Handle(IGESGeom_CopiousData)& ent, - Interface_CopyTool& /* TC */) const -{ - Standard_Integer upper; - Standard_Real aZPlane = 0; - Standard_Integer nbTuples = another->NbPoints(); - Standard_Integer aDataType = another->DataType(); - Handle(TColStd_HArray1OfReal) allData; - - if (aDataType == 1) upper = 2*nbTuples; - else if (aDataType == 2) upper = 3*nbTuples; - else upper = 6*nbTuples; - - allData = new TColStd_HArray1OfReal(1, upper); - - if (aDataType == 1) aZPlane = another->ZPlane(); - - for (Standard_Integer I = 1; I <= nbTuples; I++) { - - switch (aDataType) { - case 1: - allData->SetValue(2*I-1, another->Data(I,1)); - allData->SetValue(2*I , another->Data(I,2)); - break; - case 2: - allData->SetValue(3*I-2, another->Data(I,1)); - allData->SetValue(3*I-1, another->Data(I,2)); - allData->SetValue(3*I , another->Data(I,3)); - break; - case 3: - allData->SetValue(6*I-5, another->Data(I,1)); - allData->SetValue(6*I-4, another->Data(I,2)); - allData->SetValue(6*I-3, another->Data(I,3)); - allData->SetValue(6*I-2, another->Data(I,4)); - allData->SetValue(6*I-1, another->Data(I,5)); - allData->SetValue(6*I , another->Data(I,6)); - break; - } - } - - ent->Init(aDataType, aZPlane, allData); - if (another->IsClosedPath2D()) ent->SetClosedPath2D(); - else ent->SetPolyline (another->IsPolyline()); -} - - //======================================================================= //function : DirChecker //purpose : diff --git a/src/IGESGeom/IGESGeom_ToolCopiousData.hxx b/src/IGESGeom/IGESGeom_ToolCopiousData.hxx index f0b66165e8..095c88e5b9 100644 --- a/src/IGESGeom/IGESGeom_ToolCopiousData.hxx +++ b/src/IGESGeom/IGESGeom_ToolCopiousData.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolCopiousData { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolCopiousData, ready to work - Standard_EXPORT IGESGeom_ToolCopiousData(); + IGESGeom_ToolCopiousData() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,14 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGeom_CopiousData)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a CopiousData , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGeom_CopiousData)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_CopiousData)& ent) const; //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_CopiousData)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_CopiousData)& entfrom, const Handle(IGESGeom_CopiousData)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_CopiousData)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolCopiousData_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolCurveOnSurface.cxx b/src/IGESGeom/IGESGeom_ToolCurveOnSurface.cxx index 1c48a9ede1..456d89333f 100644 --- a/src/IGESGeom/IGESGeom_ToolCurveOnSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolCurveOnSurface.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -35,15 +34,6 @@ #include #include -// MGE 30/07/98 -//======================================================================= -//function : IGESGeom_ToolCurveOnSurface -//purpose : -//======================================================================= -IGESGeom_ToolCurveOnSurface::IGESGeom_ToolCurveOnSurface () -{ -} - //======================================================================= //function : ReadOwnParams @@ -168,26 +158,6 @@ void IGESGeom_ToolCurveOnSurface::OwnShared(const Handle(IGESGeom_CurveOnSurface } -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESGeom_ToolCurveOnSurface::OwnCopy(const Handle(IGESGeom_CurveOnSurface)& another, - const Handle(IGESGeom_CurveOnSurface)& ent, - Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity, aSurface, TC.Transferred(another->Surface())); - DeclareAndCast(IGESData_IGESEntity, aCurveUV, TC.Transferred(another->CurveUV())); - DeclareAndCast(IGESData_IGESEntity, aCurve3D, TC.Transferred(another->Curve3D())); - - Standard_Integer aMode = another->CreationMode(); - Standard_Integer aPreference = another->PreferenceMode(); - - ent->Init(aMode, aSurface, aCurveUV, aCurve3D, aPreference); -} - - //======================================================================= //function : OwnCorrect //purpose : diff --git a/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx b/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx index db69a033e3..05a52033d8 100644 --- a/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolCurveOnSurface.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolCurveOnSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolCurveOnSurface, ready to work - Standard_EXPORT IGESGeom_ToolCurveOnSurface(); + IGESGeom_ToolCurveOnSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_CurveOnSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_CurveOnSurface)& entfrom, const Handle(IGESGeom_CurveOnSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_CurveOnSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolCurveOnSurface_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolDirection.cxx b/src/IGESGeom/IGESGeom_ToolDirection.cxx index de6365f1e8..6be8171440 100644 --- a/src/IGESGeom/IGESGeom_ToolDirection.cxx +++ b/src/IGESGeom/IGESGeom_ToolDirection.cxx @@ -29,15 +29,12 @@ #include #include #include -#include #include #include #include #include #include -IGESGeom_ToolDirection::IGESGeom_ToolDirection () { } - void IGESGeom_ToolDirection::ReadOwnParams (const Handle(IGESGeom_Direction)& ent, @@ -77,18 +74,6 @@ void IGESGeom_ToolDirection::WriteOwnParams IW.Send(ent->Value().Z()); } -void IGESGeom_ToolDirection::OwnShared - (const Handle(IGESGeom_Direction)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESGeom_ToolDirection::OwnCopy - (const Handle(IGESGeom_Direction)& another, - const Handle(IGESGeom_Direction)& ent, Interface_CopyTool& /* TC */) const -{ - ent->Init(another->Value().XYZ()); -} - IGESData_DirChecker IGESGeom_ToolDirection::DirChecker (const Handle(IGESGeom_Direction)& /* ent */ ) const { diff --git a/src/IGESGeom/IGESGeom_ToolDirection.hxx b/src/IGESGeom/IGESGeom_ToolDirection.hxx index 50ab570ed9..d67348e99a 100644 --- a/src/IGESGeom/IGESGeom_ToolDirection.hxx +++ b/src/IGESGeom/IGESGeom_ToolDirection.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolDirection { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDirection, ready to work - Standard_EXPORT IGESGeom_ToolDirection(); + IGESGeom_ToolDirection() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,14 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGeom_Direction)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Direction , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGeom_Direction)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_Direction)& ent) const; //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_Direction)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_Direction)& entfrom, const Handle(IGESGeom_Direction)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_Direction)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolDirection_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolFlash.cxx b/src/IGESGeom/IGESGeom_ToolFlash.cxx index 5a0a990404..172e93fc78 100644 --- a/src/IGESGeom/IGESGeom_ToolFlash.cxx +++ b/src/IGESGeom/IGESGeom_ToolFlash.cxx @@ -30,15 +30,12 @@ #include #include #include -#include #include #include #include #include #include -IGESGeom_ToolFlash::IGESGeom_ToolFlash () { } - void IGESGeom_ToolFlash::ReadOwnParams (const Handle(IGESGeom_Flash)& ent, @@ -100,21 +97,6 @@ void IGESGeom_ToolFlash::OwnShared iter.GetOneItem( ent->ReferenceEntity() ); } -void IGESGeom_ToolFlash::OwnCopy - (const Handle(IGESGeom_Flash)& another, - const Handle(IGESGeom_Flash)& ent, Interface_CopyTool& TC) const -{ - gp_XY aPoint = (another->ReferencePoint()).XY(); - Standard_Real aDim1 = another->Dimension1(); - Standard_Real aDim2 = another->Dimension2(); - Standard_Real aRotation = another->Rotation(); - - DeclareAndCast(IGESData_IGESEntity, aReference, - TC.Transferred(another->ReferenceEntity())); - - ent->Init(aPoint, aDim1, aDim2, aRotation, aReference); -} - Standard_Boolean IGESGeom_ToolFlash::OwnCorrect (const Handle(IGESGeom_Flash)& ent) const { diff --git a/src/IGESGeom/IGESGeom_ToolFlash.hxx b/src/IGESGeom/IGESGeom_ToolFlash.hxx index a73f8f8ebb..c8bf6a8954 100644 --- a/src/IGESGeom/IGESGeom_ToolFlash.hxx +++ b/src/IGESGeom/IGESGeom_ToolFlash.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolFlash { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolFlash, ready to work - Standard_EXPORT IGESGeom_ToolFlash(); + IGESGeom_ToolFlash() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_Flash)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_Flash)& entfrom, const Handle(IGESGeom_Flash)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_Flash)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolFlash_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolLine.cxx b/src/IGESGeom/IGESGeom_ToolLine.cxx index f70e5ca35a..f3faa1c46d 100644 --- a/src/IGESGeom/IGESGeom_ToolLine.cxx +++ b/src/IGESGeom/IGESGeom_ToolLine.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,9 +35,6 @@ #include #include -// MGE 29/07/98 -IGESGeom_ToolLine::IGESGeom_ToolLine () { } - void IGESGeom_ToolLine::ReadOwnParams (const Handle(IGESGeom_Line)& ent, @@ -76,18 +72,6 @@ void IGESGeom_ToolLine::WriteOwnParams IW.Send(ent->EndPoint().Z()); } -void IGESGeom_ToolLine::OwnShared - (const Handle(IGESGeom_Line)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESGeom_ToolLine::OwnCopy - (const Handle(IGESGeom_Line)& another, - const Handle(IGESGeom_Line)& ent, Interface_CopyTool& /* TC */) const -{ - ent->Init(another->StartPoint().XYZ(), another->EndPoint().XYZ()); -} - IGESData_DirChecker IGESGeom_ToolLine::DirChecker (const Handle(IGESGeom_Line)& /* ent */ ) const { @@ -100,12 +84,6 @@ IGESData_DirChecker IGESGeom_ToolLine::DirChecker return DC; } -void IGESGeom_ToolLine::OwnCheck - (const Handle(IGESGeom_Line)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESGeom_ToolLine::OwnDump (const Handle(IGESGeom_Line)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESGeom/IGESGeom_ToolLine.hxx b/src/IGESGeom/IGESGeom_ToolLine.hxx index 180764b020..0ce72e2ef2 100644 --- a/src/IGESGeom/IGESGeom_ToolLine.hxx +++ b/src/IGESGeom/IGESGeom_ToolLine.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolLine { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolLine, ready to work - Standard_EXPORT IGESGeom_ToolLine(); + IGESGeom_ToolLine() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGeom_Line)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Line , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGeom_Line)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_Line)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGeom_Line)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_Line)& entfrom, const Handle(IGESGeom_Line)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_Line)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolLine_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx b/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx index 6b5c4ecf7b..7ff234b7b1 100644 --- a/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx +++ b/src/IGESGeom/IGESGeom_ToolOffsetCurve.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -40,15 +39,6 @@ #include #include -// MGE 30/07/98 -//======================================================================= -//function : IGESGeom_ToolOffsetCurve -//purpose : -//======================================================================= -IGESGeom_ToolOffsetCurve::IGESGeom_ToolOffsetCurve () -{ -} - //======================================================================= //function : ReadOwnParams @@ -235,40 +225,6 @@ void IGESGeom_ToolOffsetCurve::OwnShared(const Handle(IGESGeom_OffsetCurve)& ent } -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESGeom_ToolOffsetCurve::OwnCopy(const Handle(IGESGeom_OffsetCurve)& another, - const Handle(IGESGeom_OffsetCurve)& ent, - Interface_CopyTool& TC) const -{ - Standard_Integer anOffsetType, aFunctionCoord, aTaperedOffsetType; - Standard_Real offDistance1, offDistance2; - Standard_Real arcLength1, arcLength2, anOffsetParam1, anOffsetParam2; - - DeclareAndCast(IGESData_IGESEntity, aBaseCurve, - TC.Transferred(another->BaseCurve())); - anOffsetType = another->OffsetType(); - DeclareAndCast(IGESData_IGESEntity, aFunction, - TC.Transferred(another->Function())); - aFunctionCoord = another->FunctionParameter(); - aTaperedOffsetType = another->TaperedOffsetType(); - offDistance1 = another->FirstOffsetDistance(); - arcLength1 = another->ArcLength1(); - offDistance2 = another->SecondOffsetDistance(); - arcLength2 = another->ArcLength2(); - gp_XYZ aNormalVec = (another->NormalVector()).XYZ(); - anOffsetParam1 = another->StartParameter(); - anOffsetParam2 = another->EndParameter(); - - ent->Init(aBaseCurve, anOffsetType, aFunction, aFunctionCoord, - aTaperedOffsetType, offDistance1, arcLength1, offDistance2, - arcLength2, aNormalVec, anOffsetParam1, anOffsetParam2); -} - - //======================================================================= //function : OwnCorrect //purpose : diff --git a/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx b/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx index 75dc1d8148..e12aa1e299 100644 --- a/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx +++ b/src/IGESGeom/IGESGeom_ToolOffsetCurve.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolOffsetCurve { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolOffsetCurve, ready to work - Standard_EXPORT IGESGeom_ToolOffsetCurve(); + IGESGeom_ToolOffsetCurve() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -70,33 +68,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_OffsetCurve)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_OffsetCurve)& entfrom, const Handle(IGESGeom_OffsetCurve)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_OffsetCurve)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolOffsetCurve_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolOffsetSurface.cxx b/src/IGESGeom/IGESGeom_ToolOffsetSurface.cxx index 6a240ae65d..d047e1b87f 100644 --- a/src/IGESGeom/IGESGeom_ToolOffsetSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolOffsetSurface.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -38,9 +37,6 @@ #include #include -// MGE 31/07/98 -IGESGeom_ToolOffsetSurface::IGESGeom_ToolOffsetSurface () { } - void IGESGeom_ToolOffsetSurface::ReadOwnParams (const Handle(IGESGeom_OffsetSurface)& ent, @@ -114,18 +110,6 @@ void IGESGeom_ToolOffsetSurface::OwnShared iter.GetOneItem( ent->Surface() ); } -void IGESGeom_ToolOffsetSurface::OwnCopy - (const Handle(IGESGeom_OffsetSurface)& another, - const Handle(IGESGeom_OffsetSurface)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity, aSurface, TC.Transferred(another->Surface()) ); - - gp_XYZ anIndicator = (another->OffsetIndicator()).XYZ(); - Standard_Real aDistance = another->Distance(); - - ent->Init(anIndicator, aDistance, aSurface); -} - IGESData_DirChecker IGESGeom_ToolOffsetSurface::DirChecker (const Handle(IGESGeom_OffsetSurface)& /* ent */ ) const @@ -139,12 +123,6 @@ IGESData_DirChecker IGESGeom_ToolOffsetSurface::DirChecker return DC; } -void IGESGeom_ToolOffsetSurface::OwnCheck - (const Handle(IGESGeom_OffsetSurface)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESGeom_ToolOffsetSurface::OwnDump (const Handle(IGESGeom_OffsetSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESGeom/IGESGeom_ToolOffsetSurface.hxx b/src/IGESGeom/IGESGeom_ToolOffsetSurface.hxx index 5aeda5da3d..08e86e616b 100644 --- a/src/IGESGeom/IGESGeom_ToolOffsetSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolOffsetSurface.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolOffsetSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolOffsetSurface, ready to work - Standard_EXPORT IGESGeom_ToolOffsetSurface(); + IGESGeom_ToolOffsetSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_OffsetSurface)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGeom_OffsetSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_OffsetSurface)& entfrom, const Handle(IGESGeom_OffsetSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_OffsetSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolOffsetSurface_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolPlane.cxx b/src/IGESGeom/IGESGeom_ToolPlane.cxx index 4ae7ef7df8..41f4b490a9 100644 --- a/src/IGESGeom/IGESGeom_ToolPlane.cxx +++ b/src/IGESGeom/IGESGeom_ToolPlane.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -40,15 +39,6 @@ #include #include -// MGE 30/07/98 -//======================================================================= -//function : IGESGeom_ToolPlane -//purpose : -//======================================================================= -IGESGeom_ToolPlane::IGESGeom_ToolPlane () -{ -} - //======================================================================= //function : ReadOwnParams @@ -163,26 +153,6 @@ void IGESGeom_ToolPlane::OwnShared(const Handle(IGESGeom_Plane)& ent, } -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESGeom_ToolPlane::OwnCopy(const Handle(IGESGeom_Plane)& another, - const Handle(IGESGeom_Plane)& ent, - Interface_CopyTool& TC) const -{ - Standard_Real A, B, C, D; - another->Equation(A, B, C, D); - gp_XYZ attach = (another->SymbolAttach()).XYZ(); - Standard_Real aSize = another->SymbolSize(); - DeclareAndCast(IGESData_IGESEntity,aCurve, - TC.Transferred(another->BoundingCurve())); - ent->Init(A, B, C, D, aCurve, attach, aSize); - ent->SetFormNumber(another->FormNumber()); -} - - //======================================================================= //function : DirChecker //purpose : diff --git a/src/IGESGeom/IGESGeom_ToolPlane.hxx b/src/IGESGeom/IGESGeom_ToolPlane.hxx index 2d693b73e6..d6ae7f1d70 100644 --- a/src/IGESGeom/IGESGeom_ToolPlane.hxx +++ b/src/IGESGeom/IGESGeom_ToolPlane.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolPlane { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPlane, ready to work - Standard_EXPORT IGESGeom_ToolPlane(); + IGESGeom_ToolPlane() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_Plane)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_Plane)& entfrom, const Handle(IGESGeom_Plane)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_Plane)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolPlane_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolPoint.cxx b/src/IGESGeom/IGESGeom_ToolPoint.cxx index bc134d875f..3633166704 100644 --- a/src/IGESGeom/IGESGeom_ToolPoint.cxx +++ b/src/IGESGeom/IGESGeom_ToolPoint.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -38,9 +37,6 @@ #include #include -// MGE 28/07/98 -IGESGeom_ToolPoint::IGESGeom_ToolPoint () { } - void IGESGeom_ToolPoint::ReadOwnParams (const Handle(IGESGeom_Point)& ent, @@ -108,17 +104,6 @@ void IGESGeom_ToolPoint::OwnShared iter.GetOneItem(ent->DisplaySymbol()); } -void IGESGeom_ToolPoint::OwnCopy - (const Handle(IGESGeom_Point)& another, - const Handle(IGESGeom_Point)& ent, Interface_CopyTool& TC) const -{ - gp_XYZ aPoint = (another->Value()).XYZ(); - - DeclareAndCast(IGESBasic_SubfigureDef, aSymbol, - TC.Transferred(another->DisplaySymbol())); - ent->Init(aPoint, aSymbol); -} - IGESData_DirChecker IGESGeom_ToolPoint::DirChecker (const Handle(IGESGeom_Point)& ent ) const @@ -134,12 +119,6 @@ IGESData_DirChecker IGESGeom_ToolPoint::DirChecker return DC; } -void IGESGeom_ToolPoint::OwnCheck - (const Handle(IGESGeom_Point)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESGeom_ToolPoint::OwnDump (const Handle(IGESGeom_Point)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESGeom/IGESGeom_ToolPoint.hxx b/src/IGESGeom/IGESGeom_ToolPoint.hxx index 5eb5a28fec..8c5c55ac1a 100644 --- a/src/IGESGeom/IGESGeom_ToolPoint.hxx +++ b/src/IGESGeom/IGESGeom_ToolPoint.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolPoint { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPoint, ready to work - Standard_EXPORT IGESGeom_ToolPoint(); + IGESGeom_ToolPoint() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_Point)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGeom_Point)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_Point)& entfrom, const Handle(IGESGeom_Point)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_Point)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolPoint_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolRuledSurface.cxx b/src/IGESGeom/IGESGeom_ToolRuledSurface.cxx index b6275764cb..bd4613acf2 100644 --- a/src/IGESGeom/IGESGeom_ToolRuledSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolRuledSurface.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -35,9 +34,6 @@ #include #include -// MGE 31/07/98 -IGESGeom_ToolRuledSurface::IGESGeom_ToolRuledSurface () { } - void IGESGeom_ToolRuledSurface::ReadOwnParams (const Handle(IGESGeom_RuledSurface)& ent, @@ -118,20 +114,6 @@ void IGESGeom_ToolRuledSurface::OwnShared iter.GetOneItem(ent->SecondCurve()); } -void IGESGeom_ToolRuledSurface::OwnCopy - (const Handle(IGESGeom_RuledSurface)& another, - const Handle(IGESGeom_RuledSurface)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity, aCurve, - TC.Transferred(another->FirstCurve())); - DeclareAndCast(IGESData_IGESEntity, anotherCurve, - TC.Transferred(another->SecondCurve())); - Standard_Integer aDirFlag = another->DirectionFlag(); - Standard_Integer aDevFlag = (another->IsDevelopable() ? 1 : 0); - - ent->Init(aCurve, anotherCurve, aDirFlag, aDevFlag); -} - IGESData_DirChecker IGESGeom_ToolRuledSurface::DirChecker (const Handle(IGESGeom_RuledSurface)& /*ent*/ ) const { @@ -145,12 +127,6 @@ IGESData_DirChecker IGESGeom_ToolRuledSurface::DirChecker return DC; } -void IGESGeom_ToolRuledSurface::OwnCheck - (const Handle(IGESGeom_RuledSurface)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -} - void IGESGeom_ToolRuledSurface::OwnDump (const Handle(IGESGeom_RuledSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESGeom/IGESGeom_ToolRuledSurface.hxx b/src/IGESGeom/IGESGeom_ToolRuledSurface.hxx index d14c69f339..cd21f84db0 100644 --- a/src/IGESGeom/IGESGeom_ToolRuledSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolRuledSurface.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolRuledSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolRuledSurface, ready to work - Standard_EXPORT IGESGeom_ToolRuledSurface(); + IGESGeom_ToolRuledSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_RuledSurface)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGeom_RuledSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_RuledSurface)& entfrom, const Handle(IGESGeom_RuledSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_RuledSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolRuledSurface_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolSplineCurve.cxx b/src/IGESGeom/IGESGeom_ToolSplineCurve.cxx index 87984d39e3..66fe800840 100644 --- a/src/IGESGeom/IGESGeom_ToolSplineCurve.cxx +++ b/src/IGESGeom/IGESGeom_ToolSplineCurve.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -37,9 +36,6 @@ #include #include -// MGE 29/07/98 -IGESGeom_ToolSplineCurve::IGESGeom_ToolSplineCurve () { } - void IGESGeom_ToolSplineCurve::ReadOwnParams (const Handle(IGESGeom_SplineCurve)& ent, @@ -198,85 +194,6 @@ void IGESGeom_ToolSplineCurve::WriteOwnParams IW.Send(AZ); IW.Send(BZ); IW.Send(CZ); IW.Send(DZ); } -void IGESGeom_ToolSplineCurve::OwnShared - (const Handle(IGESGeom_SplineCurve)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESGeom_ToolSplineCurve::OwnCopy - (const Handle(IGESGeom_SplineCurve)& another, - const Handle(IGESGeom_SplineCurve)& ent, Interface_CopyTool& /* TC */) const -{ - Standard_Integer I; - Standard_Real A, B, C, D; - Standard_Integer aType = another->SplineType(); - Standard_Integer aDegree = another->Degree(); - Standard_Integer nbDimensions = another->NbDimensions(); - Standard_Integer nbSegments = another->NbSegments(); - - Handle(TColStd_HArray1OfReal) allBreakPoints = - new TColStd_HArray1OfReal(1, nbSegments+1); - for (I = 1; I <= (nbSegments + 1); I++) - allBreakPoints->SetValue(I, another->BreakPoint(I)); - - Handle(TColStd_HArray2OfReal) allXPolynomials = - new TColStd_HArray2OfReal(1, nbSegments, 1, 4); - Handle(TColStd_HArray2OfReal) allYPolynomials = - new TColStd_HArray2OfReal(1, nbSegments, 1, 4); - Handle(TColStd_HArray2OfReal) allZPolynomials = - new TColStd_HArray2OfReal(1, nbSegments, 1, 4); - - for (I = 1; I <= nbSegments; I++) { - another->XCoordPolynomial(I, A, B, C, D); - allXPolynomials->SetValue(I, 1, A); - allXPolynomials->SetValue(I, 2, B); - allXPolynomials->SetValue(I, 3, C); - allXPolynomials->SetValue(I, 4, D); - - another->YCoordPolynomial(I, A, B, C, D); - allYPolynomials->SetValue(I, 1, A); - allYPolynomials->SetValue(I, 2, B); - allYPolynomials->SetValue(I, 3, C); - allYPolynomials->SetValue(I, 4, D); - - another->ZCoordPolynomial(I, A, B, C, D); - allZPolynomials->SetValue(I, 1, A); - allZPolynomials->SetValue(I, 2, B); - allZPolynomials->SetValue(I, 3, C); - allZPolynomials->SetValue(I, 4, D); - } - - Handle(TColStd_HArray1OfReal) allXvalues = - new TColStd_HArray1OfReal(1, 4); - Handle(TColStd_HArray1OfReal) allYvalues = - new TColStd_HArray1OfReal(1, 4); - Handle(TColStd_HArray1OfReal) allZvalues = - new TColStd_HArray1OfReal(1, 4); - - another->XValues(A, B, C, D); - allXvalues->SetValue(1, A); - allXvalues->SetValue(2, B); - allXvalues->SetValue(3, C); - allXvalues->SetValue(4, D); - - another->YValues(A, B, C, D); - allYvalues->SetValue(1, A); - allYvalues->SetValue(2, B); - allYvalues->SetValue(3, C); - allYvalues->SetValue(4, D); - - another->ZValues(A, B, C, D); - allZvalues->SetValue(1, A); - allZvalues->SetValue(2, B); - allZvalues->SetValue(3, C); - allZvalues->SetValue(4, D); - - ent->Init(aType, aDegree, nbDimensions, allBreakPoints, - allXPolynomials, allYPolynomials, allZPolynomials, - allXvalues, allYvalues, allZvalues); -} - - IGESData_DirChecker IGESGeom_ToolSplineCurve::DirChecker (const Handle(IGESGeom_SplineCurve)& /* ent */ ) const { diff --git a/src/IGESGeom/IGESGeom_ToolSplineCurve.hxx b/src/IGESGeom/IGESGeom_ToolSplineCurve.hxx index 9af88ed04e..b56c493f23 100644 --- a/src/IGESGeom/IGESGeom_ToolSplineCurve.hxx +++ b/src/IGESGeom/IGESGeom_ToolSplineCurve.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolSplineCurve { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSplineCurve, ready to work - Standard_EXPORT IGESGeom_ToolSplineCurve(); + IGESGeom_ToolSplineCurve() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,14 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGeom_SplineCurve)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a SplineCurve , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGeom_SplineCurve)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_SplineCurve)& ent) const; //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_SplineCurve)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_SplineCurve)& entfrom, const Handle(IGESGeom_SplineCurve)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_SplineCurve)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolSplineCurve_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx b/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx index 38f183aceb..eb6a783678 100644 --- a/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolSplineSurface.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -36,9 +35,6 @@ #include #include -// MGE 30/07/98 -IGESGeom_ToolSplineSurface::IGESGeom_ToolSplineSurface () { } - void IGESGeom_ToolSplineSurface::ReadOwnParams (const Handle(IGESGeom_SplineSurface)& ent, @@ -219,63 +215,6 @@ void IGESGeom_ToolSplineSurface::WriteOwnParams IW.Send( 0.0); //Send Arbitrary Values } -void IGESGeom_ToolSplineSurface::OwnShared - (const Handle(IGESGeom_SplineSurface)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESGeom_ToolSplineSurface::OwnCopy - (const Handle(IGESGeom_SplineSurface)& another, - const Handle(IGESGeom_SplineSurface)& ent, Interface_CopyTool& /* TC */) const -{ - - Standard_Integer aBoundaryType, aPatchType, allNbUSegments, allNbVSegments; - Standard_Integer I, J; - - aBoundaryType = another->BoundaryType(); - aPatchType = another->PatchType(); - allNbUSegments = another->NbUSegments(); - allNbVSegments = another->NbVSegments(); - - Handle(TColStd_HArray1OfReal) allUBreakPoints = - new TColStd_HArray1OfReal(1, allNbUSegments+1); - - Handle(TColStd_HArray1OfReal) allVBreakPoints = - new TColStd_HArray1OfReal(1, allNbVSegments+1); - - for ( I =1; I <= allNbUSegments+1; I++) - allUBreakPoints->SetValue(I, another->UBreakPoint(I)); - - for ( I =1; I <= allNbVSegments+1; I++) - allVBreakPoints->SetValue(I, another->VBreakPoint(I)); - - Handle(IGESBasic_HArray2OfHArray1OfReal) allXCoeffs = new - IGESBasic_HArray2OfHArray1OfReal(1,allNbUSegments,1,allNbVSegments); - - Handle(IGESBasic_HArray2OfHArray1OfReal) allYCoeffs = new - IGESBasic_HArray2OfHArray1OfReal(1,allNbUSegments,1,allNbVSegments); - - Handle(IGESBasic_HArray2OfHArray1OfReal) allZCoeffs = new - IGESBasic_HArray2OfHArray1OfReal(1,allNbUSegments,1,allNbVSegments); - - Handle(TColStd_HArray1OfReal) temp = - new TColStd_HArray1OfReal(1, 16); - - for (I =1; I <= allNbUSegments; I++) - for (J = 1; J <= allNbVSegments; J++) - { - temp = another->XPolynomial(I, J); - allXCoeffs->SetValue(I,J,temp); - temp = another->YPolynomial(I,J); - allYCoeffs->SetValue(I,J,temp); - temp = another->ZPolynomial(I,J); - allZCoeffs->SetValue(I,J,temp); - } - - ent->Init(aBoundaryType , aPatchType, allUBreakPoints, allVBreakPoints, - allXCoeffs, allYCoeffs, allZCoeffs); -} - IGESData_DirChecker IGESGeom_ToolSplineSurface::DirChecker (const Handle(IGESGeom_SplineSurface)& /* ent */ ) const diff --git a/src/IGESGeom/IGESGeom_ToolSplineSurface.hxx b/src/IGESGeom/IGESGeom_ToolSplineSurface.hxx index 27e9a68e08..331b23c3c4 100644 --- a/src/IGESGeom/IGESGeom_ToolSplineSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolSplineSurface.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolSplineSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSplineSurface, ready to work - Standard_EXPORT IGESGeom_ToolSplineSurface(); + IGESGeom_ToolSplineSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,14 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGeom_SplineSurface)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a SplineSurface , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGeom_SplineSurface)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_SplineSurface)& ent) const; //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_SplineSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_SplineSurface)& entfrom, const Handle(IGESGeom_SplineSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_SplineSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolSplineSurface_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.cxx b/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.cxx index bf8227e999..14b5babf99 100644 --- a/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.cxx +++ b/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,9 +35,6 @@ #include #include -// MGE 31/07/98 -IGESGeom_ToolSurfaceOfRevolution::IGESGeom_ToolSurfaceOfRevolution () { } - void IGESGeom_ToolSurfaceOfRevolution::ReadOwnParams (const Handle(IGESGeom_SurfaceOfRevolution)& ent, @@ -125,20 +121,6 @@ void IGESGeom_ToolSurfaceOfRevolution::OwnShared iter.GetOneItem(ent->Generatrix()); } -void IGESGeom_ToolSurfaceOfRevolution::OwnCopy - (const Handle(IGESGeom_SurfaceOfRevolution)& another, - const Handle(IGESGeom_SurfaceOfRevolution)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESGeom_Line, anAxis, - TC.Transferred(another->AxisOfRevolution())); - DeclareAndCast(IGESData_IGESEntity, aGeneratrix, - TC.Transferred(another->Generatrix())); - Standard_Real aStartAngle = another->StartAngle(); - Standard_Real anEndAngle = another->EndAngle(); - - ent->Init(anAxis, aGeneratrix, aStartAngle, anEndAngle); -} - IGESData_DirChecker IGESGeom_ToolSurfaceOfRevolution::DirChecker (const Handle(IGESGeom_SurfaceOfRevolution)& /*ent*/ ) const @@ -153,15 +135,6 @@ IGESData_DirChecker IGESGeom_ToolSurfaceOfRevolution::DirChecker return DC; } -void IGESGeom_ToolSurfaceOfRevolution::OwnCheck - (const Handle(IGESGeom_SurfaceOfRevolution)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -// Standard_Real diffang = ent->EndAngle() - ent->StartAngle(); -// if (diffang <= 0.0 || diffang > 2.0 * M_PI) -// ach.AddFail("0 < TA - SA <= 2Pi is not satisfied"); -} - void IGESGeom_ToolSurfaceOfRevolution::OwnDump (const Handle(IGESGeom_SurfaceOfRevolution)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.hxx b/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.hxx index 9c1acfb1c6..8e7a670a7a 100644 --- a/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.hxx +++ b/src/IGESGeom/IGESGeom_ToolSurfaceOfRevolution.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolSurfaceOfRevolution { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSurfaceOfRevolution, ready to work - Standard_EXPORT IGESGeom_ToolSurfaceOfRevolution(); + IGESGeom_ToolSurfaceOfRevolution() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_SurfaceOfRevolution)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGeom_SurfaceOfRevolution)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_SurfaceOfRevolution)& entfrom, const Handle(IGESGeom_SurfaceOfRevolution)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_SurfaceOfRevolution)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolSurfaceOfRevolution_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.cxx b/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.cxx index 0d9859ee7d..93377447fc 100644 --- a/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.cxx +++ b/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -38,9 +37,6 @@ #include #include -// MGE 31/07/98 -IGESGeom_ToolTabulatedCylinder::IGESGeom_ToolTabulatedCylinder () { } - void IGESGeom_ToolTabulatedCylinder::ReadOwnParams (const Handle(IGESGeom_TabulatedCylinder)& ent, @@ -101,18 +97,6 @@ void IGESGeom_ToolTabulatedCylinder::OwnShared iter.GetOneItem( ent->Directrix() ); } -void IGESGeom_ToolTabulatedCylinder::OwnCopy - (const Handle(IGESGeom_TabulatedCylinder)& another, - const Handle(IGESGeom_TabulatedCylinder)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity, aDirectrix, - TC.Transferred(another->Directrix())); - - gp_XYZ anEnd = another->EndPoint().XYZ(); - - ent->Init(aDirectrix, anEnd); -} - IGESData_DirChecker IGESGeom_ToolTabulatedCylinder::DirChecker (const Handle(IGESGeom_TabulatedCylinder)& /* ent */ ) const @@ -126,11 +110,6 @@ IGESData_DirChecker IGESGeom_ToolTabulatedCylinder::DirChecker return DC; } -void IGESGeom_ToolTabulatedCylinder::OwnCheck - (const Handle(IGESGeom_TabulatedCylinder)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ } - void IGESGeom_ToolTabulatedCylinder::OwnDump (const Handle(IGESGeom_TabulatedCylinder)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.hxx b/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.hxx index f40c7afdff..f03657e4a8 100644 --- a/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.hxx +++ b/src/IGESGeom/IGESGeom_ToolTabulatedCylinder.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolTabulatedCylinder { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolTabulatedCylinder, ready to work - Standard_EXPORT IGESGeom_ToolTabulatedCylinder(); + IGESGeom_ToolTabulatedCylinder() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGeom_TabulatedCylinder)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGeom_TabulatedCylinder)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_TabulatedCylinder)& entfrom, const Handle(IGESGeom_TabulatedCylinder)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_TabulatedCylinder)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolTabulatedCylinder_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolTransformationMatrix.cxx b/src/IGESGeom/IGESGeom_ToolTransformationMatrix.cxx index c6f9b93e7f..4bd70f9ea6 100644 --- a/src/IGESGeom/IGESGeom_ToolTransformationMatrix.cxx +++ b/src/IGESGeom/IGESGeom_ToolTransformationMatrix.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -35,15 +34,6 @@ #include #include -// MGE 03/08/98 -//======================================================================= -//function : IGESGeom_ToolTransformationMatrix -//purpose : -//======================================================================= -IGESGeom_ToolTransformationMatrix::IGESGeom_ToolTransformationMatrix () -{ -} - //======================================================================= //function : ReadOwnParams @@ -94,38 +84,6 @@ void IGESGeom_ToolTransformationMatrix::WriteOwnParams } -//======================================================================= -//function : OwnShared -//purpose : -//======================================================================= - -void IGESGeom_ToolTransformationMatrix::OwnShared - (const Handle(IGESGeom_TransformationMatrix)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - - -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESGeom_ToolTransformationMatrix::OwnCopy - (const Handle(IGESGeom_TransformationMatrix)& another, - const Handle(IGESGeom_TransformationMatrix)& ent, Interface_CopyTool& /*TC*/) const -{ - Handle(TColStd_HArray2OfReal) data = new TColStd_HArray2OfReal(1, 3, 1, 4); - for (Standard_Integer I = 1; I <= 3;I++) { - for (Standard_Integer J = 1; J <= 4; J++) { - data->SetValue(I, J, another->Data(I, J)); - } - } - - ent->Init(data); - ent->SetFormNumber(another->FormNumber()); -} - - //======================================================================= //function : OwnCorrect //purpose : diff --git a/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx b/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx index 6e4be028c3..11c387b36d 100644 --- a/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx +++ b/src/IGESGeom/IGESGeom_ToolTransformationMatrix.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolTransformationMatrix { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolTransformationMatrix, ready to work - Standard_EXPORT IGESGeom_ToolTransformationMatrix(); + IGESGeom_ToolTransformationMatrix() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGeom_TransformationMatrix)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a TransformationMatrix , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGeom_TransformationMatrix)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a TransformationMatrix //! (FormNumber if 0 or 1, recomputed according Positive/Negative) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESGeom_TransformationMatrix)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_TransformationMatrix)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_TransformationMatrix)& entfrom, const Handle(IGESGeom_TransformationMatrix)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_TransformationMatrix)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolTransformationMatrix_HeaderFile diff --git a/src/IGESGeom/IGESGeom_ToolTrimmedSurface.cxx b/src/IGESGeom/IGESGeom_ToolTrimmedSurface.cxx index 33a4cb1685..af5f34fd72 100644 --- a/src/IGESGeom/IGESGeom_ToolTrimmedSurface.cxx +++ b/src/IGESGeom/IGESGeom_ToolTrimmedSurface.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -38,15 +37,6 @@ #include #include -// MGE 31/07/98 -//======================================================================= -//function : IGESGeom_ToolTrimmedSurface -//purpose : -//======================================================================= -IGESGeom_ToolTrimmedSurface::IGESGeom_ToolTrimmedSurface () -{ -} - //======================================================================= //function : ReadOwnParams @@ -218,38 +208,6 @@ void IGESGeom_ToolTrimmedSurface::OwnShared(const Handle(IGESGeom_TrimmedSurface } -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESGeom_ToolTrimmedSurface::OwnCopy(const Handle(IGESGeom_TrimmedSurface)& another, - const Handle(IGESGeom_TrimmedSurface)& ent, - Interface_CopyTool& TC) const -{ - Handle(IGESGeom_HArray1OfCurveOnSurface) anInner; - - DeclareAndCast(IGESData_IGESEntity, aSurface, - TC.Transferred(another->Surface())); - Standard_Integer aFlag = another->OuterBoundaryType(); - DeclareAndCast(IGESGeom_CurveOnSurface, anOuter, - TC.Transferred(another->OuterContour())); - Standard_Integer count = another->NbInnerContours(); - - if (count > 0) { - anInner = new IGESGeom_HArray1OfCurveOnSurface(1, count); - Standard_Integer I; - for (I = 1; I <= count; I++) { - DeclareAndCast(IGESGeom_CurveOnSurface, temp, - TC.Transferred(another->InnerContour(I))); - anInner->SetValue(I, temp); - } - } - - ent->Init(aSurface, aFlag, anOuter, anInner); -} - - //======================================================================= //function : DirChecker //purpose : diff --git a/src/IGESGeom/IGESGeom_ToolTrimmedSurface.hxx b/src/IGESGeom/IGESGeom_ToolTrimmedSurface.hxx index 6dfeb3a3fc..d1e33a5aa7 100644 --- a/src/IGESGeom/IGESGeom_ToolTrimmedSurface.hxx +++ b/src/IGESGeom/IGESGeom_ToolTrimmedSurface.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGeom_ToolTrimmedSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolTrimmedSurface, ready to work - Standard_EXPORT IGESGeom_ToolTrimmedSurface(); + IGESGeom_ToolTrimmedSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGeom_TrimmedSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGeom_TrimmedSurface)& entfrom, const Handle(IGESGeom_TrimmedSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGeom_TrimmedSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGeom_ToolTrimmedSurface_HeaderFile diff --git a/src/IGESGraph/IGESGraph.cxx b/src/IGESGraph/IGESGraph.cxx index 0654205a9d..146f96571f 100644 --- a/src/IGESGraph/IGESGraph.cxx +++ b/src/IGESGraph/IGESGraph.cxx @@ -23,14 +23,16 @@ #include #include -// Ancillary data to work on a Package of IGES Entities with a Protocol -// (Modules are created and loaded in appropriate libraries, once by Init) -static Handle(IGESGraph_Protocol) protocol; - - void IGESGraph::Init () +/*void IGESGraph::Init () { IGESBasic::Init(); + IGESGraph::Protocol(); +}*/ + +const Handle(IGESGraph_Protocol) & IGESGraph::Protocol () +{ + static Handle(IGESGraph_Protocol) protocol; if (protocol.IsNull()) { protocol = new IGESGraph_Protocol; Interface_GeneralLib::SetGlobal (new IGESGraph_GeneralModule, protocol); @@ -38,9 +40,5 @@ static Handle(IGESGraph_Protocol) protocol; IGESData_WriterLib::SetGlobal (new IGESGraph_ReadWriteModule,protocol); IGESData_SpecificLib::SetGlobal (new IGESGraph_SpecificModule, protocol); } -} - - Handle(IGESGraph_Protocol) IGESGraph::Protocol () -{ return protocol; } diff --git a/src/IGESGraph/IGESGraph.hxx b/src/IGESGraph/IGESGraph.hxx index c3276ab989..dc667fc1bc 100644 --- a/src/IGESGraph/IGESGraph.hxx +++ b/src/IGESGraph/IGESGraph.hxx @@ -18,42 +18,9 @@ #define _IGESGraph_HeaderFile #include -#include #include class IGESGraph_Protocol; -class IGESGraph_LineFontDefTemplate; -class IGESGraph_LineFontDefPattern; -class IGESGraph_TextFontDef; -class IGESGraph_TextDisplayTemplate; -class IGESGraph_Color; -class IGESGraph_DefinitionLevel; -class IGESGraph_NominalSize; -class IGESGraph_DrawingSize; -class IGESGraph_DrawingUnits; -class IGESGraph_IntercharacterSpacing; -class IGESGraph_LineFontPredefined; -class IGESGraph_HighLight; -class IGESGraph_Pick; -class IGESGraph_UniformRectGrid; -class IGESGraph_ToolLineFontDefTemplate; -class IGESGraph_ToolLineFontDefPattern; -class IGESGraph_ToolTextFontDef; -class IGESGraph_ToolTextDisplayTemplate; -class IGESGraph_ToolColor; -class IGESGraph_ToolDefinitionLevel; -class IGESGraph_ToolNominalSize; -class IGESGraph_ToolDrawingSize; -class IGESGraph_ToolDrawingUnits; -class IGESGraph_ToolIntercharacterSpacing; -class IGESGraph_ToolLineFontPredefined; -class IGESGraph_ToolHighLight; -class IGESGraph_ToolPick; -class IGESGraph_ToolUniformRectGrid; -class IGESGraph_Protocol; -class IGESGraph_ReadWriteModule; -class IGESGraph_GeneralModule; -class IGESGraph_SpecificModule; //! This package contains the group of classes necessary @@ -61,70 +28,13 @@ class IGESGraph_SpecificModule; //! (e.g., Fonts, Colors, Screen management ...) class IGESGraph { -public: - - DEFINE_STANDARD_ALLOC + public: - //! Prepares dynamic data (Protocol, Modules) for this package - Standard_EXPORT static void Init(); + //Standard_EXPORT static void Init(); //! Returns the Protocol for this Package - Standard_EXPORT static Handle(IGESGraph_Protocol) Protocol(); - - - - -protected: - - - - - -private: - - - - -friend class IGESGraph_LineFontDefTemplate; -friend class IGESGraph_LineFontDefPattern; -friend class IGESGraph_TextFontDef; -friend class IGESGraph_TextDisplayTemplate; -friend class IGESGraph_Color; -friend class IGESGraph_DefinitionLevel; -friend class IGESGraph_NominalSize; -friend class IGESGraph_DrawingSize; -friend class IGESGraph_DrawingUnits; -friend class IGESGraph_IntercharacterSpacing; -friend class IGESGraph_LineFontPredefined; -friend class IGESGraph_HighLight; -friend class IGESGraph_Pick; -friend class IGESGraph_UniformRectGrid; -friend class IGESGraph_ToolLineFontDefTemplate; -friend class IGESGraph_ToolLineFontDefPattern; -friend class IGESGraph_ToolTextFontDef; -friend class IGESGraph_ToolTextDisplayTemplate; -friend class IGESGraph_ToolColor; -friend class IGESGraph_ToolDefinitionLevel; -friend class IGESGraph_ToolNominalSize; -friend class IGESGraph_ToolDrawingSize; -friend class IGESGraph_ToolDrawingUnits; -friend class IGESGraph_ToolIntercharacterSpacing; -friend class IGESGraph_ToolLineFontPredefined; -friend class IGESGraph_ToolHighLight; -friend class IGESGraph_ToolPick; -friend class IGESGraph_ToolUniformRectGrid; -friend class IGESGraph_Protocol; -friend class IGESGraph_ReadWriteModule; -friend class IGESGraph_GeneralModule; -friend class IGESGraph_SpecificModule; - + Standard_EXPORT static const Handle(IGESGraph_Protocol) & Protocol(); }; - - - - - - #endif // _IGESGraph_HeaderFile diff --git a/src/IGESGraph/IGESGraph_GeneralModule.cxx b/src/IGESGraph/IGESGraph_GeneralModule.cxx index bb559c968a..10affd49c0 100644 --- a/src/IGESGraph/IGESGraph_GeneralModule.cxx +++ b/src/IGESGraph/IGESGraph_GeneralModule.cxx @@ -45,82 +45,18 @@ #include #include #include -#include #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESGraph_GeneralModule,IGESData_GeneralModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESGraph_GeneralModule::IGESGraph_GeneralModule () { } - void IGESGraph_GeneralModule::OwnSharedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const { switch (CN) { - case 1 : { - DeclareAndCast(IGESGraph_Color,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolColor tool; - tool.OwnShared(anent,iter); - } - break; - case 2 : { - DeclareAndCast(IGESGraph_DefinitionLevel,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolDefinitionLevel tool; - tool.OwnShared(anent,iter); - } - break; - case 3 : { - DeclareAndCast(IGESGraph_DrawingSize,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolDrawingSize tool; - tool.OwnShared(anent,iter); - } - break; - case 4 : { - DeclareAndCast(IGESGraph_DrawingUnits,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolDrawingUnits tool; - tool.OwnShared(anent,iter); - } - break; - case 5 : { - DeclareAndCast(IGESGraph_HighLight,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolHighLight tool; - tool.OwnShared(anent,iter); - } - break; - case 6 : { - DeclareAndCast(IGESGraph_IntercharacterSpacing,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolIntercharacterSpacing tool; - tool.OwnShared(anent,iter); - } - break; - case 7 : { - DeclareAndCast(IGESGraph_LineFontDefPattern,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolLineFontDefPattern tool; - tool.OwnShared(anent,iter); - } - break; - case 8 : { - DeclareAndCast(IGESGraph_LineFontPredefined,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolLineFontPredefined tool; - tool.OwnShared(anent,iter); - } - break; case 9 : { DeclareAndCast(IGESGraph_LineFontDefTemplate,anent,ent); if (anent.IsNull()) return; @@ -128,20 +64,6 @@ IGESGraph_GeneralModule::IGESGraph_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 10 : { - DeclareAndCast(IGESGraph_NominalSize,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolNominalSize tool; - tool.OwnShared(anent,iter); - } - break; - case 11 : { - DeclareAndCast(IGESGraph_Pick,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolPick tool; - tool.OwnShared(anent,iter); - } - break; case 12 : { DeclareAndCast(IGESGraph_TextDisplayTemplate,anent,ent); if (anent.IsNull()) return; @@ -156,13 +78,6 @@ IGESGraph_GeneralModule::IGESGraph_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 14 : { - DeclareAndCast(IGESGraph_UniformRectGrid,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolUniformRectGrid tool; - tool.OwnShared(anent,iter); - } - break; default : break; } } @@ -267,20 +182,6 @@ IGESGraph_GeneralModule::IGESGraph_GeneralModule () { } const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const { switch (CN) { - case 1 : { - DeclareAndCast(IGESGraph_Color,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolColor tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 2 : { - DeclareAndCast(IGESGraph_DefinitionLevel,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolDefinitionLevel tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 3 : { DeclareAndCast(IGESGraph_DrawingSize,anent,ent); if (anent.IsNull()) return; @@ -344,20 +245,6 @@ IGESGraph_GeneralModule::IGESGraph_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 12 : { - DeclareAndCast(IGESGraph_TextDisplayTemplate,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolTextDisplayTemplate tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 13 : { - DeclareAndCast(IGESGraph_TextFontDef,anent,ent); - if (anent.IsNull()) return; - IGESGraph_ToolTextFontDef tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 14 : { DeclareAndCast(IGESGraph_UniformRectGrid,anent,ent); if (anent.IsNull()) return; @@ -394,116 +281,6 @@ IGESGraph_GeneralModule::IGESGraph_GeneralModule () { } } - void IGESGraph_GeneralModule::OwnCopyCase - (const Standard_Integer CN, - const Handle(IGESData_IGESEntity)& entfrom, - const Handle(IGESData_IGESEntity)& entto, - Interface_CopyTool& TC) const -{ - switch (CN) { - case 1 : { - DeclareAndCast(IGESGraph_Color,enfr,entfrom); - DeclareAndCast(IGESGraph_Color,ento,entto); - IGESGraph_ToolColor tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 2 : { - DeclareAndCast(IGESGraph_DefinitionLevel,enfr,entfrom); - DeclareAndCast(IGESGraph_DefinitionLevel,ento,entto); - IGESGraph_ToolDefinitionLevel tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 3 : { - DeclareAndCast(IGESGraph_DrawingSize,enfr,entfrom); - DeclareAndCast(IGESGraph_DrawingSize,ento,entto); - IGESGraph_ToolDrawingSize tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 4 : { - DeclareAndCast(IGESGraph_DrawingUnits,enfr,entfrom); - DeclareAndCast(IGESGraph_DrawingUnits,ento,entto); - IGESGraph_ToolDrawingUnits tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 5 : { - DeclareAndCast(IGESGraph_HighLight,enfr,entfrom); - DeclareAndCast(IGESGraph_HighLight,ento,entto); - IGESGraph_ToolHighLight tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 6 : { - DeclareAndCast(IGESGraph_IntercharacterSpacing,enfr,entfrom); - DeclareAndCast(IGESGraph_IntercharacterSpacing,ento,entto); - IGESGraph_ToolIntercharacterSpacing tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 7 : { - DeclareAndCast(IGESGraph_LineFontDefPattern,enfr,entfrom); - DeclareAndCast(IGESGraph_LineFontDefPattern,ento,entto); - IGESGraph_ToolLineFontDefPattern tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 8 : { - DeclareAndCast(IGESGraph_LineFontPredefined,enfr,entfrom); - DeclareAndCast(IGESGraph_LineFontPredefined,ento,entto); - IGESGraph_ToolLineFontPredefined tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 9 : { - DeclareAndCast(IGESGraph_LineFontDefTemplate,enfr,entfrom); - DeclareAndCast(IGESGraph_LineFontDefTemplate,ento,entto); - IGESGraph_ToolLineFontDefTemplate tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 10 : { - DeclareAndCast(IGESGraph_NominalSize,enfr,entfrom); - DeclareAndCast(IGESGraph_NominalSize,ento,entto); - IGESGraph_ToolNominalSize tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 11 : { - DeclareAndCast(IGESGraph_Pick,enfr,entfrom); - DeclareAndCast(IGESGraph_Pick,ento,entto); - IGESGraph_ToolPick tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 12 : { - DeclareAndCast(IGESGraph_TextDisplayTemplate,enfr,entfrom); - DeclareAndCast(IGESGraph_TextDisplayTemplate,ento,entto); - IGESGraph_ToolTextDisplayTemplate tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 13 : { - DeclareAndCast(IGESGraph_TextFontDef,enfr,entfrom); - DeclareAndCast(IGESGraph_TextFontDef,ento,entto); - IGESGraph_ToolTextFontDef tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 14 : { - DeclareAndCast(IGESGraph_UniformRectGrid,enfr,entfrom); - DeclareAndCast(IGESGraph_UniformRectGrid,ento,entto); - IGESGraph_ToolUniformRectGrid tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - default : break; - } -} - - Standard_Integer IGESGraph_GeneralModule::CategoryNumber (const Standard_Integer /*CN*/, const Handle(Standard_Transient)& , const Interface_ShareTool& ) const diff --git a/src/IGESGraph/IGESGraph_GeneralModule.hxx b/src/IGESGraph/IGESGraph_GeneralModule.hxx index 9159cdf0d6..c626f390b4 100644 --- a/src/IGESGraph/IGESGraph_GeneralModule.hxx +++ b/src/IGESGraph/IGESGraph_GeneralModule.hxx @@ -17,19 +17,7 @@ #ifndef _IGESGraph_GeneralModule_HeaderFile #define _IGESGraph_GeneralModule_HeaderFile -#include -#include - #include -#include -#include -class IGESData_IGESEntity; -class Interface_EntityIterator; -class IGESData_DirChecker; -class Interface_ShareTool; -class Interface_Check; -class Standard_Transient; -class Interface_CopyTool; class IGESGraph_GeneralModule; @@ -39,12 +27,10 @@ DEFINE_STANDARD_HANDLE(IGESGraph_GeneralModule, IGESData_GeneralModule) //! This Services comprise : Shared & Implied Lists, Copy, Check class IGESGraph_GeneralModule : public IGESData_GeneralModule { + public: -public: - - //! Creates a GeneralModule from IGESGraph and puts it into GeneralLib - Standard_EXPORT IGESGraph_GeneralModule(); + IGESGraph_GeneralModule() {} //! Lists the Entities shared by a given IGESEntity , from //! its specific parameters : specific for each type @@ -61,34 +47,11 @@ public: //! Specific creation of a new void entity Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const Standard_OVERRIDE; - //! Copies parameters which are specific of each Type of Entity - Standard_EXPORT void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - //! Returns a category number which characterizes an entity //! Drawing for all Standard_EXPORT virtual Standard_Integer CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESGraph_GeneralModule,IGESData_GeneralModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _IGESGraph_GeneralModule_HeaderFile diff --git a/src/IGESGraph/IGESGraph_Protocol.cxx b/src/IGESGraph/IGESGraph_Protocol.cxx index b96dec34d2..b2b5c3f006 100644 --- a/src/IGESGraph/IGESGraph_Protocol.cxx +++ b/src/IGESGraph/IGESGraph_Protocol.cxx @@ -38,7 +38,7 @@ static int deja = 0; static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06, atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14; - IGESGraph_Protocol::IGESGraph_Protocol () +IGESGraph_Protocol::IGESGraph_Protocol () { if (deja) return; deja = 1; atype01 = STANDARD_TYPE(IGESGraph_Color); @@ -57,17 +57,15 @@ static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06, atype14 = STANDARD_TYPE(IGESGraph_UniformRectGrid); } - Standard_Integer IGESGraph_Protocol::NbResources () const - { return 1; } +Standard_Integer IGESGraph_Protocol::NbResources () const +{ return 1; } - Handle(Interface_Protocol) IGESGraph_Protocol::Resource - (const Standard_Integer /*num*/) const +Handle(Interface_Protocol) IGESGraph_Protocol::Resource (const Standard_Integer /*num*/) const { return IGESBasic::Protocol(); } - Standard_Integer IGESGraph_Protocol::TypeNumber - (const Handle(Standard_Type)& atype) const +Standard_Integer IGESGraph_Protocol::TypeNumber (const Handle(Standard_Type)& atype) const { if (atype == atype01) return 1; else if (atype == atype02) return 2; diff --git a/src/IGESGraph/IGESGraph_ToolColor.cxx b/src/IGESGraph/IGESGraph_ToolColor.cxx index 3e1c885fe9..fdff15e8a5 100644 --- a/src/IGESGraph/IGESGraph_ToolColor.cxx +++ b/src/IGESGraph/IGESGraph_ToolColor.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESGraph_ToolColor::IGESGraph_ToolColor () { } - void IGESGraph_ToolColor::ReadOwnParams (const Handle(IGESGraph_Color)& ent, @@ -72,24 +69,6 @@ void IGESGraph_ToolColor::WriteOwnParams else IW.SendVoid(); // placekeeper to be reserved for additional pointers } -void IGESGraph_ToolColor::OwnShared - (const Handle(IGESGraph_Color)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESGraph_ToolColor::OwnCopy - (const Handle(IGESGraph_Color)& another, - const Handle(IGESGraph_Color)& ent, Interface_CopyTool& /*TC*/) const -{ - Standard_Real tempRed, tempGreen, tempBlue; - Handle(TCollection_HAsciiString) tempColorName; - another->RGBIntensity(tempRed, tempGreen, tempBlue); - if (another->HasColorName()) - tempColorName = new TCollection_HAsciiString(another->ColorName()); - - ent->Init(tempRed, tempGreen, tempBlue, tempColorName); -} - IGESData_DirChecker IGESGraph_ToolColor::DirChecker (const Handle(IGESGraph_Color)& /*ent*/ ) const { @@ -106,16 +85,6 @@ IGESData_DirChecker IGESGraph_ToolColor::DirChecker return DC; } -void IGESGraph_ToolColor::OwnCheck - (const Handle(IGESGraph_Color)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -// if (ent->RankColor() == 0) -// ach.AddFail("Color Rank is zero"); -// else if (ent->RankColor() < 1 || ent->RankColor() > 8) -// ach.AddFail("Color Rank not between 1 to 8"); -} - void IGESGraph_ToolColor::OwnDump (const Handle(IGESGraph_Color)& ent, const IGESData_IGESDumper& /*dumper*/, const Handle(Message_Messenger)& S, const Standard_Integer /*level*/) const diff --git a/src/IGESGraph/IGESGraph_ToolColor.hxx b/src/IGESGraph/IGESGraph_ToolColor.hxx index 92b650fdc3..6d1d182e77 100644 --- a/src/IGESGraph/IGESGraph_ToolColor.hxx +++ b/src/IGESGraph/IGESGraph_ToolColor.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolColor { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolColor, ready to work - Standard_EXPORT IGESGraph_ToolColor(); + IGESGraph_ToolColor() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGraph_Color)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Color , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGraph_Color)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGraph_Color)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGraph_Color)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_Color)& entfrom, const Handle(IGESGraph_Color)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_Color)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolColor_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolDefinitionLevel.cxx b/src/IGESGraph/IGESGraph_ToolDefinitionLevel.cxx index 18f4bcedbf..b67fee0485 100644 --- a/src/IGESGraph/IGESGraph_ToolDefinitionLevel.cxx +++ b/src/IGESGraph/IGESGraph_ToolDefinitionLevel.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESGraph_ToolDefinitionLevel::IGESGraph_ToolDefinitionLevel () { } - void IGESGraph_ToolDefinitionLevel::ReadOwnParams (const Handle(IGESGraph_DefinitionLevel)& ent, @@ -69,27 +66,6 @@ void IGESGraph_ToolDefinitionLevel::WriteOwnParams IW.Send( ent->LevelNumber(i) ); } -void IGESGraph_ToolDefinitionLevel::OwnShared - (const Handle(IGESGraph_DefinitionLevel)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESGraph_ToolDefinitionLevel::OwnCopy - (const Handle(IGESGraph_DefinitionLevel)& another, - const Handle(IGESGraph_DefinitionLevel)& ent, Interface_CopyTool& /*TC*/) const -{ - Standard_Integer nbval; - Handle(TColStd_HArray1OfInteger) levelNumbers; - - nbval = another->NbPropertyValues(); - - levelNumbers = new TColStd_HArray1OfInteger(1, nbval); - for (Standard_Integer i = 1; i <= nbval; i++) - levelNumbers->SetValue( i, another->LevelNumber(i) ); - - ent->Init(levelNumbers); -} - IGESData_DirChecker IGESGraph_ToolDefinitionLevel::DirChecker (const Handle(IGESGraph_DefinitionLevel)& /*ent*/) const { @@ -104,12 +80,6 @@ IGESData_DirChecker IGESGraph_ToolDefinitionLevel::DirChecker return DC; } -void IGESGraph_ToolDefinitionLevel::OwnCheck - (const Handle(IGESGraph_DefinitionLevel)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -} - void IGESGraph_ToolDefinitionLevel::OwnDump (const Handle(IGESGraph_DefinitionLevel)& ent, const IGESData_IGESDumper& /*dumper*/, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESGraph/IGESGraph_ToolDefinitionLevel.hxx b/src/IGESGraph/IGESGraph_ToolDefinitionLevel.hxx index fbae62d20a..bf90df8f42 100644 --- a/src/IGESGraph/IGESGraph_ToolDefinitionLevel.hxx +++ b/src/IGESGraph/IGESGraph_ToolDefinitionLevel.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolDefinitionLevel { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDefinitionLevel, ready to work - Standard_EXPORT IGESGraph_ToolDefinitionLevel(); + IGESGraph_ToolDefinitionLevel() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGraph_DefinitionLevel)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a DefinitionLevel , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGraph_DefinitionLevel)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGraph_DefinitionLevel)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGraph_DefinitionLevel)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_DefinitionLevel)& entfrom, const Handle(IGESGraph_DefinitionLevel)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_DefinitionLevel)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolDefinitionLevel_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolDrawingSize.cxx b/src/IGESGraph/IGESGraph_ToolDrawingSize.cxx index ca8a4643c2..055f7af9c3 100644 --- a/src/IGESGraph/IGESGraph_ToolDrawingSize.cxx +++ b/src/IGESGraph/IGESGraph_ToolDrawingSize.cxx @@ -25,14 +25,11 @@ #include #include #include -#include #include #include #include #include -IGESGraph_ToolDrawingSize::IGESGraph_ToolDrawingSize () { } - void IGESGraph_ToolDrawingSize::ReadOwnParams (const Handle(IGESGraph_DrawingSize)& ent, @@ -67,18 +64,6 @@ void IGESGraph_ToolDrawingSize::WriteOwnParams IW.Send( ent->YSize() ); } -void IGESGraph_ToolDrawingSize::OwnShared - (const Handle(IGESGraph_DrawingSize)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESGraph_ToolDrawingSize::OwnCopy - (const Handle(IGESGraph_DrawingSize)& another, - const Handle(IGESGraph_DrawingSize)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init(2,another->XSize(),another->YSize()); -} - Standard_Boolean IGESGraph_ToolDrawingSize::OwnCorrect (const Handle(IGESGraph_DrawingSize)& ent) const { diff --git a/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx b/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx index 3ecce38a80..644845129d 100644 --- a/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx +++ b/src/IGESGraph/IGESGraph_ToolDrawingSize.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolDrawingSize { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDrawingSize, ready to work - Standard_EXPORT IGESGraph_ToolDrawingSize(); + IGESGraph_ToolDrawingSize() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGraph_DrawingSize)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a DrawingSize , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGraph_DrawingSize)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a DrawingSize //! (NbPropertyValues forced to 2) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESGraph_DrawingSize)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGraph_DrawingSize)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_DrawingSize)& entfrom, const Handle(IGESGraph_DrawingSize)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_DrawingSize)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolDrawingSize_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx b/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx index d8cff42197..b95bf1138c 100644 --- a/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx +++ b/src/IGESGraph/IGESGraph_ToolDrawingUnits.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESGraph_ToolDrawingUnits::IGESGraph_ToolDrawingUnits () { } - void IGESGraph_ToolDrawingUnits::ReadOwnParams (const Handle(IGESGraph_DrawingUnits)& ent, @@ -70,26 +67,6 @@ void IGESGraph_ToolDrawingUnits::WriteOwnParams IW.Send( ent->Unit() ); } -void IGESGraph_ToolDrawingUnits::OwnShared - (const Handle(IGESGraph_DrawingUnits)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESGraph_ToolDrawingUnits::OwnCopy - (const Handle(IGESGraph_DrawingUnits)& another, - const Handle(IGESGraph_DrawingUnits)& ent, Interface_CopyTool& /*TC*/) const -{ - Standard_Integer NbPropertyValues; - Standard_Integer Flag; - Handle(TCollection_HAsciiString) Unit; - - NbPropertyValues = another->NbPropertyValues(); - Flag = another->Flag(); - Unit = new TCollection_HAsciiString(another->Unit()); - - ent->Init(NbPropertyValues, Flag, Unit); -} - Standard_Boolean IGESGraph_ToolDrawingUnits::OwnCorrect (const Handle(IGESGraph_DrawingUnits)& ent) const { diff --git a/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx b/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx index dd87f92e9e..c4b78f75b6 100644 --- a/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx +++ b/src/IGESGraph/IGESGraph_ToolDrawingUnits.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolDrawingUnits { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolDrawingUnits, ready to work - Standard_EXPORT IGESGraph_ToolDrawingUnits(); + IGESGraph_ToolDrawingUnits() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGraph_DrawingUnits)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a DrawingUnits , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGraph_DrawingUnits)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a DrawingUnits //! (NbPropertyValues forced to 2) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESGraph_DrawingUnits)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGraph_DrawingUnits)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_DrawingUnits)& entfrom, const Handle(IGESGraph_DrawingUnits)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_DrawingUnits)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolDrawingUnits_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolHighLight.cxx b/src/IGESGraph/IGESGraph_ToolHighLight.cxx index 9e73c675fb..2aa69746a3 100644 --- a/src/IGESGraph/IGESGraph_ToolHighLight.cxx +++ b/src/IGESGraph/IGESGraph_ToolHighLight.cxx @@ -25,14 +25,11 @@ #include #include #include -#include #include #include #include #include -IGESGraph_ToolHighLight::IGESGraph_ToolHighLight () { } - void IGESGraph_ToolHighLight::ReadOwnParams (const Handle(IGESGraph_HighLight)& ent, @@ -63,18 +60,6 @@ void IGESGraph_ToolHighLight::WriteOwnParams IW.Send( ent->HighLightStatus() ); } -void IGESGraph_ToolHighLight::OwnShared - (const Handle(IGESGraph_HighLight)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESGraph_ToolHighLight::OwnCopy - (const Handle(IGESGraph_HighLight)& another, - const Handle(IGESGraph_HighLight)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init(1,another->HighLightStatus()); -} - Standard_Boolean IGESGraph_ToolHighLight::OwnCorrect (const Handle(IGESGraph_HighLight)& ent) const { diff --git a/src/IGESGraph/IGESGraph_ToolHighLight.hxx b/src/IGESGraph/IGESGraph_ToolHighLight.hxx index b0820da108..66bba2e5b4 100644 --- a/src/IGESGraph/IGESGraph_ToolHighLight.hxx +++ b/src/IGESGraph/IGESGraph_ToolHighLight.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolHighLight { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolHighLight, ready to work - Standard_EXPORT IGESGraph_ToolHighLight(); + IGESGraph_ToolHighLight() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGraph_HighLight)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a HighLight , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGraph_HighLight)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a HighLight //! (NbPropertyValues forced to 1) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESGraph_HighLight)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGraph_HighLight)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_HighLight)& entfrom, const Handle(IGESGraph_HighLight)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_HighLight)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolHighLight_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.cxx b/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.cxx index 88cda99f35..fd225d4997 100644 --- a/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.cxx +++ b/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.cxx @@ -25,15 +25,11 @@ #include #include #include -#include #include #include #include #include -IGESGraph_ToolIntercharacterSpacing::IGESGraph_ToolIntercharacterSpacing () - { } - void IGESGraph_ToolIntercharacterSpacing::ReadOwnParams (const Handle(IGESGraph_IntercharacterSpacing)& ent, @@ -63,18 +59,6 @@ void IGESGraph_ToolIntercharacterSpacing::WriteOwnParams IW.Send( ent->ISpace() ); } -void IGESGraph_ToolIntercharacterSpacing::OwnShared - (const Handle(IGESGraph_IntercharacterSpacing)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESGraph_ToolIntercharacterSpacing::OwnCopy - (const Handle(IGESGraph_IntercharacterSpacing)& another, - const Handle(IGESGraph_IntercharacterSpacing)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init(1,another->ISpace()); -} - Standard_Boolean IGESGraph_ToolIntercharacterSpacing::OwnCorrect (const Handle(IGESGraph_IntercharacterSpacing)& ent) const { diff --git a/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx b/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx index 735a5dbcb0..3c20da5bd4 100644 --- a/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx +++ b/src/IGESGraph/IGESGraph_ToolIntercharacterSpacing.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolIntercharacterSpacing { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolIntercharacterSpacing, ready to work - Standard_EXPORT IGESGraph_ToolIntercharacterSpacing(); + IGESGraph_ToolIntercharacterSpacing() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGraph_IntercharacterSpacing)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a IntercharacterSpacing , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGraph_IntercharacterSpacing)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a IntercharacterSpacing //! (NbPropertyValues forced to 1) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESGraph_IntercharacterSpacing)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGraph_IntercharacterSpacing)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_IntercharacterSpacing)& entfrom, const Handle(IGESGraph_IntercharacterSpacing)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_IntercharacterSpacing)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolIntercharacterSpacing_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.cxx b/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.cxx index 80c58c2c82..4d2b7d2688 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.cxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -35,8 +34,6 @@ #include #include -IGESGraph_ToolLineFontDefPattern::IGESGraph_ToolLineFontDefPattern () { } - void IGESGraph_ToolLineFontDefPattern::ReadOwnParams (const Handle(IGESGraph_LineFontDefPattern)& ent, @@ -81,27 +78,6 @@ void IGESGraph_ToolLineFontDefPattern::WriteOwnParams IW.Send(ent->DisplayPattern()); } -void IGESGraph_ToolLineFontDefPattern::OwnShared - (const Handle(IGESGraph_LineFontDefPattern)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESGraph_ToolLineFontDefPattern::OwnCopy - (const Handle(IGESGraph_LineFontDefPattern)& another, - const Handle(IGESGraph_LineFontDefPattern)& ent, Interface_CopyTool& /*TC*/) const -{ - Handle(TColStd_HArray1OfReal) tempSegmentLengths = - new TColStd_HArray1OfReal(1, another->NbSegments()); - Standard_Integer I; - Standard_Integer up = another->NbSegments(); - for (I = 1; I <= up; I++) - tempSegmentLengths->SetValue(I, another->Length(I)); - Handle(TCollection_HAsciiString) tempDisplayPattern = - new TCollection_HAsciiString(another->DisplayPattern()); - - ent->Init(tempSegmentLengths, tempDisplayPattern); -} - IGESData_DirChecker IGESGraph_ToolLineFontDefPattern::DirChecker (const Handle(IGESGraph_LineFontDefPattern)& /*ent*/) const { diff --git a/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.hxx b/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.hxx index 0401709a0c..031c370b03 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.hxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontDefPattern.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! Modules (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolLineFontDefPattern { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolLineFontDefPattern, ready to work - Standard_EXPORT IGESGraph_ToolLineFontDefPattern(); + IGESGraph_ToolLineFontDefPattern() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,14 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGraph_LineFontDefPattern)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a LineFontDefPattern , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGraph_LineFontDefPattern)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGraph_LineFontDefPattern)& ent) const; //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGraph_LineFontDefPattern)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_LineFontDefPattern)& entfrom, const Handle(IGESGraph_LineFontDefPattern)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_LineFontDefPattern)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolLineFontDefPattern_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.cxx b/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.cxx index 1f7a4ce9ad..2b84396891 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.cxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.cxx @@ -26,15 +26,12 @@ #include #include #include -#include #include #include #include #include #include -IGESGraph_ToolLineFontDefTemplate::IGESGraph_ToolLineFontDefTemplate () { } - void IGESGraph_ToolLineFontDefTemplate::ReadOwnParams (const Handle(IGESGraph_LineFontDefTemplate)& ent, @@ -76,19 +73,6 @@ void IGESGraph_ToolLineFontDefTemplate::OwnShared iter.GetOneItem(ent->TemplateEntity()); } -void IGESGraph_ToolLineFontDefTemplate::OwnCopy - (const Handle(IGESGraph_LineFontDefTemplate)& another, - const Handle(IGESGraph_LineFontDefTemplate)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer tempOrientation = another->Orientation(); - DeclareAndCast(IGESBasic_SubfigureDef, tempTemplateSubfigure, - TC.Transferred(another->TemplateEntity())); - Standard_Real tempDistance = another->Distance(); - Standard_Real tempScale = another->Scale(); - - ent->Init(tempOrientation, tempTemplateSubfigure, tempDistance, tempScale); -} - IGESData_DirChecker IGESGraph_ToolLineFontDefTemplate::DirChecker (const Handle(IGESGraph_LineFontDefTemplate)& /*ent*/) const { diff --git a/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.hxx b/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.hxx index 83be4734ba..3bccc0369a 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.hxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontDefTemplate.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! Modules (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolLineFontDefTemplate { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolLineFontDefTemplate, ready to work - Standard_EXPORT IGESGraph_ToolLineFontDefTemplate(); + IGESGraph_ToolLineFontDefTemplate() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -65,33 +63,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGraph_LineFontDefTemplate)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_LineFontDefTemplate)& entfrom, const Handle(IGESGraph_LineFontDefTemplate)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_LineFontDefTemplate)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolLineFontDefTemplate_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolLineFontPredefined.cxx b/src/IGESGraph/IGESGraph_ToolLineFontPredefined.cxx index b4200cf796..efe48847fe 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontPredefined.cxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontPredefined.cxx @@ -25,14 +25,11 @@ #include #include #include -#include #include #include #include #include -IGESGraph_ToolLineFontPredefined::IGESGraph_ToolLineFontPredefined () { } - void IGESGraph_ToolLineFontPredefined::ReadOwnParams (const Handle(IGESGraph_LineFontPredefined)& ent, @@ -62,18 +59,6 @@ void IGESGraph_ToolLineFontPredefined::WriteOwnParams IW.Send( ent->LineFontPatternCode() ); } -void IGESGraph_ToolLineFontPredefined::OwnShared - (const Handle(IGESGraph_LineFontPredefined)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESGraph_ToolLineFontPredefined::OwnCopy - (const Handle(IGESGraph_LineFontPredefined)& another, - const Handle(IGESGraph_LineFontPredefined)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init(1,another->LineFontPatternCode()); -} - Standard_Boolean IGESGraph_ToolLineFontPredefined::OwnCorrect (const Handle(IGESGraph_LineFontPredefined)& ent) const { diff --git a/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx b/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx index 60300d9fc7..ed7a9a4a75 100644 --- a/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx +++ b/src/IGESGraph/IGESGraph_ToolLineFontPredefined.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolLineFontPredefined { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolLineFontPredefined, ready to work - Standard_EXPORT IGESGraph_ToolLineFontPredefined(); + IGESGraph_ToolLineFontPredefined() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGraph_LineFontPredefined)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a LineFontPredefined , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGraph_LineFontPredefined)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a LineFontPredefined //! (NbPropertyValues forced to 1) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESGraph_LineFontPredefined)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGraph_LineFontPredefined)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_LineFontPredefined)& entfrom, const Handle(IGESGraph_LineFontPredefined)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_LineFontPredefined)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolLineFontPredefined_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolNominalSize.cxx b/src/IGESGraph/IGESGraph_ToolNominalSize.cxx index f0922682f6..99cb57a630 100644 --- a/src/IGESGraph/IGESGraph_ToolNominalSize.cxx +++ b/src/IGESGraph/IGESGraph_ToolNominalSize.cxx @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -34,8 +33,6 @@ #include #include -IGESGraph_ToolNominalSize::IGESGraph_ToolNominalSize () { } - void IGESGraph_ToolNominalSize::ReadOwnParams (const Handle(IGESGraph_NominalSize)& ent, @@ -84,29 +81,6 @@ void IGESGraph_ToolNominalSize::WriteOwnParams IW.Send( ent->StandardName() ); // optionnal } -void IGESGraph_ToolNominalSize::OwnShared - (const Handle(IGESGraph_NominalSize)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESGraph_ToolNominalSize::OwnCopy - (const Handle(IGESGraph_NominalSize)& another, - const Handle(IGESGraph_NominalSize)& ent, Interface_CopyTool& /*TC*/) const -{ - Standard_Integer nbPropertyValues; - Standard_Real nominalSizeValue; - Handle(TCollection_HAsciiString) nominalSizeName; - Handle(TCollection_HAsciiString) standardName; - - nbPropertyValues = another->NbPropertyValues(); - nominalSizeValue = another->NominalSizeValue(); - nominalSizeName = new TCollection_HAsciiString(another->NominalSizeName()); - if (another->HasStandardName()) standardName = - new TCollection_HAsciiString(another->StandardName()); - - ent->Init(nbPropertyValues, nominalSizeValue, nominalSizeName, standardName); -} - Standard_Boolean IGESGraph_ToolNominalSize::OwnCorrect (const Handle(IGESGraph_NominalSize)& ent) const { diff --git a/src/IGESGraph/IGESGraph_ToolNominalSize.hxx b/src/IGESGraph/IGESGraph_ToolNominalSize.hxx index fe83b74a59..bc5c7c6fa5 100644 --- a/src/IGESGraph/IGESGraph_ToolNominalSize.hxx +++ b/src/IGESGraph/IGESGraph_ToolNominalSize.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolNominalSize { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolNominalSize, ready to work - Standard_EXPORT IGESGraph_ToolNominalSize(); + IGESGraph_ToolNominalSize() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGraph_NominalSize)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a NominalSize , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGraph_NominalSize)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a NominalSize //! (NbPropertyValues forced to 2 or 3 according HasStandardName) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESGraph_NominalSize)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGraph_NominalSize)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_NominalSize)& entfrom, const Handle(IGESGraph_NominalSize)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_NominalSize)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolNominalSize_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolPick.cxx b/src/IGESGraph/IGESGraph_ToolPick.cxx index 79d02ceef3..fdc9898112 100644 --- a/src/IGESGraph/IGESGraph_ToolPick.cxx +++ b/src/IGESGraph/IGESGraph_ToolPick.cxx @@ -25,14 +25,11 @@ #include #include #include -#include #include #include #include #include -IGESGraph_ToolPick::IGESGraph_ToolPick () { } - void IGESGraph_ToolPick::ReadOwnParams (const Handle(IGESGraph_Pick)& ent, @@ -63,18 +60,6 @@ void IGESGraph_ToolPick::WriteOwnParams IW.Send( ent->PickFlag() ); } -void IGESGraph_ToolPick::OwnShared - (const Handle(IGESGraph_Pick)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESGraph_ToolPick::OwnCopy - (const Handle(IGESGraph_Pick)& another, - const Handle(IGESGraph_Pick)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init(1,another->PickFlag()); -} - Standard_Boolean IGESGraph_ToolPick::OwnCorrect (const Handle(IGESGraph_Pick)& ent) const { diff --git a/src/IGESGraph/IGESGraph_ToolPick.hxx b/src/IGESGraph/IGESGraph_ToolPick.hxx index 4d05caccdb..b3586aa74c 100644 --- a/src/IGESGraph/IGESGraph_ToolPick.hxx +++ b/src/IGESGraph/IGESGraph_ToolPick.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolPick { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPick, ready to work - Standard_EXPORT IGESGraph_ToolPick(); + IGESGraph_ToolPick() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGraph_Pick)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Pick , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGraph_Pick)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a Pick //! (NbPropertyValues forced to 1) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESGraph_Pick)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGraph_Pick)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_Pick)& entfrom, const Handle(IGESGraph_Pick)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_Pick)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolPick_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.cxx b/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.cxx index e419bd0fc0..8d13d7e612 100644 --- a/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.cxx +++ b/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.cxx @@ -30,15 +30,12 @@ #include #include #include -#include #include #include #include #include #include -IGESGraph_ToolTextDisplayTemplate::IGESGraph_ToolTextDisplayTemplate () { } - void IGESGraph_ToolTextDisplayTemplate::ReadOwnParams (const Handle(IGESGraph_TextDisplayTemplate)& ent, @@ -127,39 +124,6 @@ void IGESGraph_ToolTextDisplayTemplate::OwnShared iter.GetOneItem( ent->FontEntity() ); } -void IGESGraph_ToolTextDisplayTemplate::OwnCopy - (const Handle(IGESGraph_TextDisplayTemplate)& another, - const Handle(IGESGraph_TextDisplayTemplate)& ent, Interface_CopyTool& TC) const -{ - Standard_Real boxWidth; - Standard_Real boxHeight; - Standard_Integer fontCode=0; - Handle(IGESGraph_TextFontDef) fontEntity; - Standard_Real slantAngle; - Standard_Real rotationAngle; - Standard_Integer mirrorFlag; - Standard_Integer rotateFlag; - gp_XYZ corner; - - boxWidth = another->BoxWidth(); - boxHeight = another->BoxHeight(); - - if ( another->IsFontEntity() ) - fontEntity = - Handle(IGESGraph_TextFontDef)::DownCast (TC.Transferred(another->FontEntity())); - else - fontCode = another->FontCode(); - - slantAngle = another->SlantAngle(); - rotationAngle = another->RotationAngle(); - mirrorFlag = another->MirrorFlag(); - rotateFlag = another->RotateFlag(); - corner = another->StartingCorner().XYZ(); - - ent->Init(boxWidth, boxHeight, fontCode, fontEntity, - slantAngle, rotationAngle, mirrorFlag, rotateFlag, corner); -} - IGESData_DirChecker IGESGraph_ToolTextDisplayTemplate::DirChecker (const Handle(IGESGraph_TextDisplayTemplate)& /*ent*/) const { @@ -174,12 +138,6 @@ IGESData_DirChecker IGESGraph_ToolTextDisplayTemplate::DirChecker return DC; } -void IGESGraph_ToolTextDisplayTemplate::OwnCheck - (const Handle(IGESGraph_TextDisplayTemplate)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -} - void IGESGraph_ToolTextDisplayTemplate::OwnDump (const Handle(IGESGraph_TextDisplayTemplate)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.hxx b/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.hxx index 266ba5ceff..58505472c4 100644 --- a/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.hxx +++ b/src/IGESGraph/IGESGraph_ToolTextDisplayTemplate.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolTextDisplayTemplate { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolTextDisplayTemplate, ready to work - Standard_EXPORT IGESGraph_ToolTextDisplayTemplate(); + IGESGraph_ToolTextDisplayTemplate() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGraph_TextDisplayTemplate)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGraph_TextDisplayTemplate)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_TextDisplayTemplate)& entfrom, const Handle(IGESGraph_TextDisplayTemplate)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_TextDisplayTemplate)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolTextDisplayTemplate_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolTextFontDef.cxx b/src/IGESGraph/IGESGraph_ToolTextFontDef.cxx index 32c73abc1f..35be08f45c 100644 --- a/src/IGESGraph/IGESGraph_ToolTextFontDef.cxx +++ b/src/IGESGraph/IGESGraph_ToolTextFontDef.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -41,8 +40,6 @@ #include #include -IGESGraph_ToolTextFontDef::IGESGraph_ToolTextFontDef () { } - void IGESGraph_ToolTextFontDef::ReadOwnParams (const Handle(IGESGraph_TextFontDef)& ent, @@ -193,78 +190,6 @@ void IGESGraph_ToolTextFontDef::OwnShared iter.GetOneItem( ent->SupersededFontEntity() ); } -void IGESGraph_ToolTextFontDef::OwnCopy - (const Handle(IGESGraph_TextFontDef)& another, - const Handle(IGESGraph_TextFontDef)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer nbval; - Standard_Integer fontCode; - Handle(TCollection_HAsciiString) fontName; - Standard_Integer supersededFont=0; - Handle(IGESGraph_TextFontDef) supersededEntity; - Standard_Integer scale; - Handle(TColStd_HArray1OfInteger) aSCIICodes, nextCharX,nextCharY; - Handle(TColStd_HArray1OfInteger) penMotions; - Handle(IGESBasic_HArray1OfHArray1OfInteger) penFlags,movePenX,movePenY; - - Standard_Integer tempMotion; - Handle(TColStd_HArray1OfInteger) intarray,xarray,yarray; - - nbval = another->NbCharacters(); - aSCIICodes = new TColStd_HArray1OfInteger(1, nbval); - nextCharX = new TColStd_HArray1OfInteger(1, nbval); - nextCharY = new TColStd_HArray1OfInteger(1, nbval); - penMotions = new TColStd_HArray1OfInteger(1, nbval); - penFlags = new IGESBasic_HArray1OfHArray1OfInteger(1, nbval); - movePenX = new IGESBasic_HArray1OfHArray1OfInteger(1, nbval); - movePenY = new IGESBasic_HArray1OfHArray1OfInteger(1, nbval); - - fontCode = another->FontCode(); - fontName = new TCollection_HAsciiString(another->FontName()); - - if ( another->IsSupersededFontEntity() ) - supersededEntity = - Handle(IGESGraph_TextFontDef)::DownCast (TC.Transferred(another->SupersededFontEntity())); - else - supersededFont = another->SupersededFontCode(); - - scale = another->Scale(); - - Standard_Integer j, IX,IY; - - for (Standard_Integer i = 1; i <= nbval; i++) - { - aSCIICodes->SetValue( i, another->ASCIICode(i) ); - ent->NextCharOrigin (i,IX,IY); - nextCharX->SetValue ( i, IX); - nextCharY->SetValue ( i, IY); - - tempMotion = another->NbPenMotions(i); - penMotions->SetValue( i, tempMotion ); - - intarray = new TColStd_HArray1OfInteger(1, tempMotion); - xarray = new TColStd_HArray1OfInteger(1, tempMotion); - yarray = new TColStd_HArray1OfInteger(1, tempMotion); - - for (j = 1; j <= tempMotion; j++) - { - if ( another->IsPenUp(i, j) ) intarray->SetValue(j, 1); - else intarray->SetValue(j, 0); - - another->NextPenPosition(i, j, IX,IY); - xarray->SetValue(j, IX); - yarray->SetValue(j, IY); - } - penFlags->SetValue(i, intarray); - movePenX->SetValue(i, xarray); - movePenY->SetValue(i, yarray); - } - - ent->Init(fontCode, fontName, supersededFont, supersededEntity, - scale, aSCIICodes, nextCharX, nextCharY, penMotions, - penFlags, movePenX, movePenY); -} - IGESData_DirChecker IGESGraph_ToolTextFontDef::DirChecker (const Handle(IGESGraph_TextFontDef)& /*ent*/) const { @@ -280,12 +205,6 @@ IGESData_DirChecker IGESGraph_ToolTextFontDef::DirChecker return DC; } -void IGESGraph_ToolTextFontDef::OwnCheck - (const Handle(IGESGraph_TextFontDef)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -} - void IGESGraph_ToolTextFontDef::OwnDump (const Handle(IGESGraph_TextFontDef)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESGraph/IGESGraph_ToolTextFontDef.hxx b/src/IGESGraph/IGESGraph_ToolTextFontDef.hxx index 823e2e1d45..4e77e0e513 100644 --- a/src/IGESGraph/IGESGraph_ToolTextFontDef.hxx +++ b/src/IGESGraph/IGESGraph_ToolTextFontDef.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolTextFontDef { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolTextFontDef, ready to work - Standard_EXPORT IGESGraph_ToolTextFontDef(); + IGESGraph_ToolTextFontDef() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -62,36 +60,8 @@ public: //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESGraph_TextFontDef)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESGraph_TextFontDef)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_TextFontDef)& entfrom, const Handle(IGESGraph_TextFontDef)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_TextFontDef)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolTextFontDef_HeaderFile diff --git a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx index ac25b72e09..7bfd1ebadf 100644 --- a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx +++ b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.cxx @@ -29,14 +29,11 @@ #include #include #include -#include #include #include #include #include -IGESGraph_ToolUniformRectGrid::IGESGraph_ToolUniformRectGrid () { } - void IGESGraph_ToolUniformRectGrid::ReadOwnParams (const Handle(IGESGraph_UniformRectGrid)& ent, @@ -102,22 +99,6 @@ void IGESGraph_ToolUniformRectGrid::WriteOwnParams IW.Send( ent->NbPointsY() ); } -void IGESGraph_ToolUniformRectGrid::OwnShared - (const Handle(IGESGraph_UniformRectGrid)& /*ent*/, Interface_EntityIterator& /*iter*/) const -{ -} - -void IGESGraph_ToolUniformRectGrid::OwnCopy - (const Handle(IGESGraph_UniformRectGrid)& another, - const Handle(IGESGraph_UniformRectGrid)& ent, Interface_CopyTool& /*TC*/) const -{ - ent->Init - (9, (another->IsFinite() ? 1 : 0), (another->IsLine() ? 1 : 0), - (another->IsWeighted() ? 0 : 1), - another->GridPoint().XY(),another->GridSpacing().XY(), - another->NbPointsX(), another->NbPointsY()); -} - Standard_Boolean IGESGraph_ToolUniformRectGrid::OwnCorrect (const Handle(IGESGraph_UniformRectGrid)& ent) const { diff --git a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx index fc46ea5a48..f6d00ec6cd 100644 --- a/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx +++ b/src/IGESGraph/IGESGraph_ToolUniformRectGrid.hxx @@ -32,7 +32,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -41,13 +40,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESGraph_ToolUniformRectGrid { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolUniformRectGrid, ready to work - Standard_EXPORT IGESGraph_ToolUniformRectGrid(); + IGESGraph_ToolUniformRectGrid() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -56,10 +54,6 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESGraph_UniformRectGrid)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a UniformRectGrid , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESGraph_UniformRectGrid)& ent, Interface_EntityIterator& iter) const; - //! Sets automatic unambiguous Correction on a UniformRectGrid //! (NbPropertyValues forced to 9) Standard_EXPORT Standard_Boolean OwnCorrect (const Handle(IGESGraph_UniformRectGrid)& ent) const; @@ -70,33 +64,8 @@ public: //! Performs Specific Semantic Check Standard_EXPORT void OwnCheck (const Handle(IGESGraph_UniformRectGrid)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESGraph_UniformRectGrid)& entfrom, const Handle(IGESGraph_UniformRectGrid)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESGraph_UniformRectGrid)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESGraph_ToolUniformRectGrid_HeaderFile diff --git a/src/IGESSolid/IGESSolid.cxx b/src/IGESSolid/IGESSolid.cxx index 46de080422..f3b5a7762a 100644 --- a/src/IGESSolid/IGESSolid.cxx +++ b/src/IGESSolid/IGESSolid.cxx @@ -11,7 +11,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - +/* #include #include #include @@ -23,13 +23,15 @@ #include #include -// Ancillary data to work on a Package of IGES Entities with a Protocol -// (Modules are created and loaded in appropriate libraries, once by Init) -static Handle(IGESSolid_Protocol) protocol; - void IGESSolid::Init () { IGESGeom::Init(); + IGESSolid::Protocol(); +} + +const Handle(IGESSolid_Protocol) & IGESSolid::Protocol () +{ + static Handle(IGESSolid_Protocol) protocol; if (protocol.IsNull()) { protocol = new IGESSolid_Protocol; Interface_GeneralLib::SetGlobal (new IGESSolid_GeneralModule, protocol); @@ -37,9 +39,6 @@ void IGESSolid::Init () IGESData_WriterLib::SetGlobal (new IGESSolid_ReadWriteModule,protocol); IGESData_SpecificLib::SetGlobal (new IGESSolid_SpecificModule, protocol); } -} - -const Handle(IGESSolid_Protocol) & IGESSolid::Protocol () -{ return protocol; } +*/ diff --git a/src/IGESSolid/IGESSolid.hxx b/src/IGESSolid/IGESSolid.hxx index a8c7e4c25c..d7a18f4e33 100644 --- a/src/IGESSolid/IGESSolid.hxx +++ b/src/IGESSolid/IGESSolid.hxx @@ -19,7 +19,7 @@ #include #include -class IGESSolid_Protocol; +/*class IGESSolid_Protocol; //! This package consists of B-Rep and CSG Solid entities @@ -28,10 +28,10 @@ class IGESSolid public: //! Prepares dynamic data (Protocol, Modules) for this package - Standard_EXPORT static void Init(); + //Standard_EXPORT static void Init(); //! Returns the Protocol for this Package - Standard_EXPORT static const Handle(IGESSolid_Protocol) & Protocol(); + //Standard_EXPORT static const Handle(IGESSolid_Protocol) & Protocol(); }; - +*/ #endif // _IGESSolid_HeaderFile diff --git a/src/IGESSolid/IGESSolid_Block.cxx b/src/IGESSolid/IGESSolid_Block.cxx index b8d5c12f65..ddfc20c23e 100644 --- a/src/IGESSolid/IGESSolid_Block.cxx +++ b/src/IGESSolid/IGESSolid_Block.cxx @@ -25,10 +25,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Block,IGESData_IGESEntity) -IGESSolid_Block::IGESSolid_Block () { } - - - void IGESSolid_Block::Init +void IGESSolid_Block::Init (const gp_XYZ& aSize, const gp_XYZ& aCorner, const gp_XYZ& aXAxis, const gp_XYZ& aZAxis) { @@ -39,92 +36,78 @@ IGESSolid_Block::IGESSolid_Block () { } InitTypeAndForm(150,0); } - gp_XYZ IGESSolid_Block::Size () const -{ - return theSize; -} - - Standard_Real IGESSolid_Block::XLength () const -{ - return theSize.X(); -} - - Standard_Real IGESSolid_Block::YLength () const -{ - return theSize.Y(); -} - - Standard_Real IGESSolid_Block::ZLength () const -{ - return theSize.Z(); -} - - gp_Pnt IGESSolid_Block::Corner () const +gp_Pnt IGESSolid_Block::Corner () const { return gp_Pnt(theCorner); } - gp_Pnt IGESSolid_Block::TransformedCorner () const +gp_Pnt IGESSolid_Block::TransformedCorner () const { - if (!HasTransf()) return gp_Pnt(theCorner); - else - { - gp_XYZ tmp = theCorner; - Location().Transforms(tmp); - return gp_Pnt(tmp); - } + if (!HasTransf()) + return gp_Pnt(theCorner); + + gp_XYZ tmp = theCorner; + Location().Transforms(tmp); + return gp_Pnt(tmp); } - gp_Dir IGESSolid_Block::XAxis () const +gp_Dir IGESSolid_Block::XAxis () const { return gp_Dir(theXAxis); } - gp_Dir IGESSolid_Block::TransformedXAxis () const +gp_Dir IGESSolid_Block::TransformedXAxis () const { - if (!HasTransf()) return gp_Dir(theXAxis); - else - { - gp_XYZ xyz = theXAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(xyz); - return gp_Dir(xyz); - } + if (!HasTransf()) + return gp_Dir(theXAxis); + + gp_XYZ xyz = theXAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(xyz); + return gp_Dir(xyz); } - gp_Dir IGESSolid_Block::YAxis () const +gp_Dir IGESSolid_Block::YAxis () const { return gp_Dir(theXAxis ^ theZAxis); // ^ overloaded } - gp_Dir IGESSolid_Block::TransformedYAxis () const +gp_Dir IGESSolid_Block::TransformedYAxis () const { - if (!HasTransf()) return gp_Dir(theXAxis ^ theZAxis); - else - { - gp_XYZ xyz = theXAxis ^ theZAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(xyz); - return gp_Dir(xyz); - } + if (!HasTransf()) + return gp_Dir(theXAxis ^ theZAxis); + + gp_XYZ xyz = theXAxis ^ theZAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(xyz); + return gp_Dir(xyz); } - gp_Dir IGESSolid_Block::ZAxis () const +gp_Dir IGESSolid_Block::ZAxis () const { return gp_Dir(theZAxis); } - gp_Dir IGESSolid_Block::TransformedZAxis () const +gp_Dir IGESSolid_Block::TransformedZAxis () const +{ + if (!HasTransf()) + return gp_Dir(theZAxis); + + gp_XYZ xyz(theZAxis); + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(xyz); + return gp_Dir(xyz); +} + +void IGESSolid_Block::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - if (!HasTransf()) return gp_Dir(theZAxis); - else - { - gp_XYZ xyz(theZAxis); - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(xyz); - return gp_Dir(xyz); - } + const Standard_Real eps = 1.E-04; + const Standard_Real prosca = XAxis() * ZAxis(); + if (prosca < -eps || prosca > eps) + theCheck->AddFail("Local Z axis : Not orthogonal to X axis"); + if (Size().X() <= 0. || Size().Y() <= 0. || Size().Z() <= 0.) + theCheck->AddFail("Size : Not positive lengths"); } diff --git a/src/IGESSolid/IGESSolid_Block.hxx b/src/IGESSolid/IGESSolid_Block.hxx index 492ad07f91..a6761f7833 100644 --- a/src/IGESSolid/IGESSolid_Block.hxx +++ b/src/IGESSolid/IGESSolid_Block.hxx @@ -17,13 +17,8 @@ #ifndef _IGESSolid_Block_HeaderFile #define _IGESSolid_Block_HeaderFile -#include -#include - #include #include -#include -class gp_XYZ; class gp_Pnt; class gp_Dir; @@ -38,11 +33,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_Block, IGESData_IGESEntity) //! the local +X, +Y, +Z axes. class IGESSolid_Block : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_Block(); + IGESSolid_Block() {} //! This method is used to set the fields of the class Block //! - aSize : Length in each local directions @@ -54,17 +47,17 @@ public: Standard_EXPORT void Init (const gp_XYZ& aSize, const gp_XYZ& aCorner, const gp_XYZ& aXAxis, const gp_XYZ& aZAxis); //! returns the size of the block - Standard_EXPORT gp_XYZ Size() const; + const gp_XYZ & Size() const { return theSize; } //! returns the length of the Block along the local X-direction - Standard_EXPORT Standard_Real XLength() const; - + Standard_Real XLength() const { return theSize.X(); } + //! returns the length of the Block along the local Y-direction - Standard_EXPORT Standard_Real YLength() const; - + Standard_Real YLength() const { return theSize.Y(); } + //! returns the length of the Block along the local Z-direction - Standard_EXPORT Standard_Real ZLength() const; - + Standard_Real ZLength() const { return theSize.Z(); } + //! returns the corner point coordinates of the Block Standard_EXPORT gp_Pnt Corner() const; @@ -94,31 +87,16 @@ public: //! TransformationMatrix Standard_EXPORT gp_Dir TransformedZAxis() const; - - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_Block,IGESData_IGESEntity) -protected: - - - - -private: - + private: gp_XYZ theSize; gp_XYZ theCorner; gp_XYZ theXAxis; gp_XYZ theZAxis; - - }; - - - - - - #endif // _IGESSolid_Block_HeaderFile diff --git a/src/IGESSolid/IGESSolid_BooleanTree.cxx b/src/IGESSolid/IGESSolid_BooleanTree.cxx index 5315b1a4af..655d2d9588 100644 --- a/src/IGESSolid/IGESSolid_BooleanTree.cxx +++ b/src/IGESSolid/IGESSolid_BooleanTree.cxx @@ -16,18 +16,14 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_BooleanTree,IGESData_IGESEntity) -IGESSolid_BooleanTree::IGESSolid_BooleanTree () { } - - - void IGESSolid_BooleanTree::Init +void IGESSolid_BooleanTree::Init (const Handle(IGESData_HArray1OfIGESEntity)& operands, const Handle(TColStd_HArray1OfInteger)& operations) { @@ -40,28 +36,55 @@ IGESSolid_BooleanTree::IGESSolid_BooleanTree () { } InitTypeAndForm(180,0); } - Standard_Integer IGESSolid_BooleanTree::Length () const +Standard_Integer IGESSolid_BooleanTree::Length () const { return theOperands->Length(); } - Standard_Boolean IGESSolid_BooleanTree::IsOperand - (const Standard_Integer Index) const +Standard_Boolean IGESSolid_BooleanTree::IsOperand (const Standard_Integer Index) const { return (!theOperands->Value(Index).IsNull()); } - Handle(IGESData_IGESEntity) IGESSolid_BooleanTree::Operand - (const Standard_Integer Index) const +Handle(IGESData_IGESEntity) IGESSolid_BooleanTree::Operand (const Standard_Integer Index) const { return theOperands->Value(Index); } - Standard_Integer IGESSolid_BooleanTree::Operation - (const Standard_Integer Index) const +Standard_Integer IGESSolid_BooleanTree::Operation (const Standard_Integer Index) const { if (theOperands->Value(Index).IsNull()) return theOperations->Value(Index); else return 0; // It is not an operation. (operations can be : 1-2-3) } + +void IGESSolid_BooleanTree::OwnShared(Interface_EntityIterator &theIter) const +{ + const Standard_Integer length = theOperands->Length(); + for (Standard_Integer i = 1; i <= length; i++) + { + if (!theOperands->Value(i).IsNull()) + theIter.GetOneItem(theOperands->Value(i)); + } +} + +void IGESSolid_BooleanTree::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const +{ + const Standard_Integer length = Length(); + if (length <= 2) + theCheck->AddFail("Length of post-order notation : Less than three"); + else { + if (!IsOperand(1)) theCheck->AddFail("First Item is not an Operand"); + if (!IsOperand(2)) theCheck->AddFail("Second Item is not an Operand"); + if ( IsOperand(length)) theCheck->AddFail("Last Item is not an Operation"); + } + for (Standard_Integer i = 1; i <= length; i ++) { + if (!Operand(i).IsNull()) continue; + if (Operation(i) < 1 || Operation(i) > 3) { + char mess[80]; + sprintf(mess,"Item no. %d Incorrect",i); + theCheck->AddFail(mess); + } + } +} diff --git a/src/IGESSolid/IGESSolid_BooleanTree.hxx b/src/IGESSolid/IGESSolid_BooleanTree.hxx index 470f9aba2a..37c6d2196e 100644 --- a/src/IGESSolid/IGESSolid_BooleanTree.hxx +++ b/src/IGESSolid/IGESSolid_BooleanTree.hxx @@ -17,16 +17,9 @@ #ifndef _IGESSolid_BooleanTree_HeaderFile #define _IGESSolid_BooleanTree_HeaderFile -#include -#include - #include #include #include -#include -#include -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESSolid_BooleanTree; @@ -39,11 +32,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_BooleanTree, IGESData_IGESEntity) //! in post-order notation. class IGESSolid_BooleanTree : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_BooleanTree(); + IGESSolid_BooleanTree() {} //! This method is used to set the fields of the class //! BooleanTree @@ -69,29 +60,16 @@ public: //! raises exception if Index < 1 or Index > Length() Standard_EXPORT Standard_Integer Operation (const Standard_Integer Index) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_BooleanTree,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESData_HArray1OfIGESEntity) theOperands; Handle(TColStd_HArray1OfInteger) theOperations; - - }; - - - - - - #endif // _IGESSolid_BooleanTree_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ConeFrustum.cxx b/src/IGESSolid/IGESSolid_ConeFrustum.cxx index f430d71d18..88c71f434b 100644 --- a/src/IGESSolid/IGESSolid_ConeFrustum.cxx +++ b/src/IGESSolid/IGESSolid_ConeFrustum.cxx @@ -25,10 +25,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_ConeFrustum,IGESData_IGESEntity) -IGESSolid_ConeFrustum::IGESSolid_ConeFrustum () { } - - - void IGESSolid_ConeFrustum::Init +void IGESSolid_ConeFrustum::Init (const Standard_Real Ht, const Standard_Real R1, const Standard_Real R2, const gp_XYZ& Center, const gp_XYZ& anAxis) { @@ -40,51 +37,46 @@ IGESSolid_ConeFrustum::IGESSolid_ConeFrustum () { } InitTypeAndForm(156,0); } - Standard_Real IGESSolid_ConeFrustum::Height () const +gp_Pnt IGESSolid_ConeFrustum::FaceCenter () const { - return theHeight; + return gp_Pnt(theFaceCenter); } - Standard_Real IGESSolid_ConeFrustum::LargerRadius () const +gp_Pnt IGESSolid_ConeFrustum::TransformedFaceCenter () const { - return theR1; -} + if (!HasTransf()) + return gp_Pnt(theFaceCenter); - Standard_Real IGESSolid_ConeFrustum::SmallerRadius () const -{ - return theR2; + gp_XYZ tmp = theFaceCenter; + Location().Transforms(tmp); + return gp_Pnt(tmp); } - gp_Pnt IGESSolid_ConeFrustum::FaceCenter () const +gp_Dir IGESSolid_ConeFrustum::Axis () const { - return gp_Pnt(theFaceCenter); + return gp_Dir(theAxis); } - gp_Pnt IGESSolid_ConeFrustum::TransformedFaceCenter () const +gp_Dir IGESSolid_ConeFrustum::TransformedAxis () const { - if (!HasTransf()) return gp_Pnt(theFaceCenter); - else - { - gp_XYZ tmp = theFaceCenter; - Location().Transforms(tmp); - return gp_Pnt(tmp); - } -} + if (!HasTransf()) + return gp_Dir(theAxis); - gp_Dir IGESSolid_ConeFrustum::Axis () const -{ - return gp_Dir(theAxis); + gp_XYZ xyz = theAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(xyz); + return gp_Dir(xyz); } - gp_Dir IGESSolid_ConeFrustum::TransformedAxis () const +void IGESSolid_ConeFrustum::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - if (!HasTransf()) return gp_Dir(theAxis); - else - { - gp_XYZ xyz = theAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(xyz); - return gp_Dir(xyz); - } + if (Height() <= 0.0) + theCheck->AddFail("Height : Value Not Positive"); + if (LargerRadius() <= 0.0) + theCheck->AddFail("Larger face radius : Value Not Positive"); + if (SmallerRadius() < 0.0) + theCheck->AddFail("Smaller face radius : Value Not Positive"); + if (SmallerRadius() > LargerRadius()) + theCheck->AddFail("Smaller face radius : is greater than Larger face radius"); } diff --git a/src/IGESSolid/IGESSolid_ConeFrustum.hxx b/src/IGESSolid/IGESSolid_ConeFrustum.hxx index ee9e6c19ff..40cea4c949 100644 --- a/src/IGESSolid/IGESSolid_ConeFrustum.hxx +++ b/src/IGESSolid/IGESSolid_ConeFrustum.hxx @@ -17,13 +17,8 @@ #ifndef _IGESSolid_ConeFrustum_HeaderFile #define _IGESSolid_ConeFrustum_HeaderFile -#include -#include - -#include #include #include -class gp_XYZ; class gp_Pnt; class gp_Dir; @@ -40,11 +35,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_ConeFrustum, IGESData_IGESEntity) //! than the first face. class IGESSolid_ConeFrustum : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_ConeFrustum(); + IGESSolid_ConeFrustum() {} //! This method is used to set the fields of the class //! ConeFrustum @@ -56,14 +49,14 @@ public: Standard_EXPORT void Init (const Standard_Real Ht, const Standard_Real R1, const Standard_Real R2, const gp_XYZ& Center, const gp_XYZ& anAxis); //! returns the height of the cone frustum - Standard_EXPORT Standard_Real Height() const; - + Standard_Real Height() const { return theHeight; } + //! returns the radius of the larger face of the cone frustum - Standard_EXPORT Standard_Real LargerRadius() const; - + Standard_Real LargerRadius() const { return theR1; } + //! returns the radius of the second face of the cone frustum - Standard_EXPORT Standard_Real SmallerRadius() const; - + Standard_Real SmallerRadius() const { return theR2; } + //! returns the center of the larger face of the cone frustum Standard_EXPORT gp_Pnt FaceCenter() const; @@ -78,32 +71,17 @@ public: //! after applying TransformationMatrix Standard_EXPORT gp_Dir TransformedAxis() const; - - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_ConeFrustum,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Real theHeight; Standard_Real theR1; Standard_Real theR2; gp_XYZ theFaceCenter; gp_XYZ theAxis; - - }; - - - - - - #endif // _IGESSolid_ConeFrustum_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ConicalSurface.cxx b/src/IGESSolid/IGESSolid_ConicalSurface.cxx index dcc4524d9e..a18d1ac60f 100644 --- a/src/IGESSolid/IGESSolid_ConicalSurface.cxx +++ b/src/IGESSolid/IGESSolid_ConicalSurface.cxx @@ -19,14 +19,11 @@ #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_ConicalSurface,IGESData_IGESEntity) -IGESSolid_ConicalSurface::IGESSolid_ConicalSurface () { } - - - void IGESSolid_ConicalSurface::Init +void IGESSolid_ConicalSurface::Init (const Handle(IGESGeom_Point)& aLocation, const Handle(IGESGeom_Direction)& anAxis, const Standard_Real aRadius, const Standard_Real anAngle, @@ -40,32 +37,19 @@ IGESSolid_ConicalSurface::IGESSolid_ConicalSurface () { } InitTypeAndForm(194, (theRefDir.IsNull() ? 0 : 1)); } - Handle(IGESGeom_Point) IGESSolid_ConicalSurface::LocationPoint () const -{ - return theLocationPoint; -} - - Handle(IGESGeom_Direction) IGESSolid_ConicalSurface::Axis () const -{ - return theAxis; -} - - Standard_Real IGESSolid_ConicalSurface::Radius () const -{ - return theRadius; -} - - Standard_Real IGESSolid_ConicalSurface::SemiAngle () const -{ - return theAngle; -} - - Handle(IGESGeom_Direction) IGESSolid_ConicalSurface::ReferenceDir () const +void IGESSolid_ConicalSurface::OwnShared(Interface_EntityIterator &theIter) const { - return theRefDir; + theIter.GetOneItem(LocationPoint()); + theIter.GetOneItem(Axis()); + theIter.GetOneItem(ReferenceDir()); } - Standard_Boolean IGESSolid_ConicalSurface::IsParametrised () const +void IGESSolid_ConicalSurface::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return (!theRefDir.IsNull()); + if (Radius() < 0.0) + theCheck->AddFail("Radius : Value Negative"); + if (SemiAngle() < 0.0 || SemiAngle() > 90.0) + theCheck->AddFail("Semi-angle : Value not in the range [0 - 90]"); + const Standard_Integer fn = (IsParametrised()? 1 : 0); + if (fn != FormNumber()) theCheck->AddFail("Parametrised Status Mismatches with Form Number"); } diff --git a/src/IGESSolid/IGESSolid_ConicalSurface.hxx b/src/IGESSolid/IGESSolid_ConicalSurface.hxx index 69d1cb5c6e..18ec1e6571 100644 --- a/src/IGESSolid/IGESSolid_ConicalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ConicalSurface.hxx @@ -17,12 +17,7 @@ #ifndef _IGESSolid_ConicalSurface_HeaderFile #define _IGESSolid_ConicalSurface_HeaderFile -#include -#include - -#include #include -#include class IGESGeom_Point; class IGESGeom_Direction; @@ -38,11 +33,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_ConicalSurface, IGESData_IGESEntity) //! the cone semi-angle. class IGESSolid_ConicalSurface : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_ConicalSurface(); + IGESSolid_ConicalSurface() {} //! This method is used to set the fields of the class //! ConicalSurface @@ -55,51 +48,37 @@ public: Standard_EXPORT void Init (const Handle(IGESGeom_Point)& aLocation, const Handle(IGESGeom_Direction)& anAxis, const Standard_Real aRadius, const Standard_Real anAngle, const Handle(IGESGeom_Direction)& aRefdir); //! returns the location of the point on the axis - Standard_EXPORT Handle(IGESGeom_Point) LocationPoint() const; + const Handle(IGESGeom_Point) & LocationPoint() const { return theLocationPoint; } //! returns the direction of the axis - Standard_EXPORT Handle(IGESGeom_Direction) Axis() const; + const Handle(IGESGeom_Direction) & Axis() const { return theAxis; } //! returns the radius at the axis point - Standard_EXPORT Standard_Real Radius() const; + Standard_Real Radius() const { return theRadius; } //! returns the semi-angle value - Standard_EXPORT Standard_Real SemiAngle() const; + Standard_Real SemiAngle() const { return theAngle; } //! returns the reference direction of the conical surface in case - //! of parametrised surface. For unparametrised surface it returns - //! NULL. - Standard_EXPORT Handle(IGESGeom_Direction) ReferenceDir() const; + //! of parametrised surface. For unparametrised surface it returns NULL. + const Handle(IGESGeom_Direction) & ReferenceDir() const { return theRefDir; } //! returns True if Form no is 1 else false - Standard_EXPORT Standard_Boolean IsParametrised() const; - + Standard_Boolean IsParametrised() const { return (!theRefDir.IsNull()); } + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_ConicalSurface,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESGeom_Point) theLocationPoint; Handle(IGESGeom_Direction) theAxis; Standard_Real theRadius; Standard_Real theAngle; Handle(IGESGeom_Direction) theRefDir; - - }; - - - - - - #endif // _IGESSolid_ConicalSurface_HeaderFile diff --git a/src/IGESSolid/IGESSolid_Cylinder.cxx b/src/IGESSolid/IGESSolid_Cylinder.cxx index e87969fdb1..b1c9e5b66a 100644 --- a/src/IGESSolid/IGESSolid_Cylinder.cxx +++ b/src/IGESSolid/IGESSolid_Cylinder.cxx @@ -25,10 +25,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Cylinder,IGESData_IGESEntity) -IGESSolid_Cylinder::IGESSolid_Cylinder () { } - - - void IGESSolid_Cylinder::Init +void IGESSolid_Cylinder::Init (const Standard_Real aHeight, const Standard_Real aRadius, const gp_XYZ& aCenter, const gp_XYZ& anAxis) { @@ -39,46 +36,42 @@ IGESSolid_Cylinder::IGESSolid_Cylinder () { } InitTypeAndForm(154,0); } - Standard_Real IGESSolid_Cylinder::Height () const +gp_Pnt IGESSolid_Cylinder::FaceCenter () const { - return theHeight; + return gp_Pnt(theFaceCenter); } - Standard_Real IGESSolid_Cylinder::Radius () const +gp_Pnt IGESSolid_Cylinder::TransformedFaceCenter () const { - return theRadius; -} + if (!HasTransf()) + return gp_Pnt(theFaceCenter); - gp_Pnt IGESSolid_Cylinder::FaceCenter () const -{ - return gp_Pnt(theFaceCenter); + gp_XYZ tmp = theFaceCenter; + Location().Transforms(tmp); + return gp_Pnt(tmp); } - gp_Pnt IGESSolid_Cylinder::TransformedFaceCenter () const +gp_Dir IGESSolid_Cylinder::Axis () const { - if (!HasTransf()) return gp_Pnt(theFaceCenter); - else - { - gp_XYZ tmp = theFaceCenter; - Location().Transforms(tmp); - return gp_Pnt(tmp); - } + return gp_Dir(theAxis); } - gp_Dir IGESSolid_Cylinder::Axis () const +gp_Dir IGESSolid_Cylinder::TransformedAxis () const { - return gp_Dir(theAxis); + if (!HasTransf()) + return gp_Dir(theAxis); + + gp_XYZ tmp = theAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(tmp); + return gp_Dir(tmp); } - gp_Dir IGESSolid_Cylinder::TransformedAxis () const +void IGESSolid_Cylinder::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - if (!HasTransf()) return gp_Dir(theAxis); - else - { - gp_XYZ tmp = theAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(tmp); - return gp_Dir(tmp); - } + if (Height() <= 0.0) + theCheck->AddFail("Height : Value < 0"); + if (Radius() <= 0.0) + theCheck->AddFail("Radius : Value < 0"); } diff --git a/src/IGESSolid/IGESSolid_Cylinder.hxx b/src/IGESSolid/IGESSolid_Cylinder.hxx index 7b4190dd46..cf096ad142 100644 --- a/src/IGESSolid/IGESSolid_Cylinder.hxx +++ b/src/IGESSolid/IGESSolid_Cylinder.hxx @@ -17,13 +17,8 @@ #ifndef _IGESSolid_Cylinder_HeaderFile #define _IGESSolid_Cylinder_HeaderFile -#include -#include - -#include #include #include -class gp_XYZ; class gp_Pnt; class gp_Dir; @@ -36,11 +31,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_Cylinder, IGESData_IGESEntity) //! This defines a solid cylinder class IGESSolid_Cylinder : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_Cylinder(); + IGESSolid_Cylinder() {} //! This method is used to set the fields of the class //! Cylinder @@ -51,11 +44,11 @@ public: Standard_EXPORT void Init (const Standard_Real aHeight, const Standard_Real aRadius, const gp_XYZ& aCenter, const gp_XYZ& anAxis); //! returns the cylinder height - Standard_EXPORT Standard_Real Height() const; - + Standard_Real Height() const { return theHeight; } + //! returns the cylinder radius - Standard_EXPORT Standard_Real Radius() const; - + Standard_Real Radius() const { return theRadius; } + //! returns the first face center coordinates. Standard_EXPORT gp_Pnt FaceCenter() const; @@ -69,31 +62,16 @@ public: //! TransformationMatrix Standard_EXPORT gp_Dir TransformedAxis() const; - - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_Cylinder,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Real theHeight; Standard_Real theRadius; gp_XYZ theFaceCenter; gp_XYZ theAxis; - - }; - - - - - - #endif // _IGESSolid_Cylinder_HeaderFile diff --git a/src/IGESSolid/IGESSolid_CylindricalSurface.cxx b/src/IGESSolid/IGESSolid_CylindricalSurface.cxx index 7065227327..4c7e507661 100644 --- a/src/IGESSolid/IGESSolid_CylindricalSurface.cxx +++ b/src/IGESSolid/IGESSolid_CylindricalSurface.cxx @@ -19,14 +19,11 @@ #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_CylindricalSurface,IGESData_IGESEntity) -IGESSolid_CylindricalSurface::IGESSolid_CylindricalSurface () { } - - - void IGESSolid_CylindricalSurface::Init +void IGESSolid_CylindricalSurface::Init (const Handle(IGESGeom_Point)& aLocation, const Handle(IGESGeom_Direction)& anAxis, const Standard_Real aRadius, @@ -39,28 +36,17 @@ IGESSolid_CylindricalSurface::IGESSolid_CylindricalSurface () { } InitTypeAndForm(192, (theRefDir.IsNull() ? 0 : 1)); } - Handle(IGESGeom_Point) IGESSolid_CylindricalSurface::LocationPoint () const -{ - return theLocationPoint; -} - - Handle(IGESGeom_Direction) IGESSolid_CylindricalSurface::Axis () const -{ - return theAxis; -} - - Standard_Real IGESSolid_CylindricalSurface::Radius () const -{ - return theRadius; -} - - Handle(IGESGeom_Direction) IGESSolid_CylindricalSurface::ReferenceDir () const +void IGESSolid_CylindricalSurface::OwnShared(Interface_EntityIterator &theIter) const { - return theRefDir; + theIter.GetOneItem(LocationPoint()); + theIter.GetOneItem(Axis()); + theIter.GetOneItem(ReferenceDir()); } - Standard_Boolean IGESSolid_CylindricalSurface::IsParametrised () const +void IGESSolid_CylindricalSurface::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return (!theRefDir.IsNull()); + if (Radius() <= 0.0) + theCheck->AddFail("Radius : Value <= 0.0"); + const Standard_Integer fn = (IsParametrised()? 1 : 0); + if (fn != FormNumber()) theCheck->AddFail("Parametrised Status Mismatches with Form Number"); } - diff --git a/src/IGESSolid/IGESSolid_CylindricalSurface.hxx b/src/IGESSolid/IGESSolid_CylindricalSurface.hxx index 0659ae2ec7..00ab31cd0f 100644 --- a/src/IGESSolid/IGESSolid_CylindricalSurface.hxx +++ b/src/IGESSolid/IGESSolid_CylindricalSurface.hxx @@ -17,12 +17,7 @@ #ifndef _IGESSolid_CylindricalSurface_HeaderFile #define _IGESSolid_CylindricalSurface_HeaderFile -#include -#include - -#include #include -#include class IGESGeom_Point; class IGESGeom_Direction; @@ -34,11 +29,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_CylindricalSurface, IGESData_IGESEntity) //! in package IGESSolid class IGESSolid_CylindricalSurface : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_CylindricalSurface(); + IGESSolid_CylindricalSurface() {} //! This method is used to set the fields of the class //! CylindricalSurface @@ -50,46 +43,32 @@ public: Standard_EXPORT void Init (const Handle(IGESGeom_Point)& aLocation, const Handle(IGESGeom_Direction)& anAxis, const Standard_Real aRadius, const Handle(IGESGeom_Direction)& aRefdir); //! returns the point on the axis - Standard_EXPORT Handle(IGESGeom_Point) LocationPoint() const; - + const Handle(IGESGeom_Point) & LocationPoint() const { return theLocationPoint; } + //! returns the direction on the axis - Standard_EXPORT Handle(IGESGeom_Direction) Axis() const; - + const Handle(IGESGeom_Direction) & Axis() const { return theAxis; } + //! returns the radius at the axis point - Standard_EXPORT Standard_Real Radius() const; - + Standard_Real Radius() const { return theRadius; } + //! returns whether the surface is parametrised or not - Standard_EXPORT Standard_Boolean IsParametrised() const; - - //! returns the reference direction only for parametrised surface - //! else returns NULL - Standard_EXPORT Handle(IGESGeom_Direction) ReferenceDir() const; + Standard_Boolean IsParametrised() const { return (!theRefDir.IsNull()); } + //! returns the reference direction only for parametrised surface else returns NULL + const Handle(IGESGeom_Direction) & ReferenceDir() const { return theRefDir; } + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_CylindricalSurface,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESGeom_Point) theLocationPoint; Handle(IGESGeom_Direction) theAxis; Standard_Real theRadius; Handle(IGESGeom_Direction) theRefDir; - - }; - - - - - - #endif // _IGESSolid_CylindricalSurface_HeaderFile diff --git a/src/IGESSolid/IGESSolid_EdgeList.cxx b/src/IGESSolid/IGESSolid_EdgeList.cxx index c3ae8caf65..e995629b47 100644 --- a/src/IGESSolid/IGESSolid_EdgeList.cxx +++ b/src/IGESSolid/IGESSolid_EdgeList.cxx @@ -21,14 +21,12 @@ #include #include #include -#include +#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_EdgeList,IGESData_IGESEntity) -IGESSolid_EdgeList::IGESSolid_EdgeList () { } - - - void IGESSolid_EdgeList::Init +void IGESSolid_EdgeList::Init (const Handle(IGESData_HArray1OfIGESEntity)& Curves, const Handle(IGESSolid_HArray1OfVertexList)& startVertexList, const Handle(TColStd_HArray1OfInteger)& startVertexIndex, @@ -53,37 +51,51 @@ IGESSolid_EdgeList::IGESSolid_EdgeList () { } InitTypeAndForm(504,1); } - Standard_Integer IGESSolid_EdgeList::NbEdges () const +Standard_Integer IGESSolid_EdgeList::NbEdges () const { return (theCurves.IsNull() ? 0 : theCurves->Length()); } - Handle(IGESData_IGESEntity) IGESSolid_EdgeList::Curve - (const Standard_Integer num) const +const Handle(IGESData_IGESEntity) & IGESSolid_EdgeList::Curve (const Standard_Integer num) const { return theCurves->Value(num); } - Handle(IGESSolid_VertexList) IGESSolid_EdgeList::StartVertexList - (const Standard_Integer num) const +const Handle(IGESSolid_VertexList) & IGESSolid_EdgeList::StartVertexList (const Standard_Integer num) const { return theStartVertexList->Value(num); } - Standard_Integer IGESSolid_EdgeList::StartVertexIndex - (const Standard_Integer num) const +Standard_Integer IGESSolid_EdgeList::StartVertexIndex (const Standard_Integer num) const { return theStartVertexIndex->Value(num); } - Handle(IGESSolid_VertexList) IGESSolid_EdgeList::EndVertexList - (const Standard_Integer num) const +const Handle(IGESSolid_VertexList) & IGESSolid_EdgeList::EndVertexList (const Standard_Integer num) const { return theEndVertexList->Value(num); } - Standard_Integer IGESSolid_EdgeList::EndVertexIndex - (const Standard_Integer num) const +Standard_Integer IGESSolid_EdgeList::EndVertexIndex (const Standard_Integer num) const { return theEndVertexIndex->Value(num); } + +void IGESSolid_EdgeList::OwnShared(Interface_EntityIterator &theIter) const +{ + const Standard_Integer length = NbEdges(); + for (Standard_Integer i = 1; i <= length; i ++) + { + theIter.GetOneItem(Curve(i)); + theIter.GetOneItem(StartVertexList(i)); + theIter.GetOneItem(EndVertexList(i)); + } +} + +void IGESSolid_EdgeList::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const +{ + if (NbEdges() <= 0) { + Message_Msg Msg184("XSTEP_184"); + theCheck->SendFail(Msg184); + } +} diff --git a/src/IGESSolid/IGESSolid_EdgeList.hxx b/src/IGESSolid/IGESSolid_EdgeList.hxx index bfb1e130ea..bf8bfbc243 100644 --- a/src/IGESSolid/IGESSolid_EdgeList.hxx +++ b/src/IGESSolid/IGESSolid_EdgeList.hxx @@ -17,17 +17,10 @@ #ifndef _IGESSolid_EdgeList_HeaderFile #define _IGESSolid_EdgeList_HeaderFile -#include -#include - #include #include #include #include -#include -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESSolid_VertexList; @@ -40,11 +33,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_EdgeList, IGESData_IGESEntity) //! It contains one or more edge tuples. class IGESSolid_EdgeList : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_EdgeList(); + IGESSolid_EdgeList() {} //! This method is used to set the fields of the class //! EdgeList @@ -66,11 +57,11 @@ public: //! returns the num'th model space curve //! raises Exception if num <= 0 or num > NbEdges() - Standard_EXPORT Handle(IGESData_IGESEntity) Curve (const Standard_Integer num) const; + Standard_EXPORT const Handle(IGESData_IGESEntity) & Curve (const Standard_Integer num) const; //! returns the num'th start vertex list //! raises Exception if num <= 0 or num > NbEdges() - Standard_EXPORT Handle(IGESSolid_VertexList) StartVertexList (const Standard_Integer num) const; + Standard_EXPORT const Handle(IGESSolid_VertexList) & StartVertexList (const Standard_Integer num) const; //! returns the index of num'th start vertex in //! the corresponding start vertex list @@ -79,39 +70,26 @@ public: //! returns the num'th end vertex list //! raises Exception if num <= 0 or num > NbEdges() - Standard_EXPORT Handle(IGESSolid_VertexList) EndVertexList (const Standard_Integer num) const; + Standard_EXPORT const Handle(IGESSolid_VertexList) & EndVertexList (const Standard_Integer num) const; //! returns the index of num'th end vertex in //! the corresponding end vertex list //! raises Exception if num <= 0 or num > NbEdges() Standard_EXPORT Standard_Integer EndVertexIndex (const Standard_Integer num) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_EdgeList,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESData_HArray1OfIGESEntity) theCurves; Handle(IGESSolid_HArray1OfVertexList) theStartVertexList; Handle(TColStd_HArray1OfInteger) theStartVertexIndex; Handle(IGESSolid_HArray1OfVertexList) theEndVertexList; Handle(TColStd_HArray1OfInteger) theEndVertexIndex; - - }; - - - - - - #endif // _IGESSolid_EdgeList_HeaderFile diff --git a/src/IGESSolid/IGESSolid_Ellipsoid.cxx b/src/IGESSolid/IGESSolid_Ellipsoid.cxx index 583089c819..1541d285ec 100644 --- a/src/IGESSolid/IGESSolid_Ellipsoid.cxx +++ b/src/IGESSolid/IGESSolid_Ellipsoid.cxx @@ -25,10 +25,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Ellipsoid,IGESData_IGESEntity) -IGESSolid_Ellipsoid::IGESSolid_Ellipsoid () { } - - - void IGESSolid_Ellipsoid::Init +void IGESSolid_Ellipsoid::Init (const gp_XYZ& aSize, const gp_XYZ& aCenter, const gp_XYZ& anXAxis, const gp_XYZ& anZAxis) { @@ -39,92 +36,80 @@ IGESSolid_Ellipsoid::IGESSolid_Ellipsoid () { } InitTypeAndForm(168,0); } - gp_XYZ IGESSolid_Ellipsoid::Size () const -{ - return theSize; -} - - Standard_Real IGESSolid_Ellipsoid::XLength () const -{ - return theSize.X(); -} - - Standard_Real IGESSolid_Ellipsoid::YLength () const -{ - return theSize.Y(); -} - - Standard_Real IGESSolid_Ellipsoid::ZLength () const -{ - return theSize.Z(); -} - - gp_Pnt IGESSolid_Ellipsoid::Center () const +gp_Pnt IGESSolid_Ellipsoid::Center () const { return gp_Pnt(theCenter); } - gp_Pnt IGESSolid_Ellipsoid::TransformedCenter () const +gp_Pnt IGESSolid_Ellipsoid::TransformedCenter () const { - if (!HasTransf()) return gp_Pnt(theCenter); - else - { - gp_XYZ tmp = theCenter; - Location().Transforms(tmp); - return gp_Pnt(tmp); - } + if (!HasTransf()) + return gp_Pnt(theCenter); + + gp_XYZ tmp = theCenter; + Location().Transforms(tmp); + return gp_Pnt(tmp); } - gp_Dir IGESSolid_Ellipsoid::XAxis () const +gp_Dir IGESSolid_Ellipsoid::XAxis () const { return gp_Dir(theXAxis); } - gp_Dir IGESSolid_Ellipsoid::TransformedXAxis () const +gp_Dir IGESSolid_Ellipsoid::TransformedXAxis () const { - if (!HasTransf()) return gp_Dir(theXAxis); - else - { - gp_XYZ tmp = theXAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(tmp); - return gp_Dir(tmp); - } + if (!HasTransf()) + return gp_Dir(theXAxis); + + gp_XYZ tmp = theXAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(tmp); + return gp_Dir(tmp); } - gp_Dir IGESSolid_Ellipsoid::YAxis () const +gp_Dir IGESSolid_Ellipsoid::YAxis () const { return gp_Dir(theXAxis ^ theZAxis); // ^ overloaded } - gp_Dir IGESSolid_Ellipsoid::TransformedYAxis () const +gp_Dir IGESSolid_Ellipsoid::TransformedYAxis () const { - if (!HasTransf()) return gp_Dir(theXAxis ^ theZAxis); - else - { - gp_XYZ tmp = theXAxis ^ theZAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(tmp); - return gp_Dir(tmp); - } + if (!HasTransf()) + return gp_Dir(theXAxis ^ theZAxis); + + gp_XYZ tmp = theXAxis ^ theZAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(tmp); + return gp_Dir(tmp); } - gp_Dir IGESSolid_Ellipsoid::ZAxis () const +gp_Dir IGESSolid_Ellipsoid::ZAxis () const { return gp_Dir(theZAxis); } - gp_Dir IGESSolid_Ellipsoid::TransformedZAxis () const +gp_Dir IGESSolid_Ellipsoid::TransformedZAxis () const +{ + if (!HasTransf()) + return gp_Dir(theZAxis); + + gp_XYZ tmp = theZAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(tmp); + return gp_Dir(tmp); +} + +void IGESSolid_Ellipsoid::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - if (!HasTransf()) return gp_Dir(theZAxis); - else - { - gp_XYZ tmp = theZAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(tmp); - return gp_Dir(tmp); - } + const Standard_Real eps = 1.E-04; + const Standard_Real prosca = XAxis().Dot(ZAxis()); + if (prosca < -eps || prosca > eps) + theCheck->AddFail("Local Z axis : Not orthogonal to X axis"); + if (! (Size().X() >= Size().Y() + && Size().Y() >= Size().Z() + && Size().Z() > 0.)) + theCheck->AddFail("Size : The values does not satisfy LX >= LY >= LZ > 0"); } diff --git a/src/IGESSolid/IGESSolid_Ellipsoid.hxx b/src/IGESSolid/IGESSolid_Ellipsoid.hxx index f5a4881641..318473a230 100644 --- a/src/IGESSolid/IGESSolid_Ellipsoid.hxx +++ b/src/IGESSolid/IGESSolid_Ellipsoid.hxx @@ -17,13 +17,8 @@ #ifndef _IGESSolid_Ellipsoid_HeaderFile #define _IGESSolid_Ellipsoid_HeaderFile -#include -#include - #include #include -#include -class gp_XYZ; class gp_Pnt; class gp_Dir; @@ -40,11 +35,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_Ellipsoid, IGESData_IGESEntity) //! LX^2 LY^2 LZ^2 class IGESSolid_Ellipsoid : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_Ellipsoid(); + IGESSolid_Ellipsoid() {} //! This method is used to set the fields of the class //! Ellipsoid @@ -57,17 +50,17 @@ public: Standard_EXPORT void Init (const gp_XYZ& aSize, const gp_XYZ& aCenter, const gp_XYZ& anXAxis, const gp_XYZ& anZAxis); //! returns the size - Standard_EXPORT gp_XYZ Size() const; - + const gp_XYZ & Size() const { return theSize; } + //! returns the length in the local X-direction - Standard_EXPORT Standard_Real XLength() const; - + Standard_Real XLength() const { return theSize.X(); } + //! returns the length in the local Y-direction - Standard_EXPORT Standard_Real YLength() const; - + Standard_Real YLength() const { return theSize.Y(); } + //! returns the length in the local Z-direction - Standard_EXPORT Standard_Real ZLength() const; - + Standard_Real ZLength() const { return theSize.Z(); } + //! returns the center of the ellipsoid Standard_EXPORT gp_Pnt Center() const; @@ -98,31 +91,16 @@ public: //! after applying TransformationMatrix Standard_EXPORT gp_Dir TransformedZAxis() const; - - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_Ellipsoid,IGESData_IGESEntity) -protected: - - - - -private: - + private: gp_XYZ theSize; gp_XYZ theCenter; gp_XYZ theXAxis; gp_XYZ theZAxis; - - }; - - - - - - #endif // _IGESSolid_Ellipsoid_HeaderFile diff --git a/src/IGESSolid/IGESSolid_Face.cxx b/src/IGESSolid/IGESSolid_Face.cxx index 82c789f956..291998c57a 100644 --- a/src/IGESSolid/IGESSolid_Face.cxx +++ b/src/IGESSolid/IGESSolid_Face.cxx @@ -16,19 +16,16 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include #include -#include +#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Face,IGESData_IGESEntity) -IGESSolid_Face::IGESSolid_Face () { } - - - void IGESSolid_Face::Init +void IGESSolid_Face::Init (const Handle(IGESData_IGESEntity)& aSurface, const Standard_Boolean OuterLoopFlag, const Handle(IGESSolid_HArray1OfLoop)& Loops) @@ -41,23 +38,28 @@ IGESSolid_Face::IGESSolid_Face () { } InitTypeAndForm(510,1); } - Handle(IGESData_IGESEntity) IGESSolid_Face::Surface () const +Standard_Integer IGESSolid_Face::NbLoops () const { - return theSurface; + return theLoops->Length(); } - Standard_Integer IGESSolid_Face::NbLoops () const +const Handle(IGESSolid_Loop) & IGESSolid_Face::Loop (const Standard_Integer Index) const { - return theLoops->Length(); + return theLoops->Value(Index); } - Standard_Boolean IGESSolid_Face::HasOuterLoop () const +void IGESSolid_Face::OwnShared(Interface_EntityIterator &theIter) const { - return hasOuterLoop; + const Standard_Integer upper = NbLoops(); + theIter.GetOneItem(Surface()); + for (Standard_Integer i = 1; i <= upper; i ++) + theIter.GetOneItem(Loop(i)); } - Handle(IGESSolid_Loop) IGESSolid_Face::Loop (const Standard_Integer Index) const +void IGESSolid_Face::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return theLoops->Value(Index); + if (NbLoops() <= 0) { + Message_Msg Msg197("XSTEP_197"); + theCheck->SendFail(Msg197); + } } - diff --git a/src/IGESSolid/IGESSolid_Face.hxx b/src/IGESSolid/IGESSolid_Face.hxx index 9d0e6e86ac..a394abcfde 100644 --- a/src/IGESSolid/IGESSolid_Face.hxx +++ b/src/IGESSolid/IGESSolid_Face.hxx @@ -17,15 +17,8 @@ #ifndef _IGESSolid_Face_HeaderFile #define _IGESSolid_Face_HeaderFile -#include -#include - -#include #include #include -#include -class IGESData_IGESEntity; -class Standard_OutOfRange; class IGESSolid_Loop; @@ -37,11 +30,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_Face, IGESData_IGESEntity) //! Face entity is a bound (partial) which has finite area class IGESSolid_Face : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_Face(); + IGESSolid_Face() {} //! This method is used to set the fields of the class Face //! - aSurface : Pointer to the underlying surface @@ -50,42 +41,29 @@ public: Standard_EXPORT void Init (const Handle(IGESData_IGESEntity)& aSurface, const Standard_Boolean outerLoopFlag, const Handle(IGESSolid_HArray1OfLoop)& loops); //! returns the underlying surface of the face - Standard_EXPORT Handle(IGESData_IGESEntity) Surface() const; + const Handle(IGESData_IGESEntity) & Surface() const { return theSurface; } //! returns the number of the loops bounding the face Standard_EXPORT Standard_Integer NbLoops() const; //! checks whether there is an outer loop or not - Standard_EXPORT Standard_Boolean HasOuterLoop() const; + Standard_Boolean HasOuterLoop() const { return hasOuterLoop; } //! returns the Index'th loop that bounds the face //! raises exception if Index < 0 or Index >= NbLoops - Standard_EXPORT Handle(IGESSolid_Loop) Loop (const Standard_Integer Index) const; - + Standard_EXPORT const Handle(IGESSolid_Loop) & Loop (const Standard_Integer Index) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_Face,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESData_IGESEntity) theSurface; Standard_Boolean hasOuterLoop; Handle(IGESSolid_HArray1OfLoop) theLoops; - - }; - - - - - - #endif // _IGESSolid_Face_HeaderFile diff --git a/src/IGESSolid/IGESSolid_GeneralModule.cxx b/src/IGESSolid/IGESSolid_GeneralModule.cxx index f625aba084..56955488ec 100644 --- a/src/IGESSolid/IGESSolid_GeneralModule.cxx +++ b/src/IGESSolid/IGESSolid_GeneralModule.cxx @@ -11,7 +11,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - +/* #include #include #include @@ -65,33 +65,18 @@ #include #include #include -#include #include #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_GeneralModule,IGESData_GeneralModule) -// Each Module is attached to a Protocol : it must interprete Case Numbers -// (arguments of various methods) in accordance to values returned by -// the method TypeNumber from this Protocol -IGESSolid_GeneralModule::IGESSolid_GeneralModule () { } - void IGESSolid_GeneralModule::OwnSharedCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent, Interface_EntityIterator& iter) const { switch (CN) { - case 1 : { - DeclareAndCast(IGESSolid_Block,anent,ent); - if (anent.IsNull()) return; - IGESSolid_ToolBlock tool; - tool.OwnShared(anent,iter); - } - break; case 2 : { DeclareAndCast(IGESSolid_BooleanTree,anent,ent); if (anent.IsNull()) return; @@ -99,13 +84,6 @@ IGESSolid_GeneralModule::IGESSolid_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 3 : { - DeclareAndCast(IGESSolid_ConeFrustum,anent,ent); - if (anent.IsNull()) return; - IGESSolid_ToolConeFrustum tool; - tool.OwnShared(anent,iter); - } - break; case 4 : { DeclareAndCast(IGESSolid_ConicalSurface,anent,ent); if (anent.IsNull()) return; @@ -113,13 +91,6 @@ IGESSolid_GeneralModule::IGESSolid_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 5 : { - DeclareAndCast(IGESSolid_Cylinder,anent,ent); - if (anent.IsNull()) return; - IGESSolid_ToolCylinder tool; - tool.OwnShared(anent,iter); - } - break; case 6 : { DeclareAndCast(IGESSolid_CylindricalSurface,anent,ent); if (anent.IsNull()) return; @@ -134,13 +105,6 @@ IGESSolid_GeneralModule::IGESSolid_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 8 : { - DeclareAndCast(IGESSolid_Ellipsoid,anent,ent); - if (anent.IsNull()) return; - IGESSolid_ToolEllipsoid tool; - tool.OwnShared(anent,iter); - } - break; case 9 : { DeclareAndCast(IGESSolid_Face,anent,ent); if (anent.IsNull()) return; @@ -169,13 +133,6 @@ IGESSolid_GeneralModule::IGESSolid_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 13 : { - DeclareAndCast(IGESSolid_RightAngularWedge,anent,ent); - if (anent.IsNull()) return; - IGESSolid_ToolRightAngularWedge tool; - tool.OwnShared(anent,iter); - } - break; case 14 : { DeclareAndCast(IGESSolid_SelectedComponent,anent,ent); if (anent.IsNull()) return; @@ -218,13 +175,6 @@ IGESSolid_GeneralModule::IGESSolid_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 20 : { - DeclareAndCast(IGESSolid_Sphere,anent,ent); - if (anent.IsNull()) return; - IGESSolid_ToolSphere tool; - tool.OwnShared(anent,iter); - } - break; case 21 : { DeclareAndCast(IGESSolid_SphericalSurface,anent,ent); if (anent.IsNull()) return; @@ -239,20 +189,6 @@ IGESSolid_GeneralModule::IGESSolid_GeneralModule () { } tool.OwnShared(anent,iter); } break; - case 23 : { - DeclareAndCast(IGESSolid_Torus,anent,ent); - if (anent.IsNull()) return; - IGESSolid_ToolTorus tool; - tool.OwnShared(anent,iter); - } - break; - case 24 : { - DeclareAndCast(IGESSolid_VertexList,anent,ent); - if (anent.IsNull()) return; - IGESSolid_ToolVertexList tool; - tool.OwnShared(anent,iter); - } - break; default : break; } } @@ -508,13 +444,6 @@ IGESSolid_GeneralModule::IGESSolid_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 14 : { - DeclareAndCast(IGESSolid_SelectedComponent,anent,ent); - if (anent.IsNull()) return; - IGESSolid_ToolSelectedComponent tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 15 : { DeclareAndCast(IGESSolid_Shell,anent,ent); if (anent.IsNull()) return; @@ -522,20 +451,6 @@ IGESSolid_GeneralModule::IGESSolid_GeneralModule () { } tool.OwnCheck(anent,shares,ach); } break; - case 16 : { - DeclareAndCast(IGESSolid_SolidAssembly,anent,ent); - if (anent.IsNull()) return; - IGESSolid_ToolSolidAssembly tool; - tool.OwnCheck(anent,shares,ach); - } - break; - case 17 : { - DeclareAndCast(IGESSolid_SolidInstance,anent,ent); - if (anent.IsNull()) return; - IGESSolid_ToolSolidInstance tool; - tool.OwnCheck(anent,shares,ach); - } - break; case 18 : { DeclareAndCast(IGESSolid_SolidOfLinearExtrusion,anent,ent); if (anent.IsNull()) return; @@ -624,189 +539,10 @@ IGESSolid_GeneralModule::IGESSolid_GeneralModule () { } } - void IGESSolid_GeneralModule::OwnCopyCase - (const Standard_Integer CN, - const Handle(IGESData_IGESEntity)& entfrom, - const Handle(IGESData_IGESEntity)& entto, - Interface_CopyTool& TC) const -{ - switch (CN) { - case 1 : { - DeclareAndCast(IGESSolid_Block,enfr,entfrom); - DeclareAndCast(IGESSolid_Block,ento,entto); - IGESSolid_ToolBlock tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 2 : { - DeclareAndCast(IGESSolid_BooleanTree,enfr,entfrom); - DeclareAndCast(IGESSolid_BooleanTree,ento,entto); - IGESSolid_ToolBooleanTree tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 3 : { - DeclareAndCast(IGESSolid_ConeFrustum,enfr,entfrom); - DeclareAndCast(IGESSolid_ConeFrustum,ento,entto); - IGESSolid_ToolConeFrustum tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 4 : { - DeclareAndCast(IGESSolid_ConicalSurface,enfr,entfrom); - DeclareAndCast(IGESSolid_ConicalSurface,ento,entto); - IGESSolid_ToolConicalSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 5 : { - DeclareAndCast(IGESSolid_Cylinder,enfr,entfrom); - DeclareAndCast(IGESSolid_Cylinder,ento,entto); - IGESSolid_ToolCylinder tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 6 : { - DeclareAndCast(IGESSolid_CylindricalSurface,enfr,entfrom); - DeclareAndCast(IGESSolid_CylindricalSurface,ento,entto); - IGESSolid_ToolCylindricalSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 7 : { - DeclareAndCast(IGESSolid_EdgeList,enfr,entfrom); - DeclareAndCast(IGESSolid_EdgeList,ento,entto); - IGESSolid_ToolEdgeList tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 8 : { - DeclareAndCast(IGESSolid_Ellipsoid,enfr,entfrom); - DeclareAndCast(IGESSolid_Ellipsoid,ento,entto); - IGESSolid_ToolEllipsoid tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 9 : { - DeclareAndCast(IGESSolid_Face,enfr,entfrom); - DeclareAndCast(IGESSolid_Face,ento,entto); - IGESSolid_ToolFace tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 10 : { - DeclareAndCast(IGESSolid_Loop,enfr,entfrom); - DeclareAndCast(IGESSolid_Loop,ento,entto); - IGESSolid_ToolLoop tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 11 : { - DeclareAndCast(IGESSolid_ManifoldSolid,enfr,entfrom); - DeclareAndCast(IGESSolid_ManifoldSolid,ento,entto); - IGESSolid_ToolManifoldSolid tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 12 : { - DeclareAndCast(IGESSolid_PlaneSurface,enfr,entfrom); - DeclareAndCast(IGESSolid_PlaneSurface,ento,entto); - IGESSolid_ToolPlaneSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 13 : { - DeclareAndCast(IGESSolid_RightAngularWedge,enfr,entfrom); - DeclareAndCast(IGESSolid_RightAngularWedge,ento,entto); - IGESSolid_ToolRightAngularWedge tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 14 : { - DeclareAndCast(IGESSolid_SelectedComponent,enfr,entfrom); - DeclareAndCast(IGESSolid_SelectedComponent,ento,entto); - IGESSolid_ToolSelectedComponent tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 15 : { - DeclareAndCast(IGESSolid_Shell,enfr,entfrom); - DeclareAndCast(IGESSolid_Shell,ento,entto); - IGESSolid_ToolShell tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 16 : { - DeclareAndCast(IGESSolid_SolidAssembly,enfr,entfrom); - DeclareAndCast(IGESSolid_SolidAssembly,ento,entto); - IGESSolid_ToolSolidAssembly tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 17 : { - DeclareAndCast(IGESSolid_SolidInstance,enfr,entfrom); - DeclareAndCast(IGESSolid_SolidInstance,ento,entto); - IGESSolid_ToolSolidInstance tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 18 : { - DeclareAndCast(IGESSolid_SolidOfLinearExtrusion,enfr,entfrom); - DeclareAndCast(IGESSolid_SolidOfLinearExtrusion,ento,entto); - IGESSolid_ToolSolidOfLinearExtrusion tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 19 : { - DeclareAndCast(IGESSolid_SolidOfRevolution,enfr,entfrom); - DeclareAndCast(IGESSolid_SolidOfRevolution,ento,entto); - IGESSolid_ToolSolidOfRevolution tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 20 : { - DeclareAndCast(IGESSolid_Sphere,enfr,entfrom); - DeclareAndCast(IGESSolid_Sphere,ento,entto); - IGESSolid_ToolSphere tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 21 : { - DeclareAndCast(IGESSolid_SphericalSurface,enfr,entfrom); - DeclareAndCast(IGESSolid_SphericalSurface,ento,entto); - IGESSolid_ToolSphericalSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 22 : { - DeclareAndCast(IGESSolid_ToroidalSurface,enfr,entfrom); - DeclareAndCast(IGESSolid_ToroidalSurface,ento,entto); - IGESSolid_ToolToroidalSurface tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 23 : { - DeclareAndCast(IGESSolid_Torus,enfr,entfrom); - DeclareAndCast(IGESSolid_Torus,ento,entto); - IGESSolid_ToolTorus tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - case 24 : { - DeclareAndCast(IGESSolid_VertexList,enfr,entfrom); - DeclareAndCast(IGESSolid_VertexList,ento,entto); - IGESSolid_ToolVertexList tool; - tool.OwnCopy(enfr,ento,TC); - } - break; - default : break; - } -} - - Standard_Integer IGESSolid_GeneralModule::CategoryNumber - (const Standard_Integer /*CN*/, const Handle(Standard_Transient)& , + (const Standard_Integer , const Handle(Standard_Transient)& , const Interface_ShareTool& ) const { return Interface_Category::Number("Shape"); } +*/ \ No newline at end of file diff --git a/src/IGESSolid/IGESSolid_GeneralModule.hxx b/src/IGESSolid/IGESSolid_GeneralModule.hxx index 294fc3a37d..5c419389e2 100644 --- a/src/IGESSolid/IGESSolid_GeneralModule.hxx +++ b/src/IGESSolid/IGESSolid_GeneralModule.hxx @@ -17,20 +17,8 @@ #ifndef _IGESSolid_GeneralModule_HeaderFile #define _IGESSolid_GeneralModule_HeaderFile -#include -#include - #include -#include -#include -class IGESData_IGESEntity; -class Interface_EntityIterator; -class IGESData_DirChecker; -class Interface_ShareTool; -class Interface_Check; -class Standard_Transient; -class Interface_CopyTool; - +/* class IGESSolid_GeneralModule; DEFINE_STANDARD_HANDLE(IGESSolid_GeneralModule, IGESData_GeneralModule) @@ -39,12 +27,10 @@ DEFINE_STANDARD_HANDLE(IGESSolid_GeneralModule, IGESData_GeneralModule) //! This Services comprise : Shared & Implied Lists, Copy, Check class IGESSolid_GeneralModule : public IGESData_GeneralModule { + public: -public: - - //! Creates a GeneralModule from IGESSolid and puts it into GeneralLib - Standard_EXPORT IGESSolid_GeneralModule(); + IGESSolid_GeneralModule() {} //! Lists the Entities shared by a given IGESEntity , from //! its specific parameters : specific for each type @@ -61,34 +47,11 @@ public: //! Specific creation of a new void entity Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const Standard_OVERRIDE; - //! Copies parameters which are specific of each Type of Entity - Standard_EXPORT void OwnCopyCase (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& entfrom, const Handle(IGESData_IGESEntity)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - //! Returns a category number which characterizes an entity //! Shape for all Standard_EXPORT virtual Standard_Integer CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESSolid_GeneralModule,IGESData_GeneralModule) - -protected: - - - - -private: - - - - }; - - - - - - - +*/ #endif // _IGESSolid_GeneralModule_HeaderFile diff --git a/src/IGESSolid/IGESSolid_Loop.cxx b/src/IGESSolid/IGESSolid_Loop.cxx index e3ab009318..c6cd113259 100644 --- a/src/IGESSolid/IGESSolid_Loop.cxx +++ b/src/IGESSolid/IGESSolid_Loop.cxx @@ -25,14 +25,12 @@ #include #include #include -#include +#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Loop,IGESData_IGESEntity) -IGESSolid_Loop::IGESSolid_Loop () { } - - - void IGESSolid_Loop::Init +void IGESSolid_Loop::Init (const Handle(TColStd_HArray1OfInteger)& Types, const Handle(IGESData_HArray1OfIGESEntity)& Edges, const Handle(TColStd_HArray1OfInteger)& Index, @@ -63,43 +61,40 @@ IGESSolid_Loop::IGESSolid_Loop () { } InitTypeAndForm(508,1); } - Standard_Boolean IGESSolid_Loop::IsBound () const - { return (FormNumber() == 1); } - - void IGESSolid_Loop::SetBound (const Standard_Boolean bound) - { InitTypeAndForm(508, (bound ? 1 : 0)); } +Standard_Boolean IGESSolid_Loop::IsBound () const +{ return (FormNumber() == 1); } +void IGESSolid_Loop::SetBound (const Standard_Boolean bound) +{ InitTypeAndForm(508, (bound ? 1 : 0)); } - Standard_Integer IGESSolid_Loop::NbEdges () const +Standard_Integer IGESSolid_Loop::NbEdges () const { //pdn 20.04.99 CTS22655 to avoid exceptions on empty loops if(theEdges.IsNull()) return 0; return theEdges->Length(); } - Standard_Integer IGESSolid_Loop::EdgeType (const Standard_Integer Index) const +Standard_Integer IGESSolid_Loop::EdgeType (const Standard_Integer Index) const { return theTypes->Value(Index); } - Handle(IGESData_IGESEntity) IGESSolid_Loop::Edge - (const Standard_Integer Index) const +const Handle(IGESData_IGESEntity) & IGESSolid_Loop::Edge (const Standard_Integer Index) const { return theEdges->Value(Index); } - Standard_Boolean IGESSolid_Loop::Orientation (const Standard_Integer Index) const +Standard_Boolean IGESSolid_Loop::Orientation (const Standard_Integer Index) const { return (theOrientationFlags->Value(Index) != 0); } - Standard_Integer IGESSolid_Loop::NbParameterCurves - (const Standard_Integer Index) const +Standard_Integer IGESSolid_Loop::NbParameterCurves (const Standard_Integer Index) const { return theNbParameterCurves->Value(Index); } - Standard_Boolean IGESSolid_Loop::IsIsoparametric +Standard_Boolean IGESSolid_Loop::IsIsoparametric (const Standard_Integer EdgeIndex, const Standard_Integer CurveIndex) const { if (!theIsoparametricFlags->Value(EdgeIndex).IsNull()) return @@ -107,7 +102,7 @@ IGESSolid_Loop::IGESSolid_Loop () { } else return Standard_False; // faut bien dire qq chose } - Handle(IGESData_IGESEntity) IGESSolid_Loop::ParametricCurve +Handle(IGESData_IGESEntity) IGESSolid_Loop::ParametricCurve (const Standard_Integer EdgeIndex, const Standard_Integer CurveIndex) const { Handle(IGESData_IGESEntity) acurve; // par defaut sera nulle @@ -116,7 +111,30 @@ IGESSolid_Loop::IGESSolid_Loop () { } return acurve; } - Standard_Integer IGESSolid_Loop::ListIndex (const Standard_Integer num) const +Standard_Integer IGESSolid_Loop::ListIndex (const Standard_Integer num) const { return theIndex->Value(num); } + +void IGESSolid_Loop::OwnShared(Interface_EntityIterator &theIter) const +{ + Standard_Integer i, j; + const Standard_Integer length = NbEdges(); + for (i = 1; i <= length; i ++) + { + theIter.GetOneItem(Edge(i)); + const Standard_Integer nbc = NbParameterCurves(i); + for (j = 1; j <= nbc; j ++) + theIter.GetOneItem(ParametricCurve(i,j)); + } +} + +void IGESSolid_Loop::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const +{ + const Standard_Integer upper = NbEdges(); + for (Standard_Integer i = 1; i <= upper; i ++) + if (EdgeType(i) != 0 && EdgeType(i) != 1) { + Message_Msg Msg190("XSTEP_190"); + theCheck->SendFail(Msg190); + } +} diff --git a/src/IGESSolid/IGESSolid_Loop.hxx b/src/IGESSolid/IGESSolid_Loop.hxx index 5c23329f79..bef7f200bc 100644 --- a/src/IGESSolid/IGESSolid_Loop.hxx +++ b/src/IGESSolid/IGESSolid_Loop.hxx @@ -17,19 +17,11 @@ #ifndef _IGESSolid_Loop_HeaderFile #define _IGESSolid_Loop_HeaderFile -#include -#include - #include #include #include -#include -#include class IGESBasic_HArray1OfHArray1OfInteger; class IGESBasic_HArray1OfHArray1OfIGESEntity; -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESSolid_Loop; @@ -45,11 +37,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_Loop, IGESData_IGESEntity) //! else it is a bound of a face (it is the default) class IGESSolid_Loop : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_Loop(); + IGESSolid_Loop() {} //! This method is used to set the fields of the class Loop //! - types : 0 = Edge; 1 = Vertex @@ -83,7 +73,7 @@ public: //! return the EdgeList or VertexList corresponding to the Index //! raises exception if Index <= 0 or Index > NbEdges() - Standard_EXPORT Handle(IGESData_IGESEntity) Edge (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESData_IGESEntity) & Edge (const Standard_Integer Index) const; //! returns the orientation flag corresponding to Index'th edge //! raises exception if Index <= 0 or Index > NbEdges() @@ -105,18 +95,13 @@ public: //! raises exception If num <= 0 or num > NbEdges() Standard_EXPORT Standard_Integer ListIndex (const Standard_Integer num) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_Loop,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(TColStd_HArray1OfInteger) theTypes; Handle(IGESData_HArray1OfIGESEntity) theEdges; @@ -125,14 +110,6 @@ private: Handle(TColStd_HArray1OfInteger) theNbParameterCurves; Handle(IGESBasic_HArray1OfHArray1OfInteger) theIsoparametricFlags; Handle(IGESBasic_HArray1OfHArray1OfIGESEntity) theCurves; - - }; - - - - - - #endif // _IGESSolid_Loop_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ManifoldSolid.cxx b/src/IGESSolid/IGESSolid_ManifoldSolid.cxx index f6f3bf1d44..0b81488bd3 100644 --- a/src/IGESSolid/IGESSolid_ManifoldSolid.cxx +++ b/src/IGESSolid/IGESSolid_ManifoldSolid.cxx @@ -20,14 +20,11 @@ #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_ManifoldSolid,IGESData_IGESEntity) -IGESSolid_ManifoldSolid::IGESSolid_ManifoldSolid () { } - - - void IGESSolid_ManifoldSolid::Init +void IGESSolid_ManifoldSolid::Init (const Handle(IGESSolid_Shell)& aShell, const Standard_Boolean Shellflag, const Handle(IGESSolid_HArray1OfShell)& VoidShells, @@ -45,32 +42,28 @@ IGESSolid_ManifoldSolid::IGESSolid_ManifoldSolid () { } InitTypeAndForm(186,0); } - Handle(IGESSolid_Shell) IGESSolid_ManifoldSolid::Shell () const -{ - return theShell; -} - - Standard_Boolean IGESSolid_ManifoldSolid::OrientationFlag () const -{ - return theOrientationFlag; -} - - Standard_Integer IGESSolid_ManifoldSolid::NbVoidShells () const +Standard_Integer IGESSolid_ManifoldSolid::NbVoidShells () const { return (theVoidShells.IsNull() ? 0 : theVoidShells->Length()); } - Handle(IGESSolid_Shell) IGESSolid_ManifoldSolid::VoidShell - (const Standard_Integer index) const +Handle(IGESSolid_Shell) IGESSolid_ManifoldSolid::VoidShell (const Standard_Integer index) const { Handle(IGESSolid_Shell) ashell; // par defaut sera Null if (!theVoidShells.IsNull()) ashell = theVoidShells->Value(index); return ashell; } - Standard_Boolean IGESSolid_ManifoldSolid::VoidOrientationFlag - (const Standard_Integer index) const +Standard_Boolean IGESSolid_ManifoldSolid::VoidOrientationFlag (const Standard_Integer index) const { if (!theOrientFlags.IsNull()) return (theOrientFlags->Value(index) != 0); else return Standard_False; // pour retourner qqchose ... } + +void IGESSolid_ManifoldSolid::OwnShared(Interface_EntityIterator &theIter) const +{ + theIter.GetOneItem(Shell()); + const Standard_Integer nbshells = NbVoidShells(); + for (Standard_Integer i = 1; i <= nbshells; i ++) + theIter.GetOneItem(VoidShell(i)); +} diff --git a/src/IGESSolid/IGESSolid_ManifoldSolid.hxx b/src/IGESSolid/IGESSolid_ManifoldSolid.hxx index a27cb984e7..9b51230b3c 100644 --- a/src/IGESSolid/IGESSolid_ManifoldSolid.hxx +++ b/src/IGESSolid/IGESSolid_ManifoldSolid.hxx @@ -17,17 +17,10 @@ #ifndef _IGESSolid_ManifoldSolid_HeaderFile #define _IGESSolid_ManifoldSolid_HeaderFile -#include -#include - -#include #include #include #include -#include class IGESSolid_Shell; -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESSolid_ManifoldSolid; @@ -39,11 +32,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_ManifoldSolid, IGESData_IGESEntity) //! in three dimensional Euclidean space class IGESSolid_ManifoldSolid : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_ManifoldSolid(); + IGESSolid_ManifoldSolid() {} //! This method is used to set the fields of the class //! ManifoldSolid @@ -56,11 +47,11 @@ public: Standard_EXPORT void Init (const Handle(IGESSolid_Shell)& aShell, const Standard_Boolean shellflag, const Handle(IGESSolid_HArray1OfShell)& voidShells, const Handle(TColStd_HArray1OfInteger)& voidShellFlags); //! returns the Shell entity which is being referred - Standard_EXPORT Handle(IGESSolid_Shell) Shell() const; - + const Handle(IGESSolid_Shell) & Shell() const { return theShell; } + //! returns the orientation flag of the shell - Standard_EXPORT Standard_Boolean OrientationFlag() const; - + Standard_Boolean OrientationFlag() const { return theOrientationFlag; } + //! returns the number of void shells Standard_EXPORT Standard_Integer NbVoidShells() const; @@ -72,31 +63,16 @@ public: //! raises exception if Index <= 0 or Index > NbVoidShells() Standard_EXPORT Standard_Boolean VoidOrientationFlag (const Standard_Integer Index) const; - - + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_ManifoldSolid,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESSolid_Shell) theShell; Standard_Boolean theOrientationFlag; Handle(IGESSolid_HArray1OfShell) theVoidShells; Handle(TColStd_HArray1OfInteger) theOrientFlags; - - }; - - - - - - #endif // _IGESSolid_ManifoldSolid_HeaderFile diff --git a/src/IGESSolid/IGESSolid_PlaneSurface.cxx b/src/IGESSolid/IGESSolid_PlaneSurface.cxx index 54c6c663f8..7642a34d84 100644 --- a/src/IGESSolid/IGESSolid_PlaneSurface.cxx +++ b/src/IGESSolid/IGESSolid_PlaneSurface.cxx @@ -19,13 +19,11 @@ #include #include #include -#include +#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_PlaneSurface,IGESData_IGESEntity) -IGESSolid_PlaneSurface::IGESSolid_PlaneSurface () { } - - void IGESSolid_PlaneSurface::Init (const Handle(IGESGeom_Point)& aLocation, const Handle(IGESGeom_Direction)& aNormal, @@ -37,22 +35,18 @@ IGESSolid_PlaneSurface::IGESSolid_PlaneSurface () { } InitTypeAndForm(190, (theRefDir.IsNull() ? 0 : 1)); } - Handle(IGESGeom_Point) IGESSolid_PlaneSurface::LocationPoint () const -{ - return theLocationPoint; -} - - Handle(IGESGeom_Direction) IGESSolid_PlaneSurface::Normal () const -{ - return theNormal; -} - - Handle(IGESGeom_Direction) IGESSolid_PlaneSurface::ReferenceDir () const +void IGESSolid_PlaneSurface::OwnShared(Interface_EntityIterator &theIter) const { - return theRefDir; + theIter.GetOneItem(LocationPoint()); + theIter.GetOneItem(Normal()); + theIter.GetOneItem(ReferenceDir()); } - Standard_Boolean IGESSolid_PlaneSurface::IsParametrised () const +void IGESSolid_PlaneSurface::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return (!theRefDir.IsNull()); + const Standard_Integer fn = (IsParametrised()? 1 : 0); + if (fn != FormNumber()) { + Message_Msg Msg177("XSTEP_177"); + theCheck->SendFail (Msg177); + } } diff --git a/src/IGESSolid/IGESSolid_PlaneSurface.hxx b/src/IGESSolid/IGESSolid_PlaneSurface.hxx index c4b3d661c0..e08519599e 100644 --- a/src/IGESSolid/IGESSolid_PlaneSurface.hxx +++ b/src/IGESSolid/IGESSolid_PlaneSurface.hxx @@ -17,11 +17,7 @@ #ifndef _IGESSolid_PlaneSurface_HeaderFile #define _IGESSolid_PlaneSurface_HeaderFile -#include -#include - #include -#include class IGESGeom_Point; class IGESGeom_Direction; @@ -35,11 +31,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_PlaneSurface, IGESData_IGESEntity) //! surface and a normal to it. class IGESSolid_PlaneSurface : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_PlaneSurface(); + IGESSolid_PlaneSurface() {} //! This method is used to set the fields of the class //! PlaneSurface @@ -50,42 +44,29 @@ public: Standard_EXPORT void Init (const Handle(IGESGeom_Point)& aLocation, const Handle(IGESGeom_Direction)& aNormal, const Handle(IGESGeom_Direction)& refdir); //! returns the point on the surface - Standard_EXPORT Handle(IGESGeom_Point) LocationPoint() const; - + const Handle(IGESGeom_Point) & LocationPoint() const { return theLocationPoint; } + //! returns the normal to the surface - Standard_EXPORT Handle(IGESGeom_Direction) Normal() const; - + const Handle(IGESGeom_Direction) & Normal() const { return theNormal; } + //! returns the reference direction (for parameterised curve) //! returns NULL for unparameterised curve - Standard_EXPORT Handle(IGESGeom_Direction) ReferenceDir() const; - - //! returns True if parameterised, else False - Standard_EXPORT Standard_Boolean IsParametrised() const; + const Handle(IGESGeom_Direction) & ReferenceDir() const { return theRefDir; } + //! returns True if parameterised, else False + Standard_Boolean IsParametrised() const { return (!theRefDir.IsNull()); } + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_PlaneSurface,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESGeom_Point) theLocationPoint; Handle(IGESGeom_Direction) theNormal; Handle(IGESGeom_Direction) theRefDir; - - }; - - - - - - #endif // _IGESSolid_PlaneSurface_HeaderFile diff --git a/src/IGESSolid/IGESSolid_Protocol.cxx b/src/IGESSolid/IGESSolid_Protocol.cxx index 51fa6219fb..625e8bc270 100644 --- a/src/IGESSolid/IGESSolid_Protocol.cxx +++ b/src/IGESSolid/IGESSolid_Protocol.cxx @@ -11,7 +11,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - +/* #include #include #include @@ -82,7 +82,7 @@ static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06, { return 1; } Handle(Interface_Protocol) IGESSolid_Protocol::Resource - (const Standard_Integer /*num*/) const + (const Standard_Integer) const { return IGESGeom::Protocol(); } @@ -116,3 +116,4 @@ static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06, else if (atype == atype24) return 24; return 0; } +*/ \ No newline at end of file diff --git a/src/IGESSolid/IGESSolid_Protocol.hxx b/src/IGESSolid/IGESSolid_Protocol.hxx index a259221a9a..4683794149 100644 --- a/src/IGESSolid/IGESSolid_Protocol.hxx +++ b/src/IGESSolid/IGESSolid_Protocol.hxx @@ -17,25 +17,16 @@ #ifndef _IGESSolid_Protocol_HeaderFile #define _IGESSolid_Protocol_HeaderFile -#include -#include - #include -#include -#include -class Interface_Protocol; - - +/* class IGESSolid_Protocol; DEFINE_STANDARD_HANDLE(IGESSolid_Protocol, IGESData_Protocol) //! Description of Protocol for IGESSolid class IGESSolid_Protocol : public IGESData_Protocol { + public: -public: - - Standard_EXPORT IGESSolid_Protocol(); //! Gives the count of Resource Protocol. Here, one @@ -52,27 +43,7 @@ public: //! consider the same Type as the Protocol defines) Standard_EXPORT virtual Standard_Integer TypeNumber (const Handle(Standard_Type)& atype) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(IGESSolid_Protocol,IGESData_Protocol) - -protected: - - - - -private: - - - - }; - - - - - - - +*/ #endif // _IGESSolid_Protocol_HeaderFile diff --git a/src/IGESSolid/IGESSolid_RightAngularWedge.cxx b/src/IGESSolid/IGESSolid_RightAngularWedge.cxx index bd9c499abf..329cc8644b 100644 --- a/src/IGESSolid/IGESSolid_RightAngularWedge.cxx +++ b/src/IGESSolid/IGESSolid_RightAngularWedge.cxx @@ -25,10 +25,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_RightAngularWedge,IGESData_IGESEntity) -IGESSolid_RightAngularWedge::IGESSolid_RightAngularWedge () { } - - - void IGESSolid_RightAngularWedge::Init +void IGESSolid_RightAngularWedge::Init (const gp_XYZ& aSize, const Standard_Real LowX, const gp_XYZ& aCorner, const gp_XYZ& anXAxis, const gp_XYZ& anZAxis) { @@ -40,97 +37,82 @@ IGESSolid_RightAngularWedge::IGESSolid_RightAngularWedge () { } InitTypeAndForm(152,0); } - gp_XYZ IGESSolid_RightAngularWedge::Size () const -{ - return theSize; -} - - Standard_Real IGESSolid_RightAngularWedge::XBigLength () const -{ - return theSize.X(); -} - - Standard_Real IGESSolid_RightAngularWedge::XSmallLength () const -{ - return theXSmallLength; -} - - Standard_Real IGESSolid_RightAngularWedge::YLength () const -{ - return theSize.Y(); -} - - Standard_Real IGESSolid_RightAngularWedge::ZLength () const -{ - return theSize.Z(); -} - - gp_Pnt IGESSolid_RightAngularWedge::Corner () const +gp_Pnt IGESSolid_RightAngularWedge::Corner () const { return gp_Pnt(theCorner); } - gp_Pnt IGESSolid_RightAngularWedge::TransformedCorner () const +gp_Pnt IGESSolid_RightAngularWedge::TransformedCorner () const { - if (!HasTransf()) return gp_Pnt(theCorner); - else - { - gp_XYZ tmp = theCorner; - Location().Transforms(tmp); - return gp_Pnt(tmp); - } + if (!HasTransf()) + return gp_Pnt(theCorner); + + gp_XYZ tmp = theCorner; + Location().Transforms(tmp); + return gp_Pnt(tmp); } - gp_Dir IGESSolid_RightAngularWedge::XAxis () const +gp_Dir IGESSolid_RightAngularWedge::XAxis () const { return gp_Dir(theXAxis); } - gp_Dir IGESSolid_RightAngularWedge::TransformedXAxis () const +gp_Dir IGESSolid_RightAngularWedge::TransformedXAxis () const { - if (!HasTransf()) return gp_Dir(theXAxis); - else - { - gp_XYZ tmp = theXAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(tmp); - return gp_Dir(tmp); - } + if (!HasTransf()) + return gp_Dir(theXAxis); + + gp_XYZ tmp = theXAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(tmp); + return gp_Dir(tmp); } - gp_Dir IGESSolid_RightAngularWedge::YAxis () const +gp_Dir IGESSolid_RightAngularWedge::YAxis () const { return gp_Dir(theXAxis ^ theZAxis); // ^ overloaded } - gp_Dir IGESSolid_RightAngularWedge::TransformedYAxis () const +gp_Dir IGESSolid_RightAngularWedge::TransformedYAxis () const { - if (!HasTransf()) return gp_Dir(theXAxis ^ theZAxis); - else - { - gp_XYZ tmp = theXAxis ^ theZAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(tmp); - return gp_Dir(tmp); - } + if (!HasTransf()) + return gp_Dir(theXAxis ^ theZAxis); + + gp_XYZ tmp = theXAxis ^ theZAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(tmp); + return gp_Dir(tmp); } - gp_Dir IGESSolid_RightAngularWedge::ZAxis () const +gp_Dir IGESSolid_RightAngularWedge::ZAxis () const { return gp_Dir(theZAxis); } - gp_Dir IGESSolid_RightAngularWedge::TransformedZAxis () const +gp_Dir IGESSolid_RightAngularWedge::TransformedZAxis () const +{ + if (!HasTransf()) + return gp_Dir(theZAxis); + + gp_XYZ tmp = theZAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(tmp); + return gp_Dir(tmp); +} + +void IGESSolid_RightAngularWedge::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - if (!HasTransf()) return gp_Dir(theZAxis); - else - { - gp_XYZ tmp = theZAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(tmp); - return gp_Dir(tmp); - } + const Standard_Real eps = 1.E-04; + const Standard_Real prosca = XAxis() * ZAxis(); + if (prosca < -eps || prosca > eps) + theCheck->AddFail("Local Z axis : Not orthogonal to X axis"); + if (Size().X() <= 0. || Size().Y() <= 0. || Size().Z() <= 0.) + theCheck->AddFail("Size : Values are not positive"); + if (XSmallLength() <= 0.0) + theCheck->AddFail("Small X Length : Not Positive"); + if (XSmallLength() >= Size().X()) + theCheck->AddFail("Small X Length : Value not < LX"); } diff --git a/src/IGESSolid/IGESSolid_RightAngularWedge.hxx b/src/IGESSolid/IGESSolid_RightAngularWedge.hxx index 60c28679c7..fab8649150 100644 --- a/src/IGESSolid/IGESSolid_RightAngularWedge.hxx +++ b/src/IGESSolid/IGESSolid_RightAngularWedge.hxx @@ -17,13 +17,8 @@ #ifndef _IGESSolid_RightAngularWedge_HeaderFile #define _IGESSolid_RightAngularWedge_HeaderFile -#include -#include - #include -#include #include -class gp_XYZ; class gp_Pnt; class gp_Dir; @@ -36,11 +31,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_RightAngularWedge, IGESData_IGESEntity) //! A right angular wedge is a triangular/trapezoidal prism class IGESSolid_RightAngularWedge : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_RightAngularWedge(); + IGESSolid_RightAngularWedge() {} //! This method is used to set the fields of the class //! RightAngularWedge @@ -55,20 +48,20 @@ public: Standard_EXPORT void Init (const gp_XYZ& aSize, const Standard_Real lowX, const gp_XYZ& aCorner, const gp_XYZ& anXAxis, const gp_XYZ& anZAxis); //! returns the size - Standard_EXPORT gp_XYZ Size() const; - + const gp_XYZ & Size() const { return theSize; } + //! returns the length along the local X-axis - Standard_EXPORT Standard_Real XBigLength() const; - + Standard_Real XBigLength() const { return theSize.X(); } + //! returns the smaller length along the local X-direction at Y=LY - Standard_EXPORT Standard_Real XSmallLength() const; - + Standard_Real XSmallLength() const { return theXSmallLength; } + //! returns the length along the local Y-axis - Standard_EXPORT Standard_Real YLength() const; - + Standard_Real YLength() const { return theSize.Y(); } + //! returns the length along the local Z-axis - Standard_EXPORT Standard_Real ZLength() const; - + Standard_Real ZLength() const { return theSize.Z(); } + //! returns the corner point coordinates Standard_EXPORT gp_Pnt Corner() const; @@ -98,32 +91,17 @@ public: //! after applying the TransformationMatrix Standard_EXPORT gp_Dir TransformedZAxis() const; - - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_RightAngularWedge,IGESData_IGESEntity) -protected: - - - - -private: - + private: gp_XYZ theSize; Standard_Real theXSmallLength; gp_XYZ theCorner; gp_XYZ theXAxis; gp_XYZ theZAxis; - - }; - - - - - - #endif // _IGESSolid_RightAngularWedge_HeaderFile diff --git a/src/IGESSolid/IGESSolid_SelectedComponent.cxx b/src/IGESSolid/IGESSolid_SelectedComponent.cxx index 96d64ad44e..8503ed83d4 100644 --- a/src/IGESSolid/IGESSolid_SelectedComponent.cxx +++ b/src/IGESSolid/IGESSolid_SelectedComponent.cxx @@ -21,14 +21,11 @@ #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_SelectedComponent,IGESData_IGESEntity) -IGESSolid_SelectedComponent::IGESSolid_SelectedComponent () { } - - - void IGESSolid_SelectedComponent::Init +void IGESSolid_SelectedComponent::Init (const Handle(IGESSolid_BooleanTree)& anEntity, const gp_XYZ& SelectPnt) { theEntity = anEntity; @@ -36,23 +33,22 @@ IGESSolid_SelectedComponent::IGESSolid_SelectedComponent () { } InitTypeAndForm(182,0); } - Handle(IGESSolid_BooleanTree) IGESSolid_SelectedComponent::Component () const +gp_Pnt IGESSolid_SelectedComponent::SelectPoint () const { - return theEntity; + return gp_Pnt(theSelectPoint); } - gp_Pnt IGESSolid_SelectedComponent::SelectPoint () const +gp_Pnt IGESSolid_SelectedComponent::TransformedSelectPoint () const { - return gp_Pnt(theSelectPoint); + if (!HasTransf()) + return gp_Pnt(theSelectPoint); + + gp_XYZ tmp = theSelectPoint; + Location().Transforms(tmp); + return gp_Pnt(tmp); } - gp_Pnt IGESSolid_SelectedComponent::TransformedSelectPoint () const +void IGESSolid_SelectedComponent::OwnShared(Interface_EntityIterator &theIter) const { - if (!HasTransf()) return gp_Pnt(theSelectPoint); - else - { - gp_XYZ tmp = theSelectPoint; - Location().Transforms(tmp); - return gp_Pnt(tmp); - } + theIter.GetOneItem(Component()); } diff --git a/src/IGESSolid/IGESSolid_SelectedComponent.hxx b/src/IGESSolid/IGESSolid_SelectedComponent.hxx index 71352a0367..878b746cc4 100644 --- a/src/IGESSolid/IGESSolid_SelectedComponent.hxx +++ b/src/IGESSolid/IGESSolid_SelectedComponent.hxx @@ -17,13 +17,9 @@ #ifndef _IGESSolid_SelectedComponent_HeaderFile #define _IGESSolid_SelectedComponent_HeaderFile -#include -#include - #include #include class IGESSolid_BooleanTree; -class gp_XYZ; class gp_Pnt; @@ -36,11 +32,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_SelectedComponent, IGESData_IGESEntity) //! selecting one component of a disjoint CSG solid class IGESSolid_SelectedComponent : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_SelectedComponent(); + IGESSolid_SelectedComponent() {} //! This method is used to set the fields of the class //! SelectedComponent @@ -49,7 +43,7 @@ public: Standard_EXPORT void Init (const Handle(IGESSolid_BooleanTree)& anEntity, const gp_XYZ& selectPnt); //! returns the Boolean tree entity - Standard_EXPORT Handle(IGESSolid_BooleanTree) Component() const; + const Handle(IGESSolid_BooleanTree) & Component() const { return theEntity; } //! returns the point on/in the selected component Standard_EXPORT gp_Pnt SelectPoint() const; @@ -58,29 +52,14 @@ public: //! after applying TransformationMatrix Standard_EXPORT gp_Pnt TransformedSelectPoint() const; - - + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_SelectedComponent,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESSolid_BooleanTree) theEntity; gp_XYZ theSelectPoint; - - }; - - - - - - #endif // _IGESSolid_SelectedComponent_HeaderFile diff --git a/src/IGESSolid/IGESSolid_Shell.cxx b/src/IGESSolid/IGESSolid_Shell.cxx index aaecb64aa1..f1e7f0bd6f 100644 --- a/src/IGESSolid/IGESSolid_Shell.cxx +++ b/src/IGESSolid/IGESSolid_Shell.cxx @@ -20,14 +20,12 @@ #include #include #include -#include +#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Shell,IGESData_IGESEntity) -IGESSolid_Shell::IGESSolid_Shell () { } - - - void IGESSolid_Shell::Init +void IGESSolid_Shell::Init (const Handle(IGESSolid_HArray1OfFace)& Faces, const Handle(TColStd_HArray1OfInteger)& Orient) { @@ -40,25 +38,38 @@ IGESSolid_Shell::IGESSolid_Shell () { } InitTypeAndForm(514,1); } - Standard_Boolean IGESSolid_Shell::IsClosed () const - { return (FormNumber() == 1); } - - void IGESSolid_Shell::SetClosed (const Standard_Boolean closed) - { InitTypeAndForm(514, (closed ? 1 : 2)); } +Standard_Boolean IGESSolid_Shell::IsClosed () const +{ return (FormNumber() == 1); } +void IGESSolid_Shell::SetClosed (const Standard_Boolean closed) +{ InitTypeAndForm(514, (closed ? 1 : 2)); } - Standard_Integer IGESSolid_Shell::NbFaces () const +Standard_Integer IGESSolid_Shell::NbFaces () const { return theFaces->Length(); } - Handle(IGESSolid_Face) IGESSolid_Shell::Face (const Standard_Integer Index) const +const Handle(IGESSolid_Face) & IGESSolid_Shell::Face (const Standard_Integer Index) const { return theFaces->Value(Index); } - Standard_Boolean IGESSolid_Shell::Orientation - (const Standard_Integer Index) const +Standard_Boolean IGESSolid_Shell::Orientation (const Standard_Integer Index) const { return (theOrientation->Value(Index) != 0); } + +void IGESSolid_Shell::OwnShared(Interface_EntityIterator &theIter) const +{ + const Standard_Integer nbfaces = theFaces->Length(); + for (Standard_Integer i = 1; i <= nbfaces; i ++) + theIter.GetOneItem(theFaces->Value(i)); +} + +void IGESSolid_Shell::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const +{ + if (NbFaces() <= 0) { + Message_Msg Msg200("XSTEP_200"); + theCheck->SendFail(Msg200); + } +} diff --git a/src/IGESSolid/IGESSolid_Shell.hxx b/src/IGESSolid/IGESSolid_Shell.hxx index b296c18ae2..dcc5135820 100644 --- a/src/IGESSolid/IGESSolid_Shell.hxx +++ b/src/IGESSolid/IGESSolid_Shell.hxx @@ -17,16 +17,9 @@ #ifndef _IGESSolid_Shell_HeaderFile #define _IGESSolid_Shell_HeaderFile -#include -#include - #include #include #include -#include -#include -class Standard_DimensionMismatch; -class Standard_OutOfRange; class IGESSolid_Face; @@ -42,11 +35,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_Shell, IGESData_IGESEntity) //! From IGES-5.3, Form can be <1> for Closed or <2> for Open class IGESSolid_Shell : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_Shell(); + IGESSolid_Shell() {} //! This method is used to set the fields of the class Shell //! - allFaces : the faces comprising the shell @@ -66,36 +57,23 @@ public: //! returns the Index'th face entity of the shell //! raises exception if Index <= 0 or Index > NbFaces() - Standard_EXPORT Handle(IGESSolid_Face) Face (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESSolid_Face) & Face (const Standard_Integer Index) const; //! returns the orientation of Index'th face w.r.t the direction of //! the underlying surface //! raises exception if Index <= 0 or Index > NbFaces() Standard_EXPORT Standard_Boolean Orientation (const Standard_Integer Index) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_Shell,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESSolid_HArray1OfFace) theFaces; Handle(TColStd_HArray1OfInteger) theOrientation; - - }; - - - - - - #endif // _IGESSolid_Shell_HeaderFile diff --git a/src/IGESSolid/IGESSolid_SolidAssembly.cxx b/src/IGESSolid/IGESSolid_SolidAssembly.cxx index 628576a068..9efdf1f039 100644 --- a/src/IGESSolid/IGESSolid_SolidAssembly.cxx +++ b/src/IGESSolid/IGESSolid_SolidAssembly.cxx @@ -16,19 +16,15 @@ //-------------------------------------------------------------------- //-------------------------------------------------------------------- -#include #include #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_SolidAssembly,IGESData_IGESEntity) -IGESSolid_SolidAssembly::IGESSolid_SolidAssembly () { } - - - void IGESSolid_SolidAssembly::Init +void IGESSolid_SolidAssembly::Init (const Handle(IGESData_HArray1OfIGESEntity)& Items, const Handle(IGESGeom_HArray1OfTransformationMatrix)& Matrices) { @@ -41,26 +37,31 @@ IGESSolid_SolidAssembly::IGESSolid_SolidAssembly () { } InitTypeAndForm(184,0); } - Standard_Boolean IGESSolid_SolidAssembly::HasBrep () const - { return (FormNumber() == 1); } - - void IGESSolid_SolidAssembly::SetBrep (const Standard_Boolean hasbrep) - { InitTypeAndForm(184, (hasbrep ? 1 : 0)); } +Standard_Boolean IGESSolid_SolidAssembly::HasBrep () const +{ return (FormNumber() == 1); } +void IGESSolid_SolidAssembly::SetBrep (const Standard_Boolean hasbrep) +{ InitTypeAndForm(184, (hasbrep ? 1 : 0)); } - Standard_Integer IGESSolid_SolidAssembly::NbItems () const +Standard_Integer IGESSolid_SolidAssembly::NbItems () const { return theItems->Length(); } - Handle(IGESData_IGESEntity) IGESSolid_SolidAssembly::Item - (const Standard_Integer Index) const +const Handle(IGESData_IGESEntity) & IGESSolid_SolidAssembly::Item (const Standard_Integer Index) const { return theItems->Value(Index); } - Handle(IGESGeom_TransformationMatrix) IGESSolid_SolidAssembly::TransfMatrix - (const Standard_Integer Index) const +const Handle(IGESGeom_TransformationMatrix) & IGESSolid_SolidAssembly::TransfMatrix (const Standard_Integer Index) const { return theMatrices->Value(Index); } + +void IGESSolid_SolidAssembly::OwnShared(Interface_EntityIterator &theIter) const +{ + const Standard_Integer nbitems = theItems->Length(); + Standard_Integer i; + for (i = 1; i <= nbitems; i ++) theIter.GetOneItem(theItems->Value(i)); + for (i = 1; i <= nbitems; i ++) theIter.GetOneItem(theMatrices->Value(i)); +} diff --git a/src/IGESSolid/IGESSolid_SolidAssembly.hxx b/src/IGESSolid/IGESSolid_SolidAssembly.hxx index a5fa1266ab..ee1918e453 100644 --- a/src/IGESSolid/IGESSolid_SolidAssembly.hxx +++ b/src/IGESSolid/IGESSolid_SolidAssembly.hxx @@ -17,17 +17,9 @@ #ifndef _IGESSolid_SolidAssembly_HeaderFile #define _IGESSolid_SolidAssembly_HeaderFile -#include -#include - #include #include #include -#include -#include -class Standard_DimensionMismatch; -class Standard_OutOfRange; -class IGESData_IGESEntity; class IGESGeom_TransformationMatrix; @@ -44,11 +36,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_SolidAssembly, IGESData_IGESEntity) //! other Assemblies class IGESSolid_SolidAssembly : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_SolidAssembly(); + IGESSolid_SolidAssembly() {} //! This method is used to set the fields of the class //! SolidAssembly @@ -71,35 +61,20 @@ public: //! returns the Index'th item //! raises exception if Index <= 0 or Index > NbItems() - Standard_EXPORT Handle(IGESData_IGESEntity) Item (const Standard_Integer Index) const; + Standard_EXPORT const Handle(IGESData_IGESEntity) & Item (const Standard_Integer Index) const; //! returns the transformation matrix of the Index'th item //! raises exception if Index <= 0 or Index > NbItems() - Standard_EXPORT Handle(IGESGeom_TransformationMatrix) TransfMatrix (const Standard_Integer Index) const; - - + Standard_EXPORT const Handle(IGESGeom_TransformationMatrix) & TransfMatrix (const Standard_Integer Index) const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_SolidAssembly,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESData_HArray1OfIGESEntity) theItems; Handle(IGESGeom_HArray1OfTransformationMatrix) theMatrices; - - }; - - - - - - #endif // _IGESSolid_SolidAssembly_HeaderFile diff --git a/src/IGESSolid/IGESSolid_SolidInstance.cxx b/src/IGESSolid/IGESSolid_SolidInstance.cxx index 62fedb48d6..a141942c01 100644 --- a/src/IGESSolid/IGESSolid_SolidInstance.cxx +++ b/src/IGESSolid/IGESSolid_SolidInstance.cxx @@ -18,27 +18,24 @@ #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_SolidInstance,IGESData_IGESEntity) -IGESSolid_SolidInstance::IGESSolid_SolidInstance () { } - - - void IGESSolid_SolidInstance::Init +void IGESSolid_SolidInstance::Init (const Handle(IGESData_IGESEntity)& anEntity) { theEntity = anEntity; InitTypeAndForm(430,0); } - Standard_Boolean IGESSolid_SolidInstance::IsBrep () const - { return (FormNumber() == 1); } +Standard_Boolean IGESSolid_SolidInstance::IsBrep () const +{ return (FormNumber() == 1); } - void IGESSolid_SolidInstance::SetBrep (const Standard_Boolean brep) - { InitTypeAndForm(430, (brep ? 1 : 0)); } +void IGESSolid_SolidInstance::SetBrep (const Standard_Boolean brep) +{ InitTypeAndForm(430, (brep ? 1 : 0)); } - Handle(IGESData_IGESEntity) IGESSolid_SolidInstance::Entity () const +void IGESSolid_SolidInstance::OwnShared(Interface_EntityIterator &theIter) const { - return theEntity; + theIter.GetOneItem(Entity()); } diff --git a/src/IGESSolid/IGESSolid_SolidInstance.hxx b/src/IGESSolid/IGESSolid_SolidInstance.hxx index b7901a39ed..4777f3c33f 100644 --- a/src/IGESSolid/IGESSolid_SolidInstance.hxx +++ b/src/IGESSolid/IGESSolid_SolidInstance.hxx @@ -17,13 +17,7 @@ #ifndef _IGESSolid_SolidInstance_HeaderFile #define _IGESSolid_SolidInstance_HeaderFile -#include -#include - #include -#include -class IGESData_IGESEntity; - class IGESSolid_SolidInstance; DEFINE_STANDARD_HANDLE(IGESSolid_SolidInstance, IGESData_IGESEntity) @@ -37,11 +31,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_SolidInstance, IGESData_IGESEntity) //! Else it is for a Boolean Tree, Primitive, other Solid Inst. class IGESSolid_SolidInstance : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_SolidInstance(); + IGESSolid_SolidInstance() {} //! This method is used to set the fields of the class //! SolidInstance @@ -56,30 +48,15 @@ public: Standard_EXPORT void SetBrep (const Standard_Boolean brep); //! returns the solid entity - Standard_EXPORT Handle(IGESData_IGESEntity) Entity() const; - - + const Handle(IGESData_IGESEntity) & Entity() const { return theEntity; } + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_SolidInstance,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESData_IGESEntity) theEntity; - - }; - - - - - - #endif // _IGESSolid_SolidInstance_HeaderFile diff --git a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.cxx b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.cxx index 94cfdfd101..1eaae00023 100644 --- a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.cxx +++ b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.cxx @@ -18,17 +18,12 @@ #include #include -#include -#include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_SolidOfLinearExtrusion,IGESData_IGESEntity) -IGESSolid_SolidOfLinearExtrusion::IGESSolid_SolidOfLinearExtrusion () { } - - - void IGESSolid_SolidOfLinearExtrusion::Init +void IGESSolid_SolidOfLinearExtrusion::Init (const Handle(IGESData_IGESEntity)& aCurve, const Standard_Real Length, const gp_XYZ& Direction) { @@ -38,22 +33,12 @@ IGESSolid_SolidOfLinearExtrusion::IGESSolid_SolidOfLinearExtrusion () { } InitTypeAndForm(164,0); } - Handle(IGESData_IGESEntity) IGESSolid_SolidOfLinearExtrusion::Curve () const -{ - return theCurve; -} - - Standard_Real IGESSolid_SolidOfLinearExtrusion::ExtrusionLength () const -{ - return theLength; -} - - gp_Dir IGESSolid_SolidOfLinearExtrusion::ExtrusionDirection () const +gp_Dir IGESSolid_SolidOfLinearExtrusion::ExtrusionDirection () const { return gp_Dir(theDirection); } - gp_Dir IGESSolid_SolidOfLinearExtrusion::TransformedExtrusionDirection () const +gp_Dir IGESSolid_SolidOfLinearExtrusion::TransformedExtrusionDirection () const { if (!HasTransf()) return gp_Dir(theDirection); else @@ -65,3 +50,14 @@ IGESSolid_SolidOfLinearExtrusion::IGESSolid_SolidOfLinearExtrusion () { } return gp_Dir(tmp); } } + +void IGESSolid_SolidOfLinearExtrusion::OwnShared(Interface_EntityIterator &theIter) const +{ + theIter.GetOneItem(Curve()); +} + +void IGESSolid_SolidOfLinearExtrusion::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const +{ + if (ExtrusionLength() <= 0.0) + theCheck->AddFail("Length of extrusion : Not Positive"); +} diff --git a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx index 00aa5af357..2bb09de33c 100644 --- a/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx +++ b/src/IGESSolid/IGESSolid_SolidOfLinearExtrusion.hxx @@ -17,14 +17,8 @@ #ifndef _IGESSolid_SolidOfLinearExtrusion_HeaderFile #define _IGESSolid_SolidOfLinearExtrusion_HeaderFile -#include -#include - -#include #include #include -class IGESData_IGESEntity; -class gp_XYZ; class gp_Dir; @@ -37,11 +31,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_SolidOfLinearExtrusion, IGESData_IGESEntity) //! area determined by a planar curve class IGESSolid_SolidOfLinearExtrusion : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_SolidOfLinearExtrusion(); + IGESSolid_SolidOfLinearExtrusion() {} //! This method is used to set the fields of the class //! SolidOfLinearExtrusion @@ -52,41 +44,28 @@ public: Standard_EXPORT void Init (const Handle(IGESData_IGESEntity)& aCurve, const Standard_Real aLength, const gp_XYZ& aDirection); //! returns the planar curve that is to be translated - Standard_EXPORT Handle(IGESData_IGESEntity) Curve() const; - + const Handle(IGESData_IGESEntity) & Curve() const { return theCurve; } + //! returns the Extrusion Length - Standard_EXPORT Standard_Real ExtrusionLength() const; - + Standard_Real ExtrusionLength() const { return theLength; } + //! returns the Extrusion direction Standard_EXPORT gp_Dir ExtrusionDirection() const; //! returns ExtrusionDirection after applying TransformationMatrix Standard_EXPORT gp_Dir TransformedExtrusionDirection() const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_SolidOfLinearExtrusion,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESData_IGESEntity) theCurve; Standard_Real theLength; gp_XYZ theDirection; - - }; - - - - - - #endif // _IGESSolid_SolidOfLinearExtrusion_HeaderFile diff --git a/src/IGESSolid/IGESSolid_SolidOfRevolution.cxx b/src/IGESSolid/IGESSolid_SolidOfRevolution.cxx index 55eef08c98..c33fe0be97 100644 --- a/src/IGESSolid/IGESSolid_SolidOfRevolution.cxx +++ b/src/IGESSolid/IGESSolid_SolidOfRevolution.cxx @@ -19,17 +19,12 @@ #include #include #include -#include -#include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_SolidOfRevolution,IGESData_IGESEntity) -IGESSolid_SolidOfRevolution::IGESSolid_SolidOfRevolution () { } - - - void IGESSolid_SolidOfRevolution::Init +void IGESSolid_SolidOfRevolution::Init (const Handle(IGESData_IGESEntity)& aCurve, const Standard_Real Fract, const gp_XYZ& AxisPnt, const gp_XYZ& Direction) { @@ -41,57 +36,55 @@ IGESSolid_SolidOfRevolution::IGESSolid_SolidOfRevolution () { } // Form 0 : Curve closed to Axis; Form 1 : Curve closed to itself } - void IGESSolid_SolidOfRevolution::SetClosedToAxis (const Standard_Boolean F) +void IGESSolid_SolidOfRevolution::SetClosedToAxis (const Standard_Boolean F) { InitTypeAndForm(162, (F ? 0 : 1)); } - Standard_Boolean IGESSolid_SolidOfRevolution::IsClosedToAxis () const +Standard_Boolean IGESSolid_SolidOfRevolution::IsClosedToAxis () const { return (FormNumber() == 0); } - - Handle(IGESData_IGESEntity) IGESSolid_SolidOfRevolution::Curve () const +gp_Pnt IGESSolid_SolidOfRevolution::AxisPoint () const { - return theCurve; + return gp_Pnt(theAxisPoint); } - Standard_Real IGESSolid_SolidOfRevolution::Fraction () const +gp_Pnt IGESSolid_SolidOfRevolution::TransformedAxisPoint () const { - return theFraction; + if (!HasTransf()) + return gp_Pnt(theAxisPoint); + + gp_XYZ tmp = theAxisPoint; + Location().Transforms(tmp); + return gp_Pnt(tmp); } - gp_Pnt IGESSolid_SolidOfRevolution::AxisPoint () const +gp_Dir IGESSolid_SolidOfRevolution::Axis () const { - return gp_Pnt(theAxisPoint); + return gp_Dir(theAxis); } - gp_Pnt IGESSolid_SolidOfRevolution::TransformedAxisPoint () const +gp_Dir IGESSolid_SolidOfRevolution::TransformedAxis () const { - if (!HasTransf()) return gp_Pnt(theAxisPoint); - else - { - gp_XYZ tmp = theAxisPoint; - Location().Transforms(tmp); - return gp_Pnt(tmp); - } + if (!HasTransf()) + return gp_Dir(theAxis); + + gp_XYZ tmp = theAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(tmp); + return gp_Dir(tmp); } - gp_Dir IGESSolid_SolidOfRevolution::Axis () const +void IGESSolid_SolidOfRevolution::OwnShared(Interface_EntityIterator &theIter) const { - return gp_Dir(theAxis); + theIter.GetOneItem(Curve()); } - gp_Dir IGESSolid_SolidOfRevolution::TransformedAxis () const +void IGESSolid_SolidOfRevolution::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - if (!HasTransf()) return gp_Dir(theAxis); - else - { - gp_XYZ tmp = theAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(tmp); - return gp_Dir(tmp); - } + if (Fraction() <= 0. || Fraction() > 1.) + theCheck->AddFail("Fraction of rotation : Incorrect value"); } diff --git a/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx b/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx index d24e6113ab..d0a0efb387 100644 --- a/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx +++ b/src/IGESSolid/IGESSolid_SolidOfRevolution.hxx @@ -17,15 +17,8 @@ #ifndef _IGESSolid_SolidOfRevolution_HeaderFile #define _IGESSolid_SolidOfRevolution_HeaderFile -#include -#include - -#include #include #include -#include -class IGESData_IGESEntity; -class gp_XYZ; class gp_Pnt; class gp_Dir; @@ -40,11 +33,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_SolidOfRevolution, IGESData_IGESEntity) //! fraction of full rotation. class IGESSolid_SolidOfRevolution : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_SolidOfRevolution(); + IGESSolid_SolidOfRevolution() {} //! This method is used to set the fields of the class //! SolidOfRevolution @@ -64,12 +55,12 @@ public: Standard_EXPORT Standard_Boolean IsClosedToAxis() const; //! returns the curve entity that is to be revolved - Standard_EXPORT Handle(IGESData_IGESEntity) Curve() const; - + const Handle(IGESData_IGESEntity) & Curve() const { return theCurve; } + //! returns the fraction of full rotation that the curve is to //! be rotated - Standard_EXPORT Standard_Real Fraction() const; - + Standard_Real Fraction() const { return theFraction; } + //! returns the point on the axis Standard_EXPORT gp_Pnt AxisPoint() const; @@ -83,31 +74,18 @@ public: //! TransformationMatrix Standard_EXPORT gp_Dir TransformedAxis() const; + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_SolidOfRevolution,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESData_IGESEntity) theCurve; Standard_Real theFraction; gp_XYZ theAxisPoint; gp_XYZ theAxis; - - }; - - - - - - #endif // _IGESSolid_SolidOfRevolution_HeaderFile diff --git a/src/IGESSolid/IGESSolid_Sphere.cxx b/src/IGESSolid/IGESSolid_Sphere.cxx index bb87d3e7c0..baad3520b7 100644 --- a/src/IGESSolid/IGESSolid_Sphere.cxx +++ b/src/IGESSolid/IGESSolid_Sphere.cxx @@ -18,16 +18,11 @@ #include #include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Sphere,IGESData_IGESEntity) -IGESSolid_Sphere::IGESSolid_Sphere () { } - - - void IGESSolid_Sphere::Init +void IGESSolid_Sphere::Init (const Standard_Real aRadius, const gp_XYZ& aCenter) { theRadius = aRadius; @@ -35,23 +30,23 @@ IGESSolid_Sphere::IGESSolid_Sphere () { } InitTypeAndForm(158,0); } - Standard_Real IGESSolid_Sphere::Radius () const +gp_Pnt IGESSolid_Sphere::Center () const { - return theRadius; + return gp_Pnt(theCenter); } - gp_Pnt IGESSolid_Sphere::Center () const +gp_Pnt IGESSolid_Sphere::TransformedCenter () const { - return gp_Pnt(theCenter); + if (!HasTransf()) + return gp_Pnt(theCenter); + + gp_XYZ tmp = theCenter; + Location().Transforms(tmp); + return gp_Pnt(tmp); } - gp_Pnt IGESSolid_Sphere::TransformedCenter () const +void IGESSolid_Sphere::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - if (!HasTransf()) return gp_Pnt(theCenter); - else - { - gp_XYZ tmp = theCenter; - Location().Transforms(tmp); - return gp_Pnt(tmp); - } + if (Radius() <= 0.0) + theCheck->AddFail("Radius : Not Positive"); } diff --git a/src/IGESSolid/IGESSolid_Sphere.hxx b/src/IGESSolid/IGESSolid_Sphere.hxx index ae5cedf13f..1543a0ad07 100644 --- a/src/IGESSolid/IGESSolid_Sphere.hxx +++ b/src/IGESSolid/IGESSolid_Sphere.hxx @@ -17,13 +17,8 @@ #ifndef _IGESSolid_Sphere_HeaderFile #define _IGESSolid_Sphere_HeaderFile -#include -#include - -#include #include #include -class gp_XYZ; class gp_Pnt; @@ -35,11 +30,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_Sphere, IGESData_IGESEntity) //! This defines a sphere with a center and radius class IGESSolid_Sphere : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_Sphere(); + IGESSolid_Sphere() {} //! This method is used to set the fields of the class Sphere //! - aRadius : the radius of the sphere @@ -47,8 +40,8 @@ public: Standard_EXPORT void Init (const Standard_Real aRadius, const gp_XYZ& aCenter); //! returns the radius of the sphere - Standard_EXPORT Standard_Real Radius() const; - + Standard_Real Radius() const { return theRadius; } + //! returns the center of the sphere Standard_EXPORT gp_Pnt Center() const; @@ -56,29 +49,14 @@ public: //! TransformationMatrix Standard_EXPORT gp_Pnt TransformedCenter() const; - - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_Sphere,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Real theRadius; gp_XYZ theCenter; - - }; - - - - - - #endif // _IGESSolid_Sphere_HeaderFile diff --git a/src/IGESSolid/IGESSolid_SphericalSurface.cxx b/src/IGESSolid/IGESSolid_SphericalSurface.cxx index 352eb2f928..1ab5173c9e 100644 --- a/src/IGESSolid/IGESSolid_SphericalSurface.cxx +++ b/src/IGESSolid/IGESSolid_SphericalSurface.cxx @@ -21,14 +21,11 @@ #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_SphericalSurface,IGESData_IGESEntity) -IGESSolid_SphericalSurface::IGESSolid_SphericalSurface () { } - - - void IGESSolid_SphericalSurface::Init +void IGESSolid_SphericalSurface::Init (const Handle(IGESGeom_Point)& aCenter, const Standard_Real aRadius, const Handle(IGESGeom_Direction)& anAxis, @@ -41,38 +38,28 @@ IGESSolid_SphericalSurface::IGESSolid_SphericalSurface () { } InitTypeAndForm(196, (theRefDir.IsNull() ? 0 : 1) ); } - Handle(IGESGeom_Point) IGESSolid_SphericalSurface::Center () const -{ - return theCenter; -} - - gp_Pnt IGESSolid_SphericalSurface::TransformedCenter () const +gp_Pnt IGESSolid_SphericalSurface::TransformedCenter () const { - if (!HasTransf()) return theCenter->Value(); - else - { - gp_XYZ tmp = (theCenter->Value()).XYZ(); - Location().Transforms(tmp); - return gp_Pnt(tmp); - } -} + if (!HasTransf()) + return theCenter->Value(); - Standard_Real IGESSolid_SphericalSurface::Radius () const -{ - return theRadius; -} - - Handle(IGESGeom_Direction) IGESSolid_SphericalSurface::Axis () const -{ - return theAxis; + gp_XYZ tmp = (theCenter->Value()).XYZ(); + Location().Transforms(tmp); + return gp_Pnt(tmp); } - Handle(IGESGeom_Direction) IGESSolid_SphericalSurface::ReferenceDir () const +void IGESSolid_SphericalSurface::OwnShared(Interface_EntityIterator &theIter) const { - return theRefDir; + theIter.GetOneItem(Center()); + theIter.GetOneItem(Axis()); + theIter.GetOneItem(ReferenceDir()); } - Standard_Boolean IGESSolid_SphericalSurface::IsParametrised () const +void IGESSolid_SphericalSurface::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return !(theRefDir.IsNull()); + if (Radius() <= 0.0) + theCheck->AddFail("Radius : Not Positive"); + const Standard_Integer fn = (IsParametrised()? 1 : 0); + if (fn != FormNumber()) theCheck->AddFail("Parametrised Status Mismatches with Form Number"); + if (Axis().IsNull() && IsParametrised()) theCheck->AddFail("Parametrised Spherical Surface : no Axis is defined"); } diff --git a/src/IGESSolid/IGESSolid_SphericalSurface.hxx b/src/IGESSolid/IGESSolid_SphericalSurface.hxx index 62eb85b9f7..25e28eb5f4 100644 --- a/src/IGESSolid/IGESSolid_SphericalSurface.hxx +++ b/src/IGESSolid/IGESSolid_SphericalSurface.hxx @@ -17,12 +17,7 @@ #ifndef _IGESSolid_SphericalSurface_HeaderFile #define _IGESSolid_SphericalSurface_HeaderFile -#include -#include - -#include #include -#include class IGESGeom_Point; class IGESGeom_Direction; class gp_Pnt; @@ -38,11 +33,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_SphericalSurface, IGESData_IGESEntity) //! reference direction is provided. class IGESSolid_SphericalSurface : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_SphericalSurface(); + IGESSolid_SphericalSurface() {} //! This method is used to set the fields of the class //! SphericalSurface @@ -55,51 +48,38 @@ public: Standard_EXPORT void Init (const Handle(IGESGeom_Point)& aCenter, const Standard_Real aRadius, const Handle(IGESGeom_Direction)& anAxis, const Handle(IGESGeom_Direction)& aRefdir); //! returns the center of the spherical surface - Standard_EXPORT Handle(IGESGeom_Point) Center() const; + const Handle(IGESGeom_Point) & Center() const { return theCenter; } //! returns the center of the spherical surface after applying //! TransformationMatrix Standard_EXPORT gp_Pnt TransformedCenter() const; //! returns the radius of the spherical surface - Standard_EXPORT Standard_Real Radius() const; - + Standard_Real Radius() const { return theRadius; } + //! returns the direction of the axis (Parametrised surface) //! Null is returned if the surface is not parametrised - Standard_EXPORT Handle(IGESGeom_Direction) Axis() const; + const Handle(IGESGeom_Direction) & Axis() const { return theAxis; } //! returns the reference direction (Parametrised surface) //! Null is returned if the surface is not parametrised - Standard_EXPORT Handle(IGESGeom_Direction) ReferenceDir() const; - - //! Returns True if the surface is parametrised, else False - Standard_EXPORT Standard_Boolean IsParametrised() const; + const Handle(IGESGeom_Direction) & ReferenceDir() const { return theRefDir; } + //! Returns True if the surface is parametrised, else False + Standard_Boolean IsParametrised() const { return !(theRefDir.IsNull()); } + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_SphericalSurface,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESGeom_Point) theCenter; Standard_Real theRadius; Handle(IGESGeom_Direction) theAxis; Handle(IGESGeom_Direction) theRefDir; - - }; - - - - - - #endif // _IGESSolid_SphericalSurface_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolBlock.cxx b/src/IGESSolid/IGESSolid_ToolBlock.cxx index e88e881924..07d8c23195 100644 --- a/src/IGESSolid/IGESSolid_ToolBlock.cxx +++ b/src/IGESSolid/IGESSolid_ToolBlock.cxx @@ -29,15 +29,11 @@ #include #include #include -#include #include #include #include #include -IGESSolid_ToolBlock::IGESSolid_ToolBlock () { } - - void IGESSolid_ToolBlock::ReadOwnParams (const Handle(IGESSolid_Block)& ent, const Handle(IGESData_IGESReaderData)& /* IR */, IGESData_ParamReader& PR) const @@ -146,19 +142,6 @@ void IGESSolid_ToolBlock::WriteOwnParams IW.Send(ent->ZAxis().Z()); } -void IGESSolid_ToolBlock::OwnShared - (const Handle(IGESSolid_Block)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESSolid_ToolBlock::OwnCopy - (const Handle(IGESSolid_Block)& another, - const Handle(IGESSolid_Block)& ent, Interface_CopyTool& /* TC */) const -{ - ent->Init(another->Size(), another->Corner().XYZ(), - another->XAxis().XYZ(), another->ZAxis().XYZ()); -} - IGESData_DirChecker IGESSolid_ToolBlock::DirChecker (const Handle(IGESSolid_Block)& /* ent */ ) const { @@ -171,18 +154,6 @@ IGESData_DirChecker IGESSolid_ToolBlock::DirChecker return DC; } -void IGESSolid_ToolBlock::OwnCheck - (const Handle(IGESSolid_Block)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - Standard_Real eps = 1.E-04; - Standard_Real prosca = ent->XAxis() * ent->ZAxis(); - if (prosca < -eps || prosca > eps) - ach->AddFail("Local Z axis : Not orthogonal to X axis"); - if (ent->Size().X() <= 0. || ent->Size().Y() <= 0. || ent->Size().Z() <= 0.) - ach->AddFail("Size : Not positive lengths"); -} - void IGESSolid_ToolBlock::OwnDump (const Handle(IGESSolid_Block)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolBlock.hxx b/src/IGESSolid/IGESSolid_ToolBlock.hxx index 1554a48717..40779f3032 100644 --- a/src/IGESSolid/IGESSolid_ToolBlock.hxx +++ b/src/IGESSolid/IGESSolid_ToolBlock.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolBlock { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolBlock, ready to work - Standard_EXPORT IGESSolid_ToolBlock(); + IGESSolid_ToolBlock() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_Block)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Block , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_Block)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_Block)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_Block)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_Block)& entfrom, const Handle(IGESSolid_Block)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_Block)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolBlock_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolBooleanTree.cxx b/src/IGESSolid/IGESSolid_ToolBooleanTree.cxx index 5ec8254f21..d704b75070 100644 --- a/src/IGESSolid/IGESSolid_ToolBooleanTree.cxx +++ b/src/IGESSolid/IGESSolid_ToolBooleanTree.cxx @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -36,8 +35,6 @@ #include #include -IGESSolid_ToolBooleanTree::IGESSolid_ToolBooleanTree () { } - void IGESSolid_ToolBooleanTree::ReadOwnParams (const Handle(IGESSolid_BooleanTree)& ent, @@ -100,43 +97,6 @@ void IGESSolid_ToolBooleanTree::WriteOwnParams } } -void IGESSolid_ToolBooleanTree::OwnShared - (const Handle(IGESSolid_BooleanTree)& ent, Interface_EntityIterator& iter) const -{ - Standard_Integer length = ent->Length(); - for (Standard_Integer i = 1; i <= length; i++) - { - if (ent->IsOperand(i)) iter.GetOneItem(ent->Operand(i)); - } -} - -void IGESSolid_ToolBooleanTree::OwnCopy - (const Handle(IGESSolid_BooleanTree)& another, - const Handle(IGESSolid_BooleanTree)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer i; - - Standard_Integer length = another->Length(); - Handle(TColStd_HArray1OfInteger) tempOperations = - new TColStd_HArray1OfInteger(1, length); - Handle(IGESData_HArray1OfIGESEntity) tempOperands = - new IGESData_HArray1OfIGESEntity(1, length); - - for (i=1; i<= length; i++) - { - if (another->IsOperand(i)) // Operand - { - DeclareAndCast(IGESData_IGESEntity, new_ent, - TC.Transferred(another->Operand(i))); - tempOperands->SetValue(i, new_ent); - } - else // Operation - tempOperations->SetValue(i, another->Operation(i)); - } - ent->Init (tempOperands, tempOperations); - -} - IGESData_DirChecker IGESSolid_ToolBooleanTree::DirChecker (const Handle(IGESSolid_BooleanTree)& /*ent*/) const { @@ -150,28 +110,6 @@ IGESData_DirChecker IGESSolid_ToolBooleanTree::DirChecker return DC; } -void IGESSolid_ToolBooleanTree::OwnCheck - (const Handle(IGESSolid_BooleanTree)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - Standard_Integer length = ent->Length(); - if (length <= 2) - ach->AddFail("Length of post-order notation : Less than three"); - else { - if (!ent->IsOperand(1)) ach->AddFail("First Item is not an Operand"); - if (!ent->IsOperand(2)) ach->AddFail("Second Item is not an Operand"); - if ( ent->IsOperand(length)) ach->AddFail("Last Item is not an Operation"); - } - for (Standard_Integer i = 1; i <= length; i ++) { - if (!ent->Operand(i).IsNull()) continue; - if (ent->Operation(i) < 1 || ent->Operation(i) > 3) { - char mess[80]; - sprintf(mess,"Item no. %d Incorrect",i); - ach->AddFail(mess); - } - } -} - void IGESSolid_ToolBooleanTree::OwnDump (const Handle(IGESSolid_BooleanTree)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolBooleanTree.hxx b/src/IGESSolid/IGESSolid_ToolBooleanTree.hxx index 9c0796c288..d67bfb2832 100644 --- a/src/IGESSolid/IGESSolid_ToolBooleanTree.hxx +++ b/src/IGESSolid/IGESSolid_ToolBooleanTree.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolBooleanTree { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolBooleanTree, ready to work - Standard_EXPORT IGESSolid_ToolBooleanTree(); + IGESSolid_ToolBooleanTree() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_BooleanTree)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a BooleanTree , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_BooleanTree)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_BooleanTree)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_BooleanTree)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_BooleanTree)& entfrom, const Handle(IGESSolid_BooleanTree)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_BooleanTree)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolBooleanTree_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolConeFrustum.cxx b/src/IGESSolid/IGESSolid_ToolConeFrustum.cxx index bf11166e88..e798b3effc 100644 --- a/src/IGESSolid/IGESSolid_ToolConeFrustum.cxx +++ b/src/IGESSolid/IGESSolid_ToolConeFrustum.cxx @@ -29,14 +29,11 @@ #include #include #include -#include #include #include #include #include -IGESSolid_ToolConeFrustum::IGESSolid_ToolConeFrustum () { } - void IGESSolid_ToolConeFrustum::ReadOwnParams (const Handle(IGESSolid_ConeFrustum)& ent, @@ -125,20 +122,6 @@ void IGESSolid_ToolConeFrustum::WriteOwnParams IW.Send(ent->Axis().Z()); } -void IGESSolid_ToolConeFrustum::OwnShared - (const Handle(IGESSolid_ConeFrustum)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESSolid_ToolConeFrustum::OwnCopy - (const Handle(IGESSolid_ConeFrustum)& another, - const Handle(IGESSolid_ConeFrustum)& ent, Interface_CopyTool& /* TC */) const -{ - ent->Init - (another->Height(), another->LargerRadius(), another->SmallerRadius(), - another->FaceCenter().XYZ(), another->Axis().XYZ()); -} - IGESData_DirChecker IGESSolid_ToolConeFrustum::DirChecker (const Handle(IGESSolid_ConeFrustum)& /* ent */ ) const { @@ -153,20 +136,6 @@ IGESData_DirChecker IGESSolid_ToolConeFrustum::DirChecker return DC; } -void IGESSolid_ToolConeFrustum::OwnCheck - (const Handle(IGESSolid_ConeFrustum)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->Height() <= 0.0) - ach->AddFail("Height : Value Not Positive"); - if (ent->LargerRadius() <= 0.0) - ach->AddFail("Larger face radius : Value Not Positive"); - if (ent->SmallerRadius() < 0.0) - ach->AddFail("Smaller face radius : Value Not Positive"); - if (ent->SmallerRadius() > ent->LargerRadius()) - ach->AddFail("Smaller face radius : is greater than Larger face radius"); -} - void IGESSolid_ToolConeFrustum::OwnDump (const Handle(IGESSolid_ConeFrustum)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolConeFrustum.hxx b/src/IGESSolid/IGESSolid_ToolConeFrustum.hxx index 59cd011c70..7d7159f7cd 100644 --- a/src/IGESSolid/IGESSolid_ToolConeFrustum.hxx +++ b/src/IGESSolid/IGESSolid_ToolConeFrustum.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolConeFrustum { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolConeFrustum, ready to work - Standard_EXPORT IGESSolid_ToolConeFrustum(); + IGESSolid_ToolConeFrustum() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_ConeFrustum)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ConeFrustum , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_ConeFrustum)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_ConeFrustum)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_ConeFrustum)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_ConeFrustum)& entfrom, const Handle(IGESSolid_ConeFrustum)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_ConeFrustum)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolConeFrustum_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolConicalSurface.cxx b/src/IGESSolid/IGESSolid_ToolConicalSurface.cxx index d832bb0fa1..5756d854d4 100644 --- a/src/IGESSolid/IGESSolid_ToolConicalSurface.cxx +++ b/src/IGESSolid/IGESSolid_ToolConicalSurface.cxx @@ -27,15 +27,12 @@ #include #include #include -#include #include #include #include #include #include -IGESSolid_ToolConicalSurface::IGESSolid_ToolConicalSurface () { } - void IGESSolid_ToolConicalSurface::ReadOwnParams (const Handle(IGESSolid_ConicalSurface)& ent, @@ -76,40 +73,6 @@ void IGESSolid_ToolConicalSurface::WriteOwnParams if (ent->IsParametrised()) IW.Send(ent->ReferenceDir()); // cf FormNumber } -void IGESSolid_ToolConicalSurface::OwnShared - (const Handle(IGESSolid_ConicalSurface)& ent, Interface_EntityIterator& iter) const -{ - iter.GetOneItem(ent->LocationPoint()); - iter.GetOneItem(ent->Axis()); - iter.GetOneItem(ent->ReferenceDir()); -} - -void IGESSolid_ToolConicalSurface::OwnCopy - (const Handle(IGESSolid_ConicalSurface)& another, - const Handle(IGESSolid_ConicalSurface)& ent, Interface_CopyTool& TC) const -{ - Standard_Real tempRadius, tempAngle; - //Standard_Boolean IsItParametrised = Standard_False; //szv#4:S4163:12Mar99 unused - - DeclareAndCast(IGESGeom_Point, tempLocation, - TC.Transferred(another->LocationPoint())); - DeclareAndCast(IGESGeom_Direction, tempAxis, - TC.Transferred(another->Axis())); - tempRadius = another->Radius(); - tempAngle = another->SemiAngle(); - if (another->IsParametrised()) - { - DeclareAndCast(IGESGeom_Direction, tempRefdir, - TC.Transferred(another->ReferenceDir())); - ent->Init (tempLocation, tempAxis, tempRadius, tempAngle, tempRefdir); - } - else - { - Handle(IGESGeom_Direction) tempRefdir; - ent->Init (tempLocation, tempAxis, tempRadius, tempAngle, tempRefdir); - } -} - IGESData_DirChecker IGESSolid_ToolConicalSurface::DirChecker (const Handle(IGESSolid_ConicalSurface)& /*ent*/) const { @@ -125,20 +88,6 @@ IGESData_DirChecker IGESSolid_ToolConicalSurface::DirChecker return DC; } -void IGESSolid_ToolConicalSurface::OwnCheck - (const Handle(IGESSolid_ConicalSurface)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->Radius() < 0.0) - ach->AddFail("Radius : Value Negative"); - if (ent->SemiAngle() < 0.0 || ent->SemiAngle() > 90.0) - ach->AddFail("Semi-angle : Value not in the range [0 - 90]"); - Standard_Integer fn = 0; - if (ent->IsParametrised()) fn = 1; - if (fn != ent->FormNumber()) ach->AddFail - ("Parametrised Status Mismatches with Form Number"); -} - void IGESSolid_ToolConicalSurface::OwnDump (const Handle(IGESSolid_ConicalSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolConicalSurface.hxx b/src/IGESSolid/IGESSolid_ToolConicalSurface.hxx index b580d49a11..9648da00fe 100644 --- a/src/IGESSolid/IGESSolid_ToolConicalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToolConicalSurface.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolConicalSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolConicalSurface, ready to work - Standard_EXPORT IGESSolid_ToolConicalSurface(); + IGESSolid_ToolConicalSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_ConicalSurface)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ConicalSurface , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_ConicalSurface)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_ConicalSurface)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_ConicalSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_ConicalSurface)& entfrom, const Handle(IGESSolid_ConicalSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_ConicalSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolConicalSurface_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolCylinder.cxx b/src/IGESSolid/IGESSolid_ToolCylinder.cxx index 1b383ca7dd..d06721c4e3 100644 --- a/src/IGESSolid/IGESSolid_ToolCylinder.cxx +++ b/src/IGESSolid/IGESSolid_ToolCylinder.cxx @@ -28,14 +28,11 @@ #include #include #include -#include #include #include #include #include -IGESSolid_ToolCylinder::IGESSolid_ToolCylinder () { } - void IGESSolid_ToolCylinder::ReadOwnParams (const Handle(IGESSolid_Cylinder)& ent, @@ -118,20 +115,6 @@ void IGESSolid_ToolCylinder::WriteOwnParams IW.Send(ent->Axis().Z()); } -void IGESSolid_ToolCylinder::OwnShared - (const Handle(IGESSolid_Cylinder)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESSolid_ToolCylinder::OwnCopy - (const Handle(IGESSolid_Cylinder)& another, - const Handle(IGESSolid_Cylinder)& ent, Interface_CopyTool& /* TC */) const -{ - ent->Init - (another->Height(), another->Radius(), another->FaceCenter().XYZ(), - another->Axis().XYZ()); -} - IGESData_DirChecker IGESSolid_ToolCylinder::DirChecker (const Handle(IGESSolid_Cylinder)& /* ent */ ) const { @@ -146,16 +129,6 @@ IGESData_DirChecker IGESSolid_ToolCylinder::DirChecker return DC; } -void IGESSolid_ToolCylinder::OwnCheck - (const Handle(IGESSolid_Cylinder)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->Height() <= 0.0) - ach->AddFail("Height : Value < 0"); - if (ent->Radius() <= 0.0) - ach->AddFail("Radius : Value < 0"); -} - void IGESSolid_ToolCylinder::OwnDump (const Handle(IGESSolid_Cylinder)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolCylinder.hxx b/src/IGESSolid/IGESSolid_ToolCylinder.hxx index b1b2734d72..736e16715d 100644 --- a/src/IGESSolid/IGESSolid_ToolCylinder.hxx +++ b/src/IGESSolid/IGESSolid_ToolCylinder.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolCylinder { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolCylinder, ready to work - Standard_EXPORT IGESSolid_ToolCylinder(); + IGESSolid_ToolCylinder() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_Cylinder)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Cylinder , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_Cylinder)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_Cylinder)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_Cylinder)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_Cylinder)& entfrom, const Handle(IGESSolid_Cylinder)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_Cylinder)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolCylinder_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolCylindricalSurface.cxx b/src/IGESSolid/IGESSolid_ToolCylindricalSurface.cxx index 813f99f8a7..d65f5bf95a 100644 --- a/src/IGESSolid/IGESSolid_ToolCylindricalSurface.cxx +++ b/src/IGESSolid/IGESSolid_ToolCylindricalSurface.cxx @@ -27,15 +27,12 @@ #include #include #include -#include #include #include #include #include #include -IGESSolid_ToolCylindricalSurface::IGESSolid_ToolCylindricalSurface () { } - void IGESSolid_ToolCylindricalSurface::ReadOwnParams (const Handle(IGESSolid_CylindricalSurface)& ent, @@ -72,39 +69,6 @@ void IGESSolid_ToolCylindricalSurface::WriteOwnParams if (ent->IsParametrised()) IW.Send(ent->ReferenceDir()); } -void IGESSolid_ToolCylindricalSurface::OwnShared - (const Handle(IGESSolid_CylindricalSurface)& ent, Interface_EntityIterator& iter) const -{ - iter.GetOneItem(ent->LocationPoint()); - iter.GetOneItem(ent->Axis()); - iter.GetOneItem(ent->ReferenceDir()); -} - -void IGESSolid_ToolCylindricalSurface::OwnCopy - (const Handle(IGESSolid_CylindricalSurface)& another, - const Handle(IGESSolid_CylindricalSurface)& ent, Interface_CopyTool& TC) const -{ - Standard_Real tempRadius; - - DeclareAndCast(IGESGeom_Point, tempLocation, - TC.Transferred(another->LocationPoint())); - DeclareAndCast(IGESGeom_Direction, tempAxis, - TC.Transferred(another->Axis())); - tempRadius = another->Radius(); - if (another->IsParametrised()) - { - DeclareAndCast(IGESGeom_Direction, tempRefdir, - TC.Transferred(another->ReferenceDir())); - ent->Init (tempLocation, tempAxis, tempRadius, tempRefdir); - } - else - { - Handle(IGESGeom_Direction) tempRefdir; - ent->Init (tempLocation, tempAxis, tempRadius, tempRefdir); - } - -} - IGESData_DirChecker IGESSolid_ToolCylindricalSurface::DirChecker (const Handle(IGESSolid_CylindricalSurface)& /*ent*/) const { @@ -120,18 +84,6 @@ IGESData_DirChecker IGESSolid_ToolCylindricalSurface::DirChecker return DC; } -void IGESSolid_ToolCylindricalSurface::OwnCheck - (const Handle(IGESSolid_CylindricalSurface)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->Radius() <= 0.0) - ach->AddFail("Radius : Value <= 0.0"); - Standard_Integer fn = 0; - if (ent->IsParametrised()) fn = 1; - if (fn != ent->FormNumber()) ach->AddFail - ("Parametrised Status Mismatches with Form Number"); -} - void IGESSolid_ToolCylindricalSurface::OwnDump (const Handle(IGESSolid_CylindricalSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolCylindricalSurface.hxx b/src/IGESSolid/IGESSolid_ToolCylindricalSurface.hxx index 10b2ff317b..f0927161fe 100644 --- a/src/IGESSolid/IGESSolid_ToolCylindricalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToolCylindricalSurface.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolCylindricalSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolCylindricalSurface, ready to work - Standard_EXPORT IGESSolid_ToolCylindricalSurface(); + IGESSolid_ToolCylindricalSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_CylindricalSurface)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a CylindricalSurface , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_CylindricalSurface)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_CylindricalSurface)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_CylindricalSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_CylindricalSurface)& entfrom, const Handle(IGESSolid_CylindricalSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_CylindricalSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolCylindricalSurface_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolEdgeList.cxx b/src/IGESSolid/IGESSolid_ToolEdgeList.cxx index e390ba678f..e8a71343c4 100644 --- a/src/IGESSolid/IGESSolid_ToolEdgeList.cxx +++ b/src/IGESSolid/IGESSolid_ToolEdgeList.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -40,15 +39,6 @@ #include #include -// MGE 03/08/98 -//======================================================================= -//function : IGESSolid_ToolEdgeList -//purpose : -//======================================================================= -IGESSolid_ToolEdgeList::IGESSolid_ToolEdgeList () -{ -} - //======================================================================= //function : ReadOwnParams @@ -226,76 +216,6 @@ void IGESSolid_ToolEdgeList::WriteOwnParams(const Handle(IGESSolid_EdgeList)& en } -//======================================================================= -//function : OwnShared -//purpose : -//======================================================================= - -void IGESSolid_ToolEdgeList::OwnShared(const Handle(IGESSolid_EdgeList)& ent, - Interface_EntityIterator& iter) const -{ - Standard_Integer length = ent->NbEdges(); - for (Standard_Integer i = 1; i <= length; i ++) - { - iter.GetOneItem(ent->Curve(i)); - iter.GetOneItem(ent->StartVertexList(i)); - iter.GetOneItem(ent->EndVertexList(i)); - } -} - - -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESSolid_ToolEdgeList::OwnCopy(const Handle(IGESSolid_EdgeList)& another, - const Handle(IGESSolid_EdgeList)& ent, - Interface_CopyTool& TC) const -{ - Standard_Integer length; - - length = another->NbEdges(); - Handle(IGESData_HArray1OfIGESEntity) tempCurves = - new IGESData_HArray1OfIGESEntity(1, length); - Handle(IGESSolid_HArray1OfVertexList) tempStartVertexList = - new IGESSolid_HArray1OfVertexList(1, length); - Handle(TColStd_HArray1OfInteger) tempStartVertexIndex = - new TColStd_HArray1OfInteger(1, length); - Handle(IGESSolid_HArray1OfVertexList) tempEndVertexList = - new IGESSolid_HArray1OfVertexList(1, length); - Handle(TColStd_HArray1OfInteger) tempEndVertexIndex = - new TColStd_HArray1OfInteger(1, length); - - for (Standard_Integer i=1 ; i<=length ; i++) - { - // Curves - DeclareAndCast(IGESData_IGESEntity, curve, - TC.Transferred(another->Curve(i))); - tempCurves->SetValue(i, curve); - - // Start vertex list - DeclareAndCast(IGESSolid_VertexList, start, - TC.Transferred(another->StartVertexList(i))); - tempStartVertexList->SetValue(i, start); - - // Start vertex index - tempStartVertexIndex->SetValue(i, another->StartVertexIndex(i)); - - // End vertex list - DeclareAndCast(IGESSolid_VertexList, end, - TC.Transferred(another->EndVertexList(i))); - tempEndVertexList->SetValue(i, end); - - // End vertex index - tempEndVertexIndex->SetValue(i, another->EndVertexIndex(i)); - } - - ent->Init (tempCurves, tempStartVertexList, tempStartVertexIndex, - tempEndVertexList, tempEndVertexIndex); -} - - //======================================================================= //function : DirChecker //purpose : @@ -317,28 +237,6 @@ IGESData_DirChecker IGESSolid_ToolEdgeList::DirChecker } -//======================================================================= -//function : OwnCheck -//purpose : -//======================================================================= - -void IGESSolid_ToolEdgeList::OwnCheck(const Handle(IGESSolid_EdgeList)& ent, - const Interface_ShareTool&, - Handle(Interface_Check)& ach) const -{ - // MGE 03/08/98 - // Building of messages - //======================================== - //Message_Msg Msg184("XSTEP_184"); - //======================================== - - if (ent->NbEdges() <= 0) { - Message_Msg Msg184("XSTEP_184"); - ach->SendFail(Msg184); - } -} - - //======================================================================= //function : OwnDump //purpose : diff --git a/src/IGESSolid/IGESSolid_ToolEdgeList.hxx b/src/IGESSolid/IGESSolid_ToolEdgeList.hxx index 2f7f856253..366a1b791f 100644 --- a/src/IGESSolid/IGESSolid_ToolEdgeList.hxx +++ b/src/IGESSolid/IGESSolid_ToolEdgeList.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolEdgeList { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolEdgeList, ready to work - Standard_EXPORT IGESSolid_ToolEdgeList(); + IGESSolid_ToolEdgeList() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_EdgeList)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a EdgeList , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_EdgeList)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_EdgeList)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_EdgeList)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_EdgeList)& entfrom, const Handle(IGESSolid_EdgeList)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_EdgeList)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolEdgeList_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolEllipsoid.cxx b/src/IGESSolid/IGESSolid_ToolEllipsoid.cxx index f931acb142..d0a7f33f1b 100644 --- a/src/IGESSolid/IGESSolid_ToolEllipsoid.cxx +++ b/src/IGESSolid/IGESSolid_ToolEllipsoid.cxx @@ -29,14 +29,11 @@ #include #include #include -#include #include #include #include #include -IGESSolid_ToolEllipsoid::IGESSolid_ToolEllipsoid () { } - void IGESSolid_ToolEllipsoid::ReadOwnParams (const Handle(IGESSolid_Ellipsoid)& ent, @@ -146,19 +143,6 @@ void IGESSolid_ToolEllipsoid::WriteOwnParams IW.Send(ent->ZAxis().Z()); } -void IGESSolid_ToolEllipsoid::OwnShared - (const Handle(IGESSolid_Ellipsoid)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESSolid_ToolEllipsoid::OwnCopy - (const Handle(IGESSolid_Ellipsoid)& another, - const Handle(IGESSolid_Ellipsoid)& ent, Interface_CopyTool& /* TC */) const -{ - ent->Init(another->Size(), another->Center().XYZ(), - another->XAxis().XYZ(), another->ZAxis().XYZ()); -} - IGESData_DirChecker IGESSolid_ToolEllipsoid::DirChecker (const Handle(IGESSolid_Ellipsoid)& /* ent */ ) const { @@ -172,20 +156,6 @@ IGESData_DirChecker IGESSolid_ToolEllipsoid::DirChecker return DC; } -void IGESSolid_ToolEllipsoid::OwnCheck - (const Handle(IGESSolid_Ellipsoid)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - Standard_Real eps = 1.E-04; - Standard_Real prosca = ent->XAxis().Dot(ent->ZAxis()); - if (prosca < -eps || prosca > eps) - ach->AddFail("Local Z axis : Not orthogonal to X axis"); - if (! (ent->Size().X() >= ent->Size().Y() - && ent->Size().Y() >= ent->Size().Z() - && ent->Size().Z() > 0)) - ach->AddFail("Size : The values does not satisfy LX >= LY >= LZ > 0"); -} - void IGESSolid_ToolEllipsoid::OwnDump (const Handle(IGESSolid_Ellipsoid)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolEllipsoid.hxx b/src/IGESSolid/IGESSolid_ToolEllipsoid.hxx index 822867770b..d20a6a8663 100644 --- a/src/IGESSolid/IGESSolid_ToolEllipsoid.hxx +++ b/src/IGESSolid/IGESSolid_ToolEllipsoid.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolEllipsoid { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolEllipsoid, ready to work - Standard_EXPORT IGESSolid_ToolEllipsoid(); + IGESSolid_ToolEllipsoid() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_Ellipsoid)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Ellipsoid , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_Ellipsoid)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_Ellipsoid)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_Ellipsoid)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_Ellipsoid)& entfrom, const Handle(IGESSolid_Ellipsoid)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_Ellipsoid)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolEllipsoid_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolFace.cxx b/src/IGESSolid/IGESSolid_ToolFace.cxx index 293ca11c70..6af756b25f 100644 --- a/src/IGESSolid/IGESSolid_ToolFace.cxx +++ b/src/IGESSolid/IGESSolid_ToolFace.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -38,15 +37,6 @@ #include #include -// MGE 03/08/98 -//======================================================================= -//function : IGESSolid_ToolFace -//purpose : -//======================================================================= -IGESSolid_ToolFace::IGESSolid_ToolFace () -{ -} - //======================================================================= //function : ReadOwnParams @@ -155,48 +145,6 @@ void IGESSolid_ToolFace::WriteOwnParams(const Handle(IGESSolid_Face)& ent, } -//======================================================================= -//function : OwnShared -//purpose : -//======================================================================= - -void IGESSolid_ToolFace::OwnShared(const Handle(IGESSolid_Face)& ent, - Interface_EntityIterator& iter) const -{ - Standard_Integer upper = ent->NbLoops(); - iter.GetOneItem(ent->Surface()); - for (Standard_Integer i = 1; i <= upper; i ++) - iter.GetOneItem(ent->Loop(i)); -} - - -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESSolid_ToolFace::OwnCopy(const Handle(IGESSolid_Face)& another, - const Handle(IGESSolid_Face)& ent, - Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity, tempSurface, - TC.Transferred(another->Surface())); - Standard_Integer nbloops = another->NbLoops(); - Standard_Boolean outerLoopFlag = another->HasOuterLoop(); - - Handle(IGESSolid_HArray1OfLoop) tempLoops = - new IGESSolid_HArray1OfLoop(1, nbloops); - for (Standard_Integer i=1; i<=nbloops; i++) - { - DeclareAndCast(IGESSolid_Loop, anent, - TC.Transferred(another->Loop(i))); - tempLoops->SetValue(i, anent); - } - - ent->Init (tempSurface, outerLoopFlag, tempLoops); -} - - //======================================================================= //function : DirChecker //purpose : @@ -217,28 +165,6 @@ IGESData_DirChecker IGESSolid_ToolFace::DirChecker } -//======================================================================= -//function : OwnCheck -//purpose : -//======================================================================= - -void IGESSolid_ToolFace::OwnCheck(const Handle(IGESSolid_Face)& ent, - const Interface_ShareTool&, - Handle(Interface_Check)& ach) const -{ - // MGE 03/08/98 - // Building of messages - //======================================== - //Message_Msg Msg197("XSTEP_197"); - //======================================== - - if (ent->NbLoops() <= 0) { - Message_Msg Msg197("XSTEP_197"); - ach->SendFail(Msg197); - } -} - - //======================================================================= //function : OwnDump //purpose : diff --git a/src/IGESSolid/IGESSolid_ToolFace.hxx b/src/IGESSolid/IGESSolid_ToolFace.hxx index 1ffe331172..b342f15c26 100644 --- a/src/IGESSolid/IGESSolid_ToolFace.hxx +++ b/src/IGESSolid/IGESSolid_ToolFace.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolFace { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolFace, ready to work - Standard_EXPORT IGESSolid_ToolFace(); + IGESSolid_ToolFace() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_Face)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Face , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_Face)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_Face)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_Face)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_Face)& entfrom, const Handle(IGESSolid_Face)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_Face)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolFace_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolLoop.cxx b/src/IGESSolid/IGESSolid_ToolLoop.cxx index 4798630575..655b29ce56 100644 --- a/src/IGESSolid/IGESSolid_ToolLoop.cxx +++ b/src/IGESSolid/IGESSolid_ToolLoop.cxx @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -44,15 +43,6 @@ #include #include -// MGE 03/08/98 -//======================================================================= -//function : IGESSolid_ToolLoop -//purpose : -//======================================================================= -IGESSolid_ToolLoop::IGESSolid_ToolLoop () -{ -} - //======================================================================= //function : ReadOwnParams @@ -234,89 +224,6 @@ void IGESSolid_ToolLoop::WriteOwnParams(const Handle(IGESSolid_Loop)& ent, } -//======================================================================= -//function : OwnShared -//purpose : -//======================================================================= - -void IGESSolid_ToolLoop::OwnShared(const Handle(IGESSolid_Loop)& ent, - Interface_EntityIterator& iter) const -{ - Standard_Integer i, j; - Standard_Integer length = ent->NbEdges(); - - for (i = 1; i <= length; i ++) - { - iter.GetOneItem(ent->Edge(i)); - for (j = 1; j <= ent->NbParameterCurves(i); j ++) - iter.GetOneItem(ent->ParametricCurve(i,j)); - } -} - - -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESSolid_ToolLoop::OwnCopy(const Handle(IGESSolid_Loop)& another, - const Handle(IGESSolid_Loop)& ent, - Interface_CopyTool& TC) const -{ - Standard_Integer nbedges = another->NbEdges(); - Standard_Integer i, j; - Standard_Integer anint; - - Handle(TColStd_HArray1OfInteger) tempTypes = - new TColStd_HArray1OfInteger(1, nbedges); - Handle(IGESData_HArray1OfIGESEntity) tempEdges = - new IGESData_HArray1OfIGESEntity(1, nbedges); - Handle(TColStd_HArray1OfInteger) tempIndex = - new TColStd_HArray1OfInteger(1, nbedges); - Handle(TColStd_HArray1OfInteger) tempOrientation = - new TColStd_HArray1OfInteger(1, nbedges); - Handle(TColStd_HArray1OfInteger) nbParameterCurves = - new TColStd_HArray1OfInteger(1, nbedges); - Handle(IGESBasic_HArray1OfHArray1OfInteger) isoparametricFlags = - new IGESBasic_HArray1OfHArray1OfInteger(1, nbedges); - Handle(IGESBasic_HArray1OfHArray1OfIGESEntity) tempCurves = - new IGESBasic_HArray1OfHArray1OfIGESEntity(1, nbedges); - - for (i = 1; i <= nbedges; i ++) - { - tempTypes->SetValue(i, another->EdgeType(i)); - - DeclareAndCast(IGESData_IGESEntity, anent, - TC.Transferred(another->Edge(i))); - tempEdges->SetValue(i, anent); - - tempIndex->SetValue(i, another->ListIndex(i)); - - tempOrientation->SetValue(i, (another->Orientation(i) ? 1 : 0) ); - - anint = another->NbParameterCurves(i); - nbParameterCurves->SetValue(i, anint); - - Handle(IGESData_HArray1OfIGESEntity) tmpents; - if (anint > 0) tmpents = new IGESData_HArray1OfIGESEntity(1, anint); - Handle(TColStd_HArray1OfInteger) tmpints; - if (anint > 0) tmpints = new TColStd_HArray1OfInteger(1, anint); - for (j = 1; j <= anint; j ++) - { - tmpints->SetValue(j, (another->IsIsoparametric(i, j) ? 1 : 0) ); - - DeclareAndCast(IGESData_IGESEntity, localent, - TC.Transferred(another->ParametricCurve(i, j))); - tmpents->SetValue(j, localent); - } - isoparametricFlags->SetValue(i, tmpints); - tempCurves->SetValue(i, tmpents); - } - ent->Init(tempTypes, tempEdges, tempIndex, tempOrientation, - nbParameterCurves, isoparametricFlags, tempCurves); -} - - //======================================================================= //function : DirChecker //purpose : @@ -337,30 +244,6 @@ IGESData_DirChecker IGESSolid_ToolLoop::DirChecker } -//======================================================================= -//function : OwnCheck -//purpose : -//======================================================================= - -void IGESSolid_ToolLoop::OwnCheck(const Handle(IGESSolid_Loop)& ent, - const Interface_ShareTool&, - Handle(Interface_Check)& ach) const -{ - // MGE 03/08/98 - // Building of messages - //======================================== - //Message_Msg Msg190("XSTEP_190"); - //======================================== - - Standard_Integer upper = ent->NbEdges(); - for (Standard_Integer i = 1; i <= upper; i ++) - if (ent->EdgeType(i) != 0 && ent->EdgeType(i) != 1) { - Message_Msg Msg190("XSTEP_190"); - ach->SendFail(Msg190); - } -} - - //======================================================================= //function : OwnDump //purpose : diff --git a/src/IGESSolid/IGESSolid_ToolLoop.hxx b/src/IGESSolid/IGESSolid_ToolLoop.hxx index 294bfc62cf..2f78cc3f86 100644 --- a/src/IGESSolid/IGESSolid_ToolLoop.hxx +++ b/src/IGESSolid/IGESSolid_ToolLoop.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolLoop { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolLoop, ready to work - Standard_EXPORT IGESSolid_ToolLoop(); + IGESSolid_ToolLoop() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_Loop)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Loop , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_Loop)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_Loop)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_Loop)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_Loop)& entfrom, const Handle(IGESSolid_Loop)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_Loop)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolLoop_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolManifoldSolid.cxx b/src/IGESSolid/IGESSolid_ToolManifoldSolid.cxx index 60e8c9b2e9..1b95deec13 100644 --- a/src/IGESSolid/IGESSolid_ToolManifoldSolid.cxx +++ b/src/IGESSolid/IGESSolid_ToolManifoldSolid.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -38,9 +37,6 @@ #include #include -// MGE 31/07/98 -IGESSolid_ToolManifoldSolid::IGESSolid_ToolManifoldSolid () { } - void IGESSolid_ToolManifoldSolid::ReadOwnParams (const Handle(IGESSolid_ManifoldSolid)& ent, @@ -151,41 +147,6 @@ void IGESSolid_ToolManifoldSolid::WriteOwnParams } } -void IGESSolid_ToolManifoldSolid::OwnShared - (const Handle(IGESSolid_ManifoldSolid)& ent, Interface_EntityIterator& iter) const -{ - Standard_Integer i; - Standard_Integer nbshells = ent->NbVoidShells(); - - iter.GetOneItem(ent->Shell()); - for (i = 1; i <= nbshells; i ++) iter.GetOneItem(ent->VoidShell(i)); -} - -void IGESSolid_ToolManifoldSolid::OwnCopy - (const Handle(IGESSolid_ManifoldSolid)& another, - const Handle(IGESSolid_ManifoldSolid)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESSolid_Shell, shell, TC.Transferred(another->Shell())); - Standard_Boolean shellFlag = another->OrientationFlag(); - - Standard_Integer nbshells = another->NbVoidShells(); - Handle(IGESSolid_HArray1OfShell) voidShells; - Handle(TColStd_HArray1OfInteger) voidFlags; - if (nbshells > 0) - { - voidShells = new IGESSolid_HArray1OfShell(1, nbshells); - voidFlags = new TColStd_HArray1OfInteger(1, nbshells); - for (Standard_Integer i = 1; i <= nbshells; i ++) - { - DeclareAndCast(IGESSolid_Shell, voidshell, - TC.Transferred(another->VoidShell(i))); - voidShells->SetValue(i, voidshell); - voidFlags->SetValue(i, (another->VoidOrientationFlag(i) ? 1 : 0)); - } - } - ent->Init (shell, shellFlag, voidShells, voidFlags); -} - IGESData_DirChecker IGESSolid_ToolManifoldSolid::DirChecker (const Handle(IGESSolid_ManifoldSolid)& /* ent */ ) const { @@ -199,12 +160,6 @@ IGESData_DirChecker IGESSolid_ToolManifoldSolid::DirChecker return DC; } -void IGESSolid_ToolManifoldSolid::OwnCheck - (const Handle(IGESSolid_ManifoldSolid)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESSolid_ToolManifoldSolid::OwnDump (const Handle(IGESSolid_ManifoldSolid)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolManifoldSolid.hxx b/src/IGESSolid/IGESSolid_ToolManifoldSolid.hxx index 0ecd1fd3e7..d2e4b72ca9 100644 --- a/src/IGESSolid/IGESSolid_ToolManifoldSolid.hxx +++ b/src/IGESSolid/IGESSolid_ToolManifoldSolid.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolManifoldSolid { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolManifoldSolid, ready to work - Standard_EXPORT IGESSolid_ToolManifoldSolid(); + IGESSolid_ToolManifoldSolid() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_ManifoldSolid)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ManifoldSolid , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_ManifoldSolid)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_ManifoldSolid)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_ManifoldSolid)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_ManifoldSolid)& entfrom, const Handle(IGESSolid_ManifoldSolid)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_ManifoldSolid)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolManifoldSolid_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolPlaneSurface.cxx b/src/IGESSolid/IGESSolid_ToolPlaneSurface.cxx index d51a8350df..b93bd1f07f 100644 --- a/src/IGESSolid/IGESSolid_ToolPlaneSurface.cxx +++ b/src/IGESSolid/IGESSolid_ToolPlaneSurface.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,15 +35,6 @@ #include #include -// MGE 31/07/98 -//======================================================================= -//function : IGESSolid_ToolPlaneSurface -//purpose : -//======================================================================= -IGESSolid_ToolPlaneSurface::IGESSolid_ToolPlaneSurface () -{ -} - //======================================================================= //function : ReadOwnParams @@ -161,47 +151,6 @@ void IGESSolid_ToolPlaneSurface::WriteOwnParams } -//======================================================================= -//function : OwnShared -//purpose : -//======================================================================= - -void IGESSolid_ToolPlaneSurface::OwnShared(const Handle(IGESSolid_PlaneSurface)& ent, - Interface_EntityIterator& iter) const -{ - iter.GetOneItem(ent->LocationPoint()); - iter.GetOneItem(ent->Normal()); - iter.GetOneItem(ent->ReferenceDir()); -} - - -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESSolid_ToolPlaneSurface::OwnCopy - (const Handle(IGESSolid_PlaneSurface)& another, - const Handle(IGESSolid_PlaneSurface)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESGeom_Point, tempLocation, - TC.Transferred(another->LocationPoint())); - DeclareAndCast(IGESGeom_Direction, tempNormal, - TC.Transferred(another->Normal())); - if (another->IsParametrised()) - { - DeclareAndCast(IGESGeom_Direction, tempRefdir, - TC.Transferred(another->ReferenceDir())); - ent->Init (tempLocation, tempNormal, tempRefdir); - } - else - { - Handle(IGESGeom_Direction) tempRefdir; - ent->Init (tempLocation, tempNormal, tempRefdir); - } -} - - //======================================================================= //function : DirChecker //purpose : @@ -222,31 +171,6 @@ IGESData_DirChecker IGESSolid_ToolPlaneSurface::DirChecker } -//======================================================================= -//function : OwnCheck -//purpose : -//======================================================================= - -void IGESSolid_ToolPlaneSurface::OwnCheck(const Handle(IGESSolid_PlaneSurface)& ent, - const Interface_ShareTool&, - Handle(Interface_Check)& ach) const -{ - - // MGE 31/07/98 - // Building of messages - //======================================== - //Message_Msg Msg177("XSTEP_177"); - //======================================== - - Standard_Integer fn = 0; - if (ent->IsParametrised()) fn = 1; - if (fn != ent->FormNumber()) { - Message_Msg Msg177("XSTEP_177"); - ach->SendFail (Msg177); - } -} - - //======================================================================= //function : OwnDump //purpose : diff --git a/src/IGESSolid/IGESSolid_ToolPlaneSurface.hxx b/src/IGESSolid/IGESSolid_ToolPlaneSurface.hxx index 3e6a2185c2..4d8ba14621 100644 --- a/src/IGESSolid/IGESSolid_ToolPlaneSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToolPlaneSurface.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolPlaneSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolPlaneSurface, ready to work - Standard_EXPORT IGESSolid_ToolPlaneSurface(); + IGESSolid_ToolPlaneSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_PlaneSurface)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a PlaneSurface , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_PlaneSurface)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_PlaneSurface)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_PlaneSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_PlaneSurface)& entfrom, const Handle(IGESSolid_PlaneSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_PlaneSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolPlaneSurface_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolRightAngularWedge.cxx b/src/IGESSolid/IGESSolid_ToolRightAngularWedge.cxx index e7d71c66af..98894b1112 100644 --- a/src/IGESSolid/IGESSolid_ToolRightAngularWedge.cxx +++ b/src/IGESSolid/IGESSolid_ToolRightAngularWedge.cxx @@ -29,14 +29,11 @@ #include #include #include -#include #include #include #include #include -IGESSolid_ToolRightAngularWedge::IGESSolid_ToolRightAngularWedge () { } - void IGESSolid_ToolRightAngularWedge::ReadOwnParams (const Handle(IGESSolid_RightAngularWedge)& ent, @@ -150,19 +147,6 @@ void IGESSolid_ToolRightAngularWedge::WriteOwnParams IW.Send(ent->ZAxis().Z()); } -void IGESSolid_ToolRightAngularWedge::OwnShared - (const Handle(IGESSolid_RightAngularWedge)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESSolid_ToolRightAngularWedge::OwnCopy - (const Handle(IGESSolid_RightAngularWedge)& another, - const Handle(IGESSolid_RightAngularWedge)& ent, Interface_CopyTool& /* TC */) const -{ - ent->Init(another->Size(), another->XSmallLength(), another->Corner().XYZ(), - another->XAxis().XYZ(), another->ZAxis().XYZ()); -} - IGESData_DirChecker IGESSolid_ToolRightAngularWedge::DirChecker (const Handle(IGESSolid_RightAngularWedge)& /* ent */ ) const { @@ -176,22 +160,6 @@ IGESData_DirChecker IGESSolid_ToolRightAngularWedge::DirChecker return DC; } -void IGESSolid_ToolRightAngularWedge::OwnCheck - (const Handle(IGESSolid_RightAngularWedge)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - Standard_Real eps = 1.E-04; - Standard_Real prosca = ent->XAxis() * ent->ZAxis(); - if (prosca < -eps || prosca > eps) - ach->AddFail("Local Z axis : Not orthogonal to X axis"); - if (ent->Size().X() <= 0. || ent->Size().Y() <= 0. || ent->Size().Z() <= 0.) - ach->AddFail("Size : Values are not positive"); - if (ent->XSmallLength() <= 0.0) - ach->AddFail("Small X Length : Not Positive"); - if (ent->XSmallLength() >= ent->Size().X()) - ach->AddFail("Small X Length : Value not < LX"); -} - void IGESSolid_ToolRightAngularWedge::OwnDump (const Handle(IGESSolid_RightAngularWedge)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolRightAngularWedge.hxx b/src/IGESSolid/IGESSolid_ToolRightAngularWedge.hxx index f3b23333ef..59cafc587c 100644 --- a/src/IGESSolid/IGESSolid_ToolRightAngularWedge.hxx +++ b/src/IGESSolid/IGESSolid_ToolRightAngularWedge.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolRightAngularWedge { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolRightAngularWedge, ready to work - Standard_EXPORT IGESSolid_ToolRightAngularWedge(); + IGESSolid_ToolRightAngularWedge() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_RightAngularWedge)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a RightAngularWedge , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_RightAngularWedge)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_RightAngularWedge)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_RightAngularWedge)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_RightAngularWedge)& entfrom, const Handle(IGESSolid_RightAngularWedge)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_RightAngularWedge)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolRightAngularWedge_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolSelectedComponent.cxx b/src/IGESSolid/IGESSolid_ToolSelectedComponent.cxx index 3e15d01779..84b023dc0f 100644 --- a/src/IGESSolid/IGESSolid_ToolSelectedComponent.cxx +++ b/src/IGESSolid/IGESSolid_ToolSelectedComponent.cxx @@ -29,15 +29,12 @@ #include #include #include -#include #include #include #include #include #include -IGESSolid_ToolSelectedComponent::IGESSolid_ToolSelectedComponent () { } - void IGESSolid_ToolSelectedComponent::ReadOwnParams (const Handle(IGESSolid_SelectedComponent)& ent, @@ -65,22 +62,6 @@ void IGESSolid_ToolSelectedComponent::WriteOwnParams IW.Send(ent->SelectPoint().Z()); } -void IGESSolid_ToolSelectedComponent::OwnShared - (const Handle(IGESSolid_SelectedComponent)& ent, Interface_EntityIterator& iter) const -{ - iter.GetOneItem(ent->Component()); -} - -void IGESSolid_ToolSelectedComponent::OwnCopy - (const Handle(IGESSolid_SelectedComponent)& another, - const Handle(IGESSolid_SelectedComponent)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESSolid_BooleanTree, tempEntity, - TC.Transferred(another->Component())); - gp_XYZ tempSelectPoint = another->SelectPoint().XYZ(); - ent->Init (tempEntity, tempSelectPoint); -} - IGESData_DirChecker IGESSolid_ToolSelectedComponent::DirChecker (const Handle(IGESSolid_SelectedComponent)& /* ent */ ) const { @@ -97,12 +78,6 @@ IGESData_DirChecker IGESSolid_ToolSelectedComponent::DirChecker return DC; } -void IGESSolid_ToolSelectedComponent::OwnCheck - (const Handle(IGESSolid_SelectedComponent)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESSolid_ToolSelectedComponent::OwnDump (const Handle(IGESSolid_SelectedComponent)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolSelectedComponent.hxx b/src/IGESSolid/IGESSolid_ToolSelectedComponent.hxx index e1a8bb86a7..93cfe24801 100644 --- a/src/IGESSolid/IGESSolid_ToolSelectedComponent.hxx +++ b/src/IGESSolid/IGESSolid_ToolSelectedComponent.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolSelectedComponent { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSelectedComponent, ready to work - Standard_EXPORT IGESSolid_ToolSelectedComponent(); + IGESSolid_ToolSelectedComponent() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_SelectedComponent)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a SelectedComponent , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_SelectedComponent)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_SelectedComponent)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_SelectedComponent)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_SelectedComponent)& entfrom, const Handle(IGESSolid_SelectedComponent)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_SelectedComponent)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolSelectedComponent_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolShell.cxx b/src/IGESSolid/IGESSolid_ToolShell.cxx index 4e6ceefd57..b28a6c7e07 100644 --- a/src/IGESSolid/IGESSolid_ToolShell.cxx +++ b/src/IGESSolid/IGESSolid_ToolShell.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -39,15 +38,6 @@ #include #include -// MGE 03/08/98 -//======================================================================= -//function : IGESSolid_ToolShell -//purpose : -//======================================================================= -IGESSolid_ToolShell::IGESSolid_ToolShell () -{ -} - //======================================================================= //function : ReadOwnParams @@ -140,46 +130,6 @@ void IGESSolid_ToolShell::WriteOwnParams(const Handle(IGESSolid_Shell)& ent, } -//======================================================================= -//function : OwnShared -//purpose : -//======================================================================= - -void IGESSolid_ToolShell::OwnShared(const Handle(IGESSolid_Shell)& ent, - Interface_EntityIterator& iter) const -{ - Standard_Integer nbfaces = ent->NbFaces(); - for (Standard_Integer i = 1; i <= nbfaces; i ++) - iter.GetOneItem(ent->Face(i)); -} - - -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESSolid_ToolShell::OwnCopy(const Handle(IGESSolid_Shell)& another, - const Handle(IGESSolid_Shell)& ent, - Interface_CopyTool& TC) const -{ - Standard_Integer nbfaces = another->NbFaces(); - - Handle(IGESSolid_HArray1OfFace) tempFaces = new - IGESSolid_HArray1OfFace(1, nbfaces); - Handle(TColStd_HArray1OfInteger) tempOrientation = new - TColStd_HArray1OfInteger(1, nbfaces); - for (Standard_Integer i=1; i<=nbfaces; i++) - { - DeclareAndCast(IGESSolid_Face, face, - TC.Transferred(another->Face(i))); - tempFaces->SetValue(i, face); - tempOrientation->SetValue(i, (another->Orientation(i) ? 1 : 0) ); - } - ent->Init (tempFaces, tempOrientation); -} - - //======================================================================= //function : DirChecker //purpose : @@ -200,28 +150,6 @@ IGESData_DirChecker IGESSolid_ToolShell::DirChecker } -//======================================================================= -//function : OwnCheck -//purpose : -//======================================================================= - -void IGESSolid_ToolShell::OwnCheck(const Handle(IGESSolid_Shell)& ent, - const Interface_ShareTool&, - Handle(Interface_Check)& ach) const -{ - // MGE 03/08/98 - // Building of messages - //======================================== - //Message_Msg Msg200("XSTEP_200"); - //======================================== - - if (ent->NbFaces() <= 0) { - Message_Msg Msg200("XSTEP_200"); - ach->SendFail(Msg200); - } -} - - //======================================================================= //function : OwnDump //purpose : diff --git a/src/IGESSolid/IGESSolid_ToolShell.hxx b/src/IGESSolid/IGESSolid_ToolShell.hxx index 35cfd7418c..6a6e288431 100644 --- a/src/IGESSolid/IGESSolid_ToolShell.hxx +++ b/src/IGESSolid/IGESSolid_ToolShell.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolShell { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolShell, ready to work - Standard_EXPORT IGESSolid_ToolShell(); + IGESSolid_ToolShell() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_Shell)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Shell , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_Shell)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_Shell)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_Shell)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_Shell)& entfrom, const Handle(IGESSolid_Shell)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_Shell)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolShell_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolSolidAssembly.cxx b/src/IGESSolid/IGESSolid_ToolSolidAssembly.cxx index 2f0d7a9d29..efb4985d7f 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidAssembly.cxx +++ b/src/IGESSolid/IGESSolid_ToolSolidAssembly.cxx @@ -30,15 +30,12 @@ #include #include #include -#include #include #include #include #include #include -IGESSolid_ToolSolidAssembly::IGESSolid_ToolSolidAssembly () { } - void IGESSolid_ToolSolidAssembly::ReadOwnParams (const Handle(IGESSolid_SolidAssembly)& ent, @@ -96,44 +93,6 @@ void IGESSolid_ToolSolidAssembly::WriteOwnParams IW.Send(ent->TransfMatrix(i)); } -void IGESSolid_ToolSolidAssembly::OwnShared - (const Handle(IGESSolid_SolidAssembly)& ent, Interface_EntityIterator& iter) const -{ - Standard_Integer nbitems = ent->NbItems(); - Standard_Integer i; - for (i = 1; i <= nbitems; i ++) iter.GetOneItem(ent->Item(i)); - for (i = 1; i <= nbitems; i ++) iter.GetOneItem(ent->TransfMatrix(i)); -} - -void IGESSolid_ToolSolidAssembly::OwnCopy - (const Handle(IGESSolid_SolidAssembly)& another, - const Handle(IGESSolid_SolidAssembly)& ent, Interface_CopyTool& TC) const -{ - Standard_Integer nbitems, i; - Handle(IGESData_IGESEntity) anent; - - nbitems = another->NbItems(); - Handle(IGESData_HArray1OfIGESEntity) tempItems = new - IGESData_HArray1OfIGESEntity(1, nbitems); - Handle(IGESGeom_HArray1OfTransformationMatrix) tempMatrices = new - IGESGeom_HArray1OfTransformationMatrix(1, nbitems); - - for (i=1; i<=nbitems; i++) - { - DeclareAndCast(IGESData_IGESEntity, localent, - TC.Transferred(another->Item(i))); - tempItems->SetValue(i, localent); - } - for (i=1; i<=nbitems; i++) - { - DeclareAndCast(IGESGeom_TransformationMatrix, newlocalent, - TC.Transferred(another->TransfMatrix(i))); - tempMatrices->SetValue(i, newlocalent); - } - - ent->Init(tempItems, tempMatrices); -} - IGESData_DirChecker IGESSolid_ToolSolidAssembly::DirChecker (const Handle(IGESSolid_SolidAssembly)& /* ent */ ) const { @@ -148,12 +107,6 @@ IGESData_DirChecker IGESSolid_ToolSolidAssembly::DirChecker return DC; } -void IGESSolid_ToolSolidAssembly::OwnCheck - (const Handle(IGESSolid_SolidAssembly)& /* ent */, - const Interface_ShareTool& , Handle(Interface_Check)& /* ach */) const -{ -} - void IGESSolid_ToolSolidAssembly::OwnDump (const Handle(IGESSolid_SolidAssembly)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolSolidAssembly.hxx b/src/IGESSolid/IGESSolid_ToolSolidAssembly.hxx index 5e138f2256..8b9814a853 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidAssembly.hxx +++ b/src/IGESSolid/IGESSolid_ToolSolidAssembly.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolSolidAssembly { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSolidAssembly, ready to work - Standard_EXPORT IGESSolid_ToolSolidAssembly(); + IGESSolid_ToolSolidAssembly() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_SolidAssembly)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a SolidAssembly , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_SolidAssembly)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_SolidAssembly)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_SolidAssembly)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_SolidAssembly)& entfrom, const Handle(IGESSolid_SolidAssembly)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_SolidAssembly)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolSolidAssembly_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolSolidInstance.cxx b/src/IGESSolid/IGESSolid_ToolSolidInstance.cxx index 54e45e8d67..bfd3ff80d9 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidInstance.cxx +++ b/src/IGESSolid/IGESSolid_ToolSolidInstance.cxx @@ -26,15 +26,12 @@ #include #include #include -#include #include #include #include #include #include -IGESSolid_ToolSolidInstance::IGESSolid_ToolSolidInstance () { } - void IGESSolid_ToolSolidInstance::ReadOwnParams (const Handle(IGESSolid_SolidInstance)& ent, @@ -55,21 +52,6 @@ void IGESSolid_ToolSolidInstance::WriteOwnParams IW.Send(ent->Entity()); } -void IGESSolid_ToolSolidInstance::OwnShared - (const Handle(IGESSolid_SolidInstance)& ent, Interface_EntityIterator& iter) const -{ - iter.GetOneItem(ent->Entity()); -} - -void IGESSolid_ToolSolidInstance::OwnCopy - (const Handle(IGESSolid_SolidInstance)& another, - const Handle(IGESSolid_SolidInstance)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity, tempEntity, - TC.Transferred(another->Entity())); - ent->Init (tempEntity); -} - IGESData_DirChecker IGESSolid_ToolSolidInstance::DirChecker (const Handle(IGESSolid_SolidInstance)& /*ent*/) const { @@ -83,12 +65,6 @@ IGESData_DirChecker IGESSolid_ToolSolidInstance::DirChecker return DC; } -void IGESSolid_ToolSolidInstance::OwnCheck - (const Handle(IGESSolid_SolidInstance)& /*ent*/, - const Interface_ShareTool& , Handle(Interface_Check)& /*ach*/) const -{ -} - void IGESSolid_ToolSolidInstance::OwnDump (const Handle(IGESSolid_SolidInstance)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolSolidInstance.hxx b/src/IGESSolid/IGESSolid_ToolSolidInstance.hxx index 936698283e..86cf9cfd88 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidInstance.hxx +++ b/src/IGESSolid/IGESSolid_ToolSolidInstance.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolSolidInstance { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSolidInstance, ready to work - Standard_EXPORT IGESSolid_ToolSolidInstance(); + IGESSolid_ToolSolidInstance() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_SolidInstance)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a SolidInstance , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_SolidInstance)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_SolidInstance)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_SolidInstance)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_SolidInstance)& entfrom, const Handle(IGESSolid_SolidInstance)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_SolidInstance)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolSolidInstance_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.cxx b/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.cxx index 11f20b22c9..f5b32a3d70 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.cxx +++ b/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.cxx @@ -28,16 +28,12 @@ #include #include #include -#include #include #include #include #include #include -IGESSolid_ToolSolidOfLinearExtrusion::IGESSolid_ToolSolidOfLinearExtrusion () - { } - void IGESSolid_ToolSolidOfLinearExtrusion::ReadOwnParams (const Handle(IGESSolid_SolidOfLinearExtrusion)& ent, @@ -94,23 +90,6 @@ void IGESSolid_ToolSolidOfLinearExtrusion::WriteOwnParams IW.Send(ent->ExtrusionDirection().Z()); } -void IGESSolid_ToolSolidOfLinearExtrusion::OwnShared - (const Handle(IGESSolid_SolidOfLinearExtrusion)& ent, Interface_EntityIterator& iter) const -{ - iter.GetOneItem(ent->Curve()); -} - -void IGESSolid_ToolSolidOfLinearExtrusion::OwnCopy - (const Handle(IGESSolid_SolidOfLinearExtrusion)& another, - const Handle(IGESSolid_SolidOfLinearExtrusion)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity, tempEntity, - TC.Transferred(another->Curve())); - Standard_Real tempLength = another->ExtrusionLength(); - gp_XYZ tempDirection = another->ExtrusionDirection().XYZ(); - ent->Init(tempEntity, tempLength, tempDirection); -} - IGESData_DirChecker IGESSolid_ToolSolidOfLinearExtrusion::DirChecker (const Handle(IGESSolid_SolidOfLinearExtrusion)& /* ent */ ) const { @@ -125,14 +104,6 @@ IGESData_DirChecker IGESSolid_ToolSolidOfLinearExtrusion::DirChecker return DC; } -void IGESSolid_ToolSolidOfLinearExtrusion::OwnCheck - (const Handle(IGESSolid_SolidOfLinearExtrusion)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->ExtrusionLength() <= 0.0) - ach->AddFail("Length of extrusion : Not Positive"); -} - void IGESSolid_ToolSolidOfLinearExtrusion::OwnDump (const Handle(IGESSolid_SolidOfLinearExtrusion)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.hxx b/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.hxx index 100802585f..66b5ca48b4 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.hxx +++ b/src/IGESSolid/IGESSolid_ToolSolidOfLinearExtrusion.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolSolidOfLinearExtrusion { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSolidOfLinearExtrusion, ready to work - Standard_EXPORT IGESSolid_ToolSolidOfLinearExtrusion(); + IGESSolid_ToolSolidOfLinearExtrusion() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_SolidOfLinearExtrusion)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a SolidOfLinearExtrusion , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_SolidOfLinearExtrusion)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_SolidOfLinearExtrusion)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_SolidOfLinearExtrusion)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_SolidOfLinearExtrusion)& entfrom, const Handle(IGESSolid_SolidOfLinearExtrusion)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_SolidOfLinearExtrusion)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolSolidOfLinearExtrusion_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.cxx b/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.cxx index 13a78cdd5b..628631a614 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.cxx +++ b/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.cxx @@ -30,15 +30,12 @@ #include #include #include -#include #include #include #include #include #include -IGESSolid_ToolSolidOfRevolution::IGESSolid_ToolSolidOfRevolution () { } - void IGESSolid_ToolSolidOfRevolution::ReadOwnParams (const Handle(IGESSolid_SolidOfRevolution)& ent, @@ -125,24 +122,6 @@ void IGESSolid_ToolSolidOfRevolution::WriteOwnParams IW.Send(ent->Axis().Z()); } -void IGESSolid_ToolSolidOfRevolution::OwnShared - (const Handle(IGESSolid_SolidOfRevolution)& ent, Interface_EntityIterator& iter) const -{ - iter.GetOneItem(ent->Curve()); -} - -void IGESSolid_ToolSolidOfRevolution::OwnCopy - (const Handle(IGESSolid_SolidOfRevolution)& another, - const Handle(IGESSolid_SolidOfRevolution)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESData_IGESEntity, tempEntity, - TC.Transferred(another->Curve())); - Standard_Real tempFraction = another->Fraction(); - gp_XYZ tempAxisPoint = another->AxisPoint().XYZ(); - gp_XYZ tempAxis= another->Axis().XYZ(); - ent->Init(tempEntity, tempFraction, tempAxisPoint, tempAxis); -} - IGESData_DirChecker IGESSolid_ToolSolidOfRevolution::DirChecker (const Handle(IGESSolid_SolidOfRevolution)& /* ent */ ) const { @@ -157,14 +136,6 @@ IGESData_DirChecker IGESSolid_ToolSolidOfRevolution::DirChecker return DC; } -void IGESSolid_ToolSolidOfRevolution::OwnCheck - (const Handle(IGESSolid_SolidOfRevolution)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->Fraction() <= 0 || ent->Fraction() > 1.0) - ach->AddFail("Fraction of rotation : Incorrect value"); -} - void IGESSolid_ToolSolidOfRevolution::OwnDump (const Handle(IGESSolid_SolidOfRevolution)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.hxx b/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.hxx index 1bde02b2d0..ab32c060f8 100644 --- a/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.hxx +++ b/src/IGESSolid/IGESSolid_ToolSolidOfRevolution.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolSolidOfRevolution { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSolidOfRevolution, ready to work - Standard_EXPORT IGESSolid_ToolSolidOfRevolution(); + IGESSolid_ToolSolidOfRevolution() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_SolidOfRevolution)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a SolidOfRevolution , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_SolidOfRevolution)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_SolidOfRevolution)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_SolidOfRevolution)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_SolidOfRevolution)& entfrom, const Handle(IGESSolid_SolidOfRevolution)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_SolidOfRevolution)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolSolidOfRevolution_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolSphere.cxx b/src/IGESSolid/IGESSolid_ToolSphere.cxx index 131dead26c..c519c40fd6 100644 --- a/src/IGESSolid/IGESSolid_ToolSphere.cxx +++ b/src/IGESSolid/IGESSolid_ToolSphere.cxx @@ -28,14 +28,11 @@ #include #include #include -#include #include #include #include #include -IGESSolid_ToolSphere::IGESSolid_ToolSphere () { } - void IGESSolid_ToolSphere::ReadOwnParams (const Handle(IGESSolid_Sphere)& ent, @@ -84,18 +81,6 @@ void IGESSolid_ToolSphere::WriteOwnParams IW.Send(ent->Center().Z()); } -void IGESSolid_ToolSphere::OwnShared - (const Handle(IGESSolid_Sphere)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESSolid_ToolSphere::OwnCopy - (const Handle(IGESSolid_Sphere)& another, - const Handle(IGESSolid_Sphere)& ent, Interface_CopyTool& /* TC */) const -{ - ent->Init (another->Radius(), another->Center().XYZ()); -} - IGESData_DirChecker IGESSolid_ToolSphere::DirChecker (const Handle(IGESSolid_Sphere)& /* ent */ ) const { @@ -110,14 +95,6 @@ IGESData_DirChecker IGESSolid_ToolSphere::DirChecker return DC; } -void IGESSolid_ToolSphere::OwnCheck - (const Handle(IGESSolid_Sphere)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->Radius() <= 0.0) - ach->AddFail("Radius : Not Positive"); -} - void IGESSolid_ToolSphere::OwnDump (const Handle(IGESSolid_Sphere)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolSphere.hxx b/src/IGESSolid/IGESSolid_ToolSphere.hxx index ba888fef7e..f911c4858e 100644 --- a/src/IGESSolid/IGESSolid_ToolSphere.hxx +++ b/src/IGESSolid/IGESSolid_ToolSphere.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolSphere { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSphere, ready to work - Standard_EXPORT IGESSolid_ToolSphere(); + IGESSolid_ToolSphere() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_Sphere)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Sphere , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_Sphere)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_Sphere)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_Sphere)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_Sphere)& entfrom, const Handle(IGESSolid_Sphere)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_Sphere)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolSphere_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolSphericalSurface.cxx b/src/IGESSolid/IGESSolid_ToolSphericalSurface.cxx index 813b8e8ac9..61aa9abf3e 100644 --- a/src/IGESSolid/IGESSolid_ToolSphericalSurface.cxx +++ b/src/IGESSolid/IGESSolid_ToolSphericalSurface.cxx @@ -27,15 +27,12 @@ #include #include #include -#include #include #include #include #include #include -IGESSolid_ToolSphericalSurface::IGESSolid_ToolSphericalSurface () { } - void IGESSolid_ToolSphericalSurface::ReadOwnParams (const Handle(IGESSolid_SphericalSurface)& ent, @@ -78,38 +75,6 @@ void IGESSolid_ToolSphericalSurface::WriteOwnParams } } -void IGESSolid_ToolSphericalSurface::OwnShared - (const Handle(IGESSolid_SphericalSurface)& ent, Interface_EntityIterator& iter) const -{ - iter.GetOneItem(ent->Center()); - iter.GetOneItem(ent->Axis()); - iter.GetOneItem(ent->ReferenceDir()); -} - -void IGESSolid_ToolSphericalSurface::OwnCopy - (const Handle(IGESSolid_SphericalSurface)& another, - const Handle(IGESSolid_SphericalSurface)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESGeom_Point, tempCenter, - TC.Transferred(another->Center())); - Standard_Real tempRadius = another->Radius(); - if (another->IsParametrised()) - { - DeclareAndCast(IGESGeom_Direction, tempAxis, - TC.Transferred(another->Axis())); - DeclareAndCast(IGESGeom_Direction, tempRefdir, - TC.Transferred(another->ReferenceDir())); - ent->Init (tempCenter, tempRadius, tempAxis, tempRefdir); - } - else - { - Handle(IGESGeom_Direction) tempAxis; - Handle(IGESGeom_Direction) tempRefdir; - ent->Init (tempCenter, tempRadius, tempAxis, tempRefdir); - } - -} - IGESData_DirChecker IGESSolid_ToolSphericalSurface::DirChecker (const Handle(IGESSolid_SphericalSurface)& /*ent*/) const { @@ -125,20 +90,6 @@ IGESData_DirChecker IGESSolid_ToolSphericalSurface::DirChecker return DC; } -void IGESSolid_ToolSphericalSurface::OwnCheck - (const Handle(IGESSolid_SphericalSurface)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->Radius() <= 0.0) - ach->AddFail("Radius : Not Positive"); - Standard_Integer fn = 0; - if (ent->IsParametrised()) fn = 1; - if (fn != ent->FormNumber()) ach->AddFail - ("Parametrised Status Mismatches with Form Number"); - if (ent->Axis().IsNull()) if (ent->IsParametrised()) ach->AddFail - ("Parametrised Spherical Surface : no Axis is defined"); -} - void IGESSolid_ToolSphericalSurface::OwnDump (const Handle(IGESSolid_SphericalSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolSphericalSurface.hxx b/src/IGESSolid/IGESSolid_ToolSphericalSurface.hxx index d6236f9821..23e1f8d549 100644 --- a/src/IGESSolid/IGESSolid_ToolSphericalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToolSphericalSurface.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolSphericalSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolSphericalSurface, ready to work - Standard_EXPORT IGESSolid_ToolSphericalSurface(); + IGESSolid_ToolSphericalSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_SphericalSurface)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a SphericalSurface , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_SphericalSurface)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_SphericalSurface)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_SphericalSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_SphericalSurface)& entfrom, const Handle(IGESSolid_SphericalSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_SphericalSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolSphericalSurface_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolToroidalSurface.cxx b/src/IGESSolid/IGESSolid_ToolToroidalSurface.cxx index 1106c165e0..8a87bec2ac 100644 --- a/src/IGESSolid/IGESSolid_ToolToroidalSurface.cxx +++ b/src/IGESSolid/IGESSolid_ToolToroidalSurface.cxx @@ -27,15 +27,12 @@ #include #include #include -#include #include #include #include #include #include -IGESSolid_ToolToroidalSurface::IGESSolid_ToolToroidalSurface () { } - void IGESSolid_ToolToroidalSurface::ReadOwnParams (const Handle(IGESSolid_ToroidalSurface)& ent, @@ -74,37 +71,6 @@ void IGESSolid_ToolToroidalSurface::WriteOwnParams if (ent->IsParametrised()) IW.Send(ent->ReferenceDir()); } -void IGESSolid_ToolToroidalSurface::OwnShared - (const Handle(IGESSolid_ToroidalSurface)& ent, Interface_EntityIterator& iter) const -{ - iter.GetOneItem(ent->Center()); - iter.GetOneItem(ent->Axis()); - iter.GetOneItem(ent->ReferenceDir()); -} - -void IGESSolid_ToolToroidalSurface::OwnCopy - (const Handle(IGESSolid_ToroidalSurface)& another, - const Handle(IGESSolid_ToroidalSurface)& ent, Interface_CopyTool& TC) const -{ - DeclareAndCast(IGESGeom_Point, tempCenter, - TC.Transferred(another->Center())); - DeclareAndCast(IGESGeom_Direction, tempAxis, - TC.Transferred(another->Axis())); - Standard_Real majRad = another->MajorRadius(); - Standard_Real minRad = another->MinorRadius(); - if (another->IsParametrised()) - { - DeclareAndCast(IGESGeom_Direction, tempRefdir, - TC.Transferred(another->ReferenceDir())); - ent->Init (tempCenter, tempAxis, majRad, minRad, tempRefdir); - } - else - { - Handle(IGESGeom_Direction) tempRefdir; - ent->Init (tempCenter, tempAxis, majRad, minRad, tempRefdir); - } -} - IGESData_DirChecker IGESSolid_ToolToroidalSurface::DirChecker (const Handle(IGESSolid_ToroidalSurface)& /*ent*/) const { @@ -120,22 +86,6 @@ IGESData_DirChecker IGESSolid_ToolToroidalSurface::DirChecker return DC; } -void IGESSolid_ToolToroidalSurface::OwnCheck - (const Handle(IGESSolid_ToroidalSurface)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->MajorRadius() <= 0.0) - ach->AddFail("Major Radius : Not Positive"); - if (ent->MinorRadius() <= 0.0) - ach->AddFail("Minor Radius : Not Positive"); - if (ent->MinorRadius() >= ent->MajorRadius()) - ach->AddFail("Minor Radius : Value not < Major radius"); - Standard_Integer fn = 0; - if (ent->IsParametrised()) fn = 1; - if (fn != ent->FormNumber()) ach->AddFail - ("Parametrised Status Mismatches with Form Number"); -} - void IGESSolid_ToolToroidalSurface::OwnDump (const Handle(IGESSolid_ToroidalSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolToroidalSurface.hxx b/src/IGESSolid/IGESSolid_ToolToroidalSurface.hxx index 602e9b6d08..caf1b9a887 100644 --- a/src/IGESSolid/IGESSolid_ToolToroidalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToolToroidalSurface.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolToroidalSurface { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolToroidalSurface, ready to work - Standard_EXPORT IGESSolid_ToolToroidalSurface(); + IGESSolid_ToolToroidalSurface() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_ToroidalSurface)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a ToroidalSurface , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_ToroidalSurface)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_ToroidalSurface)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_ToroidalSurface)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_ToroidalSurface)& entfrom, const Handle(IGESSolid_ToroidalSurface)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_ToroidalSurface)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolToroidalSurface_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolTorus.cxx b/src/IGESSolid/IGESSolid_ToolTorus.cxx index 17647e5679..9d1b61c19f 100644 --- a/src/IGESSolid/IGESSolid_ToolTorus.cxx +++ b/src/IGESSolid/IGESSolid_ToolTorus.cxx @@ -29,14 +29,11 @@ #include #include #include -#include #include #include #include #include -IGESSolid_ToolTorus::IGESSolid_ToolTorus () { } - void IGESSolid_ToolTorus::ReadOwnParams (const Handle(IGESSolid_Torus)& ent, @@ -118,19 +115,6 @@ void IGESSolid_ToolTorus::WriteOwnParams IW.Send(ent->Axis().Z()); } -void IGESSolid_ToolTorus::OwnShared - (const Handle(IGESSolid_Torus)& /* ent */, Interface_EntityIterator& /* iter */) const -{ -} - -void IGESSolid_ToolTorus::OwnCopy - (const Handle(IGESSolid_Torus)& another, - const Handle(IGESSolid_Torus)& ent, Interface_CopyTool& /* TC */) const -{ - ent->Init (another->MajorRadius(), another->DiscRadius(), - another->AxisPoint().XYZ(), another->Axis().XYZ()); -} - IGESData_DirChecker IGESSolid_ToolTorus::DirChecker (const Handle(IGESSolid_Torus)& /* ent */ ) const { @@ -145,18 +129,6 @@ IGESData_DirChecker IGESSolid_ToolTorus::DirChecker return DC; } -void IGESSolid_ToolTorus::OwnCheck - (const Handle(IGESSolid_Torus)& ent, - const Interface_ShareTool& , Handle(Interface_Check)& ach) const -{ - if (ent->MajorRadius() <= 0.0) - ach->AddFail("Radius of revolution : Not Positive"); - if (ent->DiscRadius() <= 0.0) - ach->AddFail("Radius of disc : Not Positive"); - if (ent->DiscRadius() >= ent->MajorRadius()) - ach->AddFail("Radius of disc : is not Less than Radius of revolution"); -} - void IGESSolid_ToolTorus::OwnDump (const Handle(IGESSolid_Torus)& ent, const IGESData_IGESDumper& /* dumper */, const Handle(Message_Messenger)& S, const Standard_Integer level) const diff --git a/src/IGESSolid/IGESSolid_ToolTorus.hxx b/src/IGESSolid/IGESSolid_ToolTorus.hxx index de3ca1f6e0..5690bab473 100644 --- a/src/IGESSolid/IGESSolid_ToolTorus.hxx +++ b/src/IGESSolid/IGESSolid_ToolTorus.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolTorus { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolTorus, ready to work - Standard_EXPORT IGESSolid_ToolTorus(); + IGESSolid_ToolTorus() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_Torus)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a Torus , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_Torus)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_Torus)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_Torus)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_Torus)& entfrom, const Handle(IGESSolid_Torus)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_Torus)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolTorus_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToolVertexList.cxx b/src/IGESSolid/IGESSolid_ToolVertexList.cxx index 2b3486dad1..1802362ed1 100644 --- a/src/IGESSolid/IGESSolid_ToolVertexList.cxx +++ b/src/IGESSolid/IGESSolid_ToolVertexList.cxx @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -37,15 +36,6 @@ #include #include -// MGE 03/08/98 -//======================================================================= -//function : IGESSolid_ToolVertexList -//purpose : -//======================================================================= -IGESSolid_ToolVertexList::IGESSolid_ToolVertexList () -{ -} - //======================================================================= //function : ReadOwnParams @@ -117,40 +107,6 @@ void IGESSolid_ToolVertexList::WriteOwnParams(const Handle(IGESSolid_VertexList) } -//======================================================================= -//function : OwnShared -//purpose : -//======================================================================= - -void IGESSolid_ToolVertexList::OwnShared(const Handle(IGESSolid_VertexList)& /* ent */, - Interface_EntityIterator& /* iter */) const -{ -} - - -//======================================================================= -//function : OwnCopy -//purpose : -//======================================================================= - -void IGESSolid_ToolVertexList::OwnCopy(const Handle(IGESSolid_VertexList)& another, - const Handle(IGESSolid_VertexList)& ent, - Interface_CopyTool& /* TC */) const -{ - Standard_Integer nbitems, i; - - nbitems = another->NbVertices(); - Handle(TColgp_HArray1OfXYZ) tempVertices = new - TColgp_HArray1OfXYZ(1, nbitems); - - for (i=1; i<=nbitems; i++) - { - tempVertices->SetValue(i, another->Vertex(i).XYZ()); - } - ent->Init(tempVertices); -} - - //======================================================================= //function : DirChecker //purpose : @@ -172,28 +128,6 @@ IGESData_DirChecker IGESSolid_ToolVertexList::DirChecker } -//======================================================================= -//function : OwnCheck -//purpose : -//======================================================================= - -void IGESSolid_ToolVertexList::OwnCheck(const Handle(IGESSolid_VertexList)& ent, - const Interface_ShareTool&, - Handle(Interface_Check)& ach) const -{ - // MGE 03/08/98 - // Building of messages - //======================================== - //Message_Msg Msg182("XSTEP_182"); - //======================================== - - if (ent->NbVertices() <= 0) { - Message_Msg Msg182("XSTEP_182"); - ach->SendFail(Msg182); - } -} - - //======================================================================= //function : OwnDump //purpose : diff --git a/src/IGESSolid/IGESSolid_ToolVertexList.hxx b/src/IGESSolid/IGESSolid_ToolVertexList.hxx index b090940537..17a56f9c40 100644 --- a/src/IGESSolid/IGESSolid_ToolVertexList.hxx +++ b/src/IGESSolid/IGESSolid_ToolVertexList.hxx @@ -31,7 +31,6 @@ class Interface_EntityIterator; class IGESData_DirChecker; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class IGESData_IGESDumper; class Message_Messenger; @@ -40,13 +39,12 @@ class Message_Messenger; //! (ReadWriteModule, GeneralModule, SpecificModule) class IGESSolid_ToolVertexList { -public: + public: DEFINE_STANDARD_ALLOC - //! Returns a ToolVertexList, ready to work - Standard_EXPORT IGESSolid_ToolVertexList(); + IGESSolid_ToolVertexList() {} //! Reads own parameters from file. gives access to them, //! detains parameter types and values @@ -55,43 +53,11 @@ public: //! Writes own parameters to IGESWriter Standard_EXPORT void WriteOwnParams (const Handle(IGESSolid_VertexList)& ent, IGESData_IGESWriter& IW) const; - //! Lists the Entities shared by a VertexList , from - //! its specific (own) parameters - Standard_EXPORT void OwnShared (const Handle(IGESSolid_VertexList)& ent, Interface_EntityIterator& iter) const; - //! Returns specific DirChecker Standard_EXPORT IGESData_DirChecker DirChecker (const Handle(IGESSolid_VertexList)& ent) const; - //! Performs Specific Semantic Check - Standard_EXPORT void OwnCheck (const Handle(IGESSolid_VertexList)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const; - - //! Copies Specific Parameters - Standard_EXPORT void OwnCopy (const Handle(IGESSolid_VertexList)& entfrom, const Handle(IGESSolid_VertexList)& entto, Interface_CopyTool& TC) const; - //! Dump of Specific Parameters Standard_EXPORT void OwnDump (const Handle(IGESSolid_VertexList)& ent, const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S, const Standard_Integer own) const; - - - - -protected: - - - - - -private: - - - - - }; - - - - - - #endif // _IGESSolid_ToolVertexList_HeaderFile diff --git a/src/IGESSolid/IGESSolid_ToroidalSurface.cxx b/src/IGESSolid/IGESSolid_ToroidalSurface.cxx index bf07535bb8..32eb582d2d 100644 --- a/src/IGESSolid/IGESSolid_ToroidalSurface.cxx +++ b/src/IGESSolid/IGESSolid_ToroidalSurface.cxx @@ -21,14 +21,11 @@ #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_ToroidalSurface,IGESData_IGESEntity) -IGESSolid_ToroidalSurface::IGESSolid_ToroidalSurface () { } - - - void IGESSolid_ToroidalSurface::Init +void IGESSolid_ToroidalSurface::Init (const Handle(IGESGeom_Point)& aCenter, const Handle(IGESGeom_Direction)& anAxis, const Standard_Real majRadius, const Standard_Real minRadius, @@ -42,43 +39,31 @@ IGESSolid_ToroidalSurface::IGESSolid_ToroidalSurface () { } InitTypeAndForm(198, (theRefDir.IsNull() ? 0 : 1) ); } - Handle(IGESGeom_Point) IGESSolid_ToroidalSurface::Center () const +gp_Pnt IGESSolid_ToroidalSurface::TransformedCenter () const { - return theCenter; -} + if (!HasTransf()) + return theCenter->Value(); - gp_Pnt IGESSolid_ToroidalSurface::TransformedCenter () const -{ - if (!HasTransf()) return theCenter->Value(); - else - { - gp_XYZ tmp = theCenter->Value().XYZ(); - Location().Transforms(tmp); - return gp_Pnt(tmp); - } -} - - Handle(IGESGeom_Direction) IGESSolid_ToroidalSurface::Axis () const -{ - return theAxis; -} - - Standard_Real IGESSolid_ToroidalSurface::MajorRadius () const -{ - return theMajorRadius; -} - - Standard_Real IGESSolid_ToroidalSurface::MinorRadius () const -{ - return theMinorRadius; + gp_XYZ tmp = theCenter->Value().XYZ(); + Location().Transforms(tmp); + return gp_Pnt(tmp); } - Handle(IGESGeom_Direction) IGESSolid_ToroidalSurface::ReferenceDir () const +void IGESSolid_ToroidalSurface::OwnShared(Interface_EntityIterator &theIter) const { - return theRefDir; + theIter.GetOneItem(Center()); + theIter.GetOneItem(Axis()); + theIter.GetOneItem(ReferenceDir()); } - Standard_Boolean IGESSolid_ToroidalSurface::IsParametrised () const +void IGESSolid_ToroidalSurface::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - return !(theRefDir.IsNull()); + if (MajorRadius() <= 0.0) + theCheck->AddFail("Major Radius : Not Positive"); + if (MinorRadius() <= 0.0) + theCheck->AddFail("Minor Radius : Not Positive"); + if (MinorRadius() >= MajorRadius()) + theCheck->AddFail("Minor Radius : Value not < Major radius"); + const Standard_Integer fn = (IsParametrised()? 1 : 0); + if (fn != FormNumber()) theCheck->AddFail("Parametrised Status Mismatches with Form Number"); } diff --git a/src/IGESSolid/IGESSolid_ToroidalSurface.hxx b/src/IGESSolid/IGESSolid_ToroidalSurface.hxx index 0f8dd539b5..c3f17b2367 100644 --- a/src/IGESSolid/IGESSolid_ToroidalSurface.hxx +++ b/src/IGESSolid/IGESSolid_ToroidalSurface.hxx @@ -17,12 +17,7 @@ #ifndef _IGESSolid_ToroidalSurface_HeaderFile #define _IGESSolid_ToroidalSurface_HeaderFile -#include -#include - -#include #include -#include class IGESGeom_Point; class IGESGeom_Direction; class gp_Pnt; @@ -38,11 +33,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_ToroidalSurface, IGESData_IGESEntity) //! parametrised surface a reference direction is provided. class IGESSolid_ToroidalSurface : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_ToroidalSurface(); + IGESSolid_ToroidalSurface() {} //! This method is used to set the fields of the class //! ToroidalSurface @@ -55,54 +48,41 @@ public: Standard_EXPORT void Init (const Handle(IGESGeom_Point)& aCenter, const Handle(IGESGeom_Direction)& anAxis, const Standard_Real majRadius, const Standard_Real minRadius, const Handle(IGESGeom_Direction)& Refdir); //! returns the center point coordinates of the surface - Standard_EXPORT Handle(IGESGeom_Point) Center() const; + const Handle(IGESGeom_Point) & Center() const { return theCenter; } //! returns the center point coordinates of the surface //! after applying TransformationMatrix Standard_EXPORT gp_Pnt TransformedCenter() const; //! returns the direction of the axis - Standard_EXPORT Handle(IGESGeom_Direction) Axis() const; - + const Handle(IGESGeom_Direction) & Axis() const { return theAxis; } + //! returns the major radius of the surface - Standard_EXPORT Standard_Real MajorRadius() const; - + Standard_Real MajorRadius() const { return theMajorRadius; } + //! returns the minor radius of the surface - Standard_EXPORT Standard_Real MinorRadius() const; - + Standard_Real MinorRadius() const { return theMinorRadius; } + //! returns the reference direction (parametrised surface) //! Null is returned if the surface is not parametrised - Standard_EXPORT Handle(IGESGeom_Direction) ReferenceDir() const; - - //! Returns True if the surface is parametrised, else False - Standard_EXPORT Standard_Boolean IsParametrised() const; + const Handle(IGESGeom_Direction) & ReferenceDir() const { return theRefDir; } + //! Returns True if the surface is parametrised, else False + Standard_Boolean IsParametrised() const { return !(theRefDir.IsNull()); } + Standard_EXPORT virtual void OwnShared(Interface_EntityIterator &theIter) const Standard_OVERRIDE; + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_ToroidalSurface,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(IGESGeom_Point) theCenter; Handle(IGESGeom_Direction) theAxis; Standard_Real theMajorRadius; Standard_Real theMinorRadius; Handle(IGESGeom_Direction) theRefDir; - - }; - - - - - - #endif // _IGESSolid_ToroidalSurface_HeaderFile diff --git a/src/IGESSolid/IGESSolid_Torus.cxx b/src/IGESSolid/IGESSolid_Torus.cxx index f2490cbc26..0f08636369 100644 --- a/src/IGESSolid/IGESSolid_Torus.cxx +++ b/src/IGESSolid/IGESSolid_Torus.cxx @@ -19,16 +19,11 @@ #include #include #include -#include #include -#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_Torus,IGESData_IGESEntity) -IGESSolid_Torus::IGESSolid_Torus () { } - - - void IGESSolid_Torus::Init +void IGESSolid_Torus::Init (const Standard_Real R1, const Standard_Real R2, const gp_XYZ& Point, const gp_XYZ& Axisdir) { @@ -39,46 +34,44 @@ IGESSolid_Torus::IGESSolid_Torus () { } InitTypeAndForm(160,0); } - Standard_Real IGESSolid_Torus::MajorRadius () const +gp_Pnt IGESSolid_Torus::AxisPoint () const { - return theR1; + return gp_Pnt(thePoint); } - Standard_Real IGESSolid_Torus::DiscRadius () const +gp_Pnt IGESSolid_Torus::TransformedAxisPoint () const { - return theR2; -} + if (!HasTransf()) + return gp_Pnt(thePoint); - gp_Pnt IGESSolid_Torus::AxisPoint () const -{ - return gp_Pnt(thePoint); + gp_XYZ pnt = thePoint; + Location().Transforms(pnt); + return gp_Pnt(pnt); } - gp_Pnt IGESSolid_Torus::TransformedAxisPoint () const +gp_Dir IGESSolid_Torus::Axis () const { - if (!HasTransf()) return gp_Pnt(thePoint); - else - { - gp_XYZ pnt = thePoint; - Location().Transforms(pnt); - return gp_Pnt(pnt); - } + return gp_Dir(theAxis); } - gp_Dir IGESSolid_Torus::Axis () const +gp_Dir IGESSolid_Torus::TransformedAxis () const { - return gp_Dir(theAxis); + if (!HasTransf()) + return gp_Dir(theAxis); + + gp_XYZ pnt = theAxis; + gp_GTrsf loc = Location(); + loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); + loc.Transforms(pnt); + return gp_Dir(pnt); } - gp_Dir IGESSolid_Torus::TransformedAxis () const +void IGESSolid_Torus::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const { - if (!HasTransf()) return gp_Dir(theAxis); - else - { - gp_XYZ pnt = theAxis; - gp_GTrsf loc = Location(); - loc.SetTranslationPart(gp_XYZ(0.,0.,0.)); - loc.Transforms(pnt); - return gp_Dir(pnt); - } + if (MajorRadius() <= 0.0) + theCheck->AddFail("Radius of revolution : Not Positive"); + if (DiscRadius() <= 0.0) + theCheck->AddFail("Radius of disc : Not Positive"); + if (DiscRadius() >= MajorRadius()) + theCheck->AddFail("Radius of disc : is not Less than Radius of revolution"); } diff --git a/src/IGESSolid/IGESSolid_Torus.hxx b/src/IGESSolid/IGESSolid_Torus.hxx index a43e359c1a..1ba862a6f5 100644 --- a/src/IGESSolid/IGESSolid_Torus.hxx +++ b/src/IGESSolid/IGESSolid_Torus.hxx @@ -17,13 +17,8 @@ #ifndef _IGESSolid_Torus_HeaderFile #define _IGESSolid_Torus_HeaderFile -#include -#include - -#include #include #include -class gp_XYZ; class gp_Pnt; class gp_Dir; @@ -37,11 +32,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_Torus, IGESData_IGESEntity) //! about a specified coplanar axis. class IGESSolid_Torus : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_Torus(); + IGESSolid_Torus() {} //! This method is used to set the fields of the class Torus //! - R1 : distance from center of torus to center @@ -53,11 +46,11 @@ public: //! returns the distance from the center of torus to the center of //! the disc to be revolved - Standard_EXPORT Standard_Real MajorRadius() const; - + Standard_Real MajorRadius() const { return theR1; } + //! returns the radius of the disc to be revolved - Standard_EXPORT Standard_Real DiscRadius() const; - + Standard_Real DiscRadius() const { return theR2; } + //! returns the center of torus Standard_EXPORT gp_Pnt AxisPoint() const; @@ -70,31 +63,16 @@ public: //! returns direction of the axis after applying TransformationMatrix Standard_EXPORT gp_Dir TransformedAxis() const; - - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_Torus,IGESData_IGESEntity) -protected: - - - - -private: - + private: Standard_Real theR1; Standard_Real theR2; gp_XYZ thePoint; gp_XYZ theAxis; - - }; - - - - - - #endif // _IGESSolid_Torus_HeaderFile diff --git a/src/IGESSolid/IGESSolid_VertexList.cxx b/src/IGESSolid/IGESSolid_VertexList.cxx index fdc89cfc76..ada57ad069 100644 --- a/src/IGESSolid/IGESSolid_VertexList.cxx +++ b/src/IGESSolid/IGESSolid_VertexList.cxx @@ -20,14 +20,11 @@ #include #include #include -#include +#include IMPLEMENT_STANDARD_RTTIEXT(IGESSolid_VertexList,IGESData_IGESEntity) -IGESSolid_VertexList::IGESSolid_VertexList () { } - - - void IGESSolid_VertexList::Init +void IGESSolid_VertexList::Init (const Handle(TColgp_HArray1OfXYZ)& Vertices) { if (Vertices.IsNull() || Vertices->Lower() != 1) @@ -36,12 +33,20 @@ IGESSolid_VertexList::IGESSolid_VertexList () { } InitTypeAndForm(502,1); } - Standard_Integer IGESSolid_VertexList::NbVertices () const +Standard_Integer IGESSolid_VertexList::NbVertices () const { return (theVertices.IsNull() ? 0 : theVertices->Length()); } - gp_Pnt IGESSolid_VertexList::Vertex (const Standard_Integer Index) const +gp_Pnt IGESSolid_VertexList::Vertex (const Standard_Integer Index) const { return gp_Pnt(theVertices->Value(Index)); } + +void IGESSolid_VertexList::OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &theCheck) const +{ + if (NbVertices() <= 0) { + Message_Msg Msg182("XSTEP_182"); + theCheck->SendFail(Msg182); + } +} diff --git a/src/IGESSolid/IGESSolid_VertexList.hxx b/src/IGESSolid/IGESSolid_VertexList.hxx index d8f0ed8d94..aafe0cbdc9 100644 --- a/src/IGESSolid/IGESSolid_VertexList.hxx +++ b/src/IGESSolid/IGESSolid_VertexList.hxx @@ -17,13 +17,8 @@ #ifndef _IGESSolid_VertexList_HeaderFile #define _IGESSolid_VertexList_HeaderFile -#include -#include - #include #include -#include -class Standard_OutOfRange; class gp_Pnt; @@ -37,11 +32,9 @@ DEFINE_STANDARD_HANDLE(IGESSolid_VertexList, IGESData_IGESEntity) //! It contains one or more vertices. class IGESSolid_VertexList : public IGESData_IGESEntity { + public: -public: - - - Standard_EXPORT IGESSolid_VertexList(); + IGESSolid_VertexList() {} //! This method is used to set the fields of the class //! VertexList @@ -55,28 +48,13 @@ public: //! raises exception if num <= 0 or num > NbVertices() Standard_EXPORT gp_Pnt Vertex (const Standard_Integer num) const; - - + Standard_EXPORT virtual void OwnCheck (const Interface_ShareTool &, const Handle(Interface_Check) &) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(IGESSolid_VertexList,IGESData_IGESEntity) -protected: - - - - -private: - + private: Handle(TColgp_HArray1OfXYZ) theVertices; - - }; - - - - - - #endif // _IGESSolid_VertexList_HeaderFile diff --git a/src/IGESToBRep/IGESToBRep_Reader.cxx b/src/IGESToBRep/IGESToBRep_Reader.cxx index c464c83316..64735ec516 100644 --- a/src/IGESToBRep/IGESToBRep_Reader.cxx +++ b/src/IGESToBRep/IGESToBRep_Reader.cxx @@ -19,15 +19,11 @@ #include #include #include -#include -#include -#include #include #include #include #include -#include -#include +#include #include #include #include @@ -64,9 +60,6 @@ #else #include #endif -//extern int errno; - -static Handle(IGESData_FileProtocol) protocol; //======================================================================= @@ -76,13 +69,10 @@ static Handle(IGESData_FileProtocol) protocol; IGESToBRep_Reader::IGESToBRep_Reader () { + IGESControl_Controller::Init(); + IGESControl_Controller::DefineProtocol(); + theDone = Standard_False; - if (protocol.IsNull()) { - IGESAppli::Init(); IGESSolid::Init(); - protocol = new IGESData_FileProtocol; - protocol->Add(IGESAppli::Protocol()); - protocol->Add(IGESSolid::Protocol()); - } theActor = new IGESToBRep_Actor; theProc = new Transfer_TransientProcess; } @@ -111,6 +101,7 @@ Standard_Integer IGESToBRep_Reader::LoadFile (const Standard_CString filename) OSD_Timer c; c.Reset(); c.Start(); char *pfilename=(char *)filename; + const Handle(IGESData_Protocol) &protocol = IGESControl_Controller::DefineProtocol(); Standard_Integer StatusFile = IGESFile_Read(pfilename,model,protocol); if (StatusFile != 0) { // Sending of message : IGES file opening error @@ -214,6 +205,7 @@ void IGESToBRep_Reader::SetModel (const Handle(IGESData_IGESModel)& model) Standard_Boolean IGESToBRep_Reader::Check (const Standard_Boolean withprint) const { + const Handle(IGESData_Protocol) &protocol = IGESControl_Controller::DefineProtocol(); Interface_CheckTool cht (theModel,protocol); Interface_CheckIterator chl = cht.CompleteCheckList(); if (withprint && !theProc.IsNull()) @@ -281,7 +273,7 @@ void IGESToBRep_Reader::TransferRoots (const Standard_Boolean onlyvisible) theProc->SetModel (theModel); theProc->SetActor (theActor); - const Handle(Interface_Protocol) aProtocol = protocol; // to avoid ambiguity + const Handle(Interface_Protocol) aProtocol = IGESControl_Controller::DefineProtocol(); Interface_ShareFlags SH (theModel, aProtocol); Standard_Integer nb = theModel->NbEntities(); ShapeExtend_Explorer SBE; diff --git a/src/Interface/FILES b/src/Interface/FILES index cc0c7289ed..42ffbfc9e1 100755 --- a/src/Interface/FILES +++ b/src/Interface/FILES @@ -12,12 +12,6 @@ Interface_CheckIterator.hxx Interface_CheckStatus.hxx Interface_CheckTool.cxx Interface_CheckTool.hxx -Interface_CopyControl.cxx -Interface_CopyControl.hxx -Interface_CopyMap.cxx -Interface_CopyMap.hxx -Interface_CopyTool.cxx -Interface_CopyTool.hxx Interface_DataMapIteratorOfDataMapOfTransientInteger.hxx Interface_DataMapOfTransientInteger.hxx Interface_DataState.hxx diff --git a/src/Interface/Interface_CopyControl.cxx b/src/Interface/Interface_CopyControl.cxx deleted file mode 100644 index 6e34d376cb..0000000000 --- a/src/Interface/Interface_CopyControl.cxx +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(Interface_CopyControl,MMgt_TShared) \ No newline at end of file diff --git a/src/Interface/Interface_CopyControl.hxx b/src/Interface/Interface_CopyControl.hxx deleted file mode 100644 index 666de642c3..0000000000 --- a/src/Interface/Interface_CopyControl.hxx +++ /dev/null @@ -1,80 +0,0 @@ -// Created on: 1993-04-08 -// Created by: Christian CAILLET -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Interface_CopyControl_HeaderFile -#define _Interface_CopyControl_HeaderFile - -#include -#include - -#include -#include -class Interface_InterfaceError; -class Standard_Transient; - - -class Interface_CopyControl; -DEFINE_STANDARD_HANDLE(Interface_CopyControl, MMgt_TShared) - -//! This deferred class describes the services required by -//! CopyTool to work. They are very simple and correspond -//! basically to the management of an indexed map. -//! But they can be provided by various classes which can -//! control a Transfer. Each Starting Entity have at most -//! one Result (Mapping one-one) -class Interface_CopyControl : public MMgt_TShared -{ - -public: - - - //! Clears List of Copy Results. Gets Ready to begin another Copy - //! Process. - Standard_EXPORT virtual void Clear() = 0; - - //! Bind a Result to a Starting Entity identified by its Number - Standard_EXPORT virtual void Bind (const Handle(Standard_Transient)& ent, const Handle(Standard_Transient)& res) = 0; - - //! Searches for the Result bound to a Startingf Entity identified - //! by its Number. - //! If Found, returns True and fills - //! Else, returns False and nullifies - Standard_EXPORT virtual Standard_Boolean Search (const Handle(Standard_Transient)& ent, Handle(Standard_Transient)& res) const = 0; - - - - - DEFINE_STANDARD_RTTIEXT(Interface_CopyControl,MMgt_TShared) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _Interface_CopyControl_HeaderFile diff --git a/src/Interface/Interface_CopyMap.cxx b/src/Interface/Interface_CopyMap.cxx deleted file mode 100644 index 803a4aca37..0000000000 --- a/src/Interface/Interface_CopyMap.cxx +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(Interface_CopyMap,Interface_CopyControl) - -// CopyMap : rien de plus qu une Map passive -Interface_CopyMap::Interface_CopyMap - (const Handle(Interface_InterfaceModel)& amodel) - : theres (0,amodel->NbEntities()) - { themod = amodel; } - - - void Interface_CopyMap::Clear () -{ - Standard_Integer nb = theres.Upper(); - Handle(Standard_Transient) bid; // Null - for (Standard_Integer i = 1; i <= nb; i ++) theres.SetValue(i,bid); -} - - Handle(Interface_InterfaceModel) Interface_CopyMap::Model () const - { return themod; } - - void Interface_CopyMap::Bind - (const Handle(Standard_Transient)& ent, - const Handle(Standard_Transient)& res) -{ - Standard_Integer num = themod->Number(ent); - if (num == 0 || num > theres.Upper()) Interface_InterfaceError::Raise - ("CopyMap : Bind, Starting Entity not issued from Starting Model"); - if (!theres.Value(num).IsNull()) Interface_InterfaceError::Raise - ("CopyMap : Bind, Starting Entity already bound"); - theres.SetValue(num,res); -} - - - Standard_Boolean Interface_CopyMap::Search - (const Handle(Standard_Transient)& ent, - Handle(Standard_Transient)& res) const -{ - Standard_Integer num = themod->Number(ent); - if (num == 0) return Standard_False; - res = theres.Value(num); - return (!res.IsNull()); -} diff --git a/src/Interface/Interface_CopyMap.hxx b/src/Interface/Interface_CopyMap.hxx deleted file mode 100644 index a3b838f34a..0000000000 --- a/src/Interface/Interface_CopyMap.hxx +++ /dev/null @@ -1,88 +0,0 @@ -// Created on: 1993-03-16 -// Created by: Christian CAILLET -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Interface_CopyMap_HeaderFile -#define _Interface_CopyMap_HeaderFile - -#include -#include - -#include -#include -#include -class Interface_InterfaceModel; -class Interface_InterfaceError; -class Standard_Transient; - - -class Interface_CopyMap; -DEFINE_STANDARD_HANDLE(Interface_CopyMap, Interface_CopyControl) - -//! Manages a Map for the need of single Transfers, such as Copies -//! In such transfer, Starting Entities are read from a unique -//! Starting Model, and each transferred Entity is bound to one -//! and only one Result, which cannot be changed later. -class Interface_CopyMap : public Interface_CopyControl -{ - -public: - - - //! Creates a CopyMap adapted to work from a Model - Standard_EXPORT Interface_CopyMap(const Handle(Interface_InterfaceModel)& amodel); - - //! Clears Transfer List. Gets Ready to begin another Transfer - Standard_EXPORT void Clear() Standard_OVERRIDE; - - //! Returns the InterfaceModel used at Creation time - Standard_EXPORT Handle(Interface_InterfaceModel) Model() const; - - //! Binds a Starting Entity identified by its Number in the - //! Starting Model, to a Result of Transfer - Standard_EXPORT void Bind (const Handle(Standard_Transient)& ent, const Handle(Standard_Transient)& res) Standard_OVERRIDE; - - //! Search for the result of a Starting Object (i.e. an Entity, - //! identified by its Number in the Starting Model) - //! Returns True if a Result is Bound (and fills ) - //! Returns False if no result is Bound (and nullifies ) - Standard_EXPORT Standard_Boolean Search (const Handle(Standard_Transient)& ent, Handle(Standard_Transient)& res) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(Interface_CopyMap,Interface_CopyControl) - -protected: - - - - -private: - - - Handle(Interface_InterfaceModel) themod; - TColStd_Array1OfTransient theres; - - -}; - - - - - - - -#endif // _Interface_CopyMap_HeaderFile diff --git a/src/Interface/Interface_CopyTool.cxx b/src/Interface/Interface_CopyTool.cxx deleted file mode 100644 index 9c36b0a14d..0000000000 --- a/src/Interface/Interface_CopyTool.cxx +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Se souvenir qu une version plus riche de CopyTool existe : c est -// TransferDispatch (package Transfer). Cette classe offre beaucoup plus de -// possibilite (parametrage des actions, gestion du Mapping ...) -// Mais le principe (transfert en 2 passes) reste le meme, a savoir : -// Passe 1 normale : les entites a transferer sont designees, elles entrainent -// leurs sous-references vraies -// Passe 2 : une fois tous les transferts faits, les relations "Imply" sont -// mises, pour les entites designees ET QUI ONT ETE AUSSI TRANSFEREES, la -// relation est reconduite (pas de nouveau Share) -// ##################################################################### -// .... CONSTRUCTEURS .... -Interface_CopyTool::Interface_CopyTool - (const Handle(Interface_InterfaceModel)& amodel, - const Interface_GeneralLib& lib) - : thelib (lib) , thelst (amodel->NbEntities()) -{ - thelst.Init(Standard_False); - themod = amodel; - themap = new Interface_CopyMap (amodel); - therep = new Interface_CopyMap (amodel); - thelev = 0; theimp = Standard_False; -} - - Interface_CopyTool::Interface_CopyTool - (const Handle(Interface_InterfaceModel)& amodel, - const Handle(Interface_Protocol)& protocol) - : thelib (protocol) , thelst (amodel->NbEntities()) -{ - thelst.Init(Standard_False); - themod = amodel; - themap = new Interface_CopyMap (amodel); - therep = new Interface_CopyMap (amodel); - thelev = 0; theimp = Standard_False; -} - - Handle(Interface_InterfaceModel) Interface_CopyTool::Model () const - { return themod; } - - void Interface_CopyTool::SetControl - (const Handle(Interface_CopyControl)& othermap) - { themap = othermap; } - - Handle(Interface_CopyControl) Interface_CopyTool::Control () const - { return themap; } - - -// ##################################################################### -// .... Actions Individuelles .... - - void Interface_CopyTool::Clear () -{ - themap->Clear(); - therep->Clear(); - thelev = 0; theimp = Standard_False; - therts.Clear(); - ClearLastFlags(); -} - - Standard_Boolean Interface_CopyTool::NewVoid - (const Handle(Standard_Transient)& entfrom, - Handle(Standard_Transient)& entto) -{ - if (entfrom == theent) { - if (themdu.IsNull()) return Standard_False; - return themdu->NewVoid(theCN,entto); - } - theent = entfrom; - Standard_Boolean res = thelib.Select (entfrom,themdu,theCN); - if (res) res = themdu->NewVoid (theCN,entto); - if (!res) res = themdu->NewCopiedCase (theCN,entfrom,entto,*this); - return res; -} - - - Standard_Boolean Interface_CopyTool::Copy - (const Handle(Standard_Transient)& entfrom, - Handle(Standard_Transient)& entto, - const Standard_Boolean mapped, const Standard_Boolean errstat) -{ - Standard_Boolean res = Standard_True; - if (entfrom == theent) { - if (themdu.IsNull()) res = Standard_False; - } else { - theent = entfrom; - res = thelib.Select(entfrom,themdu,theCN); - } - if (!res) { -// Built-in : - if (entfrom.IsNull()) return res; - if (entfrom->DynamicType() == STANDARD_TYPE(TCollection_HAsciiString)) { - entto = new TCollection_HAsciiString - ( Handle(TCollection_HAsciiString)::DownCast(entfrom)->ToCString() ); - res = Standard_True; - } - return res; - } -// On cree l Entite vide (NewVoid), la Copie reste a faire - res = NewVoid(entfrom,entto); - if (mapped) themap->Bind (entfrom,entto); // Mapper avant de continuer ... - -// A present, on effectue la Copie (selon cas; si ShallowCopy ne suffit pas : -// c est qui decide) - -// Une Entite en Erreur n est pas copiee (pas de sens et c est risque ...) -// Cependant, elle est "Copiee a Vide (NewVoid)" donc referencable - if (!errstat) themdu->CopyCase(theCN,entfrom,entto,*this); - return res; -} - - void Interface_CopyTool::Implied - (const Handle(Standard_Transient)& entfrom, - const Handle(Standard_Transient)& entto) -{ - Handle(Interface_GeneralModule) module; - Standard_Integer CN; - if (thelib.Select(entfrom,module,CN)) - module->RenewImpliedCase(CN,entfrom,entto,*this); -} - - -// .... Alimentation de la Map .... - - Handle(Standard_Transient) Interface_CopyTool::Transferred - (const Handle(Standard_Transient)& ent) -{ - Handle(Standard_Transient) res; - if (ent.IsNull()) return res; // Copie d un Null : tres simple ... - Standard_Integer nument = themod->Number(ent); - -// == 0 -> Peut etre une sous-partie non partagee ... -// On accepte mais on se protege contre un bouclage - if (nument == 0 && thelev > 100) Interface_InterfaceError::Raise - ("CopyTool : Transferred, Entity is not contained in Starting Model"); - if (!themap->Search(ent,res)) { // deja transfere ? sinon, le faire - -// On opere la Copie (enfin, on tente) -// En cas d echec, rien n est enregistre - if (!Copy(ent,res, (nument != 0), themod->IsRedefinedContent(nument) )) - return res; - - thelev ++; - if (nument != 0) thelst.SetTrue (nument); - Handle(Interface_ReportEntity) rep; - if (nument != 0) rep = themod->ReportEntity (nument); - if (!rep.IsNull()) { -// ATTENTION ATTENTION, si ReportEntity : Copier aussi Content et refaire une -// ReportEntity avec les termes initiaux - if (rep->IsUnknown()) therep->Bind - (ent, new Interface_ReportEntity(res)); - else { - Handle(Standard_Transient) contfrom, contto; - contfrom = rep->Content(); - Handle(Interface_ReportEntity) repto = - new Interface_ReportEntity (rep->Check(),res); - if (!contfrom.IsNull()) { - if (contfrom == ent) contto = res; - else Copy (contfrom,contto, themod->Contains(contfrom), Standard_False); - repto->SetContent (contto); - } - therep->Bind (ent,repto); - } - } -// Gerer le niveau d imbrication (0 = racine du transfert) - thelev --; - } - if (thelev == 0 && nument > 0) therts.Append(nument); - return res; -} - - void Interface_CopyTool::Bind - (const Handle(Standard_Transient)& ent, - const Handle(Standard_Transient)& res) -{ - Standard_Integer num = themod->Number(ent); - themap->Bind (ent,res); - thelst.SetTrue (num); -} - - Standard_Boolean Interface_CopyTool::Search - (const Handle(Standard_Transient)& ent, - Handle(Standard_Transient)& res) const - { return themap->Search (ent,res); } - -// ## ## ## ## ## ## ## ## ## ## ## ## ## -// LastFlag - - void Interface_CopyTool::ClearLastFlags () - { thelst.Init(Standard_False); } - - Standard_Integer Interface_CopyTool::LastCopiedAfter - (const Standard_Integer numfrom, - Handle(Standard_Transient)& ent, Handle(Standard_Transient)& res) const -{ - Standard_Integer nb = thelst.Length(); - for (Standard_Integer num = numfrom + 1; num <= nb; num ++) { - if (thelst.Value(num)) { - ent = themod->Value(num); - if (themap->Search(ent,res)) return num; - } - } - return 0; -} - - -// ######################################################################### -// .... Actions Generales .... - - void Interface_CopyTool::TransferEntity - (const Handle(Standard_Transient)& ent) - { Handle(Standard_Transient) res = Transferred(ent); } - - void Interface_CopyTool::RenewImpliedRefs () -{ - if (theimp) return; // deja fait - theimp = Standard_True; - -// Transfert Passe 2 : recuperation des relations non "Share" (mais "Imply") -// c-a-d portant sur des entites qui ont pu ou non etre transferees -// (Et que la 1re passe n a pas copie mais laisse en Null) -// N.B. : on devrait interdire de commander des nouveaux transferts ... - - Standard_Integer nb = themod->NbEntities(); - for (Standard_Integer i = 1; i <= nb; i ++) { - Handle(Standard_Transient) ent = themod->Value(i); - Handle(Standard_Transient) res; - if (!themap->Search(ent,res)) continue; // entite pas transferee -// Reconduction des references "Imply". Attention, ne pas copier si non chargee - Handle(Standard_Transient) aRep; - if (!therep->Search(ent,aRep)) - { - Implied (ent,res); - } - else - { - Handle(Interface_ReportEntity) rep = Handle(Interface_ReportEntity)::DownCast (aRep); - if (! rep.IsNull() && ! rep->HasNewContent()) - Implied (ent,res); - } - } -} - - - Interface_EntityIterator Interface_CopyTool::CompleteResult - (const Standard_Boolean withreports) const -{ - Interface_EntityIterator iter; - Standard_Integer nb = themod->NbEntities(); - for (Standard_Integer i = 1; i <= nb; i ++) { - Handle(Standard_Transient) ent = themod->Value(i); - Handle(Standard_Transient) res; - if (!themap->Search(ent,res)) continue; - if (withreports) { - Handle(Standard_Transient) rep; - if (therep->Search(ent,rep)) res = rep; - } - iter.GetOneItem(res); - } - return iter; -} - - Interface_EntityIterator Interface_CopyTool::RootResult - (const Standard_Boolean withreports) const -{ - Interface_EntityIterator iter; - Standard_Integer nb = therts.Length(); - for (Standard_Integer i = 1; i <= nb; i ++) { - Standard_Integer j = therts.Value(i); - Handle(Standard_Transient) ent = themod->Value(j); - Handle(Standard_Transient) res; - if (!themap->Search(ent,res)) continue; - if (withreports) { - Handle(Standard_Transient) rep; - if (therep->Search(ent,rep)) res = rep; - } - iter.GetOneItem(res); - } - return iter; -} - -//======================================================================= -//function : ~Interface_CopyTool -//purpose : Destructor -//======================================================================= - -Interface_CopyTool::~Interface_CopyTool() -{ -} diff --git a/src/Interface/Interface_CopyTool.hxx b/src/Interface/Interface_CopyTool.hxx deleted file mode 100644 index a63d8410c2..0000000000 --- a/src/Interface/Interface_CopyTool.hxx +++ /dev/null @@ -1,218 +0,0 @@ -// Created on: 1993-02-02 -// Created by: Christian CAILLET -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Interface_CopyTool_HeaderFile -#define _Interface_CopyTool_HeaderFile - -#include -#include -#include - -#include -#include -#include -#include -#include -class Interface_InterfaceModel; -class Interface_CopyControl; -class Interface_CopyMap; -class Standard_Transient; -class Interface_GeneralModule; -class Interface_InterfaceError; -class Interface_GeneralLib; -class Interface_Protocol; -class Interface_EntityIterator; - - -//! Performs Deep Copies of sets of Entities -//! Allows to perform Copy of Interface Entities from a Model to -//! another one. Works by calling general services GetFromAnother -//! and GetImplied. -//! Uses a CopyMap to bind a unique Result to each Copied Entity -//! -//! It is possible to command Copies of Entities (and those they -//! reference) by call to the General Service Library, or to -//! enforce results for transfer of some Entities (calling Bind) -//! -//! A Same CopyTool can be used for several successive Copies from -//! the same Model : either by restarting from scratch (e.g. to -//! copy different parts of a starting Model to several Targets), -//! or incremental : in that case, it is possible to know what is -//! the content of the last increment (defined by last call to -//! ClearLastFlags and queried by call to LastCopiedAfter) -//! -//! Works in two times : first, create the list of copied Entities -//! second, pushes them to a target Model (manages also Model's -//! Header) or returns the Result as an Iterator, as desired -//! -//! The core action (Copy) works by using ShallowCopy (method -//! attached to each class) and Copy from GeneralLib (itself using -//! dedicated tools). It can be redefined for specific actions. -class Interface_CopyTool -{ -public: - - DEFINE_STANDARD_ALLOC - - //! Creates a CopyTool adapted to work from a Model. Works - //! with a General Service Library, given as an argument - Standard_EXPORT Interface_CopyTool(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib); - - //! Same as above, but Library is defined through a Protocol - Standard_EXPORT Interface_CopyTool(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol); - - //! Returns the Model on which the CopyTool works - Standard_EXPORT Handle(Interface_InterfaceModel) Model() const; - - //! Changes the Map of Result for another one. This allows to work - //! with a more sophisticated Mapping Control than the Standard - //! one which is CopyMap (e.g. TransferProcess from Transfer) - Standard_EXPORT void SetControl (const Handle(Interface_CopyControl)& othermap); - - //! Returns the object used for Control - Standard_EXPORT Handle(Interface_CopyControl) Control() const; - - //! Clears Transfer List. Gets Ready to begin another Transfer - Standard_EXPORT virtual void Clear(); - - //! Creates the CounterPart of an Entity (by ShallowCopy), Binds - //! it, then Copies the content of the former Entity to the other - //! one (same Type), by call to the General Service Library - //! It may command the Copy of Referenced Entities - //! Then, its returns True. - //! - //! If is True, the Map is used to store the Result - //! Else, the Result is simply produced : it can be used to Copy - //! internal sub-parts of Entities, which are not intended to be - //! shared (Strings, Arrays, etc...) - //! If is True, this means that the Entity is recorded - //! in the Model as Erroneous : in this case, the General Service - //! for Deep Copy is not called (this could be dangerous) : hence - //! the Counter-Part is produced but empty, it can be referenced. - //! - //! This method does nothing and returns False if the Protocol - //! does not recognize . - //! It basically makes a Deep Copy without changing the Types. - //! It can be redefined for special uses. - Standard_EXPORT virtual Standard_Boolean Copy (const Handle(Standard_Transient)& entfrom, Handle(Standard_Transient)& entto, const Standard_Boolean mapped, const Standard_Boolean errstat); - - //! Transfers one Entity, if not yet bound to a result - //! Remark : For an Entity which is reported in the Starting Model, - //! the ReportEntity will also be copied with its Content if it - //! has one (at least ShallowCopy; Complete Copy if the Protocol - //! recognizes the Content : see method Copy) - Standard_EXPORT Handle(Standard_Transient) Transferred (const Handle(Standard_Transient)& ent); - - //! Defines a Result for the Transfer of a Starting object. - //! Used by method Transferred (which performs a normal Copy), - //! but can also be called to enforce a result : in the latter - //! case, the enforced result must be compatible with the other - //! Transfers which are performed - Standard_EXPORT void Bind (const Handle(Standard_Transient)& ent, const Handle(Standard_Transient)& res); - - //! Search for the result of a Starting Object (i.e. an Entity) - //! Returns True if a Result is Bound (and fills "result") - //! Returns False if no result is Bound - Standard_EXPORT Standard_Boolean Search (const Handle(Standard_Transient)& ent, Handle(Standard_Transient)& res) const; - - //! Clears LastFlags only. This allows to know what Entities are - //! copied after its call (see method LastCopiedAfter). It can be - //! used when copies are done by increments, which must be - //! distinghished. ClearLastFlags is also called by Clear. - Standard_EXPORT void ClearLastFlags(); - - //! Returns an copied Entity and its Result which were operated - //! after last call to ClearLastFlags. It returns the first - //! "Last Copied Entity" which Number follows , Zero if - //! none. It is used in a loop as follow : - //! Integer num = 0; - //! while ( (num = CopyTool.LastCopiedAfter(num,ent,res)) ) { - //! .. Process Starting and its Result - //! } - Standard_EXPORT Standard_Integer LastCopiedAfter (const Standard_Integer numfrom, Handle(Standard_Transient)& ent, Handle(Standard_Transient)& res) const; - - //! Transfers one Entity and records result into the Transfer List - //! Calls method Transferred - Standard_EXPORT void TransferEntity (const Handle(Standard_Transient)& ent); - - //! Renews the Implied References. These References do not involve - //! Copying of referenced Entities. For such a Reference, if the - //! Entity which defines it AND the referenced Entity are both - //! copied, then this Reference is renewed. Else it is deleted in - //! the copied Entities. - //! Remark : this concerns only some specific references, such as - //! "back pointers". - Standard_EXPORT void RenewImpliedRefs(); - - //! Returns the complete list of copied Entities - //! If is given True, the entities which were - //! reported in the Starting Model are replaced in the list - //! by the copied ReportEntities - Standard_EXPORT Interface_EntityIterator CompleteResult (const Standard_Boolean withreports = Standard_False) const; - - //! Returns the list of Root copied Entities (those which were - //! asked for copy by the user of CopyTool, not by copying - //! another Entity) - Standard_EXPORT Interface_EntityIterator RootResult (const Standard_Boolean withreports = Standard_False) const; - Standard_EXPORT virtual ~Interface_CopyTool(); - - - - -protected: - - - //! Creates a new void instance (just created) of the same class - //! as . Uses the general service GeneralModule:NewVoid - //! Returns True if OK (Recognize has succeeded), False else - //! (in such a case, the standard method ShallowCopy is called - //! to produce from : hence it is not void) - //! - //! No mapping is managed by this method - Standard_EXPORT virtual Standard_Boolean NewVoid (const Handle(Standard_Transient)& entfrom, Handle(Standard_Transient)& entto); - - - Interface_GeneralLib thelib; - - -private: - - - //! Renews the Implied References of one already Copied Entity - Standard_EXPORT virtual void Implied (const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto); - - - Handle(Interface_InterfaceModel) themod; - Handle(Interface_CopyControl) themap; - Handle(Interface_CopyMap) therep; - Interface_BitMap thelst; - Standard_Integer thelev; - TColStd_SequenceOfInteger therts; - Standard_Boolean theimp; - Handle(Standard_Transient) theent; - Handle(Interface_GeneralModule) themdu; - Standard_Integer theCN; - - -}; - - - - - - - -#endif // _Interface_CopyTool_HeaderFile diff --git a/src/Interface/Interface_FileReaderTool.cxx b/src/Interface/Interface_FileReaderTool.cxx index 65b3c662e6..fcdf413681 100644 --- a/src/Interface/Interface_FileReaderTool.cxx +++ b/src/Interface/Interface_FileReaderTool.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -58,8 +57,10 @@ //purpose : //======================================================================= -Interface_FileReaderTool::Interface_FileReaderTool () -: themessenger(Message::DefaultMessenger()), +Interface_FileReaderTool::Interface_FileReaderTool (const Handle(Interface_Protocol)& protocol) +: theglib(protocol), + therlib(protocol), + themessenger(Message::DefaultMessenger()), thetrace(1), thenbrep0(0), thenbreps(0) @@ -98,14 +99,13 @@ void Interface_FileReaderTool::SetEntities () for (num = thereader->FindNextRecord(0); num > 0; num = thereader->FindNextRecord(num)) { Handle(Standard_Transient) newent; - Handle(Interface_Check) ach = new Interface_Check; - Standard_Boolean res = Recognize (num,ach,newent); - if (!res) newent = theproto->UnknownEntity(); - else res = ((ach->NbFails() + ach->NbWarnings()) == 0) || newent.IsNull(); + const Standard_Boolean res = Recognize (num,newent); if (!res) { - if (thereports.IsNull()) thereports = new TColStd_HArray1OfTransient (1,thereader->NbRecords()); + newent = theproto->UnknownEntity(); + if (thereports.IsNull()) + thereports = new TColStd_HArray1OfTransient (1,thereader->NbRecords()); thenbreps ++; thenbrep0 ++; - thereports->SetValue (num,new Interface_ReportEntity(ach,newent)); + thereports->SetValue (num,new Interface_ReportEntity(newent)); } thereader->BindEntity (num,newent); } @@ -119,7 +119,7 @@ void Interface_FileReaderTool::SetEntities () void Interface_FileReaderTool::EndRead(const Handle(Interface_InterfaceModel)& ) { -} // par defaut, ne fait rien; redefinissable selon besoin +} // .... (Sa Majeste le) CHARGEMENT DU MODELE .... @@ -378,9 +378,6 @@ Handle(Standard_Transient) Interface_FileReaderTool::LoadedEntity (const Standar //======================================================================= Standard_Boolean Interface_FileReaderTool::RecognizeByLib(const Standard_Integer num, - Interface_GeneralLib& glib, - Interface_ReaderLib& rlib, - Handle(Interface_Check)& ach, Handle(Standard_Transient)& ent) const { Handle(Interface_GeneralModule) gmod; @@ -388,22 +385,21 @@ Standard_Boolean Interface_FileReaderTool::RecognizeByLib(const Standard_Integer Handle(Interface_Protocol) proto; Standard_Integer CN = 0; // Chercher dans ReaderLib : Reconnaissance de cas -> CN , proto - for (rlib.Start(); rlib.More(); rlib.Next()) { - rmod = rlib.Module(); + for (therlib.Start(); therlib.More(); therlib.Next()) { + rmod = therlib.Module(); if (rmod.IsNull()) continue; CN = rmod->CaseNum(thereader,num); - if (CN > 0) { proto = rlib.Protocol(); break; } + if (CN > 0) { proto = therlib.Protocol(); break; } } if (CN <= 0 || proto.IsNull()) return Standard_False; // Se recaler dans GeneralLib : Creation de l entite vide Handle(Standard_Type) typrot = proto->DynamicType(); - for (glib.Start(); glib.More(); glib.Next()) { - proto = glib.Protocol(); + for (theglib.Start(); theglib.More(); theglib.Next()) { + proto = theglib.Protocol(); if (proto.IsNull()) continue; if (proto->DynamicType() != typrot) continue; - Standard_Boolean res = glib.Module()->NewVoid(CN,ent); + Standard_Boolean res = theglib.Module()->NewVoid(CN,ent); if (res) return res; - if (!rmod.IsNull()) return rmod->NewRead (CN,thereader,num,ach,ent); } return Standard_False; } diff --git a/src/Interface/Interface_FileReaderTool.hxx b/src/Interface/Interface_FileReaderTool.hxx index 228b0fde2a..997089d4c8 100644 --- a/src/Interface/Interface_FileReaderTool.hxx +++ b/src/Interface/Interface_FileReaderTool.hxx @@ -21,19 +21,14 @@ #include #include -#include -#include +#include +#include #include class Interface_Protocol; class Interface_FileReaderData; class Interface_InterfaceModel; class Message_Messenger; -class Standard_DomainError; -class Standard_NoSuchObject; class Interface_Check; -class Standard_Transient; -class Interface_GeneralLib; -class Interface_ReaderLib; //! Defines services which are required to load an InterfaceModel @@ -119,18 +114,13 @@ public: protected: //! Constructor; sets default fields - Standard_EXPORT Interface_FileReaderTool(); + Standard_EXPORT Interface_FileReaderTool(const Handle(Interface_Protocol)& protocol); //! Recognizes a record with the help of Libraries. Can be used //! to implement the method Recognize. - //! is used to find Protocol and CaseNumber to apply - //! performs the creation (by service NewVoid, or NewRead - //! if NewVoid gave no result) - //! is a check, which is transmitted to NewRead if it is - //! called, gives a result but which is false //! is the result //! Returns False if recognition has failed, True else - Standard_EXPORT Standard_Boolean RecognizeByLib (const Standard_Integer num, Interface_GeneralLib& glib, Interface_ReaderLib& rlib, Handle(Interface_Check)& ach, Handle(Standard_Transient)& ent) const; + Standard_EXPORT Standard_Boolean RecognizeByLib (const Standard_Integer num, Handle(Standard_Transient)& ent) const; //! Recognizes a record, given its number. Specific to each //! Interface; called by SetEntities. It can call the basic method @@ -142,7 +132,7 @@ public: //! //! Note that it works thru a Recognizer (method Evaluate) which //! has to be memorized before starting - Standard_EXPORT virtual Standard_Boolean Recognize (const Standard_Integer num, Handle(Interface_Check)& ach, Handle(Standard_Transient)& ent) = 0; + Standard_EXPORT virtual Standard_Boolean Recognize (const Standard_Integer num, Handle(Standard_Transient)& ent) = 0; //! Fills model's header; each Interface defines for its Model its //! own file header; this method fills it from FileReaderTool.+ @@ -165,9 +155,12 @@ public: //! Ends file reading after reading all the entities //! default is doing nothing; redefinable as necessary - Standard_EXPORT virtual void EndRead (const Handle(Interface_InterfaceModel)& amodel) = 0; + Standard_EXPORT virtual void EndRead (const Handle(Interface_InterfaceModel)& amodel); - private: + protected: + + mutable Interface_GeneralLib theglib; + mutable Interface_ReaderLib therlib; Handle(Interface_Protocol) theproto; Handle(Interface_FileReaderData) thereader; diff --git a/src/Interface/Interface_GeneralModule.cxx b/src/Interface/Interface_GeneralModule.cxx index 019ffa04d2..5d5b430848 100644 --- a/src/Interface/Interface_GeneralModule.cxx +++ b/src/Interface/Interface_GeneralModule.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include @@ -52,35 +51,6 @@ void Interface_GeneralModule::FillShared Interface_EntityIterator& /*iter*/) const { } // Par defaut, pas d Imply - - Standard_Boolean Interface_GeneralModule::CanCopy - (const Standard_Integer /*CN*/, const Handle(Standard_Transient)& /*ent*/) const - { return Standard_False; } - - Standard_Boolean Interface_GeneralModule::Dispatch - (const Standard_Integer, const Handle(Standard_Transient)& entfrom, - Handle(Standard_Transient)& entto, Interface_CopyTool& ) const - { entto = entfrom; return Standard_False; } - - Standard_Boolean Interface_GeneralModule::NewCopiedCase - (const Standard_Integer, const Handle(Standard_Transient)&, - Handle(Standard_Transient)&, Interface_CopyTool& ) const - { return Standard_False; } - - - void Interface_GeneralModule::RenewImpliedCase - (const Standard_Integer /*casenum*/, - const Handle(Standard_Transient)& /*entfrom*/, - const Handle(Standard_Transient)& /*entto*/, - const Interface_CopyTool& /*TC*/) const -{ } // Par defaut, ne fait rien - - void Interface_GeneralModule::WhenDeleteCase - (const Standard_Integer /*casenum*/, - const Handle(Standard_Transient)& /*ent*/, - const Standard_Boolean /*dispatched*/) const -{ } // par defaut, ne fait rien - Standard_Integer Interface_GeneralModule::CategoryNumber (const Standard_Integer , const Handle(Standard_Transient)& , const Interface_ShareTool& ) const diff --git a/src/Interface/Interface_GeneralModule.hxx b/src/Interface/Interface_GeneralModule.hxx index ce2219c764..d516c61419 100644 --- a/src/Interface/Interface_GeneralModule.hxx +++ b/src/Interface/Interface_GeneralModule.hxx @@ -28,7 +28,6 @@ class Standard_Transient; class Interface_EntityIterator; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class TCollection_HAsciiString; @@ -45,10 +44,8 @@ DEFINE_STANDARD_HANDLE(Interface_GeneralModule, MMgt_TShared) //! GeneralModule belongs to. class Interface_GeneralModule : public MMgt_TShared { + public: -public: - - //! Specific filling of the list of Entities shared by an Entity //! , according a Case Number (formerly computed by //! CaseNum), considered in the context of a Model @@ -88,84 +85,11 @@ public: //! Can check context queried through a ShareTool, as required Standard_EXPORT virtual void CheckCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const = 0; - //! Specific answer to the question "is Copy properly implemented" - //! Remark that it should be in phase with the implementation of - //! NewVoid+CopyCase/NewCopyCase - //! Default returns always False, can be redefined - Standard_EXPORT virtual Standard_Boolean CanCopy (const Standard_Integer CN, const Handle(Standard_Transient)& ent) const; - - //! Dispatches an entity - //! Returns True if it works by copy, False if it just duplicates - //! the starting Handle - //! - //! Dispatching means producing a new entity, image of the - //! starting one, in order to be put into a new Model, this Model - //! being itself the result of a dispatch from an original Model - //! - //! According to the cases, dispatch can either - //! * just return as equating - //! -> the new model designates the starting entity : it is - //! lighter, but the dispatched entity being shared might not be - //! modified for dispatch - //! * copy to - //! by calling NewVoid+CopyCase (two steps) or NewCopiedCase (1) - //! -> the dispatched entity is a COPY, hence it can be modified - //! - //! The provided default just duplicates the handle without - //! copying, then returns False. Can be redefined - Standard_EXPORT virtual Standard_Boolean Dispatch (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const; - //! Creates a new void entity according to a Case Number //! This entity remains to be filled, by reading from a file or //! by copying from another entity of same type (see CopyCase) Standard_EXPORT virtual Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& entto) const = 0; - - //! Specific Copy ("Deep") from to (same type) - //! by using a CopyTool which provides its working Map. - //! Use method Transferred from CopyTool to work - Standard_EXPORT virtual void CopyCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const = 0; - - //! Specific operator (create+copy) defaulted to do nothing. - //! It can be redefined : When it is not possible to work in two - //! steps (NewVoid then CopyCase). This can occur when there is - //! no default constructor : hence the result must be - //! created with an effective definition. - //! Remark : if NewCopiedCase is defined, CopyCase has nothing to do - //! Returns True if it has produced something, false else - Standard_EXPORT virtual Standard_Boolean NewCopiedCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const; - - //! Specific Copying of Implied References - //! A Default is provided which does nothing (must current case !) - //! Already copied references (by CopyFrom) must remain unchanged - //! Use method Search from CopyTool to work - Standard_EXPORT virtual void RenewImpliedCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, const Interface_CopyTool& TC) const; - - //! Prepares an entity to be deleted. What does it mean : - //! Basically, any class of entity may define its own destructor - //! By default, it does nothing but calling destructors on fields - //! With the Memory Manager, it is useless to call destructor, - //! it is done automatically when the Handle is nullified(cleared) - //! BUT this is ineffective in looping structures (whatever these - //! are "Implied" references or not). - //! - //! THUS : if no loop may appear in definitions, a class which - //! inherits from TShared is correctly managed by automatic way - //! BUT if there can be loops (or simply back pointers), they must - //! be broken, for instance by clearing fields of one of the nodes - //! The default does nothing, to be redefined if a loop can occur - //! (Implied generally requires WhenDelete, but other cases can - //! occur) - //! - //! Warning : tells if the entity to be deleted has been - //! produced by Dispatch or not. Hence WhenDelete must be in - //! coherence with Dispatch - //! Dispatch can either copy or not. - //! If it copies the entity, this one should be deleted - //! If it doesnt (i.e. duplicates the handle) nothing to do - //! - //! If is False, normal deletion is to be performed - Standard_EXPORT virtual void WhenDeleteCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Standard_Boolean dispatched) const; - + //! Returns a category number which characterizes an entity //! Category Numbers are managed by the class Category //! can be used to evaluate this number in the context @@ -181,27 +105,7 @@ public: //! field, the returned value must be copied before. Standard_EXPORT virtual Handle(TCollection_HAsciiString) Name (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const; - - - DEFINE_STANDARD_RTTIEXT(Interface_GeneralModule,MMgt_TShared) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _Interface_GeneralModule_HeaderFile diff --git a/src/Interface/Interface_Protocol.hxx b/src/Interface/Interface_Protocol.hxx index df25e2f449..15dc390fcd 100644 --- a/src/Interface/Interface_Protocol.hxx +++ b/src/Interface/Interface_Protocol.hxx @@ -45,7 +45,7 @@ DEFINE_STANDARD_HANDLE(Interface_Protocol, MMgt_TShared) class Interface_Protocol : public MMgt_TShared { public: - + //! Returns count of Protocol used as Resources (level one) Standard_EXPORT virtual Standard_Integer NbResources() const; @@ -90,9 +90,6 @@ class Interface_Protocol : public MMgt_TShared //! Creates an empty Model of the considered Norm Standard_EXPORT virtual Handle(Interface_InterfaceModel) NewModel() const = 0; - //! Returns True if is a Model of the considered Norm - Standard_EXPORT virtual Standard_Boolean IsSuitableModel (const Handle(Interface_InterfaceModel)& model) const = 0; - //! Creates a new Unknown Entity for the considered Norm Standard_EXPORT virtual Handle(Standard_Transient) UnknownEntity() const = 0; diff --git a/src/Interface/Interface_ReaderModule.cxx b/src/Interface/Interface_ReaderModule.cxx index b3dd26e269..d147863c7d 100644 --- a/src/Interface/Interface_ReaderModule.cxx +++ b/src/Interface/Interface_ReaderModule.cxx @@ -11,16 +11,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. - #include IMPLEMENT_STANDARD_RTTIEXT(Interface_ReaderModule,MMgt_TShared) - -Standard_Boolean Interface_ReaderModule::NewRead(const Standard_Integer, - const Handle(Interface_FileReaderData)&, - const Standard_Integer, - Handle(Interface_Check)&, - Handle(Standard_Transient)& ) const -{ - return Standard_False; -} diff --git a/src/Interface/Interface_ReaderModule.hxx b/src/Interface/Interface_ReaderModule.hxx index 78e6cc47e2..73871fbac3 100644 --- a/src/Interface/Interface_ReaderModule.hxx +++ b/src/Interface/Interface_ReaderModule.hxx @@ -50,18 +50,6 @@ class Interface_ReaderModule : public MMgt_TShared //! In case of Error or Warning, fills with messages //! Remark that the Case Number comes from translating a record Standard_EXPORT virtual void Read (const Standard_Integer casenum, const Handle(Interface_FileReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(Standard_Transient)& ent) const = 0; - - //! Specific operator (create+read) defaulted to do nothing. - //! It can be redefined when it is not possible to work in two - //! steps (NewVoid then Read). This occurs when no default - //! constructor is defined : hence the result must be - //! created with an effective definition from the reader. - //! Remark : if NewRead is defined, Copy has nothing to do. - //! - //! Returns True if it has produced something, false else. - //! If nothing was produced, should be filled : it will be - //! treated as "Unrecognized case" by reader tool. - Standard_EXPORT virtual Standard_Boolean NewRead (const Standard_Integer casenum, const Handle(Interface_FileReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, Handle(Standard_Transient)& ent) const; DEFINE_STANDARD_RTTIEXT(Interface_ReaderModule,MMgt_TShared) }; diff --git a/src/Interface/Interface_ReportEntity.cxx b/src/Interface/Interface_ReportEntity.cxx index 1d596b4e09..250c40744b 100644 --- a/src/Interface/Interface_ReportEntity.cxx +++ b/src/Interface/Interface_ReportEntity.cxx @@ -14,8 +14,6 @@ #include #include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(Interface_ReportEntity,MMgt_TShared) @@ -23,11 +21,12 @@ IMPLEMENT_STANDARD_RTTIEXT(Interface_ReportEntity,MMgt_TShared) //function : Interface_ReportEntity //purpose : //======================================================================= -Interface_ReportEntity::Interface_ReportEntity - (const Handle(Standard_Transient)& unknown) + +Interface_ReportEntity::Interface_ReportEntity (const Handle(Standard_Transient)& unknown) +: thecheck(new Interface_Check), + theconcerned(unknown), + thecontent(unknown) { - theconcerned = unknown; - thecontent = unknown; } @@ -36,73 +35,14 @@ Interface_ReportEntity::Interface_ReportEntity //purpose : //======================================================================= -Interface_ReportEntity::Interface_ReportEntity - (const Handle(Interface_Check)& acheck, - const Handle(Standard_Transient)& concerned) -: thecheck(acheck) +Interface_ReportEntity::Interface_ReportEntity (const Handle(Interface_Check)& acheck, const Handle(Standard_Transient)& concerned) +: thecheck(acheck), + theconcerned(concerned) { - theconcerned = concerned; thecheck->SetEntity(concerned); } -//======================================================================= -//function : SetContent -//purpose : -//======================================================================= - -void Interface_ReportEntity::SetContent(const Handle(Standard_Transient)& content) -{ - thecontent = content; -} - -// .... CONSULTATION .... - - -//======================================================================= -//function : Check -//purpose : -//======================================================================= - -const Handle(Interface_Check)& Interface_ReportEntity::Check () const -{ - return thecheck; -} - - -//======================================================================= -//function : CCheck -//purpose : -//======================================================================= - -Handle(Interface_Check)& Interface_ReportEntity::CCheck () -{ - return thecheck; -} - - -//======================================================================= -//function : Concerned -//purpose : -//======================================================================= - -Handle(Standard_Transient) Interface_ReportEntity::Concerned () const -{ - return theconcerned; -} - - -//======================================================================= -//function : HasContent -//purpose : -//======================================================================= - -Standard_Boolean Interface_ReportEntity::HasContent () const -{ - return (!thecontent.IsNull()); -} - - //======================================================================= //function : HasNewContent //purpose : @@ -114,17 +54,6 @@ Standard_Boolean Interface_ReportEntity::HasNewContent () const } -//======================================================================= -//function : Content -//purpose : -//======================================================================= - -Handle(Standard_Transient) Interface_ReportEntity::Content () const -{ - return thecontent; -} - - //======================================================================= //function : IsError //purpose : @@ -143,6 +72,5 @@ Standard_Boolean Interface_ReportEntity::IsError () const Standard_Boolean Interface_ReportEntity::IsUnknown () const { - return ((thecheck->NbFails() == 0) && (thecheck->NbWarnings() == 0) - && (theconcerned == thecontent)); + return ((thecheck->NbFails() == 0) && (thecheck->NbWarnings() == 0) && (theconcerned == thecontent)); } diff --git a/src/Interface/Interface_ReportEntity.hxx b/src/Interface/Interface_ReportEntity.hxx index 4d80905981..ec4e16d1c5 100644 --- a/src/Interface/Interface_ReportEntity.hxx +++ b/src/Interface/Interface_ReportEntity.hxx @@ -21,9 +21,7 @@ #include #include -#include class Interface_Check; -class Standard_Transient; class Interface_ReportEntity; @@ -54,37 +52,35 @@ DEFINE_STANDARD_HANDLE(Interface_ReportEntity, MMgt_TShared) //! only the specific part remains to be defined for each norm. class Interface_ReportEntity : public MMgt_TShared { + public: -public: - - //! Creates a ReportEntity for an Unknown Entity : Check is empty, //! and Concerned equates Content (i.e. the Unknown Entity) - Standard_EXPORT Interface_ReportEntity(const Handle(Standard_Transient)& unknown); - + Standard_EXPORT Interface_ReportEntity (const Handle(Standard_Transient)& unknown); + //! Creates a ReportEntity with its features : //! - is the Check to be memorised //! - is the Entity to which the Check is bound //! Later, a Content can be set : it is required for an Error - Standard_EXPORT Interface_ReportEntity(const Handle(Interface_Check)& acheck, const Handle(Standard_Transient)& concerned); + Standard_EXPORT Interface_ReportEntity (const Handle(Interface_Check)& acheck, const Handle(Standard_Transient)& concerned); //! Sets a Content : it brings non interpreted data which belong //! to the Concerned Entity. It can be empty then loaded later. //! Remark that for an Unknown Entity, Content is set by Create. - Standard_EXPORT void SetContent (const Handle(Standard_Transient)& content); + void SetContent (const Handle(Standard_Transient)& content) { thecontent = content; } //! Returns the stored Check - Standard_EXPORT const Handle(Interface_Check)& Check() const; + const Handle(Interface_Check) & Check () const { return thecheck; } //! Returns the stored Check in order to change it - Standard_EXPORT Handle(Interface_Check)& CCheck(); + Handle(Interface_Check) & CCheck () { return thecheck; } //! Returns the stored Concerned Entity. It equates the Content //! in the case of an Unknown Entity - Standard_EXPORT Handle(Standard_Transient) Concerned() const; + const Handle(Standard_Transient) & Concerned() const { return theconcerned; } //! Returns True if a Content is stored (it can equate Concerned) - Standard_EXPORT Standard_Boolean HasContent() const; + Standard_Boolean HasContent() const { return (!thecontent.IsNull()); } //! Returns True if a Content is stored AND differs from Concerned //! (i.e. redefines content) : used when Concerned could not be @@ -94,7 +90,7 @@ public: //! Returns the stored Content, or a Null Handle //! Remark that it must be an "Unknown Entity" suitable for //! the norm of the containing Model - Standard_EXPORT Handle(Standard_Transient) Content() const; + const Handle(Standard_Transient) & Content() const { return thecontent; } //! Returns True for an Error Entity, i.e. if the Check //! brings at least one Fail message @@ -104,30 +100,13 @@ public: //! is empty and Concerned equates Content Standard_EXPORT Standard_Boolean IsUnknown() const; - - - DEFINE_STANDARD_RTTIEXT(Interface_ReportEntity,MMgt_TShared) -protected: - - - - -private: - + private: Handle(Interface_Check) thecheck; Handle(Standard_Transient) theconcerned; Handle(Standard_Transient) thecontent; - - }; - - - - - - #endif // _Interface_ReportEntity_HeaderFile diff --git a/src/Interface/Interface_UndefinedContent.cxx b/src/Interface/Interface_UndefinedContent.cxx index d4b3dbd338..e4d74837a3 100644 --- a/src/Interface/Interface_UndefinedContent.cxx +++ b/src/Interface/Interface_UndefinedContent.cxx @@ -12,7 +12,6 @@ // commercial license or contractual agreement. -#include #include #include #include @@ -291,27 +290,3 @@ Interface_UndefinedContent::ParamValue Interface_EntityList Interface_UndefinedContent::EntityList () const { return theentities; } - - - -// toutes les recopies de UndefinedEntity se ressemblent ... Partie commune - void Interface_UndefinedContent::GetFromAnother - (const Handle(Interface_UndefinedContent)& other, Interface_CopyTool& TC) -{ - Standard_Integer nb = other->NbParams(); - theentities.Clear(); - thevalues.Nullify(); - theparams.Nullify(); - Reservate (nb,other->NbLiterals()); - - Handle(Standard_Transient) ent; - for (Standard_Integer i = 1; i <= nb; i ++) { - Interface_ParamType ptype; - Handle(TCollection_HAsciiString) val; - if (other->ParamData (i, ptype,ent,val)) { - ent = TC.Transferred(ent); - AddEntity (ptype,ent); - } - else AddLiteral (ptype,val); - } -} diff --git a/src/Interface/Interface_UndefinedContent.hxx b/src/Interface/Interface_UndefinedContent.hxx index ce62d22221..0527e461fa 100644 --- a/src/Interface/Interface_UndefinedContent.hxx +++ b/src/Interface/Interface_UndefinedContent.hxx @@ -34,7 +34,6 @@ class Interface_InterfaceError; class Standard_Transient; class TCollection_HAsciiString; class Interface_EntityList; -class Interface_CopyTool; class Interface_UndefinedContent; @@ -64,10 +63,8 @@ DEFINE_STANDARD_HANDLE(Interface_UndefinedContent, MMgt_TShared) //! Recognize Unknown Entities of this norm class Interface_UndefinedContent : public MMgt_TShared { + public: -public: - - //! Defines an empty UndefinedContent Standard_EXPORT Interface_UndefinedContent(); @@ -124,38 +121,16 @@ public: //! Returns globally the list of param entities. Note that it can //! be used as shared entity list for the UndefinedEntity Standard_EXPORT Interface_EntityList EntityList() const; - - //! Copies contents of undefined entities; deigned to be called by - //! GetFromAnother method from Undefined entity of each Interface - //! (the basic operation is the same regardless the norm) - Standard_EXPORT void GetFromAnother (const Handle(Interface_UndefinedContent)& other, Interface_CopyTool& TC); - - - DEFINE_STANDARD_RTTIEXT(Interface_UndefinedContent,MMgt_TShared) -protected: - - - - -private: - + private: Standard_Integer thenbparams; Standard_Integer thenbstr; Handle(TColStd_HArray1OfInteger) theparams; Handle(Interface_HArray1OfHAsciiString) thevalues; Interface_EntityList theentities; - - }; - - - - - - #endif // _Interface_UndefinedContent_HeaderFile diff --git a/src/LibCtl/LibCtl_Library.gxx b/src/LibCtl/LibCtl_Library.gxx index 7e9edac52e..cf808ffd13 100644 --- a/src/LibCtl/LibCtl_Library.gxx +++ b/src/LibCtl/LibCtl_Library.gxx @@ -67,19 +67,17 @@ static Handle(LibCtl_Node) thelast; // D abord, ajouter celui-ci a la liste : chercher le Node Handle(LibCtl_GlobalNode) curr; for (curr = theglobal; !curr.IsNull(); ) { // curr->Next : plus loin - const Handle(Interface_Protocol)& protocol = curr->Protocol(); - if (!protocol.IsNull()) { // Match Protocol ? - if (protocol->DynamicType() == aprotocol->DynamicType()) { - if (thelist.IsNull()) thelist = new LibCtl_Node; - thelist->AddNode(curr); - break; // UN SEUL MODULE PAR PROTOCOLE - } + const Handle(Interface_Protocol)& protocol = curr->Protocol(); + if (!protocol.IsNull() && (protocol->DynamicType() == aprotocol->DynamicType())) { + if (thelist.IsNull()) thelist = new LibCtl_Node; + thelist->AddNode(curr); + break; // UN SEUL MODULE PAR PROTOCOLE } curr = curr->Next(); // cette formule est refusee dans "for" } // Ensuite, Traiter les ressources - Standard_Integer nb = aprotocol->NbResources(); + const Standard_Integer nb = aprotocol->NbResources(); for (Standard_Integer i = 1; i <= nb; i ++) { AddProtocol (aprotocol->Resource(i)); } diff --git a/src/RWHeaderSection/RWHeaderSection_GeneralModule.cxx b/src/RWHeaderSection/RWHeaderSection_GeneralModule.cxx index 64a39431ad..7a612ce809 100644 --- a/src/RWHeaderSection/RWHeaderSection_GeneralModule.cxx +++ b/src/RWHeaderSection/RWHeaderSection_GeneralModule.cxx @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -55,100 +54,26 @@ void RWHeaderSection_GeneralModule::CheckCase(const Standard_Integer, { } - -void RWHeaderSection_GeneralModule::CopyCase(const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const -{ -// ajout manuel - switch (CN) { - - case 1 : { - Standard_Integer i; - DeclareAndCast(HeaderSection_FileName,enfr,entfrom); - DeclareAndCast(HeaderSection_FileName,ento,entto); - Handle(TCollection_HAsciiString) name = - new TCollection_HAsciiString (enfr->Name()); - Handle(TCollection_HAsciiString) time = - new TCollection_HAsciiString (enfr->TimeStamp()); - Standard_Integer nba = enfr->NbAuthor(); - Handle(Interface_HArray1OfHAsciiString) auth = - new Interface_HArray1OfHAsciiString (1,nba); - for (i = 1; i <= nba; i ++) auth->SetValue - (i, new TCollection_HAsciiString (enfr->AuthorValue(i)) ); - Standard_Integer nbo = enfr->NbOrganization(); - Handle(Interface_HArray1OfHAsciiString) orga = - new Interface_HArray1OfHAsciiString (1,nbo); - for (i = 1; i <= nbo; i ++) orga->SetValue - (i, new TCollection_HAsciiString (enfr->OrganizationValue(i)) ); - Handle(TCollection_HAsciiString) prep = - new TCollection_HAsciiString (enfr->PreprocessorVersion()); - Handle(TCollection_HAsciiString) orig = - new TCollection_HAsciiString (enfr->OriginatingSystem()); - Handle(TCollection_HAsciiString) autr = - new TCollection_HAsciiString (enfr->Authorisation()); - ento->Init (name,time,auth,orga,prep,orig,autr); - } - break; - - case 2 : { - Standard_Integer i; - DeclareAndCast(HeaderSection_FileDescription,enfr,entfrom); - DeclareAndCast(HeaderSection_FileDescription,ento,entto); - Standard_Integer nbd = enfr->NbDescription(); - Handle(Interface_HArray1OfHAsciiString) desc = - new Interface_HArray1OfHAsciiString (1,nbd); - for (i = 1; i <= nbd; i ++) desc->SetValue - (i, new TCollection_HAsciiString (enfr->DescriptionValue(i)) ); - Handle(TCollection_HAsciiString) impl = - new TCollection_HAsciiString (enfr->ImplementationLevel()); - ento->Init (desc,impl); - } - break; - - case 3 : { - Standard_Integer i; - DeclareAndCast(HeaderSection_FileSchema,enfr,entfrom); - DeclareAndCast(HeaderSection_FileSchema,ento,entto); - Standard_Integer nbs = enfr->NbSchemaIdentifiers(); - Handle(Interface_HArray1OfHAsciiString) sche = - new Interface_HArray1OfHAsciiString (1,nbs); - for (i = 1; i <= nbs; i ++) sche->SetValue - (i, new TCollection_HAsciiString (enfr->SchemaIdentifiersValue(i)) ); - ento->Init (sche); - } - break; - - case 4 : { - DeclareAndCast(StepData_UndefinedEntity,undfrom,entfrom); - DeclareAndCast(StepData_UndefinedEntity,undto,entto); - undto->GetFromAnother(undfrom,TC); // On pourrait rapatrier cela - } - break; - - default : break; - } -} // --- Construction of empty class --- Standard_Boolean RWHeaderSection_GeneralModule::NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& ent) const { - if (CN == 0) return Standard_False; - switch (CN) { - case 1 : - ent = new HeaderSection_FileName; - break; - case 2 : - ent = new HeaderSection_FileDescription; - break; - case 3 : - ent = new HeaderSection_FileSchema; - break; - case 4 : - ent = new StepData_UndefinedEntity; - break; - default : return Standard_False; - } + switch (CN) { + case 1 : + ent = new HeaderSection_FileName; + break; + case 2 : + ent = new HeaderSection_FileDescription; + break; + case 3 : + ent = new HeaderSection_FileSchema; + break; + case 4 : + ent = new StepData_UndefinedEntity; + break; + default : return Standard_False; + } -return Standard_True; + return Standard_True; } - diff --git a/src/RWHeaderSection/RWHeaderSection_GeneralModule.hxx b/src/RWHeaderSection/RWHeaderSection_GeneralModule.hxx index cbfd209da2..028e74f806 100644 --- a/src/RWHeaderSection/RWHeaderSection_GeneralModule.hxx +++ b/src/RWHeaderSection/RWHeaderSection_GeneralModule.hxx @@ -27,7 +27,6 @@ class Standard_Transient; class Interface_EntityIterator; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class RWHeaderSection_GeneralModule; @@ -38,10 +37,8 @@ DEFINE_STANDARD_HANDLE(RWHeaderSection_GeneralModule, StepData_GeneralModule) //! Depends (for case numbers) of Protocol from HeaderSection class RWHeaderSection_GeneralModule : public StepData_GeneralModule { + public: -public: - - //! Creates a GeneralModule Standard_EXPORT RWHeaderSection_GeneralModule(); @@ -53,34 +50,9 @@ public: //! Specific Checking of an Entity Standard_EXPORT void CheckCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const Standard_OVERRIDE; - //! Specific Copy ("Deep") from to (same type) - //! by using a CopyTool which provides its working Map. - //! Use method Transferred from CopyTool to work - Standard_EXPORT void CopyCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& ent) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(RWHeaderSection_GeneralModule,StepData_GeneralModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _RWHeaderSection_GeneralModule_HeaderFile diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx index 7cdb5cdd9a..4d4e59e13c 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.cxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.cxx @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -5237,19 +5236,6 @@ void RWStepAP214_GeneralModule::CheckCase(const Standard_Integer CN, } } - -//======================================================================= -//function : CopyCase -//purpose : -//======================================================================= - -void RWStepAP214_GeneralModule::CopyCase(const Standard_Integer /*CN*/, - const Handle(Standard_Transient)& /*entfrom*/, - const Handle(Standard_Transient)& /*entto*/, - Interface_CopyTool& /*TC*/) const -{ -} - // --- Construction of empty classe --- //======================================================================= diff --git a/src/RWStepAP214/RWStepAP214_GeneralModule.hxx b/src/RWStepAP214/RWStepAP214_GeneralModule.hxx index afc626d11d..3637f4d378 100644 --- a/src/RWStepAP214/RWStepAP214_GeneralModule.hxx +++ b/src/RWStepAP214/RWStepAP214_GeneralModule.hxx @@ -27,7 +27,6 @@ class Standard_Transient; class Interface_EntityIterator; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class TCollection_HAsciiString; @@ -42,7 +41,6 @@ class RWStepAP214_GeneralModule : public StepData_GeneralModule public: - //! Creates a GeneralModule Standard_EXPORT RWStepAP214_GeneralModule(); @@ -54,11 +52,6 @@ public: //! Specific Checking of an Entity Standard_EXPORT void CheckCase (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const Standard_OVERRIDE; - //! Specific Copy ("Deep") from to (same type) - //! by using a CopyTool which provides its working Map. - //! Use method Transferred from CopyTool to work - Standard_EXPORT void CopyCase (const Standard_Integer CN, const Handle(Standard_Transient)& entfrom, const Handle(Standard_Transient)& entto, Interface_CopyTool& TC) const Standard_OVERRIDE; - Standard_EXPORT Standard_Boolean NewVoid (const Standard_Integer CN, Handle(Standard_Transient)& ent) const Standard_OVERRIDE; Standard_EXPORT virtual Standard_Integer CategoryNumber (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE; @@ -66,27 +59,7 @@ public: //! Returns the name of a STEP Entity according to its type Standard_EXPORT virtual Handle(TCollection_HAsciiString) Name (const Standard_Integer CN, const Handle(Standard_Transient)& ent, const Interface_ShareTool& shares) const Standard_OVERRIDE; - - - DEFINE_STANDARD_RTTIEXT(RWStepAP214_GeneralModule,StepData_GeneralModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _RWStepAP214_GeneralModule_HeaderFile diff --git a/src/StepData/StepData_GeneralModule.hxx b/src/StepData/StepData_GeneralModule.hxx index b811e4b32f..d7bbca5597 100644 --- a/src/StepData/StepData_GeneralModule.hxx +++ b/src/StepData/StepData_GeneralModule.hxx @@ -26,7 +26,6 @@ class Standard_Transient; class Interface_EntityIterator; class Interface_ShareTool; class Interface_Check; -class Interface_CopyTool; class StepData_GeneralModule; diff --git a/src/StepData/StepData_Protocol.cxx b/src/StepData/StepData_Protocol.cxx index aec8d7e610..f2c6b3bfba 100644 --- a/src/StepData/StepData_Protocol.cxx +++ b/src/StepData/StepData_Protocol.cxx @@ -66,13 +66,6 @@ Handle(Interface_InterfaceModel) StepData_Protocol::NewModel () const } -Standard_Boolean StepData_Protocol::IsSuitableModel - (const Handle(Interface_InterfaceModel)& model) const -{ - return model->IsKind(STANDARD_TYPE(StepData_StepModel)); -} - - Handle(Standard_Transient) StepData_Protocol::UnknownEntity () const { return new StepData_UndefinedEntity; diff --git a/src/StepData/StepData_Protocol.hxx b/src/StepData/StepData_Protocol.hxx index a0120a56a6..25177fa481 100644 --- a/src/StepData/StepData_Protocol.hxx +++ b/src/StepData/StepData_Protocol.hxx @@ -69,9 +69,6 @@ class StepData_Protocol : public Interface_Protocol //! Creates an empty Model for Step Norm Standard_EXPORT Handle(Interface_InterfaceModel) NewModel() const Standard_OVERRIDE; - //! Returns True if is a Model of Step Norm - Standard_EXPORT Standard_Boolean IsSuitableModel (const Handle(Interface_InterfaceModel)& model) const Standard_OVERRIDE; - //! Creates a new Unknown Entity for Step (UndefinedEntity) Standard_EXPORT Handle(Standard_Transient) UnknownEntity() const Standard_OVERRIDE; diff --git a/src/StepData/StepData_ReadWriteModule.hxx b/src/StepData/StepData_ReadWriteModule.hxx index 2de7f06139..b2fa6b9e90 100644 --- a/src/StepData/StepData_ReadWriteModule.hxx +++ b/src/StepData/StepData_ReadWriteModule.hxx @@ -21,14 +21,10 @@ #include #include -#include #include -#include -class Standard_DomainError; class Interface_FileReaderData; class TCollection_AsciiString; class Interface_Check; -class Standard_Transient; class StepData_StepReaderData; class StepData_StepWriter; @@ -45,10 +41,8 @@ DEFINE_STANDARD_HANDLE(StepData_ReadWriteModule, Interface_ReaderModule) //! as the Protocol does for the corresponding Entity) class StepData_ReadWriteModule : public Interface_ReaderModule { + public: -public: - - //! Translate the Type of record in to a positive //! Case Number, or 0 if failed. //! Works with a StepReaderData, in which the Type of an Entity @@ -107,27 +101,7 @@ public: //! Write Function, switched by CaseNum Standard_EXPORT virtual void WriteStep (const Standard_Integer CN, StepData_StepWriter& SW, const Handle(Standard_Transient)& ent) const = 0; - - - DEFINE_STANDARD_RTTIEXT(StepData_ReadWriteModule,Interface_ReaderModule) - -protected: - - - - -private: - - - - }; - - - - - - #endif // _StepData_ReadWriteModule_HeaderFile diff --git a/src/StepData/StepData_StepModel.cxx b/src/StepData/StepData_StepModel.cxx index baec99859e..af69474829 100644 --- a/src/StepData/StepData_StepModel.cxx +++ b/src/StepData/StepData_StepModel.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include diff --git a/src/StepData/StepData_StepReaderTool.cxx b/src/StepData/StepData_StepReaderTool.cxx index 7dc87355e1..80fc4cca56 100644 --- a/src/StepData/StepData_StepReaderTool.cxx +++ b/src/StepData/StepData_StepReaderTool.cxx @@ -34,7 +34,7 @@ StepData_StepReaderTool::StepData_StepReaderTool (const Handle(StepData_StepReaderData)& reader, const Handle(StepData_Protocol)& protocol) -: theglib(protocol) , therlib(protocol) +: Interface_FileReaderTool(protocol) { SetData(reader,protocol); } @@ -50,41 +50,14 @@ StepData_StepReaderTool::StepData_StepReaderTool void StepData_StepReaderTool::Prepare () { -// SetEntityNumbers a ete mis du cote de ReaderData, because beaucoup acces - DeclareAndCast(StepData_StepReaderData,stepdat,Data()); - try { - OCC_CATCH_SIGNALS - stepdat->SetEntityNumbers(Standard_True); - SetEntities(); - } - catch(Standard_Failure) { - const Handle(Message_Messenger) &sout = Message::DefaultMessenger(); - sout << " Exception Raised during Preparation :\n"; - sout << Standard_Failure::Caught()->GetMessageString(); - sout << "\n Now, trying to continue, but with presomption of failure\n"; - } -} - - // .... Gestion du Header : Preparation, lecture .... // - - -//======================================================================= -//function : PrepareHeader -//purpose : -//======================================================================= - -void StepData_StepReaderTool::PrepareHeader () -{ Standard_Integer i = 0; // Reconnaissance des types DeclareAndCast(StepData_StepReaderData,stepdat,Data()); while ( (i = stepdat->FindNextHeaderRecord(i)) != 0) { Handle(Standard_Transient) ent; -// Reconnaissance par la librairie - Handle(Interface_Check) ach = new Interface_Check; // faudrait le lister ... ? - RecognizeByLib (i,theglib,therlib,ach,ent); + RecognizeByLib (i,ent); if (ent.IsNull()) ent = Protocol()->UnknownEntity(); stepdat->BindEntity(i,ent); } @@ -92,6 +65,19 @@ void StepData_StepReaderTool::PrepareHeader () // Reste la Resolution des references : ne concerne que les sous-listes // Assuree par ReaderData stepdat->PrepareHeader(); + +// SetEntityNumbers a ete mis du cote de ReaderData, because beaucoup acces + try { + OCC_CATCH_SIGNALS + stepdat->SetEntityNumbers(Standard_True); + SetEntities(); + } + catch(Standard_Failure) { + const Handle(Message_Messenger) &sout = Message::DefaultMessenger(); + sout << " Exception Raised during Preparation :\n"; + sout << Standard_Failure::Caught()->GetMessageString(); + sout << "\n Now, trying to continue, but with presomption of failure\n"; + } } @@ -100,12 +86,9 @@ void StepData_StepReaderTool::PrepareHeader () //purpose : //======================================================================= -Standard_Boolean StepData_StepReaderTool::Recognize(const Standard_Integer num, - Handle(Interface_Check)& ach, - Handle(Standard_Transient)& ent) +Standard_Boolean StepData_StepReaderTool::Recognize (const Standard_Integer num, Handle(Standard_Transient)& ent) { -// Reconnaissance par la librairie - return RecognizeByLib (num,theglib,therlib,ach,ent); + return RecognizeByLib (num,ent); } diff --git a/src/StepData/StepData_StepReaderTool.hxx b/src/StepData/StepData_StepReaderTool.hxx index 998827823c..f322ecfff7 100644 --- a/src/StepData/StepData_StepReaderTool.hxx +++ b/src/StepData/StepData_StepReaderTool.hxx @@ -21,8 +21,6 @@ #include #include -#include -#include #include class StepData_StepReaderData; class StepData_Protocol; @@ -34,7 +32,7 @@ class Interface_InterfaceModel; //! provides references evaluation, plus access to litteral data //! and specific methods defined by FileReaderTool //! Remarks : works with a ReaderLib to load Entities -class StepData_StepReaderTool : public Interface_FileReaderTool +class StepData_StepReaderTool : public Interface_FileReaderTool { public: @@ -44,21 +42,17 @@ class StepData_StepReaderTool : public Interface_FileReaderTool //! to a Step Protocol. Defines the ReaderLib at this time Standard_EXPORT StepData_StepReaderTool(const Handle(StepData_StepReaderData)& reader, const Handle(StepData_Protocol)& protocol); - //! Bounds empty entities to records - //! Works only on data entities (skips header) - Standard_EXPORT void Prepare (); - //! Bounds empty entities and sub-lists to header records + //! Bounds empty entities to records //! works like Prepare + SetEntityNumbers, but for header //! (N.B.: in Header, no Ident and no reference) - Standard_EXPORT void PrepareHeader (); + //! Then works only on data entities + Standard_EXPORT void Prepare (); private: - //! recognizes records, by asking either ReaderLib (default) or - //! FileRecognizer (if defined) to do so. is to call - //! RecognizeByLib - Standard_EXPORT virtual Standard_Boolean Recognize (const Standard_Integer num, Handle(Interface_Check)& ach, Handle(Standard_Transient)& ent) Standard_OVERRIDE; + //! recognizes records, by asking ReaderLib. + Standard_EXPORT virtual Standard_Boolean Recognize (const Standard_Integer num, Handle(Standard_Transient)& ent) Standard_OVERRIDE; //! fills model's header; that is, gives to it Header entities //! and commands their loading. Also fills StepModel's Global @@ -73,9 +67,6 @@ class StepData_StepReaderTool : public Interface_FileReaderTool //! Ends file reading after reading all the entities //! Here, it binds in the model, Idents to Entities (for checks) Standard_EXPORT virtual void EndRead (const Handle(Interface_InterfaceModel)& amodel) Standard_OVERRIDE; - - Interface_GeneralLib theglib; - Interface_ReaderLib therlib; }; #endif // _StepData_StepReaderTool_HeaderFile diff --git a/src/StepData/StepData_UndefinedEntity.cxx b/src/StepData/StepData_UndefinedEntity.cxx index fdbadedb53..2e2c119683 100644 --- a/src/StepData/StepData_UndefinedEntity.cxx +++ b/src/StepData/StepData_UndefinedEntity.cxx @@ -13,7 +13,6 @@ #include -#include #include #include #include @@ -130,21 +129,6 @@ void StepData_UndefinedEntity::WriteParams (StepData_StepWriter& SW) const thenext->WriteParams(SW); } - void StepData_UndefinedEntity::GetFromAnother - (const Handle(StepData_UndefinedEntity)& another, - Interface_CopyTool& TC) -{ -// DeclareAndCast(StepData_UndefinedEntity,another,other); - thetype = new TCollection_HAsciiString (another->StepType()); - thecont = new Interface_UndefinedContent; - thecont->GetFromAnother(another->UndefinedContent(),TC); - - thesub = another->IsSub(); - if (another->IsComplex()) thenext = - GetCasted(StepData_UndefinedEntity,TC.Transferred(another->Next())); - else thenext.Nullify(); -} - void StepData_UndefinedEntity::FillShared (Interface_EntityIterator& list) const diff --git a/src/StepData/StepData_UndefinedEntity.hxx b/src/StepData/StepData_UndefinedEntity.hxx index 281db09d00..32490b2413 100644 --- a/src/StepData/StepData_UndefinedEntity.hxx +++ b/src/StepData/StepData_UndefinedEntity.hxx @@ -29,7 +29,6 @@ class Interface_UndefinedContent; class StepData_StepReaderData; class Interface_Check; class StepData_StepWriter; -class Interface_CopyTool; class Interface_EntityIterator; @@ -43,10 +42,8 @@ DEFINE_STANDARD_HANDLE(StepData_UndefinedEntity, MMgt_TShared) //! ANDOR clause in Express). class StepData_UndefinedEntity : public MMgt_TShared { + public: -public: - - //! creates an Unknown entity Standard_EXPORT StepData_UndefinedEntity(); @@ -84,37 +81,17 @@ public: //! write data to StepWriter, taken from UndefinedContent Standard_EXPORT void WriteParams (StepData_StepWriter& SW) const; - //! reads another UndefinedEntity from StepData - Standard_EXPORT void GetFromAnother (const Handle(StepData_UndefinedEntity)& other, Interface_CopyTool& TC); - //! Fills the list of shared entities Standard_EXPORT void FillShared (Interface_EntityIterator& list) const; - - - DEFINE_STANDARD_RTTIEXT(StepData_UndefinedEntity,MMgt_TShared) -protected: - - - - -private: - + private: Handle(TCollection_HAsciiString) thetype; Handle(Interface_UndefinedContent) thecont; Standard_Boolean thesub; Handle(StepData_UndefinedEntity) thenext; - - }; - - - - - - #endif // _StepData_UndefinedEntity_HeaderFile diff --git a/src/StepData/StepData_WriterLib.hxx b/src/StepData/StepData_WriterLib.hxx index a4cce78958..7c8d031438 100644 --- a/src/StepData/StepData_WriterLib.hxx +++ b/src/StepData/StepData_WriterLib.hxx @@ -21,15 +21,12 @@ #include #include -#include -#include class Interface_Protocol; class StepData_NodeOfWriterLib; class StepData_ReadWriteModule; class StepData_GlobalNodeOfWriterLib; - class StepData_WriterLib { public: @@ -46,10 +43,6 @@ class StepData_WriterLib //! which are bound to the given Protocol and its Resources Standard_EXPORT StepData_WriterLib(const Handle(Interface_Protocol)& aprotocol); - //! Creates an empty Library : it will later by filled by method - //! AddProtocol - Standard_EXPORT StepData_WriterLib(); - //! Adds a couple (Module-Protocol) to the Library, given the //! class of a Protocol. Takes Resources into account. //! (if is not of type TheProtocol, it is not added) @@ -85,6 +78,9 @@ class StepData_WriterLib Standard_EXPORT const Handle(Interface_Protocol)& Protocol() const; private: + + //! Creates an empty Library : it will later by filled by method AddProtocol + Standard_EXPORT StepData_WriterLib(); Handle(StepData_NodeOfWriterLib) thelist; Handle(StepData_NodeOfWriterLib) thecurr; diff --git a/src/StepFile/StepFile_Read.cxx b/src/StepFile/StepFile_Read.cxx index f8baa7b5d2..b6a55bfa37 100644 --- a/src/StepFile/StepFile_Read.cxx +++ b/src/StepFile/StepFile_Read.cxx @@ -158,8 +158,6 @@ Standard_Integer StepFile_Read // Analyse : par StepReaderTool StepData_StepReaderTool readtool (undirec,protocol); - - readtool.PrepareHeader(); readtool.Prepare(); #ifdef CHRONOMESURE diff --git a/src/StepSelect/StepSelect_StepType.cxx b/src/StepSelect/StepSelect_StepType.cxx index 309212946a..230a47c28f 100644 --- a/src/StepSelect/StepSelect_StepType.cxx +++ b/src/StepSelect/StepSelect_StepType.cxx @@ -28,13 +28,11 @@ static TCollection_AsciiString lastvalue; StepSelect_StepType::StepSelect_StepType () -: IFSelect_Signature ("Step Type") +: IFSelect_Signature ("Step Type"), + thelib(StepAP214::Protocol()), + theproto(StepAP214::Protocol()) { - const Handle(StepAP214_Protocol) &proto = StepAP214::Protocol(); - if (proto.IsNull()) Interface_InterfaceError::Raise("StepSelect_StepType"); - theproto = proto; - thelib.Clear(); - thelib.AddProtocol (theproto); + if (theproto.IsNull()) Interface_InterfaceError::Raise("StepSelect_StepType"); thename.Clear(); thename.AssignCat ("Step Type (Schema "); thename.AssignCat (theproto->SchemaName()); diff --git a/src/XSDRAWIGES/XSDRAWIGES.cxx b/src/XSDRAWIGES/XSDRAWIGES.cxx index f278647059..1f23ddad34 100644 --- a/src/XSDRAWIGES/XSDRAWIGES.cxx +++ b/src/XSDRAWIGES/XSDRAWIGES.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include -- 2.39.5